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.Data;
|
import lombok.extern.slf4j.Slf4j;
|
|
import java.util.*;
|
|
/**
|
* 领导一致性指标
|
*/
|
@Data
|
@Slf4j
|
public class AlignmentIndications extends BaseCondition_V2 {
|
private String name = "AlignmentIndications";
|
private Double OLAS;
|
|
@Override
|
public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
|
return null;
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
|
@Override
|
public List<TLibraryCode> calculateList(Map<String, String> map, LangTypeEnum langType) {
|
try {
|
String olas = map.get("olas");
|
if (checkParamsIsNull(olas)) {
|
return null;
|
}
|
OLAS = Double.valueOf(olas);
|
//分数区间计算代码
|
boolean LIBLAQ0051A = OLAS >= 70;
|
boolean LIBLAQ0061A = 30 < OLAS && OLAS < 70;
|
boolean LIBLAQ0071A = OLAS <= 30;
|
|
Map calculateMap = new HashMap();
|
calculateMap.put(LIBLAQ0051A, "LIBLAQ0051,LIBLAQ0052,LIBLAQ0053,LIBLAQ0054");
|
calculateMap.put(LIBLAQ0061A, "LIBLAQ0061,LIBLAQ0062,LIBLAQ0063,LIBLAQ0064,LIBLAQ0065");
|
calculateMap.put(LIBLAQ0071A, "LIBLAQ0071,LIBLAQ0072,LIBLAQ0073");
|
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("AlignmentIndications error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
}
|