提交 | 用户 | 时间
|
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", "测点值"), |
|
18 |
PREDICTITEM("PREDICTITEM", "预测值"), |
|
19 |
IND("IND", "指标值"), |
|
20 |
PLAN("PLAN", "计划值"); |
|
21 |
|
|
22 |
private String code; |
|
23 |
private String desc; |
|
24 |
|
|
25 |
public static ModelParamType getEumByCode(String code) { |
|
26 |
if (code == null) { |
|
27 |
return null; |
|
28 |
} |
|
29 |
|
|
30 |
for (ModelParamType statusEnum : ModelParamType.values()) { |
|
31 |
if (statusEnum.getCode().equals(code)) { |
|
32 |
return statusEnum; |
|
33 |
} |
|
34 |
} |
|
35 |
return null; |
|
36 |
} |
|
37 |
} |