[测评系统]--测评系统核心代码库
linzhijie
2021-03-11 84fea994d2db7dc313ad1774f34eb12a45f8d6e7
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
package com.ots.project.tool.report.RuilinMAQ.condition;
import com.ots.common.enums.LangTypeEnum;
import com.ots.project.exam.domain.TLibraryCode;
import com.ots.project.tool.report.MAQ.base.BaseCondition;
import lombok.Getter;
import lombok.Setter;
import java.util.HashMap;
import java.util.Map;
@Getter
@Setter
public class NumberOfStars extends BaseCondition {
    private String conditionKey;
    private String name;
    public NumberOfStars(String conditionKey) {
        this.conditionKey = conditionKey;
    }
    @Override
    public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
        this.name = conditionKey + "SS";
        String conditionValue = map.get(conditionKey);
        if (checkParamsIsNull(conditionValue)) {
            return null;
        }
        Double aDouble = Double.valueOf(conditionValue);
        boolean RL000001 = aDouble <= 30;
        boolean RL000002 = 30 < aDouble && aDouble < 70;
        boolean RL000003 = aDouble >= 70;
        Map calculateMap = new HashMap();
        calculateMap.put(RL000001, "RL000001");
        calculateMap.put(RL000002, "RL000002");
        calculateMap.put(RL000003, "RL000003");
        String codeId = selectTrueObject(calculateMap);
        
        TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId, langType);
        return maqReportLibrary;
    }
    @Override
    public Map<String, String> getMAQwaterDropsImages() {
        return null;
    }
}