自动化立体仓库 - 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
package com.zy.core.enums;
 
/**
 * RGV模式枚举
 */
public enum RgvModeType {
 
    STOP((short) 0, "停机模式"),
    MANUAL((short) 1, "手动模式"),
    AUTO((short) 2, "自动模式"),
    COMPUTER((short) 3, "电脑模式"),
    ;
 
    public Short id;
    public String desc;
 
    RgvModeType(Short id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static RgvModeType get(Short id) {
        if (null == id) {
            return null;
        }
        for (RgvModeType type : RgvModeType.values()) {
            if (type.id.equals(id)) {
                return type;
            }
        }
        return null;
    }
 
    public static RgvModeType get(RgvModeType type) {
        if (null == type) {
            return null;
        }
        for (RgvModeType type1 : RgvModeType.values()) {
            if (type1 == type) {
                return type1;
            }
        }
        return null;
    }
}