Pu Zhibing
2025-02-27 f0a9a41697a8568e8b3bd3436c450e68b3298916
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
package com.panzhihua.common.enums;
 
import lombok.Getter;
 
/**
 * desc 本地事件类型和浪潮接口对应的事件类型的对应关系 本地事件类型1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报 7宣传教育
 * 
 * @author manaiilin
 */
@Getter
public enum LocalEventToLangChaoEventTypeEnum {
    ZA(1, "6", "治安隐患"), GG(2, "4", "公共服务"), MD(3, "5", "矛盾纠纷"), TF(5, "1b62afbccc2a4bb98125f999b7133242", "突发事件"),
    TSRQ(6, "7da14163537b4b7e9a73ae28f4a58b72", "特殊人群信息上报"), XC(8, "9306ca7327a44b5ca474426f2da0e206", "宣传教育");
 
    private final Integer code;
    private final String name;
    private final String eventName;
 
    LocalEventToLangChaoEventTypeEnum(Integer code, String name, String eventName) {
        this.code = code;
        this.name = name;
        this.eventName = eventName;
    }
 
    public static String getCodeByName(Integer code) {
        for (LocalEventToLangChaoEventTypeEnum item : LocalEventToLangChaoEventTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return ZA.getName();
    }
 
    public static String getEventNameByCode(Integer code) {
        for (LocalEventToLangChaoEventTypeEnum item : LocalEventToLangChaoEventTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getEventName();
            }
        }
        return ZA.getEventName();
    }
}