package com.zy.asrs.wms.asrs.entity.enums; /** * 库位高度类型 */ public enum LocTypeHeightType { LOW(1, "low", "低库位"), MIDDLE(2, "middle", "中库位"), HEIGHT(3, "height", "高库位"), ; public Integer id; public String flag; public String desc; LocTypeHeightType(Integer id, String flag, String desc) { this.id = id; this.flag = flag; this.desc = desc; } public static LocTypeHeightType get(Integer id) { for (LocTypeHeightType value : LocTypeHeightType.values()) { if (value.id.equals(id)) { return value; } } return null; } public static LocTypeHeightType get(String flag) { for (LocTypeHeightType value : LocTypeHeightType.values()) { if (value.flag.equals(flag)) { return value; } } return null; } }