package com.zy.core.enums; /** * 四向穿梭车任务号类型 */ public enum ShuttleTaskNoType { IN(1, "入库"), OUT(2, "出库"), MOVE(3, "移动"), CHARGE(4, "充电"), RESET(5, "复位"), ; public Integer id; public String desc; ShuttleTaskNoType(Integer id, String desc) { this.id = id; this.desc = desc; } public static ShuttleTaskNoType get(Integer id) { if (null == id) { return null; } for (ShuttleTaskNoType type : ShuttleTaskNoType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static ShuttleTaskNoType get(ShuttleTaskNoType type) { if (null == type) { return null; } for (ShuttleTaskNoType type1 : ShuttleTaskNoType.values()) { if (type1 == type) { return type1; } } return null; } }