whyclxw
7 天以前 a7e0682010b832c504f9ff7129dae36316f2f946
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
package com.whyc.constant;
 
/**
 * TODO 每次新增流程时,需要持续维护
 */
public enum WorkflowTypeEnum {
 
    DEVICE_DEFAULT(0,"未定义的流程申请单","FG-WDY"),
    DEVICE_REPAIR(1,"设备维修申请单","FG-WX"),
    DEVICE_IN(2,"设备入库申请单","FG-RK"),
    DEVICE_SCRAP(3,"设备报废申请单","FG-BF"),
    DEVICE_OUT(4,"设备出库申请单","FG-CK");
 
 
    private Integer type;
    private String name;
 
    private String namingPrefix;
 
    WorkflowTypeEnum(Integer type, String name, String namingPrefix) {
        this.type = type;
        this.name = name;
        this.namingPrefix = namingPrefix;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getNamingPrefix() {
        return namingPrefix;
    }
 
    public void setNamingPrefix(String namingPrefix) {
        this.namingPrefix = namingPrefix;
    }
 
    public static WorkflowTypeEnum getByType(Integer type) {
        for (WorkflowTypeEnum value : WorkflowTypeEnum.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return DEVICE_DEFAULT;
    }
}