[测评系统]--测评系统核心代码库
zhijie
2023-10-25 38060cfc45cdce22b9072eef5854c82d18904e8c
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
package com.ots.project.tool.report.LAQ.condition;
 
import com.ots.common.enums.LangTypeEnum;
import com.ots.project.exam.domain.TLibraryCode;
import com.ots.project.tool.report.MAQ.base.BaseCondition;
import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
 
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
 
@Getter
@Setter
@Slf4j
public class NumericalReasoningHigh extends BaseCondition_V2 {
    private String name = "NumericalReasoningHigh";
    private Double NR;
 
    @Override
    public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
        try {
            String pNR = map.get("nr");
            if (checkParamsIsNull(pNR)) {
                return null;
            }
            NR = Double.valueOf(pNR);
            boolean LIBLAQ0010 = (NR <= 30);
            boolean LIBLAQ0008 = (30 < NR && NR < 70);
            boolean LIBLAQ0005 = (NR >= 70);
            Map calculateMap = new HashMap();
            calculateMap.put(LIBLAQ0010, "LIBLAQ0010");
            calculateMap.put(LIBLAQ0008, "LIBLAQ0008");
            calculateMap.put(LIBLAQ0005, "LIBLAQ0005");
            String codeId = selectTrueObject(calculateMap);
            
            TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType);
            return maqReportLibrary;
        } catch (Exception ex) {
            log.error("NumericalReasoningHigh error:{}", ex.getMessage(), ex);
            return null;
        }
    }
 
    @Override
    public Map<String, String> getMAQwaterDropsImages() {
        return null;
    }
}