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
| package com.zy.core.enums;
|
| public enum LiftCommandModeType {
|
| NONE(-1, "未知类型"),
| MOVE(1, "提升机升降"),
| // PALLET_INOUT(2, "托盘出入"),
| LOCK(3, "锁定提升机"),
| UNLOCK(4, "解锁提升机"),
| RESET(5, "复位"),
| MOVE_CAR(6, "提升机升降小车"),
| PALLET_IN(7, "托盘入"),
| PALLET_OUT(8, "托盘出"),
| ;
|
| public Integer id;
| public String desc;
|
| LiftCommandModeType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static LiftCommandModeType get(Integer id) {
| if (null == id) {
| return null;
| }
| for (LiftCommandModeType type : LiftCommandModeType.values()) {
| if (type.id.equals(id)) {
| return type;
| }
| }
| return null;
| }
|
| public static LiftCommandModeType get(LiftCommandModeType type) {
| if (null == type) {
| return null;
| }
| for (LiftCommandModeType type1 : LiftCommandModeType.values()) {
| if (type1 == type) {
| return type1;
| }
| }
| return null;
| }
|
| }
|
|