自动化立体仓库 - 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
40
package com.zy.core.enums.DevpType;
 
import com.zy.core.enums.CrnStatusType;
 
public enum DevpWorkType {
    NONE(-1,"离线"),
    IDLE(0,"空闲"),
    BUSY(1,"忙碌");
 
    public Integer id;
    public String desc;
    DevpWorkType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static DevpWorkType get(Short id) {
        if (null == id) {
            return null;
        }
        for (DevpWorkType type : DevpWorkType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return NONE;
    }
 
    public static DevpWorkType get(DevpWorkType type) {
        if (null == type) {
            return null;
        }
        for (DevpWorkType devpWorkType : DevpWorkType.values()) {
            if (devpWorkType == type) {
                return devpWorkType;
            }
        }
        return null;
    }
}