package com.zzg.common.enums;
|
|
public enum CompensateTypeEnum {
|
HOUSE_ACQUISITION_COMPENSATION_FEE(1, "征收房屋补偿费"),
|
POLICY_COMPENSATION_FEE(2, "政策性补偿费"),
|
POLICY_SUBSIDY_FEE(3, "政策性补助费"),
|
POLICY_ALLOWANCE(4, "政策性补贴"),
|
EARLY_RELOCATION_REWARD(5, "提前搬迁奖励");
|
|
private final int code;
|
private final String description;
|
|
CompensateTypeEnum(int code, String description) {
|
this.code = code;
|
this.description = description;
|
}
|
public static int getCode(String description) {
|
for (CompensateTypeEnum type : CompensateTypeEnum.values()) {
|
if (type.getDescription().equalsIgnoreCase(description)) {
|
return type.getCode();
|
}
|
}
|
return 0;
|
}
|
public static String getDescription(Integer key) {
|
for (CompensateTypeEnum v : CompensateTypeEnum.values()) {
|
if (key.equals(v.getCode())) {
|
return v.getDescription();
|
}
|
}
|
return "";
|
}
|
public int getCode() {
|
return code;
|
}
|
|
public String getDescription() {
|
return description;
|
}
|
|
@Override
|
public String toString() {
|
return this.description;
|
}
|
}
|