package com.zy.core.enums; /** * 四向穿梭车命令类型 */ public enum ShuttleCommandModeType { NONE(-1, "未知类型"), MOVE(1, "移动"), IN_LIFT(2, "进提升机"), OUT_LIFT(3, "出提升机"), CHARGE_OPEN(4, "充电开"), CHARGE_CLOSE(5, "充电关"), PALLET_LIFT(6, "托盘顶升"), PALLET_DOWN(7, "托盘下降"), RESET(8, "复位"), UPDATE_LOCATION(9, "更新坐标"), ; public Integer id; public String desc; ShuttleCommandModeType(Integer id, String desc) { this.id = id; this.desc = desc; } public static ShuttleCommandModeType get(Integer id) { if (null == id) { return null; } for (ShuttleCommandModeType type : ShuttleCommandModeType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static ShuttleCommandModeType get(ShuttleCommandModeType type) { if (null == type) { return null; } for (ShuttleCommandModeType type1 : ShuttleCommandModeType.values()) { if (type1 == type) { return type1; } } return null; } }