From 4dc7d3be58310345b86ff009752fa4d7c5d39f93 Mon Sep 17 00:00:00 2001 From: wangbo <184677810@qq.com> Date: Wed, 5 Jun 2019 17:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=87=E5=A5=B3=E5=81=A5=E5=BA=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E8=BF=BD=E8=AE=BF=E7=AE=A1=E7=90=86-=E5=AD=95?= =?UTF-8?q?=E6=9C=9F=E6=A3=80=E6=9F=A5-=E5=AF=BC=E5=87=BA=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=9C=80=E5=A2=9E=E5=8A=A0=E9=AB=98=E5=8D=B1=E9=A3=8E?= =?UTF-8?q?=E9=99=A9=E7=B4=A0=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operate/web/facade/BabyCheckFacade.java | 3 +- .../operate/web/facade/TrackDownFacade.java | 61 ++++++++++++---------- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java index e7d41f3..9c7832a 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java @@ -2348,8 +2348,9 @@ public class BabyCheckFacade { //喂养指南 data.put("wyzl", wyconfig.getContentOne()); + //2019 6月计划 婴幼儿指导报告 去掉每日所需营养素、个月龄饮食指南和喂养指南进行整合为一项 //每日所需营养素 - data.put("yys", getYys(month)); + data.put("yys", getYys(month)); } } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java index 9066626..782d29f 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java @@ -50,14 +50,14 @@ import java.util.*; public class TrackDownFacade { - public void export(TrackDownQueryRequest downQueryRequest, Integer userId,HttpServletResponse response) { + public void export(TrackDownQueryRequest downQueryRequest, Integer userId, HttpServletResponse response) { //转换为本地的查询条件 //转换为本地的查询条件 TrackDownRecordQuery downRecordQuery; try { downRecordQuery = convertNaviteQuery(downQueryRequest, userId); - }catch (Exception e){ - return ; + } catch (Exception e) { + return; } //不分页 downRecordQuery.setNeed(null); @@ -105,11 +105,13 @@ public class TrackDownFacade { cnames.put("yyTime", "预约时间"); } else if (downQueryRequest.getTrackType() == 3) { // 产前检查 cnames.put("week", "孕周"); + cnames.put("rFactor", "高危因素"); cnames.put("checkCount", "本院产检次数"); cnames.put("yyTime", "产检日期"); cnames.put("yycjDate", "预约产检日期"); cnames.put("cjzfDate", "产检追访时间"); cnames.put("result", "产检追访结果"); + } else if (downQueryRequest.getTrackType() == 4) { // 产前筛查 cnames.put("week", "孕周"); cnames.put("yycsDate", "预约产筛日期"); @@ -151,6 +153,7 @@ public class TrackDownFacade { result.put("yyTime", data.get("yyTime")); } else if (downQueryRequest.getTrackType() == 3) { // 产前检查 result.put("week", data.get("week")); + result.put("rFactor", data.get("rFactor")); result.put("checkCount", data.get("checkCount")); result.put("yyTime", data.get("yyTime")); result.put("yycjDate", data.get("yycjDate")); @@ -276,7 +279,7 @@ public class TrackDownFacade { * @param downQueryRequest * @return */ - private TrackDownRecordQuery convertNaviteQuery(TrackDownQueryRequest downQueryRequest, Integer userId) throws Exception{ + private TrackDownRecordQuery convertNaviteQuery(TrackDownQueryRequest downQueryRequest, Integer userId) throws Exception { boolean isPatient = false; String hospitalId = autoMatchFacade.getHospitalId(userId); @@ -299,12 +302,12 @@ public class TrackDownFacade { isPatient = true; } - if(downQueryRequest.getStartNextCheckTime()!=null){//下次产检开始日期 + if (downQueryRequest.getStartNextCheckTime() != null) {//下次产检开始日期 patientsQuery.setNextCheckTimeStart(downQueryRequest.getStartNextCheckTime()); isPatient = true; } - if(downQueryRequest.getEndNextCheckTime()!=null){//下次产检结束日期 + if (downQueryRequest.getEndNextCheckTime() != null) {//下次产检结束日期 patientsQuery.setNextCheckTimeEnd(downQueryRequest.getEndNextCheckTime()); isPatient = true; } @@ -355,9 +358,9 @@ public class TrackDownFacade { patientsQuery.setHospitalId(hospitalId); patientsQuery.setType(1); patientsQuery.setQueryNo(downQueryRequest.getKey()); - System.out.println("过滤条件:"+patientsQuery.convertToQuery().convertToMongoQuery()); + System.out.println("过滤条件:" + patientsQuery.convertToQuery().convertToMongoQuery()); List patientses = patientsService.queryPatient(patientsQuery); - if(CollectionUtils.isEmpty(patientses)){ + if (CollectionUtils.isEmpty(patientses)) { throw new Exception("没有找到数据"); } List pids = new ArrayList<>(); @@ -545,7 +548,7 @@ public class TrackDownFacade { TrackDownRecordQuery downRecordQuery; try { downRecordQuery = convertNaviteQuery(downQueryRequest, userId); - }catch (Exception e){ + } catch (Exception e) { BaseObjectResponse baseObjectResponse = new BaseObjectResponse(); baseObjectResponse.setData(new ArrayList<>()); return new BaseObjectResponse(); @@ -611,8 +614,8 @@ public class TrackDownFacade { Patients patients = patientsService.findOnePatientById(downRecord.getParentId()); - if(patients==null){ - System.out.println("产后复查未找到parent:"+downRecord.getParentId()); + if (patients == null) { + System.out.println("产后复查未找到parent:" + downRecord.getParentId()); return temp; } //分娩时间 @@ -777,14 +780,14 @@ public class TrackDownFacade { Patients patients = patientsService.findOnePatientById(downRecord.getParentId()); Map temp = new HashMap<>(); - if(patients==null){ - System.out.println("产检追访未找到parent:"+downRecord.getParentId()); + if (patients == null) { + System.out.println("产检追访未找到parent:" + downRecord.getParentId()); downRecord.setStatus(0); - trackDownRecordService.updateTrackDown(downRecord,downRecord.getId()); + trackDownRecordService.updateTrackDown(downRecord, downRecord.getId()); return temp; } //完善高危数据 - handHightRisk(patients,temp); + handHightRisk(patients, temp); temp.put("username", downRecord.getUsername()); temp.put("age", DateUtil.getAge(downRecord.getBirth())); temp.put("cardNo", StringUtils.encryCardNo(downRecord.getCardNo())); @@ -798,6 +801,13 @@ public class TrackDownFacade { temp.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date())); /** 孕周 */ } } + //高危因素 + if (CollectionUtils.isNotEmpty(patients.getRiskFactorId())) { + for (String risl : patients.getRiskFactorId()) { + + } + } + //产检次数 temp.put("checkCount", getChuzhenCount(parentId)); Criteria criteria = Criteria.where("yn").is(1).and("parentId").is(downRecord.getParentId()); @@ -858,7 +868,7 @@ public class TrackDownFacade { } } - public void handHightRisk(Patients patients,Map map){ + public void handHightRisk(Patients patients, Map map) { //高危因素 List factor = patients.getRiskFactorId(); @@ -873,21 +883,18 @@ public class TrackDownFacade { } } if (sb.toString().endsWith(",")) { - map.put("rFactor",sb.substring(0, sb.length() - 1)); + map.put("rFactor", sb.substring(0, sb.length() - 1)); } else { - map.put("rFactor",sb.toString()); + map.put("rFactor", sb.toString()); } if (!"-".equals(map.get("rFactor")) && org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { - map.put("rFactor",map.get("rFactor")+","+patients.getoRiskFactor()); - }else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) - { - map.put("rFactor",patients.getoRiskFactor()); + map.put("rFactor", map.get("rFactor") + "," + patients.getoRiskFactor()); + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { + map.put("rFactor", patients.getoRiskFactor()); } - } - else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) - { - map.put("rFactor",patients.getoRiskFactor()); + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { + map.put("rFactor", patients.getoRiskFactor()); } List level = new ArrayList(); if (StringUtils.isNotEmpty(patients.getRiskLevelId())) { @@ -904,7 +911,7 @@ public class TrackDownFacade { } catch (Exception e) { ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); } - map.put("rLevel",HighScoreResult.filter(level)); + map.put("rLevel", HighScoreResult.filter(level)); } } } \ No newline at end of file -- 1.8.3.1