1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package com.gkhy.testFourierSpecialGasMonitor.enums;
|
|
| import lombok.Getter;
|
| @Getter
| public enum GasConcentrationStateEnum {
|
|
| NORMAL((Integer) 0, "正常"),
| NO_DATA_FROM_ONSITE_EQUIPMENT_FOR_5_MINUTES((Integer) 1, "现场设备连续5min无数据")
| ;
|
| private Integer state;
| private String desc;
|
| GasConcentrationStateEnum(Integer state, String desc) {
| this.state = state;
| this.desc = desc;
| }
|
| public static String getValue(Integer key){
| for (GasConcentrationStateEnum value : GasConcentrationStateEnum.values()) {
| if (value.state.equals(key)){
| return value.desc;
| }
| }
| return null;
| }
| }
|
|