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 AbstractReasoningLikely extends BaseCondition_V2 {
|
private String name = "AbstractReasoningLikely";
|
private Double AR;
|
|
@Override
|
public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
|
return null;
|
}
|
|
@Override
|
public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) {
|
try {
|
String pAR = map.get("ar");
|
if (checkParamsIsNull(pAR)) {
|
return null;
|
}
|
AR = Double.valueOf(pAR);
|
//分数区间计算代码
|
boolean LIBLAQ0150 = (AR <= 30);
|
boolean LIBLAQ0140 = (30 < AR && AR < 70);
|
boolean LIBLAQ0130 = (AR >= 70);
|
|
Map calculateMap = new HashMap();
|
calculateMap.put(LIBLAQ0130, "LIBLAQ0131,LIBLAQ0132");
|
calculateMap.put(LIBLAQ0140, "LIBLAQ0141,LIBLAQ0142");
|
calculateMap.put(LIBLAQ0150, "LIBLAQ0151,LIBLAQ0151");
|
String codeId = selectTrueObject(calculateMap);
|
String[] split = codeId.split(",");
|
List<TLibraryCode> libcodes = new ArrayList<>();
|
Arrays.stream(split).forEach(item -> {
|
libcodes.add(getMaqReportLibrary(map, item, langType));
|
});
|
return libcodes;
|
} catch (Exception ex) {
|
log.error("AbstractReasoningLikely error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
}
|