liujie
2023-05-22 9f2315d92cc93f8f431805a10ea9ce3f79fa7eb2
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
57
58
59
60
61
62
63
package com.stylefeng.guns.modular.system.enums;
 
public enum UserFeeSettingEnum {
 
    LH_FSH(1, "LH-FSH"),
    CHASSIS_FEE(2, "Chassis fee"),
    PREPULL(3, "Prepull"),
    CHASSIS_SPLIT(4, "Chassis split"),
    DETENTION_CONGESTION(5, "Detention/Congestion"),
    DRY_RUN(6, "DRY RUN"),
    OVERWEIGHT(7, "Overweight"),
    HAZMAT(8, "Hazmat"),
    URGENT_SEE(9, "Urgent see"),
    EXAM_FEE(10, "Exam fee"),
    PIERPASS(11, "Pierpass"),
    CTF(12, "CTF"),
    STORAGE(13, "Storage"),
    DELIVERY_APPOINTMENT(14, "Delivery appointment"),
    RESIDENTIAL_DELIVERY(15, "Residential delivery"),
    WALMART_DELIVERY(16, "Walmart delivery"),
    COSTCO_DELIVERY(17, "Costco delivery"),
    OPEN_FIELD_DELIVERY(18, "Open field delivery"),
    TRADE_SHOW_DELIVERY(19,"Trade show delivery"),
    SCHOOL_DELIVERY(20, "School delivery"),
    FARM_DELIVERY(21, "Farm delivery"),
    CONTAINER_FREIGHT_STATION_DELIVERY(22, "Container freight station delivery");
 
    private String desc;
 
 
    private int code;
 
 
    UserFeeSettingEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
 
    public String getDesc() {
        return desc;
    }
 
    public int getCode() {
        return code;
    }
 
    /**
     * 通过code获取枚举
     *
     * @param code
     * @return
     */
    public static UserFeeSettingEnum fromCode(Integer code) {
        UserFeeSettingEnum[] resultTypes = UserFeeSettingEnum.values();
        for (UserFeeSettingEnum resultType : resultTypes) {
            if (code.equals(resultType.getCode())) {
                return resultType;
            }
        }
        return null;
    }
 
}