package com.zy.asrs.enums; public enum CheckStatusEnum { //状态 1: 未生成 0: 禁用 2:待盘 3:已盘 NO_CREATE(1, "未生成"), DISABLED(0, "禁用"), WAIT_CHECK(2, "待盘"), CHECKED(3, "已盘"), //调整单 ALLOW(4, "允许"), FORBID(5, "禁止"), MODIFIED(6, "已修改"); public final Integer type; public final String desc; CheckStatusEnum(Integer type, String desc) { this.type = type; this.desc = desc; } public static String getDescByType(Integer type) { for (CheckStatusEnum value : CheckStatusEnum.values()) { if (value.type.equals(type)) { return value.desc; } } return null; } }