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 AbstractReasoningHigh extends BaseCondition_V2 {
|
private String name = "AbstractReasoningHigh";
|
private Double AR;
|
|
@Override
|
public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
|
try {
|
String pAR = map.get("ar");
|
if (checkParamsIsNull(pAR)) {
|
return null;
|
}
|
AR = Double.valueOf(pAR);
|
boolean LIBLAQ0010 = (AR <= 30);
|
boolean LIBLAQ0008 = (30 < AR && AR < 70);
|
boolean LIBLAQ0005 = (AR >= 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("AbstractReasoningHigh error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
}
|