[测评系统]--测评系统核心代码库
linzhijie
2021-03-11 3cfd98ba9e99e68b9ff43e35a8befd90a48e1ab7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.ots.common.enums;
import lombok.Getter;
import java.util.Objects;
@Getter
public enum TemplateTypeEnum {
    Brief("Brief", "简易版"), Complete("Complete", "完整版"), SAQ("SAQ", "SAQ报告"), RuiLin("RuiLin", "睿邻报告"), CAQ("CAQ", "CAQ报告"),
    JAQ("JAQ","JAQ报告"),MAQ("MAQ", "MAQ报告");
    private final String code;
    private final String message;
    TemplateTypeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
    public static TemplateTypeEnum codeOf(String code) {
        for (TemplateTypeEnum xxxEnum : values()) {
            if (Objects.equals(xxxEnum.getCode(), code)) {
                return xxxEnum;
            }
        }
        throw new RuntimeException("The Report is not supported!");
    }
}