package com.zy.core.enums; public enum SteHisTaskStatusType { INIT(0, "初始"), COMPLETE(1, "执行完成"), REMOVE(2, "删除"), ; public Integer id; public String desc; SteHisTaskStatusType(Integer id, String desc) { this.id = id; this.desc = desc; } public static SteHisTaskStatusType get(Short id) { if (null == id) { return null; } for (SteHisTaskStatusType type : SteHisTaskStatusType.values()) { if (type.id.equals(id.intValue())) { return type; } } return null; } public static SteHisTaskStatusType get(SteHisTaskStatusType type) { if (null == type) { return null; } for (SteHisTaskStatusType statusType : SteHisTaskStatusType.values()) { if (statusType == type) { return statusType; } } return null; } }