自动化立体仓库 - 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
package com.zy.core.enums;
 
/**
 * 四向穿梭车
 * Wm200 小车忙状态位
 */
public enum ShuttleStatusType {
 
    IDLE((short)0, "空闲"),
    BUSY((short)1, "忙"),
    ;
 
    public Short id;
    public String desc;
 
    ShuttleStatusType(Short id,String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static ShuttleStatusType get(Short id) {
        if (null == id) {
            return null;
        }
        for (ShuttleStatusType type : ShuttleStatusType.values()) {
            if (type.id.equals(id.shortValue())) {
                return type;
            }
        }
        return BUSY;
    }
 
    public static ShuttleStatusType get(ShuttleStatusType type) {
        if (null == type) {
            return null;
        }
        for (ShuttleStatusType shuttleStatusType : ShuttleStatusType.values()) {
            if (shuttleStatusType == type) {
                return shuttleStatusType;
            }
        }
        return null;
    }
 
}