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 OpennessExperience extends BaseCondition_V2 { private String name = "OpennessExperience"; private Double OPEN; @Override public TLibraryCode calculate(Map map, LangTypeEnum langType) { return null; } @Override public List calculateList(Map map, LangTypeEnum langType) { try { String pOPEN = map.get("open"); if (checkParamsIsNull(pOPEN)) { return null; } OPEN = Double.valueOf(pOPEN); //分数区间计算代码 boolean LIBLAQ0230 = (OPEN <= 30); boolean LIBLAQ0220 = (30 < OPEN && OPEN < 70); boolean LIBLAQ0210 = (OPEN >= 70); Map calculateMap = new HashMap(); calculateMap.put(LIBLAQ0210, "LIBLAQ0211,LIBLAQ0212,LIBLAQ0213,LIBLAQ0214,LIBLAQ0215"); calculateMap.put(LIBLAQ0220, "LIBLAQ0221,LIBLAQ0222,LIBLAQ0223"); calculateMap.put(LIBLAQ0230, "LIBLAQ0231,LIBLAQ0232,LIBLAQ0233,LIBLAQ0234,LIBLAQ0235"); 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("OpennessExperience error:{}", ex.getMessage(), ex); return null; } } @Override public Map getMAQwaterDropsImages() { return null; } }