自动化立体仓库 - WCS系统
#
yxFwq
2025-01-01 716f7e3dec477b1dffe2ff33182116f558be60b0
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
package com.zy.core.enums;
 
public enum JarStatusType {
 
    IDLE(0, "空闲"),
    MOVING(1, "开门"),
    SOS(2, "充压中"),
    WAITING1(3, "开门"),
    WAITING2(4, "硫化完成"),
    WAITING3(5, "门打开中"),
    WAITING4(6, "门打开中"),
    WAITING5(7, "门关闭中"),
    OFF_LINE(8, "门关闭中"),
    SOS2(9, "保温中"),
    OTHER(100, "其它"),
    ;
 
    public Integer id;
    public String desc;
    JarStatusType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static JarStatusType get(Short id) {
        if (null == id) {
            return OTHER;
        }
        for (JarStatusType type : JarStatusType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return OTHER;
    }
 
    public static JarStatusType get(JarStatusType type) {
        if (null == type) {
            return OTHER;
        }
        for (JarStatusType jarStatusType : JarStatusType.values()) {
            if (jarStatusType == type) {
                return jarStatusType;
            }
        }
        return OTHER;
    }
}