自动化立体仓库 - WCS系统
#
lsh
2024-06-21 1d3e88187f8d7dce311ecb05b9b7587cdf2d2da2
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
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, "右门关闭中"),
    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 null;
        }
        for (JarStatusType type : JarStatusType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return OFF_LINE;
    }
 
    public static JarStatusType get(JarStatusType type) {
        if (null == type) {
            return null;
        }
        for (JarStatusType jarStatusType : JarStatusType.values()) {
            if (jarStatusType == type) {
                return jarStatusType;
            }
        }
        return null;
    }
}