自动化立体仓库 - WCS系统
#
Junjie
6 天以前 d65679fefe52fc2bf2435825c65aec3a329e3b9e
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.asrs.domain.enums;
 
public enum NotifyMsgType {
    //任务
    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;
    }
}