package com.iailab.module.model.mcs.pre.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2024年11月11日 */ @Getter @AllArgsConstructor public enum ItemRunStatusEnum { PROCESSING(1, "处理中"), SUCCESS(2, "成功"), FAIL(3, "失败"), MODELRESULTERROR(4, "模型结果异常"); private Integer code; private String desc; public static ItemRunStatusEnum getEumByCode(Integer code) { if (code == null) { return null; } for (ItemRunStatusEnum statusEnum : ItemRunStatusEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }