郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
package com.gkhy.safePlatform.riskCtrl.enums;
 
import java.util.HashMap;
import java.util.Map;
 
public enum ReportBizEnum {
 
 
    PREVENT_RISK((byte) 1, "双重预防隐患条件报表"),
    EMERGENCY_PRACTICE((byte)2,"应急管理应急演练报表"),
    INCIDENT_COUNT((byte) 3, "事故统计报表")
    ;
 
    public byte getType() {
        return type;
    }
 
    public void setType(byte type) {
        this.type = type;
    }
 
    public String getDesc() {
        return desc;
    }
 
    public void setDesc(String desc) {
        this.desc = desc;
    }
 
    ReportBizEnum(byte type, String desc) {
        this.type = type;
        this.desc = desc;
    }
 
    byte type;
    String desc;
 
    static Map<Byte, ReportBizEnum> map;
 
    static {
        map = new HashMap<>();
        for (ReportBizEnum reportBizEnum : ReportBizEnum.values()) {
            map.put(reportBizEnum.getType(), reportBizEnum);
        }
    }
 
    public static ReportBizEnum parse(Byte type) {
        return map.get(type);
    }
 
}