[测评系统]--测评系统核心代码库
wzp
2021-06-28 09ee32471c0b3adef524e386d5a464633a6a9437
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
44
package com.ots.common.enums;
 
/**
 * @author zhijie
 * @date 2021/03/19
 * @Description: 报告邮件标题类
 */
public enum ReportTitle {
    ZH("姓名","Chinese", "%s的%s测评报告附上了"),
    US("Name","English", "%s's %s Report Is Attached"),
    TAI("ชื่อ","Thai", "รายงานการประเมิน %s ของ %s"),
    ;
    public final String field;
    public final String langType;
    public final String reportTitle;
 
 
 
    ReportTitle(String field,String langType, String reportTitle) {
        this.field = field;
        this.langType = langType;
        this.reportTitle = reportTitle;
    }
 
    public static String getReportTitle(String langType) {
        ReportTitle[] types = ReportTitle.values();
        for (ReportTitle type : types) {
            if (type.langType.equals(langType)) {
                return type.reportTitle;
            }
        }
        return "";
    }
 
    public static String getField(String langType) {
        ReportTitle[] types = ReportTitle.values();
        for (ReportTitle type : types) {
            if (type.langType.equals(langType)) {
                return type.field;
            }
        }
        return "";
    }
}