package com.imed.costaccount.enums; import java.util.Objects; /** * 计划状态枚举 */ public enum CheckStatusEnum { NOT_START(1, "未开始"), START(2, "查核中"), END(3, "已完成"), ; private Integer key; private String value; CheckStatusEnum(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 (CheckStatusEnum jobUserTypeEnum : CheckStatusEnum.values()) { if (Objects.equals(key, jobUserTypeEnum.key)) { return jobUserTypeEnum.value; } } return null; } }