mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
package com.panzhihua.common.api;
 
import lombok.Getter;
 
/**
 * 攀枝花综治网格化 浪潮重点人员走访接口,人员类型
 * 
 * @author manailin
 * @date 2021/06/20
 */
@Getter
public enum LcVisitRecordKeyPersonLabelEnum {
    /**
     * 浪潮接口请求参数:吸毒人员类型
     */
    XD(1, "p01_drug"),
    /**
     * 浪潮接口请求参数:重精人员类型
     */
    JS(2, "p01_trouble_schiz"),
    /**
     * 浪潮接口请求参数:释放人员类型
     */
    XM(3, "p01_release"),
    /**
     * 浪潮接口请求参数:纠正人员类型
     */
    SJ(4, "p01_be_corrected");
 
    private final Integer code;
    private final String name;
 
    LcVisitRecordKeyPersonLabelEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
 
    public static int getCodeByName(String name) {
        for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) {
            if (item.name.equals(name)) {
                return item.getCode();
            }
        }
        return -1;
    }
 
    public static String getCnDescByName(Integer code) {
        for (LcVisitRecordKeyPersonLabelEnum item : LcVisitRecordKeyPersonLabelEnum.values()) {
            if (item.code.equals(code)) {
                return item.getName();
            }
        }
        return "其他";
    }
 
}