自动化立体仓库 - 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;
 
public enum DevpStateType {
    NONE(-1,"离线"),
    STOP(0,"停机"),
    HAND(1,"手动"),
    AUTO(2,"自动"),
    FAULT(3,"故障");
 
    public Integer id;
    public String desc;
    DevpStateType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static DevpStateType get(Short id) {
        if (null == id) {
            return null;
        }
        for (DevpStateType type : DevpStateType.values()) {
            if (type.id.equals(id.intValue())) {
                return type;
            }
        }
        return NONE;
    }
 
    public static DevpStateType get(DevpStateType type) {
        if (null == type) {
            return null;
        }
        for (DevpStateType devpModeType : DevpStateType.values()) {
            if (devpModeType == type) {
                return devpModeType;
            }
        }
        return null;
    }
}