package com.zy.asrs.enums; public enum OrderTypeEnum { //上架派工单 PICKING(1, "上架派工单"), //备货调拨单 TRANSFER(2, "备货调拨单"), INVENTORY(3, "盘点单"), ADJUSTMENT(4, "库存调整单"), //备货单 STOCK(5, "备货单"); public Integer type; public String desc; OrderTypeEnum(Integer type, String desc) { this.type = type; this.desc = desc; } public static String getDescByType(Integer type) { for (OrderTypeEnum value : OrderTypeEnum.values()) { if (value.type.equals(type)) { return value.desc; } } return null; } }