package com.gkhy.safePlatform.specialWork.enums; import java.util.HashMap; import java.util.Map; public enum WorkApprovalStepResultEnum { WAIT_TO_START((byte)-1,"未开始"), RESULT_IN_APPROVAL((byte)0,"审批中"), RESULT_SUCCESS((byte)1,"通过"), RESULT_ABORD((byte)2,"终止"), RESULT_OVER_TIME((byte)5,"作业审批超时"), RESULT_EXPIRATION_DATE((byte)6,"分析人审批时效过期") ; private Byte result; private String desc; WorkApprovalStepResultEnum(Byte result, String desc) { this.result = result; this.desc = desc; } static Map map; static { map = new HashMap<>(); for (WorkApprovalStepResultEnum e : WorkApprovalStepResultEnum.values()) { map.put(e.result, e); } } public static WorkApprovalStepResultEnum parse(Byte type) { return map.get(type); } public Byte getResult() { return result; } public void setResult(Byte result) { this.result = result; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } }