提交 | 用户 | 时间
|
e78121
|
1 |
package com.iailab.module.model.mdk.common.enums; |
潘 |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* 模型参数类型 |
|
8 |
* |
|
9 |
* @author PanZhibao |
|
10 |
* @Description |
|
11 |
* @createTime 2024年11月08日 |
|
12 |
*/ |
|
13 |
@Getter |
|
14 |
@AllArgsConstructor |
|
15 |
public enum ModelParamType { |
|
16 |
|
|
17 |
DATAPOINT("DATAPOINT", "测点值"), |
19a4fb
|
18 |
NORMALITEM("NormalItem", "预测值(NormalItem)"), |
D |
19 |
MERGEITEM("MergeItem", "MergeItem"), |
e78121
|
20 |
IND("IND", "指标值"), |
潘 |
21 |
PLAN("PLAN", "计划值"); |
|
22 |
|
|
23 |
private String code; |
|
24 |
private String desc; |
|
25 |
|
|
26 |
public static ModelParamType getEumByCode(String code) { |
|
27 |
if (code == null) { |
|
28 |
return null; |
|
29 |
} |
|
30 |
|
|
31 |
for (ModelParamType statusEnum : ModelParamType.values()) { |
|
32 |
if (statusEnum.getCode().equals(code)) { |
|
33 |
return statusEnum; |
|
34 |
} |
|
35 |
} |
|
36 |
return null; |
|
37 |
} |
|
38 |
} |