package com.ots.project.tool.report.SAQ.gs.condition; import com.ots.common.enums.LangTypeEnum; import com.ots.project.exam.domain.TLibraryCode; import com.ots.project.tool.report.MAQ.base.BaseCondition; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import java.util.HashMap; import java.util.Map; /** * @Description: SAQ简易版结果值计算 * @Author: zhijie * @Date: 2021/6/6 */ @Getter @Setter @Slf4j public class ResponseFidelityDiagnosisSAQGsTitle extends BaseCondition { private String name = "ResponseFidelityDiagnosisSAQGsTitle"; private Double P_SDE_T1; private Double P_IM_T1; private Double P_INCON_T1; @Override public Map getMAQwaterDropsImages() { return null; } /** * 命中计算 * @param map * @param langType * @return */ @Override public TLibraryCode calculate(Map 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 LIBSAQ8810 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (P_SDE23 >= 95 || P_IM24 >= 95 || P_INCON25 >= 95); boolean LIBSAQ8820 = (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 LIBSAQ8830 = (P_SDE_T1 >= 95 || P_IM_T1 >= 95 || P_INCON_T1 >= 95) && (P_SDE23 <= 5 || P_IM24 <= 5) && (P_INCON25 < 95); boolean LIBSAQ8840 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (P_SDE23 >= 95 || P_IM24 >= 95 || P_INCON25 >= 95); boolean LIBSAQ8850 = (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 LIBSAQ8860 = (P_SDE_T1 < 95 && P_IM_T1 < 95 && P_INCON_T1 < 95) && (P_SDE23 <= 5 || P_IM24 <= 5) && (P_INCON25 < 95); Map calculateMap = new HashMap(); calculateMap.put(LIBSAQ8810, "LIBSAQGS8801"); calculateMap.put(LIBSAQ8820, "LIBSAQGS8802"); calculateMap.put(LIBSAQ8830, "LIBSAQGS8803"); calculateMap.put(LIBSAQ8840, "LIBSAQGS8804"); calculateMap.put(LIBSAQ8850, "LIBSAQGS8805"); calculateMap.put(LIBSAQ8860, "LIBSAQGS8806"); String codeId = selectTrueObject(calculateMap); TLibraryCode maqReportLibrary = getMaqReportLibrary(map, codeId ,langType); return maqReportLibrary; } catch (Exception ex) { log.error("ResponseFidelityDiagnosisSAQTitle error:{}", ex.getMessage(), ex); return null; } } }