提交 | 用户 | 时间
|
4eb113
|
1 |
package com.iailab.module.model.mcs.pre.enums; |
潘 |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author PanZhibao |
|
8 |
* @Description |
|
9 |
* @createTime 2024年11月11日 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
@AllArgsConstructor |
|
13 |
public enum ItemRunStatusEnum { |
|
14 |
PROCESSING(1, "处理中"), |
|
15 |
SUCCESS(2, "成功"), |
7f0bcd
|
16 |
FAIL(3, "失败"), |
1178da
|
17 |
MODELRESULTERROR(4, "模型结果异常"), |
D |
18 |
MODELRESULTSAVEERROR(5, "模型结果保存异常"); |
4eb113
|
19 |
|
潘 |
20 |
private Integer code; |
|
21 |
private String desc; |
|
22 |
|
|
23 |
public static ItemRunStatusEnum getEumByCode(Integer code) { |
|
24 |
if (code == null) { |
|
25 |
return null; |
|
26 |
} |
|
27 |
|
|
28 |
for (ItemRunStatusEnum statusEnum : ItemRunStatusEnum.values()) { |
|
29 |
if (statusEnum.getCode().equals(code)) { |
|
30 |
return statusEnum; |
|
31 |
} |
|
32 |
} |
|
33 |
return null; |
|
34 |
} |
|
35 |
} |