From a99a1cfa9c5920fc46205c81a0e83e231dfeeaf9 Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Fri, 29 Dec 2017 09:37:15 +0800 Subject: [PATCH] bbbbbb --- .../web/service/impl/ReportServiceImpl.java | 84 +++++++++++----------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java index f7ff795..049cb8c 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java @@ -250,7 +250,7 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService Map temp = new HashMap<>(); for (Map dateMap : range) { if(patient.getBookbuildingDate().getTime() >= dateMap.get("start").getTime() - && patient.getBookbuildingDate().getTime() < dateMap.get("end").getTime()) { + && patient.getBookbuildingDate().getTime() <= dateMap.get("end").getTime()) { temp.put(DateUtil.getyyyy_mm(dateMap.get("cname")), 1); break; } @@ -606,7 +606,7 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService return RespBuilder.buildSuccess(); } AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("hospitalId").is(hospitalId)).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class); - List antexModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("hospitalId").is(hospitalId)).with(new Sort(Sort.Direction.ASC, "checkDate")), AntenatalExaminationModel.class); + List antexModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("hospitalId").is(hospitalId)).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class); Map xyMap = new HashMap<>(); List szyMin = new ArrayList<>(); @@ -631,45 +631,6 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService Map weights = new LinkedHashMap<>(); boolean tzFlag = antExChuModel == null || StringUtils.isEmpty(antExChuModel.getYqWeight()) || StringUtils.isEmpty(antExChuModel.getHeight()) ? false : true; - // 添加初诊list - if(antExChuModel != null) { - Map temp = new HashMap<>(); - temp.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); - Integer week = DateUtil.getWeek2(p.getLastMenses(), antExChuModel.getCheckTime()); - temp.put("week", DateUtil.getWeekDesc(p.getLastMenses(), antExChuModel.getCheckTime())); - temp.put("weight", antExChuModel.getWeight()); - temp.put("bp", parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), "--")); - temp.put("gonggao", antExChuModel.getGonggao()); - temp.put("abdominalCircumference", antExChuModel.getFuwei());// 腹围 - - List tireData = antExChuModel.getPlacentas(); - String fetalPosition = ""; - String heartRate = ""; - String fetalPresentation = ""; - if(CollectionUtils.isNotEmpty(tireData)) { - for (Map tireDatum : tireData) { - fetalPosition = fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; - heartRate = heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; - fetalPresentation = fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); - } - } else { - fetalPosition = "--"; - heartRate = "--"; - fetalPresentation = "--"; - } - - temp.put("fetalPosition", fetalPosition); // 胎位 - temp.put("heartRate", heartRate); // 胎心 - temp.put("fetalPresentation", fetalPresentation); // 先露 - temp.put("edema",FuZhongEnums.getName(antExChuModel.getEdema())); // 水肿 - temp.put("urineProtein", antExChuModel.getNdb()); // 尿蛋白 - temp.put("hemoglobin", antExChuModel.getXhdb()); // 血红素 - - ssy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), 0)); - szy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), 0)); - - restList.add(temp); - } for (AntenatalExaminationModel antexModel : antexModels) { Map temp = new HashMap<>(); @@ -712,6 +673,47 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService restList.add(temp); } + // 添加初诊list\ + if(antExChuModel != null) { + Map temp = new HashMap<>(); + temp.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); + Integer week = DateUtil.getWeek2(p.getLastMenses(), antExChuModel.getCheckTime()); + temp.put("week", DateUtil.getWeekDesc(p.getLastMenses(), antExChuModel.getCheckTime())); + temp.put("weight", antExChuModel.getWeight()); + temp.put("bp", parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), "--")); + temp.put("gonggao", antExChuModel.getGonggao()); + temp.put("abdominalCircumference", antExChuModel.getFuwei());// 腹围 + + List tireData = antExChuModel.getPlacentas(); + String fetalPosition = ""; + String heartRate = ""; + String fetalPresentation = ""; + if(CollectionUtils.isNotEmpty(tireData)) { + for (Map tireDatum : tireData) { + fetalPosition = fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; + heartRate = heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; + fetalPresentation = fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); + } + } else { + fetalPosition = "--"; + heartRate = "--"; + fetalPresentation = "--"; + } + + temp.put("fetalPosition", fetalPosition); // 胎位 + temp.put("heartRate", heartRate); // 胎心 + temp.put("fetalPresentation", fetalPresentation); // 先露 + temp.put("edema",FuZhongEnums.getName(antExChuModel.getEdema())); // 水肿 + temp.put("urineProtein", antExChuModel.getNdb()); // 尿蛋白 + temp.put("hemoglobin", antExChuModel.getXhdb()); // 血红素 + + ssy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), 0)); + szy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), 0)); + + restList.add(temp); + } + + /*if (MapUtils.isNotEmpty(dayWeights)) { -- 1.8.3.1