package com.ots.project.tool.report.PAQ.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.HashMap;
|
import java.util.Map;
|
|
/**
|
* 测试结果有效性诊断标题
|
*/
|
@Data
|
@Slf4j
|
public class DiagnosisTitle extends BaseCondition_V2 {
|
|
private String name = "DiagnosisTitle";
|
private Double P_SDE_T1;
|
private Double P_IM_T1;
|
private Double P_INCON_T1;
|
|
@Override
|
public TLibraryCode calculate(Map<String, String> map, LangTypeEnum langType) {
|
try {
|
String p_sde_t1 = map.get("P_SDE_T1");
|
String p_im_t1 = map.get("P_IM_T1");
|
String p_incon_t1 = map.get("P_INCON_T1");
|
String p_sde23 = map.get("P_SDE23");
|
String p_im24 = map.get("P_IM24");
|
String p_incon25 = map.get("P_INCON25");
|
if (checkParamsIsNull(p_sde_t1, p_im_t1, p_incon_t1, p_sde23, p_im24, p_incon25)) {
|
return null;
|
}
|
P_SDE_T1 = Double.valueOf(p_sde_t1);
|
P_IM_T1 = Double.valueOf(p_im_t1);
|
P_INCON_T1 = Double.valueOf(p_incon_t1);
|
Double P_SDE23 = Double.valueOf(p_sde23);
|
Double P_IM24 = Double.valueOf(p_im24);
|
Double P_INCON25 = Double.valueOf(p_incon25);
|
//分数区间计算代码
|
boolean LIBPAQGS8801 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (P_SDE23 >= 95 || P_IM24 >= 95 || P_INCON25 >= 95);
|
boolean LIBPAQGS8802 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && ((5 < P_SDE23 && P_SDE23 < 95) && (5 < P_IM24 && P_IM24 < 95) && P_INCON25 < 95);
|
boolean LIBPAQGS8803 = false;
|
boolean LIBPAQGS8803_1 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (P_SDE23 <= 5 && 5 < P_IM24 && P_IM24 < 95) && (P_INCON25 < 95);
|
boolean LIBPAQGS8803_2 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (5 < P_SDE23 && P_SDE23 < 95 && P_IM24 <= 5) && (P_INCON25 < 95);
|
boolean LIBPAQGS8803_3 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (P_SDE23 <= 5 && P_IM24 <= 5) && (P_INCON25 < 95);
|
//三个条件 其中一个符合就返回true
|
if(LIBPAQGS8803_1 || LIBPAQGS8803_2 || LIBPAQGS8803_3){
|
LIBPAQGS8803 = true;
|
}
|
boolean LIBPAQGS8804 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (P_SDE23 >= 95 || P_IM24 >= 95 || P_INCON25 >= 95);
|
boolean LIBPAQGS8805 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && ((5 < P_SDE23 && P_SDE23 < 95) && (5 < P_IM24 && P_IM24 < 95) && P_INCON25 < 95);
|
boolean LIBPAQGS8806 = false;
|
boolean LIBPAQGS8806_1 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (P_SDE23 <= 5 && 5 < P_IM24 && P_IM24 < 95) && (P_INCON25 < 95);
|
boolean LIBPAQGS8806_2 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (5 < P_SDE23 && P_SDE23 < 95 && P_IM24 <= 5) && (P_INCON25 < 95);
|
boolean LIBPAQGS8806_3 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (P_SDE23 <= 5 && P_IM24 <= 5) && (P_INCON25 < 95);
|
//三个条件 其中一个符合就返回true
|
if(LIBPAQGS8806_1 || LIBPAQGS8806_2 || LIBPAQGS8806_3){
|
LIBPAQGS8806 = true;
|
}
|
|
//设置命中的有效性结果
|
Map calculateMap = new HashMap();
|
calculateMap.put(LIBPAQGS8801, "LIBPAQGS8801");
|
calculateMap.put(LIBPAQGS8802, "LIBPAQGS8802");
|
calculateMap.put(LIBPAQGS8803, "LIBPAQGS8803");
|
calculateMap.put(LIBPAQGS8804, "LIBPAQGS8804");
|
calculateMap.put(LIBPAQGS8805, "LIBPAQGS8805");
|
calculateMap.put(LIBPAQGS8806, "LIBPAQGS8806");
|
String codeId = selectTrueObject(calculateMap);
|
|
TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId, langType);
|
return maqReportLibrary;
|
} catch (Exception ex) {
|
log.error("DiagnosisTitle error:{}", ex.getMessage(), ex);
|
return null;
|
}
|
}
|
|
@Override
|
public Map<String, String> getMAQwaterDropsImages() {
|
return null;
|
}
|
}
|