[测评系统]--测评系统核心代码库
wzp
2025-08-01 95eb8a2a75cbeebcb3393d404c1952bd59b8989a
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
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报告"),
    Panorama("Panorama","LAQ全景图报告"),
    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!");
    }
}