[测评系统]--测评系统核心代码库
linzhijie
2021-04-26 9843a613b41db35b05e048d3eacaf99253b57ce6
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.MAQNEW.condition;
import com.ots.common.enums.LangTypeEnum;
import com.ots.project.exam.domain.TLibraryCode;
import com.ots.project.tool.report.MAQNEW.base.BaseCondition_V2;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import java.util.Map;
@Slf4j
@Getter
@Setter
public class PrimaryLeadershipStyle_V2 extends BaseCondition_V2 {
    private String name = "PrimaryLeadershipStyle_V2";
    @Override
    public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
        try {
            String p_task31 = map.get("P_Task31");
            String p_people32 = map.get("P_People32");
            if (checkParamsIsNull(p_task31, p_people32)) {
                return null;
            }
            Double P_task31 = Double.valueOf(p_task31);
            Double P_people32 = Double.valueOf(p_people32);
            String codeId = null;
            if (P_task31 >= 50 && P_people32 < 50) {
                codeId = "LIBMAQV225003";
            } else if (P_task31 >= 50 && P_people32 >= 50) {
                codeId = "LIBMAQV225016";
            } else if (P_task31 < 50 && P_people32 >= 50) {
                codeId = "LIBMAQV225026";
            } else if (P_task31 < 50 && P_people32 < 50) {
                codeId = "LIBMAQV225036";
            } else {
                TLibraryCode libraryCode = new TLibraryCode();
                String briefContent = "NONE";
                libraryCode.setEnglistContent(briefContent);
                libraryCode.setChineseContent(briefContent);
                libraryCode.setThaiContent(briefContent);
                return libraryCode;
            }
            return getMaqReportLibrary(map, codeId, langType);
        } catch (Exception ex) {
            log.error("PrimaryLeadershipStyle error:{}", ex.getMessage(), ex);
            return null;
        }
    }
    @Override
    public Map<String, String> getMAQwaterDropsImages() {
        return null;
    }
}