自动化立体仓库 - 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
package com.zy.core.enums;
 
public enum JarModeType {
 
    NONE(-1, "离线"),
    STOP(0, "离线"),
    HAND(1, "手动"),
    HALF_AUTO(2, "自动"),
    AUTO(3, "其他"),
    AUTO2(100, "其它"),
    ;
 
    public Integer id;
    public String desc;
    JarModeType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static JarModeType get(Integer id) {
        if (null == id) {
            return null;
        }
        for (JarModeType type : JarModeType.values()) {
            if (type.id.equals(id)) {
                return type;
            }
        }
        return null;
    }
 
    public static JarModeType get(JarModeType type) {
        if (null == type) {
            return null;
        }
        for (JarModeType jarModeType : JarModeType.values()) {
            if (jarModeType == type) {
                return jarModeType;
            }
        }
        return null;
    }
}