czt
2025-12-03 53fab3f56e8335fbf39fc07c4e10f6abdb0505bb
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
package com.fzzy.igds.constant;
 
/**
 * @Description 警告通知类型:短信,语音
 * @Author CZT
 * @Date 2025/11/25 15:43
 */
public enum NoticeType {
 
 
    /**
     *
     */
    NONE("NONE", "不通知"),
    SMS("SMS", "短信通知"),
    EMAIL("EMAIL", "邮箱通知"),
    VOICE("VOICE", "语音通知"),
    WECHAT("WECHAT", "微信通知");
 
    private String code;
    private String name;
 
    NoticeType(String code, String name) {
        this.code = code;
        this.name = name;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getName() {
        return name;
    }
 
    public static String getName(String code) {
        if (null == code) return null;
 
        if (NoticeType.NONE.getCode().equals(code)) return NoticeType.NONE.getName();
        if (NoticeType.SMS.getCode().equals(code)) return NoticeType.SMS.getName();
        if (NoticeType.EMAIL.getCode().equals(code)) return NoticeType.EMAIL.getName();
        if (NoticeType.VOICE.getCode().equals(code)) return NoticeType.VOICE.getName();
        if (NoticeType.WECHAT.getCode().equals(code)) return NoticeType.WECHAT.getName();
 
        return code;
    }
}