提交 | 用户 | 时间
|
68413a
|
1 |
package com.iailab.module.data.common.enums; |
J |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
218503
|
7 |
* 指标类型 |
潘 |
8 |
* |
68413a
|
9 |
* @author PanZhibao |
J |
10 |
* @Description |
|
11 |
* @createTime 2023年05月03日 19:10:00 |
|
12 |
*/ |
|
13 |
@Getter |
|
14 |
@AllArgsConstructor |
|
15 |
public enum ItemTypeEnum { |
|
16 |
|
cf757d
|
17 |
ATOM("ATOM", "原子指标"), |
68413a
|
18 |
|
cf757d
|
19 |
DER("DER", "派生指标"), |
68413a
|
20 |
|
cf757d
|
21 |
CAL("CAL", "复合指标"); |
68413a
|
22 |
|
J |
23 |
private String code; |
cf757d
|
24 |
private String desc; |
潘 |
25 |
|
|
26 |
public static ItemTypeEnum getEumByCode(String code) { |
|
27 |
if (code == null) { |
|
28 |
return null; |
|
29 |
} |
|
30 |
|
|
31 |
for (ItemTypeEnum statusEnum : ItemTypeEnum.values()) { |
|
32 |
if (statusEnum.getCode().equals(code)) { |
|
33 |
return statusEnum; |
|
34 |
} |
|
35 |
} |
|
36 |
return null; |
|
37 |
} |
68413a
|
38 |
} |