From ea2e3b57520d325d658b2614dffc8923fb37ae76 Mon Sep 17 00:00:00 2001 From: landong2015 Date: Wed, 8 Feb 2017 09:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E8=AF=8A=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E6=8D=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/operate/web/facade/ViewFacade.java | 61 +++++++++++++++++----- 1 file changed, 48 insertions(+), 13 deletions(-) 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 aab0dc8..8712e2b 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 @@ -23,10 +23,7 @@ import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * Created by Administrator on 2017/1/16 0016. @@ -120,13 +117,30 @@ public class ViewFacade { /* 院内信息 */ map.put("lastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses())); + //孕周(用末次月经去计算) + map.put("lastMensesWeek", ResolveUtils.getPregnancyWeek(data.getLastMenses(),new Date())); //纠正末次月经,取末次月经数据 map.put("correctionLastMenses", DateUtil.getyyyy_MM_dd(data.getLastMenses())); + //纠正末次月经孕周 + map.put("correctionLastMensesWeek", ResolveUtils.getPregnancyWeek(data.getLastMenses(),new Date())); + map.put("dueDate", DateUtil.getyyyy_MM_dd(data.getDueDate())); map.put("vcCardNo", data.getVcCardNo()); //条码(暂时去掉) //档案编号 map.put("fileCode", data.getFileCode()); + //建档医生 + String bookbuildingDoctor = ""; + if (StringUtils.isNotEmpty(data.getBookbuildingDoctor()) && FunvCommonUtil.isNumeric(data.getBookbuildingDoctor())){ + Users users = usersService.getUsers(Integer.parseInt(data.getBookbuildingDoctor())); + if (users!=null && users.getYn()==YnEnums.YES.getId()){ + bookbuildingDoctor = users.getName(); + } + } + map.put("bookbuildingDoctor", bookbuildingDoctor); + //建档日期 + map.put("bookbuildingDate", DateUtil.getyyyy_MM_dd(data.getBookbuildingDate())); + map.put("mremark", data.getMremark()); //服务类型 String serviceType = ""; @@ -157,7 +171,6 @@ public class ViewFacade { return ""; } - private void getRisk(String highRisk,String oRisk,Map map){ HighScoreResult highScoreResult = null; if (StringUtils.isNotEmpty(highRisk)){ @@ -246,7 +259,8 @@ public class ViewFacade { map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth())); map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI)); map.put("phone",patients.getPhone()); - map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek())); + //基本信息孕周 + map.put("fmWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(),new Date())); map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate())); map.put("mremark",patients.getMremark()); @@ -256,7 +270,7 @@ public class ViewFacade { //产检基本信息 map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckTime())); //产检孕周 - map.put("cDueWeek",data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek()))); + map.put("cDueWeek", ResolveUtils.getPregnancyWeek(patients.getLastMenses(),data.getCheckTime())); String checkDoctor = ""; if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getProdDoctor())){ @@ -274,6 +288,8 @@ public class ViewFacade { } } map.put("hospital", hospital); + //产检劵 + map.put("barCode", data.getBarCode()); map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime())); /* 初诊信息 */ //既往史 @@ -332,7 +348,17 @@ public class ViewFacade { cestationInfo = FunvCommonUtil.replace(map1,new StringBuilder(),basicConfigService); } map.put("cestationInfo", cestationInfo); - + //丈夫健康情况 + String hHealthInfo = ""; + Map hHealthInfoMap = JsonUtil.getMap(data.gethHealthInfo()); + if (MapUtils.isNotEmpty(hHealthInfoMap)){ + if (hHealthInfoMap.get("yesOrNo").equals("yes")){ + hHealthInfo = "健康"; + }else if (hHealthInfoMap.get("yesOrNo").equals("no")){ + hHealthInfo = hHealthInfoMap.get("qt"); + } + } + map.put("hHealthInfo", hHealthInfo); //孕产史 map.put("pregnancyTimes", UnitUtils.unitSplice(data.getPregnancyTimes(), UnitConstants.CI)); map.put("prodTime", UnitUtils.unitSplice(data.getProdTime(),UnitConstants.CI)); @@ -346,6 +372,7 @@ public class ViewFacade { map.put("height", UnitUtils.unitSplice(data.getHeight(),UnitConstants.CM)); map.put("weight", UnitUtils.unitSplice(data.getWeight(),UnitConstants.KG)); + map.put("baricIndex", data.getBaricIndex()); map.put("yqWeight", UnitUtils.unitSplice(data.getYqWeight(),UnitConstants.KG)); // 血压 String ssy = ""; @@ -396,6 +423,10 @@ public class ViewFacade { fetalPresentation += placenta.getFetalPresentation() == null ? "" : placenta.getFetalPresentation(); //胎心率 heartRate += placenta.getHeartRate() == null ? "" : placenta.getHeartRate().toString(); + + Integer a = (int)Double.parseDouble(heartRate); + heartRate = String.valueOf(a); + join = placenta.getJoin(); } @@ -411,6 +442,10 @@ public class ViewFacade { } } heartRate += placenta.get("heartRate") == null ? "" : placenta.get("heartRate"); + + Integer a = (int)Double.parseDouble(heartRate); + heartRate = String.valueOf(a); + fetalPresentation += placenta.get("fetalPresentation") == null ? "" : placenta.get("fetalPresentation"); join = placenta.get("join"); } @@ -432,24 +467,24 @@ public class ViewFacade { map.put("platelet",UnitUtils.unitSplice(data.getPlatelet(),UnitConstants.TEN_LKG)); map.put("chgOther",data.getChgOther()); - map.put("ndb",data.getNdb()); + map.put("ndb",FunvCommonUtil.checkYiGan(data.getNdb())); map.put("nt",data.getNt()); map.put("urineKetone",data.getUrineKetone()); map.put("bld",data.getBld()); map.put("ncgOther",data.getNcgOther()); map.put("abo",FunvCommonUtil.getBaseicConfigByid(data.getAbo(), basicConfigService)); - map.put("rh",data.getRh()); - map.put("bloodSugar",data.getBloodSugar()); + map.put("rh",FunvCommonUtil.checkYiGan(data.getRh())); + map.put("bloodSugar",UnitUtils.unitSplice(data.getBloodSugar(),UnitConstants.MMOLL)); map.put("xqgbzam",UnitUtils.unitSplice(data.getXqgbzam(), UnitConstants.UL)); map.put("xqgczam",UnitUtils.unitSplice(data.getXqgczam(), UnitConstants.UL)); map.put("albumin",UnitUtils.unitSplice(data.getAlbumin(), UnitConstants.GL)); map.put("totalBilirubin",UnitUtils.unitSplice(data.getTotalBilirubin(), UnitConstants.UMOLL)); map.put("jhBilirubin",UnitUtils.unitSplice(data.getJhBilirubin(), UnitConstants.UMOLL)); - map.put("bg",data.getBg()); + map.put("bg",FunvCommonUtil.checkYiGan(data.getBg())); map.put("ygbmky",FunvCommonUtil.checkYiGan(data.getYgbmky())); - map.put("ygbmkt",FunvCommonUtil.checkYiGan(data.getYgbmky())); + map.put("ygbmkt",FunvCommonUtil.checkYiGan(data.getYgbmkt())); map.put("ygeky",FunvCommonUtil.checkYiGan(data.getYgeky())); map.put("ygekt",FunvCommonUtil.checkYiGan(data.getYgekt())); map.put("yghxkt",FunvCommonUtil.checkYiGan(data.getYghxkt())); -- 1.8.3.1