Jay
2024-11-08 02722a3f9eca857ce7fffea352e9f7ee692a1b71
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
package com.iailab.netsdk.lib.enumeration;
 
/**
 * @author 251823
 * @description 用户的权限列表
 * @date 2023/03/16 09:04:48
 */
public enum EM_ALARM_USERAUTHORITY {
    /**
     * 未知
     */
    EM_ALARM_USERAUTHORITY_UNKNOWN(0, "未知"),
    /**
     * 布防
     */
    EM_ALARM_USERAUTHORITY_ARMING(1, "布防"),
    /**
     * 强制布防
     */
    EM_ALARM_USERAUTHORITY_FORCEARMING(2, "强制布防"),
    /**
     * 撤防
     */
    EM_ALARM_USERAUTHORITY_DISARM(3, "撤防"),
    /**
     * 旁路
     */
    EM_ALARM_USERAUTHORITY_BYPASS(4, "旁路"),
    /**
     * 永久旁路
     */
    EM_ALARM_USERAUTHORITY_PERMANENTBYPASS(5, "永久旁路"),
    /**
     * 消警
     */
    EM_ALARM_USERAUTHORITY_ALARMCONFIRM(6, "消警"),
    /**
     * 查询日志
     */
    EM_ALARM_USERAUTHORITY_QUERYLOG(7, "查询日志"),
    /**
     * 调试模式
     */
    EM_ALARM_USERAUTHORITY_DEBUGMODE(8, "调试模式"),
    /**
     * 更改基本程序,如:升级程序
     */
    EM_ALARM_USERAUTHORITY_UPGRADE(9, "更改基本程序,如:升级程序"),
    /**
     * 添加/更改配置参数
     */
    EM_ALARM_USERAUTHORITY_SYSTEMCONFIG(10, "添加/更改配置参数"),
    /**
     * 用户管理
     */
    EM_ALARM_USERAUTHORITY_USERMANAGEMENT(11, "用户管理");
 
    private int value;
 
    private String note;
 
    public String getNote() {
        return note;
    }
 
    public int getValue() {
        return value;
    }
 
    EM_ALARM_USERAUTHORITY(int givenValue, String note) {
        this.value = givenValue;
        this.note = note;
    }
 
    public static String getNoteByValue(int givenValue) {
        for (EM_ALARM_USERAUTHORITY enumType : EM_ALARM_USERAUTHORITY.values()) {
            if (givenValue == enumType.getValue()) {
                return enumType.getNote();
            }
        }
        return null;
    }
 
    public static int getValueByNote(String givenNote) {
        for (EM_ALARM_USERAUTHORITY enumType : EM_ALARM_USERAUTHORITY.values()) {
            if (givenNote.equals(enumType.getNote())) {
                return enumType.getValue();
            }
        }
        return -1;
    }
}