提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 开门方式 |
|
6 |
* @date 2022/06/02 10:15:21 |
|
7 |
*/ |
|
8 |
public enum EM_CUSTOMER_DEV_SETTING_DOOR_METHOD { |
|
9 |
/** |
|
10 |
* 未知 |
|
11 |
*/ |
|
12 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_UNKNOWN(-1, "未知"), |
|
13 |
/** |
|
14 |
* CTID 码开门 |
|
15 |
*/ |
|
16 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_CTID(0, "CTID 码开门"), |
|
17 |
/** |
|
18 |
* CTID 码 + 人脸组合开门 |
|
19 |
*/ |
|
20 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_CTID_AND_FACE(1, "CTID 码 + 人脸组合开门"), |
|
21 |
/** |
|
22 |
* CTID 码或人脸开门 |
|
23 |
*/ |
|
24 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_CTID_OR_FACE(2, "CTID 码或人脸开门"), |
|
25 |
/** |
|
26 |
* 腕带码或人脸开门 |
|
27 |
*/ |
|
28 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_WRISTBAND_OR_FACE(3, "腕带码或人脸开门"), |
|
29 |
/** |
|
30 |
* 腕带码或人脸或证件开门 |
|
31 |
*/ |
|
32 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_WRISTBAND_OR_FACE_OR_IDCARD(4, "腕带码或人脸或证件开门"), |
|
33 |
/** |
|
34 |
* 码1或码2开门 (码1、码2的含义由平台和设备双方约定) |
|
35 |
*/ |
|
36 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_CODE1_OR_CODE2(5, "码1或码2开门 (码1、码2的含义由平台和设备双方约定)"), |
|
37 |
/** |
|
38 |
* 人脸或腕带码或码2 |
|
39 |
*/ |
|
40 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_WRISTBAND_OR_FACE_OR_CODE2(6, "人脸或腕带码或码2"), |
|
41 |
/** |
|
42 |
* 人脸+(码1或码2) |
|
43 |
*/ |
|
44 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_FACE_AND_CODE1_OR_CODE2(7, "人脸+(码1或码2)"), |
|
45 |
/** |
|
46 |
* (人脸或证件)+(码1或者码2) |
|
47 |
*/ |
|
48 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_FACE_OR_IDCARD_AND_CODE1_OR_CODE2(8, "(人脸或证件)+(码1或者码2)"), |
|
49 |
/** |
|
50 |
* 人脸或码1或码2或者腕带码 |
|
51 |
*/ |
|
52 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD_FACE_OR_IDCARD_OR_CODE1_OR_CODE2(9, "人脸或码1或码2或者腕带码"); |
|
53 |
|
|
54 |
private int value; |
|
55 |
|
|
56 |
private String note; |
|
57 |
|
|
58 |
public String getNote() { |
|
59 |
return note; |
|
60 |
} |
|
61 |
|
|
62 |
public int getValue() { |
|
63 |
return value; |
|
64 |
} |
|
65 |
|
|
66 |
EM_CUSTOMER_DEV_SETTING_DOOR_METHOD(int givenValue, String note) { |
|
67 |
this.value = givenValue; |
|
68 |
this.note = note; |
|
69 |
} |
|
70 |
|
|
71 |
public static String getNoteByValue(int givenValue) { |
|
72 |
for (EM_CUSTOMER_DEV_SETTING_DOOR_METHOD enumType : EM_CUSTOMER_DEV_SETTING_DOOR_METHOD.values()) { |
|
73 |
if (givenValue == enumType.getValue()) { |
|
74 |
return enumType.getNote(); |
|
75 |
} |
|
76 |
} |
|
77 |
return null; |
|
78 |
} |
|
79 |
|
|
80 |
public static int getValueByNote(String givenNote) { |
|
81 |
for (EM_CUSTOMER_DEV_SETTING_DOOR_METHOD enumType : EM_CUSTOMER_DEV_SETTING_DOOR_METHOD.values()) { |
|
82 |
if (givenNote.equals(enumType.getNote())) { |
|
83 |
return enumType.getValue(); |
|
84 |
} |
|
85 |
} |
|
86 |
return -2; |
|
87 |
} |
|
88 |
|
|
89 |
} |