自动化立体仓库 - WCS系统
#
Junjie
2 天以前 544f7c2314a46cd39d55fdce2dc0247499905b1d
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
package com.zy.asrs.domain.enums;
 
public enum NotifyMsgType {
    //任务
    TASK_START("task_start", "任务开始"),
    TASK_COMPLETE("task_complete", "任务完成"),
    TASK_CANCEL("task_cancel", "任务取消"),
    ;
 
    public String flag;
    public String desc;
 
    NotifyMsgType(String flag, String desc) {
        this.flag = flag;
        this.desc = desc;
    }
 
    public static NotifyMsgType get(String flag) {
        if (null == flag) {
            return null;
        }
        for (NotifyMsgType type : NotifyMsgType.values()) {
            if (type.flag.equals(flag)) {
                return type;
            }
        }
        return null;
    }
 
    public static NotifyMsgType get(NotifyMsgType type) {
        if (null == type) {
            return null;
        }
        for (NotifyMsgType type2 : NotifyMsgType.values()) {
            if (type2 == type) {
                return type2;
            }
        }
        return null;
    }
}