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.MAQNEW.base.BaseCondition_V2; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import java.util.*; @Getter @Setter @Slf4j public class Conscientiousness extends BaseCondition_V2 { private String name = "Conscientiousness"; private Double CONS; @Override public TLibraryCode calculate(Map map, LangTypeEnum langType) { return null; } @Override public List calculateList(Map map, LangTypeEnum langType) { try { String pCONS = map.get("cons"); if (checkParamsIsNull(pCONS)) { return null; } CONS = Double.valueOf(pCONS); //分数区间计算代码 boolean LIBLAQ0330 = (CONS <= 30); boolean LIBLAQ0320 = (30 < CONS && CONS < 70); boolean LIBLAQ0310 = (CONS >= 70); Map calculateMap = new HashMap(); calculateMap.put(LIBLAQ0310, "LIBLAQ0311,LIBLAQ0312,LIBLAQ0313,LIBLAQ0314,LIBLAQ0315"); calculateMap.put(LIBLAQ0320, "LIBLAQ0321,LIBLAQ0322,LIBLAQ0323,LIBLAQ0324,LIBLAQ0325,LIBLAQ0326"); calculateMap.put(LIBLAQ0330, "LIBLAQ0331,LIBLAQ0332,LIBLAQ0333,LIBLAQ0334,LIBLAQ0335"); String codeId = selectTrueObject(calculateMap); String[] split = codeId.split(","); List libcodes = new ArrayList<>(); Arrays.stream(split).forEach(item -> { libcodes.add(getMaqReportLibrary(map, item, langType)); }); return libcodes; } catch (Exception ex) { log.error("Conscientiousness error:{}", ex.getMessage(), ex); return null; } } @Override public Map getMAQwaterDropsImages() { return null; } }