CZT
2023-11-27 c206acfaedc69c390fb67daa81bc686f58a212ef
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
package com.ld.igds.constant;
 
/**
 * 警告等级1
 * @author
 */
public enum WarnLevel {
 
    LEVEL_01("01", "一级警告"),
    LEVEL_02("02", "二级警告"),
    LEVEL_03("03", "三级警告");
    private String code;
    private String msg;
 
    WarnLevel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    public String getCode() {
        return code;
    }
    
    public String getMsg() {
        return msg;
    }
 
    public static String getMsg(String code) {
        if(null == code) return "";
 
        if(WarnLevel.LEVEL_01.getCode().equals(code)) return WarnLevel.LEVEL_01.getMsg();
        if(WarnLevel.LEVEL_02.getCode().equals(code)) return WarnLevel.LEVEL_02.getMsg();
        if(WarnLevel.LEVEL_03.getCode().equals(code)) return WarnLevel.LEVEL_03.getMsg();
 
        return "";
        
    }
}