#
Junjie
3 天以前 6daf900a09adcca981f620744bf89851654d88e0
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
package com.zy.core.enums;
 
//提升机任务模式
public enum LiftTaskModeType {
 
    NONE(0, "未知"),
    PICK_PUT(1, "取放货"),
    SHUTTLE_SWITCH(2, "小车换层"),
    MOVE(3, "提升机移动"),
    RESET(9996, "复位"),
    SWITCH_IN(9997, "切换入库模式"),
    SWITCH_OUt(9998, "切换出库模式"),
    READ_STATUS(9999, "读取状态"),
    ;
 
    public Integer id;
    public String desc;
 
    LiftTaskModeType(Integer id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public static LiftTaskModeType get(Integer id) {
        if (null == id) {
            return null;
        }
        for (LiftTaskModeType type : LiftTaskModeType.values()) {
            if (type.id.equals(id)) {
                return type;
            }
        }
        return null;
    }
 
    public static LiftTaskModeType get(LiftTaskModeType type) {
        if (null == type) {
            return null;
        }
        for (LiftTaskModeType type2 : LiftTaskModeType.values()) {
            if (type2 == type) {
                return type2;
            }
        }
        return null;
    }
}