diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java index 721c9df..4aa10fe 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java @@ -428,10 +428,15 @@ public class ViewFacade { map.put("hPhone", patients.getHusbandPhone()); } - - map.put("yNum", data.getPregnancyTimes()); - map.put("fNum", data.getDelivery()); - map.put("pNum", data.getPlanedProd()); + if (data.getPregnancyTimes() != null) { + map.put("yNum", data.getPregnancyTimes()); + } + if (data.getDelivery() != null) { + map.put("fNum", data.getDelivery()); + } + if (data.getPlanedProd() != null) { + map.put("pNum", data.getPlanedProd()); + } if (data.getLastMenses() != null) { Calendar lastCal = Calendar.getInstance(); lastCal.setTime(data.getLastMenses()); @@ -944,12 +949,12 @@ public class ViewFacade { /* 初诊信息 */ - map.put("zyqbdjc", Boolean.valueOf(data.getZyqbd())?"已检查":"未检查"); - map.put("ntjc", Boolean.valueOf(data.getNtjc())?"已检查":"未检查"); - map.put("cjsc", Boolean.valueOf(data.getCjsc())?"已检查":"未检查"); - map.put("textpjbc", Boolean.valueOf(data.getTextpjbc())?"已检查":"未检查"); - map.put("s75gdgtt",Boolean.valueOf( data.getS75gdgtt())?"已检查":"未检查"); - map.put("jzxgn", Boolean.valueOf(data.getJzxgn())?"已检查":"未检查"); + map.put("zyqbdjc", Boolean.valueOf(data.getZyqbd()) ? "已检查" : "未检查"); + map.put("ntjc", Boolean.valueOf(data.getNtjc()) ? "已检查" : "未检查"); + map.put("cjsc", Boolean.valueOf(data.getCjsc()) ? "已检查" : "未检查"); + map.put("textpjbc", Boolean.valueOf(data.getTextpjbc()) ? "已检查" : "未检查"); + map.put("s75gdgtt", Boolean.valueOf(data.getS75gdgtt()) ? "已检查" : "未检查"); + map.put("jzxgn", Boolean.valueOf(data.getJzxgn()) ? "已检查" : "未检查"); //既往史 String pastHistory = ""; if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getPastHistory())) { @@ -1027,13 +1032,11 @@ public class ViewFacade { map.put("gongwaiyun", UnitUtils.unitSplice(data.getGongwaiyun(), UnitConstants.CI)); //流产 StringBuffer abortion = new StringBuffer(); - if (data.getAbortion() != null) - { + if (data.getAbortion() != null) { boolean isAppend = false; abortion.append(UnitUtils.unitSplice(data.getAbortion(), UnitConstants.CI) == null ? "" : UnitUtils.unitSplice(data.getAbortion(), UnitConstants.CI)); - if (data.getAbortionZR() != null || data.getAbortionRG() != null || data.getYaowu() != null) - { - isAppend = true; + if (data.getAbortionZR() != null || data.getAbortionRG() != null || data.getYaowu() != null) { + isAppend = true; abortion.append("("); } if (data.getAbortionZR() != null) { @@ -1047,8 +1050,7 @@ public class ViewFacade { if (data.getYaowu() != null) { abortion.append(" 药物:" + data.getYaowu() + UnitConstants.CI + ""); } - if (isAppend) - { + if (isAppend) { abortion.append(")"); } @@ -1171,7 +1173,7 @@ public class ViewFacade { } if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) { - Map placenta = (Map)obj; + Map placenta = (Map) obj; if (MapUtils.isNotEmpty(placenta)) { if (placenta.get("fetalPosition") != null) { for (FetalPositionEnums fetalPositionEnums : FetalPositionEnums.values()) { @@ -1189,22 +1191,22 @@ public class ViewFacade { fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation"); join = String.valueOf(placenta.get("join")); - if (placenta.get("xlwz")!=null) { + if (placenta.get("xlwz") != null) { placetaMap.put("xlwz", GongJingEnums.getXLWeiZhiNameById(String.valueOf(placenta.get("xlwz")))); } - if (placenta.get("gjwz")!=null) { + if (placenta.get("gjwz") != null) { placetaMap.put("gjwz", GongJingEnums.getWeiZhiNameById(String.valueOf(placenta.get("gjwz")))); } - if (placenta.get("gjyd")!=null) { + if (placenta.get("gjyd") != null) { placetaMap.put("gjyd", GongJingEnums.getYinDuNameById(String.valueOf(placenta.get("gjyd")))); } - if (placenta.get("tm")!=null) { + if (placenta.get("tm") != null) { placetaMap.put("tm", TaiShuEnums.getTmNameById(String.valueOf(placenta.get("tm")))); } - if (placenta.get("ydjc")!=null) { + if (placenta.get("ydjc") != null) { placetaMap.put("ydjc", GongJingEnums.getYDJianCeNameById(String.valueOf(placenta.get("ydjc")))); } @@ -1216,11 +1218,11 @@ public class ViewFacade { placetaMap.put("gjrs", UnitUtils.unitSplice(placenta.get("gjrs"), UnitConstants.BF)); } - if (placenta.get("gjwzOther")!=null) { + if (placenta.get("gjwzOther") != null) { placetaMap.put("gjwzOther", placenta.get("gjwzOther")); } - if (placenta.get("gjydOther")!=null) { + if (placenta.get("gjydOther") != null) { placetaMap.put("gjydOther", placenta.get("gjydOther")); } @@ -1275,7 +1277,7 @@ public class ViewFacade { map.put("syjg", FunvCommonUtil.checkYiGan(data.getSyjg())); map.put("hivkt", FunvCommonUtil.checkYiGan(data.getHivkt())); - map.put("cjzxs",data.getCjzxs());//促甲状腺素 + map.put("cjzxs", data.getCjzxs());//促甲状腺素 map.put("yljzxs", data.getYljzxs());//游离甲状腺素 map.put("jzxgyhwmkt", data.getJzxgyhwmkt());//甲状腺过氧化物酶抗体 @@ -1399,12 +1401,12 @@ public class ViewFacade { map.put("checkDate", DateUtil.getyyyy_MM_dd(data.getCheckDate())); map.put("currentDueDate", ResolveUtils.getPregnancyWeek(patients.getLastMenses(), data.getCheckDate())); - map.put("zyqbdjc", Boolean.valueOf(data.getZyqbd())?"已检查":"未检查"); - map.put("ntjc", Boolean.valueOf(data.getNtjc())?"已检查":"未检查"); - map.put("cjsc", Boolean.valueOf(data.getCjsc())?"已检查":"未检查"); - map.put("textpjbc", Boolean.valueOf(data.getTextpjbc())?"已检查":"未检查"); - map.put("s75gdgtt",Boolean.valueOf( data.getS75gdgtt())?"已检查":"未检查"); - map.put("jzxgn", Boolean.valueOf(data.getJzxgn())?"已检查":"未检查"); + map.put("zyqbdjc", Boolean.valueOf(data.getZyqbd()) ? "已检查" : "未检查"); + map.put("ntjc", Boolean.valueOf(data.getNtjc()) ? "已检查" : "未检查"); + map.put("cjsc", Boolean.valueOf(data.getCjsc()) ? "已检查" : "未检查"); + map.put("textpjbc", Boolean.valueOf(data.getTextpjbc()) ? "已检查" : "未检查"); + map.put("s75gdgtt", Boolean.valueOf(data.getS75gdgtt()) ? "已检查" : "未检查"); + map.put("jzxgn", Boolean.valueOf(data.getJzxgn()) ? "已检查" : "未检查"); //早孕期病毒检测 // private String zyqbdjc; @@ -1495,22 +1497,22 @@ public class ViewFacade { tireMap.put("fetalPosition", FetalPositionEnums.getTitle(fetalPosition)); tireMap.put("fetalPresentation", FetalEnums.getTitle(fetalPresentation)); tireMap.put("join", JoinEnums.getTitle(join)); - if (tire.get("xlwz")!=null) { + if (tire.get("xlwz") != null) { tireMap.put("xlwz", GongJingEnums.getXLWeiZhiNameById(String.valueOf(tire.get("xlwz")))); } - if (tire.get("gjwz")!=null) { + if (tire.get("gjwz") != null) { tireMap.put("gjwz", GongJingEnums.getWeiZhiNameById(String.valueOf(tire.get("gjwz")))); } - if (tire.get("gjyd")!=null) { + if (tire.get("gjyd") != null) { tireMap.put("gjyd", GongJingEnums.getYinDuNameById(String.valueOf(tire.get("gjyd")))); } - if (tire.get("tm")!=null) { + if (tire.get("tm") != null) { tireMap.put("tm", TaiShuEnums.getTmNameById(String.valueOf(tire.get("tm")))); } - if (tire.get("ydjc")!=null) { + if (tire.get("ydjc") != null) { tireMap.put("ydjc", GongJingEnums.getYDJianCeNameById(String.valueOf(tire.get("ydjc")))); } @@ -1522,11 +1524,11 @@ public class ViewFacade { tireMap.put("gjrs", UnitUtils.unitSplice(tire.get("gjrs"), UnitConstants.BF)); } - if (tire.get("gjwzOther")!=null) { + if (tire.get("gjwzOther") != null) { tireMap.put("gjwzOther", tire.get("gjwzOther")); } - if (tire.get("gjydOther")!=null) { + if (tire.get("gjydOther") != null) { tireMap.put("gjydOther", tire.get("gjydOther")); }