liusheng
2 天以前 a3207e38c13a81299afc1963e0e52d9800e05a68
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
package cn.lihu.jh.module.ecg.enums;
 
import lombok.AllArgsConstructor;
import lombok.Getter;
 
/**
 * Action类型枚举
 */
@Getter
@AllArgsConstructor
public enum ActionTypeEnum {
 
    S0201ECG("S0201ECG", "申请单创建"),
    S0202ECG("S0202ECG", "申请单更新"),
    S040501HIS("S040501HIS", "预约更新"),
    S050401("S050401", "检查预约状态新增"),
    S050501("S050501", "检查预约状态修改");
 
 
    /**
     * 类型
     */
    private final String type;
    /**
     * 描述
     */
    private final String description;
 
    /**
     * 根据类型获取枚举
     *
     * @param type 类型
     * @return 枚举
     */
    public static ActionTypeEnum getByType(String type) {
        for (ActionTypeEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}