package com.zy.core.enums; public enum LiftCommandModeType { NONE(-1, "未知类型"), MOVE(1, "提升机升降"), // PALLET_INOUT(2, "托盘出入"), LOCK(3, "锁定提升机"), UNLOCK(4, "解锁提升机"), RESET(5, "复位"), MOVE_CAR(6, "提升机升降小车"), PALLET_IN(7, "托盘入"), PALLET_OUT(8, "托盘出"), ; public Integer id; public String desc; LiftCommandModeType(Integer id, String desc) { this.id = id; this.desc = desc; } public static LiftCommandModeType get(Integer id) { if (null == id) { return null; } for (LiftCommandModeType type : LiftCommandModeType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static LiftCommandModeType get(LiftCommandModeType type) { if (null == type) { return null; } for (LiftCommandModeType type1 : LiftCommandModeType.values()) { if (type1 == type) { return type1; } } return null; } }