提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.data.point.common; |
H |
2 |
|
01d6f8
|
3 |
import lombok.AllArgsConstructor; |
潘 |
4 |
import lombok.Getter; |
|
5 |
|
a6de49
|
6 |
/** |
H |
7 |
* @author PanZhibao |
|
8 |
* @date 2021年04月25日 11:41 |
|
9 |
*/ |
01d6f8
|
10 |
@Getter |
潘 |
11 |
@AllArgsConstructor |
a6de49
|
12 |
public enum PointTypeEnum { |
01d6f8
|
13 |
MEASURE_POINT("MEASURE", "测量点"), |
潘 |
14 |
CALCULATE_POINT("CALCULATE", "计算点"), |
|
15 |
CONSTANT("CONSTANT", "常量点"); |
a6de49
|
16 |
|
H |
17 |
private String code; |
|
18 |
|
01d6f8
|
19 |
private String desc; |
a6de49
|
20 |
|
01d6f8
|
21 |
public static PointTypeEnum getEumByCode(String code) { |
潘 |
22 |
if (code == null) { |
|
23 |
return null; |
|
24 |
} |
a6de49
|
25 |
|
01d6f8
|
26 |
for (PointTypeEnum statusEnum : PointTypeEnum.values()) { |
潘 |
27 |
if (statusEnum.getCode().equals(code)) { |
|
28 |
return statusEnum; |
|
29 |
} |
|
30 |
} |
|
31 |
return null; |
a6de49
|
32 |
} |
H |
33 |
} |