提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 闸机类型 |
|
7 |
* @date 2021/2/7 |
|
8 |
*/ |
|
9 |
public enum EM_GATE_TYPE { |
|
10 |
/** 未知 */ |
|
11 |
EM_ASG_GATE_TYPE_UNKNOWN(-1, "未知"), |
|
12 |
/** 摆闸1 */ |
|
13 |
EM_ASG_GATE_TYPE_SWING_GATE_ONE(0, "摆闸1"), |
|
14 |
/** 摆闸2 */ |
|
15 |
EM_ASG_GATE_TYPE_SWING_GATE_TWO(1, "摆闸2"), |
|
16 |
/** 翼闸1 */ |
|
17 |
EM_ASG_GATE_TYPE_WING_GATE_ONE(2, "翼闸1"), |
|
18 |
/** 翼闸2 */ |
|
19 |
EM_ASG_GATE_TYPE_WING_GATE_TWO(3, "翼闸2"), |
|
20 |
/** 翼闸3 */ |
|
21 |
EM_ASG_GATE_TYPE_WING_GATE_THREE(4, "翼闸3"), |
|
22 |
/** 三棍闸1 */ |
|
23 |
EM_ASG_GATE_TYPE_THREE_STICK_GATE_ONE(10, "三棍闸1"), |
|
24 |
/** 三棍闸2 */ |
|
25 |
EM_ASG_GATE_TYPE_THREE_STICK_GATE_TWO(11, "三棍闸2"), |
|
26 |
/** 摆闸3 */ |
|
27 |
EM_ASG_GATE_TYPE_SWING_GATE_THREE(20, "摆闸3"), |
|
28 |
/** 摆闸4 */ |
|
29 |
EM_ASG_GATE_TYPE_SWING_GATE_FOUR(21, "摆闸4"), |
|
30 |
/** 摆闸5 */ |
|
31 |
EM_ASG_GATE_TYPE_SWING_GATE_FIVE(22, "摆闸5"); |
|
32 |
|
|
33 |
private int type; |
|
34 |
private String desc; |
|
35 |
|
|
36 |
EM_GATE_TYPE(int type, String desc) { |
|
37 |
this.type = type; |
|
38 |
this.desc = desc; |
|
39 |
} |
|
40 |
|
|
41 |
public static EM_GATE_TYPE getGateType(int type) { |
|
42 |
for (EM_GATE_TYPE gateType : EM_GATE_TYPE.values()) { |
|
43 |
if (gateType.type == type) { |
|
44 |
return gateType; |
|
45 |
} |
|
46 |
} |
|
47 |
return EM_ASG_GATE_TYPE_UNKNOWN; |
|
48 |
} |
|
49 |
|
|
50 |
public int getType() { |
|
51 |
return type; |
|
52 |
} |
|
53 |
|
|
54 |
public void setType(int type) { |
|
55 |
this.type = type; |
|
56 |
} |
|
57 |
|
|
58 |
public String getDesc() { |
|
59 |
return desc; |
|
60 |
} |
|
61 |
|
|
62 |
public void setDesc(String desc) { |
|
63 |
this.desc = desc; |
|
64 |
} |
|
65 |
} |