fuliqi
2024-08-07 748a94912543e37633d527bf1343fb78213dab0b
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
package enumeration.general;
 
import lombok.Getter;
 
/**
 * 区域枚举
 */
@Getter
public enum AreaDeptEnum {
    ZLJQ("自流井区", "510302", 201),
    GJQ("贡井区", "510303", 202),
    DAQ("大安区", "510304", 102),
    YTQ("沿滩区", "510311", 211),
    RX("荣县", "510321", 203),
    FSX("富顺县", "510322", 101),
    GXQ("高新区", "510399", 210),
    ;
 
    private final String name;
 
    private final String code;
 
    private final Integer deptId;
 
    AreaDeptEnum(String name, String code, Integer deptId) {
        this.name = name;
        this.code = code;
        this.deptId = deptId;
    }
 
    public static AreaDeptEnum fromCode(String code) {
        for (AreaDeptEnum type : AreaDeptEnum.values()) {
            if (type.getCode().equals(code) ) {
                return type;
            }
        }
        return null;
    }
 
}