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
| package com.zy.core.enums;
|
| public enum ShuttleTaskModeType {
|
| INIT(0, "初始"), // 初始
| PAK_IN(1, "入库"),
| PAK_OUT(2, "出库"),
| PALLET_LIFT(3, "托盘顶升"),
| PALLET_DOWN(4, "托盘下降"),
| MOVE_LEFT(5, "左移"),
| MOVE_RIGHT(6, "右移"),
| MOVE_TOP(7, "前移"),
| MOVE_BOTTOM(8, "后移"),
| RESET(9, "状态复位"),
| SEARCH_LEFT(10, "正方向(右)寻库位"),
| SEARCH_RIGHT(11, "负方向(左)寻库位"),
| SEARCH_TOP(12, "负方向(前)寻库位"),
| SEARCH_BOTTOM(13, "负方向(后)寻库位"),
| MOVE_LOC_NO(14, "移动到目标库位"),
| CHARGE(15, "充电"),
| MOVE_LIFT(16, "移动到提升机"),
| ;
|
| public Integer id;
| public String desc;
|
| ShuttleTaskModeType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static ShuttleTaskModeType get(Short id) {
| if (null == id) {
| return null;
| }
| for (ShuttleTaskModeType type : ShuttleTaskModeType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return null;
| }
|
| public static ShuttleTaskModeType get(ShuttleTaskModeType type) {
| if (null == type) {
| return null;
| }
| for (ShuttleTaskModeType shuttleTaskModeType : ShuttleTaskModeType.values()) {
| if (shuttleTaskModeType == type) {
| return shuttleTaskModeType;
| }
| }
| return null;
| }
|
| }
|
|