package com.zy.core.enums; public enum ForkLiftProtocolStatusType { NONE(-1, "离线"), IDLE(0, "空闲"), PICK_UP(1, "取货中"), PUT_DOWN(2, "放货中"), WAITING(98, "等待确认"), ERROR(99, "故障"), ; public Integer id; public String desc; ForkLiftProtocolStatusType(Integer id, String desc) { this.id = id; this.desc = desc; } public static ForkLiftProtocolStatusType get(Integer id) { if (null == id) { return null; } for (ForkLiftProtocolStatusType type : ForkLiftProtocolStatusType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static ForkLiftProtocolStatusType get(ForkLiftProtocolStatusType type) { if (null == type) { return null; } for (ForkLiftProtocolStatusType type2 : ForkLiftProtocolStatusType.values()) { if (type2 == type) { return type2; } } return null; } }