自动化立体仓库 - WCS系统
#
zjj
2025-03-26 6ceeb65fe79ce6c5eb648bca52308bc4a5c77dad
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
package com.zy.core.enums.DevpType;
 
public enum DevpTrayType {
 
    NONE(-1,"离线"),
    EMPTY(1,"空托"),
    FULL(2,"满托");
 
    public Integer id;
    public String desc;
    DevpTrayType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static DevpTrayType get(Short id) {
        if (null == id) {
            return null;
        }
        for (DevpTrayType type : DevpTrayType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return NONE;
    }
 
    public static DevpTrayType get(DevpTrayType type) {
        if (null == type) {
            return null;
        }
        for (DevpTrayType devpTrayType : DevpTrayType.values()) {
            if (devpTrayType == type) {
                return devpTrayType;
            }
        }
        return null;
    }
}