package com.zy.core.enums; //货叉提升机任务确认 public enum ForkLiftConfirmType { NO(0, "未确认"), CONFIRM(1, "已确认"), ; public Integer id; public String desc; ForkLiftConfirmType(Integer id, String desc) { this.id = id; this.desc = desc; } public static ForkLiftConfirmType get(Integer id) { if (null == id) { return null; } for (ForkLiftConfirmType type : ForkLiftConfirmType.values()) { if (type.id.equals(id)) { return type; } } return null; } public static ForkLiftConfirmType get(ForkLiftConfirmType type) { if (null == type) { return null; } for (ForkLiftConfirmType type2 : ForkLiftConfirmType.values()) { if (type2 == type) { return type2; } } return null; } }