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.HashMap; import java.util.Map; @Getter @Setter @Slf4j public class SummaryScoreStrong extends BaseCondition_V2 { private String name = "SummaryScoreStrong"; private Double OLAS; @Override public TLibraryCode calculate(Map map, LangTypeEnum langType) { try { String pOLAS = map.get("olas"); if (checkParamsIsNull(pOLAS)) { return null; } OLAS = Double.valueOf(pOLAS); boolean LIBLAQ0020 = (OLAS <= 30); boolean LIBLAQ0018 = (30 < OLAS && OLAS < 70); boolean LIBLAQ0015 = (OLAS >= 70); Map calculateMap = new HashMap(); calculateMap.put(LIBLAQ0020, "LIBLAQ0020"); calculateMap.put(LIBLAQ0018, "LIBLAQ0018"); calculateMap.put(LIBLAQ0015, "LIBLAQ0015"); String codeId = selectTrueObject(calculateMap); TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId , langType); return maqReportLibrary; } catch (Exception ex) { log.error("SummaryScoreStrong error:{}", ex.getMessage(), ex); return null; } } @Override public Map getMAQwaterDropsImages() { return null; } }