[测评系统]--测评系统核心代码库
linzhijie
2021-04-12 38c060a610e8c27dfc54e064f4fb4fd22b6b4d56
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.ots.project.exam.domain;
import com.ots.common.enums.LangTypeEnum;
import com.ots.framework.aspectj.lang.annotation.Excel;
import com.ots.framework.web.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.springframework.web.multipart.MultipartFile;
import java.util.Objects;
import static com.ots.common.enums.LangTypeEnum.*;
 
@Getter
@Setter
public class TLibraryCode extends BaseEntity {
    private static final long serialVersionUID = 1L;
    
    private Long id;
    
    @Excel(name = "报告类型", type = Excel.Type.EXPORT)
    private String reportType;
    
    @Excel(name = "Library Code(报告字典编码)")
    private String libraryCode;
    
    @Excel(name = "English Content(英文字典内容)")
    private String englistContent;
    
    @Excel(name = "Chinese Content(中文字典内容)")
    private String chineseContent;
    
    @Excel(name = "Thai Content(泰文字典内容)")
    private String thaiContent;
    
    private String icon;
    
    private String dictType;
    private MultipartFile iconFile;
    
    private String score;
    public String getLangTypeContext(LangTypeEnum langType) {
        if (Objects.equals("2",dictType)) {
            return icon;
        }
        if (English == langType) {
            return getEnglistContent();
        }
        if (Chinese == langType) {
            return getChineseContent();
        }
        if (Thai == langType) {
            return getThaiContent();
        }
        return "";
    }
    public void setLangTypeContext(String context, LangTypeEnum langType) {
        if (English == langType) {
            setEnglistContent(context);
        }
        if (Chinese == langType) {
            setChineseContent(context);
        }
        if (Thai == langType) {
            setThaiContent(context);
        }
    }
}