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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package com.netsdk.lib.enumeration;
 
 
/** 
* @author 291189
* @description  事件报警类型 
* @date 2022/08/22 16:50:06
*/
public enum EM_WATER_DETECTION_ALARM_TYPE {
/**
未知
*/
EM_WATER_DETECTION_ALARM_TYPE_UNKNOWN(0,"未知"),
/**
水质类别
*/
EM_WATER_DETECTION_ALARM_TYPE_QUALITY(1,"水质类别"),
/**
PH
*/
EM_WATER_DETECTION_ALARM_TYPE_PH(2,"PH"),
/**
浊度值
*/
EM_WATER_DETECTION_ALARM_TYPE_NTU(3,"浊度值"),
/**
氨氮值
*/
EM_WATER_DETECTION_ALARM_TYPE_NH3_N(4,"氨氮值"),
/**
总氮值
*/
EM_WATER_DETECTION_ALARM_TYPE_TN(5,"总氮值"),
/**
透明度值
*/
EM_WATER_DETECTION_ALARM_TYPE_SD(6,"透明度值"),
/**
化学需氧量
*/
EM_WATER_DETECTION_ALARM_TYPE_COD(7,"化学需氧量"),
/**
亚硝酸盐氮
*/
EM_WATER_DETECTION_ALARM_TYPE_NN(8,"亚硝酸盐氮"),
/**
溶解氧
*/
EM_WATER_DETECTION_ALARM_TYPE_DO(9,"溶解氧"),
/**
叶绿素a
*/
EM_WATER_DETECTION_ALARM_TYPE_CHL_A(10,"叶绿素a"),
/**
总磷
*/
EM_WATER_DETECTION_ALARM_TYPE_TP(11,"总磷"),
/**
高锰酸盐指数范围
*/
EM_WATER_DETECTION_ALARM_TYPE_CODMN(12,"高锰酸盐指数范围"),
/**
悬浮物
*/
EM_WATER_DETECTION_ALARM_TYPE_SS(13,"悬浮物"),
/**
五日生化需氧量
*/
EM_WATER_DETECTION_ALARM_TYPE_BOD_5(14,"五日生化需氧量"),
/**
硝酸盐
*/
EM_WATER_DETECTION_ALARM_TYPE_NO3_N(15,"硝酸盐"),
/**
富营养状况指数
*/
EM_WATER_DETECTION_ALARM_TYPE_TSI(16,"富营养状况指数"),
/**
黑臭等级
*/
EM_WATER_DETECTION_ALARM_TYPE_SMELLY_LEVEL(17,"黑臭等级");
 
private int value;
 
private String note;
 
public String getNote() {
        return note;
    }
 
public int getValue() {
        return value;
    }
 
EM_WATER_DETECTION_ALARM_TYPE(int givenValue, String note) {
        this.value = givenValue;
        this.note = note;
    }
 
public static String getNoteByValue(int givenValue) {
        for (EM_WATER_DETECTION_ALARM_TYPE enumType : EM_WATER_DETECTION_ALARM_TYPE.values()) {
            if (givenValue == enumType.getValue()) {
                return enumType.getNote();
            }
        }
        return null;
    }
 
public static int getValueByNote(String givenNote) {
        for (EM_WATER_DETECTION_ALARM_TYPE enumType : EM_WATER_DETECTION_ALARM_TYPE.values()) {
            if (givenNote.equals(enumType.getNote())) {
                return enumType.getValue();
            }
        }
        return -1;
    }
 
public static EM_WATER_DETECTION_ALARM_TYPE getEnum(int value) {
        for (EM_WATER_DETECTION_ALARM_TYPE e : EM_WATER_DETECTION_ALARM_TYPE.values()) {
            if (e.getValue() == value)
                return e;
        }
        return EM_WATER_DETECTION_ALARM_TYPE.EM_WATER_DETECTION_ALARM_TYPE_UNKNOWN;
    }
 
}