package com.zy.core.enums; //货叉提升机任务模式 public enum ForkLiftTaskModeType { NONE(0, "未知"), PICK_UP(1, "取货"), PUT_DOWN(2, "放货"), PICK_PUT(3, "取放货"), SHUTTLE_SWITCH(4, "小车换层"), MOVE(5, "提升机移动"), ; public Integer id; public String desc; ForkLiftTaskModeType(Integer id, String desc) { this.id = id; this.desc = desc; } public static ForkLiftTaskModeType get(Integer id) { if (null == id) { return null; } for (ForkLiftTaskModeType type : ForkLiftTaskModeType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static ForkLiftTaskModeType get(ForkLiftTaskModeType type) { if (null == type) { return null; } for (ForkLiftTaskModeType type2 : ForkLiftTaskModeType.values()) { if (type2 == type) { return type2; } } return null; } }