yanghb
2024-12-24 fe6e43d5e1144156d0ca4e9d6080c9821c25d97c
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
package com.zzg.common.enums;
 
public enum ResettlementTypeEnum {
    MONKEY(1, "货币赔偿"),
    GOODS(2, "房屋产权置换");
    private final Integer value;
 
    private final String text;
    public static String getDescription(Integer key) {
        for (ResettlementTypeEnum v : ResettlementTypeEnum.values()) {
            if (key.equals(v.getValue())) {
                return v.getText();
            }
        }
        return "";
    }
 
    public static int getValue(String description) {
        for (ResettlementTypeEnum category : ResettlementTypeEnum.values()) {
            if (category.getText().equalsIgnoreCase(description)) {
                return category.getValue();
            }
        }
        return 0;
    }
    ResettlementTypeEnum(Integer value, String text) {
        this.value = value;
        this.text = text;
    }
 
    public Integer getValue() {
        return value;
    }
 
    public String getText() {
        return text;
    }
}