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 Agreeableness extends BaseCondition_V2 {
|
private String name = "Agreeableness";
|
private Double AGREE;
|
|
@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 pAGREE = map.get("agree");
|
if (checkParamsIsNull(pAGREE)) {
|
return null;
|
}
|
AGREE = Double.valueOf(pAGREE);
|
//分数区间计算代码
|
boolean LIBLAQ0530 = (AGREE <= 30);
|
boolean LIBLAQ0520 = (30 < AGREE && AGREE < 70);
|
boolean LIBLAQ0510 = (AGREE >= 70);
|
|
Map calculateMap = new HashMap();
|
calculateMap.put(LIBLAQ0510, "LIBLAQ0511,LIBLAQ0512,LIBLAQ0513,LIBLAQ0514,LIBLAQ0515");
|
calculateMap.put(LIBLAQ0520, "LIBLAQ0521,LIBLAQ0522,LIBLAQ0523,LIBLAQ0524");
|
calculateMap.put(LIBLAQ0530, "LIBLAQ0531,LIBLAQ0532,LIBLAQ0533,LIBLAQ0534,LIBLAQ0535");
|
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("Agreeableness error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
}
|