123456789101112131415161718192021222324252627282930313233343536373839 |
- package com.imed.costaccount.common.enums;
- import java.util.Objects;
- /**
- * 计划状态枚举
- */
- public enum PlanStatusEnum {
- NOT_START(1, "未开始"),
- START(2, "进行中"),
- END(3, "已结束"),
- ;
- private Integer key;
- private String value;
- PlanStatusEnum(Integer key, String value) {
- this.key = key;
- this.value = value;
- }
- public Integer getKey() {
- return key;
- }
- public String getValue() {
- return value;
- }
- public static String getByCode(Integer key) {
- for (PlanStatusEnum jobUserTypeEnum : PlanStatusEnum.values()) {
- if (Objects.equals(key, jobUserTypeEnum.key)) {
- return jobUserTypeEnum.value;
- }
- }
- return null;
- }
- }
|