package com.zy.core.enums; //提升机出入库模式 public enum LiftIoModeType { NONE(0, "未知"), IN(1, "入库"), OUT(2, "出库"), ; public Integer id; public String desc; LiftIoModeType(Integer id, String desc) { this.id = id; this.desc = desc; } public static LiftIoModeType get(Integer id) { if (null == id) { return null; } for (LiftIoModeType type : LiftIoModeType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static LiftIoModeType get(LiftIoModeType type) { if (null == type) { return null; } for (LiftIoModeType type2 : LiftIoModeType.values()) { if (type2 == type) { return type2; } } return null; } }