自动化立体仓库 - WCS系统
#
lsh
2023-03-03 76d3fff7c27d020fd7110e4a5e84cc87e3fe7e43
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
package com.zy.core.enums;
 
public enum CrnStatusType {
 
    NONE(-1, "离线"),
    IDLE(0, "空闲"),
    FETCH_MOVING(1, "取货行走"),
    FETCH_WAITING(2, "取货等待"),
    FETCHING(3, "取货中"),
    PUT_MOVING(4, "放货走行"),
    PUT_WAITING(5, "放货等待"),
    PUTTING(6, "放货中"),
    ORIGIN_GO(7, "回原点"),
    ORIGIN_BACK(8, "回反原点"),
    MOVING(9, "走行中"),
    WAITING(10, "任务完成等待WCS确认"),
    PAUSE(11, "任务暂停"),
    SOS(99, "报警"),
    ;
 
    public Integer id;
    public String desc;
    CrnStatusType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static CrnStatusType get(Short id) {
        if (null == id) {
            return null;
        }
        for (CrnStatusType type : CrnStatusType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return null;
    }
 
    public static CrnStatusType get(CrnStatusType type) {
        if (null == type) {
            return null;
        }
        for (CrnStatusType crnStatusType : CrnStatusType.values()) {
            if (crnStatusType == type) {
                return crnStatusType;
            }
        }
        return null;
    }
}