自动化立体仓库 - WCS系统
#
Junjie
2023-09-04 6d611bd596f57f0079c36bdb6a7686613f1bbb13
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
46
47
48
49
50
51
52
53
54
55
56
package com.zy.core.enums;
 
public enum LiftNotReadyType {
    STATUS_0(0, "N"),
    NOT_LEV(1, "不在指定层"),
    NOT_SYNC(2, "四轴不同步"),
    STATUS_3(3, "平台前限光电被挡到(靠近货架)"),
    STATUS_4(4, "平台后限光电被挡到(远离货架)"),
    STATUS_5(5, "平台上限位报警"),
    STATUS_6(6, "平台下限位报警"),
    STATUS_7(7, "电柜急停报警"),
    STATUS_8(8, "输送线前限位被挡到(靠近货架)"),
    STATUS_9(9, "输送线后限位被挡到(远离货架)"),
    STATUS_10(10, "触摸屏紧急停止被按下"),
    STATUS_11(11, "四轴动力线断线"),
    STATUS_12(12, "单机模式"),
    STATUS_13(13, "四轴报警"),
    STATUS_14(14, "位置偏差过大"),
    STATUS_15(15, "扭矩偏差过大"),
    STATUS_16(16, "输送线过载"),
    STATUS_17(17, "进提升机卡托盘"),
    STATUS_18(18, "出提升机卡托盘"),
    ;
 
    public Integer id;
    public String desc;
 
    LiftNotReadyType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static LiftNotReadyType get(Integer id) {
        if (null == id) {
            return null;
        }
        for (LiftNotReadyType type : LiftNotReadyType.values()) {
            if (type.id.equals(id)) {
                return type;
            }
        }
        return null;
    }
 
    public static LiftNotReadyType get(LiftNotReadyType type) {
        if (null == type) {
            return null;
        }
        for (LiftNotReadyType type2 : LiftNotReadyType.values()) {
            if (type2 == type) {
                return type2;
            }
        }
        return null;
    }
}