干燥机配套车间生产管理系统/云平台服务端
baoshiwei
2023-03-10 58d42ccf875b120f40fddce63752298e916e0b0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package org.jeecg.common.constant.enums;
 
import org.jeecg.common.util.oConvertUtils;
 
/**
 * 文件类型
 */
public enum FileTypeEnum {
    //    文档类型(folder:文件夹 excel:excel doc:word pp:ppt image:图片  archive:其他文档 video:视频)
//    FOLDER
    xls(".xls","excel","excel"),
    xlsx(".xlsx","excel","excel"),
    doc(".doc","doc","word"),
    docx(".docx","doc","word"),
    ppt(".ppt","pp","ppt"),
    pptx(".pptx","pp","ppt"),
    gif(".gif","image","图片"),
    jpg(".jpg","image","图片"),
    jpeg(".jpeg","image","图片"),
    png(".png","image","图片"),
    txt(".txt","text","文本"),
    avi(".avi","video","视频"),
    mov(".mov","video","视频"),
    rmvb(".rmvb","video","视频"),
    rm(".rm","video","视频"),
    flv(".flv","video","视频"),
    mp4(".mp4","video","视频"),
    zip(".zip","zip","压缩包"),
    pdf(".pdf","pdf","pdf");
 
    private String type;
    private String value;
    private String text;
    private FileTypeEnum(String type,String value,String text){
        this.type = type;
        this.value = value;
        this.text = text;
    }
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
    public String getValue() {
        return value;
    }
 
    public void setValue(String value) {
        this.value = value;
    }
 
    public String getText() {
        return text;
    }
 
    public void setText(String text) {
        this.text = text;
    }
 
    public static FileTypeEnum getByType(String type){
        if (oConvertUtils.isEmpty(type)) {
            return null;
        }
        for (FileTypeEnum val : values()) {
            if (val.getType().equals(type)) {
                return val;
            }
        }
        return null;
    }
 
}