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 EmotionalStability extends BaseCondition_V2 {
|
private String name = "EmotionalStability";
|
private Double EMOSTA;
|
|
@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 pEMOSTA = map.get("emosta");
|
if (checkParamsIsNull(pEMOSTA)) {
|
return null;
|
}
|
EMOSTA = Double.valueOf(pEMOSTA);
|
//分数区间计算代码
|
boolean LIBLAQ0630 = (EMOSTA <= 30);
|
boolean LIBLAQ0620 = (30 < EMOSTA && EMOSTA < 70);
|
boolean LIBLAQ0610 = (EMOSTA >= 70);
|
|
Map calculateMap = new HashMap();
|
calculateMap.put(LIBLAQ0610, "LIBLAQ0611,LIBLAQ0612,LIBLAQ0613,LIBLAQ0614");
|
calculateMap.put(LIBLAQ0620, "LIBLAQ0621,LIBLAQ0622,LIBLAQ0623,LIBLAQ0624,LIBLAQ0625");
|
calculateMap.put(LIBLAQ0630, "LIBLAQ0631,LIBLAQ0632,LIBLAQ0633,LIBLAQ0634");
|
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("EmotionalStability error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
}
|