自动化立体仓库 - WCS系统
#
lsh
2024-06-21 c147a3dc2a56ab23b1cfeafef3de2867593f4206
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
package com.zy.core.enums;
/*
* 2024/6/21
* */
public enum JarTaskModeType {
 
    INIT(1, "左门开"),    // 初始
    OUT_RIGHT(2, "左门关"),    // 右出库
    OUT_LEFT(3, "右门开"),    // 左出库
    IN_RIGHT(4, "右门关"),    // 右入库
    ;
 
    public Integer id;
    public String desc;
    JarTaskModeType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static JarTaskModeType get(Short id) {
        if (null == id) {
            return null;
        }
        for (JarTaskModeType type : JarTaskModeType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return null;
    }
 
    public static JarTaskModeType get(JarTaskModeType type) {
        if (null == type) {
            return null;
        }
        for (JarTaskModeType crnTaskModeType : JarTaskModeType.values()) {
            if (crnTaskModeType == type) {
                return crnTaskModeType;
            }
        }
        return null;
    }
 
}