package com.zy.core.enums; /** * 牛眼提升机任务类型枚举 */ public enum NyLiftTaskModelType { MOVE_TRAY(1, "移托盘"), MOVE_CAR(2, "移小车") ; public Integer id; public String desc; NyLiftTaskModelType(Integer id, String desc) { this.id = id; this.desc = desc; } public static NyLiftTaskModelType get(Integer id) { if (null == id) { return null; } for (NyLiftTaskModelType type : NyLiftTaskModelType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static NyLiftTaskModelType get(NyLiftTaskModelType type) { if (null == type) { return null; } for (NyLiftTaskModelType type2 : NyLiftTaskModelType.values()) { if (type2 == type) { return type2; } } return null; } }