自动化立体仓库 - WCS系统
Junjie
2023-04-06 39a7c54ceffb921258ac0148f58ccea60da0c87e
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
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, "状态复位"),
    ;
 
    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;
    }
 
}