自动化立体仓库 - WCS系统
#
Junjie
2023-12-07 a05a58973d6dc855bfb203ee16189d48238fea62
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
package com.zy.core.enums;
 
/**
 * RGV状态枚举
 */
public enum RgvStatusType {
 
    OFFLINE((short) -1, "离线"),
    IDLE((short) 0, "空闲"),
    PICK_WALK((short) 1, "取货走行"),
    PICK_WAIT((short) 2, "取货等待"),
    PICK_WORKING((short) 3, "取货中"),
    RELEASE_WALK((short) 4, "放货走行"),
    RELEASE_WAIT((short) 5, "放货等待"),
    RELEASE_WORKING((short) 6, "放货中"),
    WALKING((short) 9, "走行中"),
    WAITING((short) 90, "任务完成等待WCS确认"),
    ALARM((short) 99, "报警"),
    OTHER((short) 100, "其他"),
    ;
    public Short id;
    public String desc;
 
    RgvStatusType(Short id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static RgvStatusType get(Short id) {
        if (null == id) {
            return null;
        }
        for (RgvStatusType type : RgvStatusType.values()) {
            if (type.id.equals(id)) {
                return type;
            }
        }
        return null;
    }
 
    public static RgvStatusType get(RgvStatusType type) {
        if (null == type) {
            return null;
        }
        for (RgvStatusType type1 : RgvStatusType.values()) {
            if (type1 == type) {
                return type1;
            }
        }
        return null;
    }
}