package com.zzg.common.enums;
|
|
import lombok.AllArgsConstructor;
|
import lombok.Getter;
|
|
/**
|
* DeleteFlagEnum
|
*/
|
@Getter
|
@AllArgsConstructor
|
public enum StateProjectStatusEnum {
|
CANCELLATION(-1, "作废", "cancellation"),
|
SIMULATE(0, "模拟", "simulate"),
|
LEVY(1, "征收", "signed"),
|
HOUSEHOLD_SURVEY(2, "入户调查", "house"),
|
SUCCESS(3, "完成", "settled"),
|
;
|
|
public static String getValueByKey(Integer key) {
|
for (StateProjectStatusEnum v : StateProjectStatusEnum.values()) {
|
if (key.equals(v.getKey())) {
|
return v.getValue();
|
}
|
}
|
return "";
|
}
|
|
public static String getValue(Integer key) {
|
for (StateProjectStatusEnum v : StateProjectStatusEnum.values()) {
|
if (key.equals(v.key)) {
|
return v.value;
|
}
|
}
|
return "";
|
}
|
|
public static StateProjectStatusEnum getEnumByKey(Integer key) {
|
for (StateProjectStatusEnum v : StateProjectStatusEnum.values()) {
|
if (key.equals(v.key)) {
|
return v;
|
}
|
}
|
return null;
|
}
|
|
private final Integer key;
|
private final String value;
|
private final String jsonKey;
|
}
|