Commit a99a1cfa9c5920fc46205c81a0e83e231dfeeaf9
1 parent
a7237bc87c
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 43 additions and 41 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
a99a1cf
... | ... | @@ -250,7 +250,7 @@ |
250 | 250 | Map<String, Integer> temp = new HashMap<>(); |
251 | 251 | for (Map<String, Date> dateMap : range) { |
252 | 252 | if(patient.getBookbuildingDate().getTime() >= dateMap.get("start").getTime() |
253 | - && patient.getBookbuildingDate().getTime() < dateMap.get("end").getTime()) { | |
253 | + && patient.getBookbuildingDate().getTime() <= dateMap.get("end").getTime()) { | |
254 | 254 | temp.put(DateUtil.getyyyy_mm(dateMap.get("cname")), 1); |
255 | 255 | break; |
256 | 256 | } |
... | ... | @@ -606,7 +606,7 @@ |
606 | 606 | return RespBuilder.buildSuccess(); |
607 | 607 | } |
608 | 608 | 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); |
609 | - List<AntenatalExaminationModel> 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); | |
609 | + List<AntenatalExaminationModel> 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); | |
610 | 610 | |
611 | 611 | Map<String, Object> xyMap = new HashMap<>(); |
612 | 612 | List<Integer> szyMin = new ArrayList<>(); |
613 | 613 | |
... | ... | @@ -631,46 +631,7 @@ |
631 | 631 | Map<Integer, String> weights = new LinkedHashMap<>(); |
632 | 632 | boolean tzFlag = antExChuModel == null || StringUtils.isEmpty(antExChuModel.getYqWeight()) || StringUtils.isEmpty(antExChuModel.getHeight()) ? false : true; |
633 | 633 | |
634 | - // 添加初诊list | |
635 | - if(antExChuModel != null) { | |
636 | - Map<String, Object> temp = new HashMap<>(); | |
637 | - temp.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); | |
638 | - Integer week = DateUtil.getWeek2(p.getLastMenses(), antExChuModel.getCheckTime()); | |
639 | - temp.put("week", DateUtil.getWeekDesc(p.getLastMenses(), antExChuModel.getCheckTime())); | |
640 | - temp.put("weight", antExChuModel.getWeight()); | |
641 | - temp.put("bp", parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), "--")); | |
642 | - temp.put("gonggao", antExChuModel.getGonggao()); | |
643 | - temp.put("abdominalCircumference", antExChuModel.getFuwei());// 腹围 | |
644 | 634 | |
645 | - List<Map> tireData = antExChuModel.getPlacentas(); | |
646 | - String fetalPosition = ""; | |
647 | - String heartRate = ""; | |
648 | - String fetalPresentation = ""; | |
649 | - if(CollectionUtils.isNotEmpty(tireData)) { | |
650 | - for (Map tireDatum : tireData) { | |
651 | - fetalPosition = fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; | |
652 | - heartRate = heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; | |
653 | - fetalPresentation = fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
654 | - } | |
655 | - } else { | |
656 | - fetalPosition = "--"; | |
657 | - heartRate = "--"; | |
658 | - fetalPresentation = "--"; | |
659 | - } | |
660 | - | |
661 | - temp.put("fetalPosition", fetalPosition); // 胎位 | |
662 | - temp.put("heartRate", heartRate); // 胎心 | |
663 | - temp.put("fetalPresentation", fetalPresentation); // 先露 | |
664 | - temp.put("edema",FuZhongEnums.getName(antExChuModel.getEdema())); // 水肿 | |
665 | - temp.put("urineProtein", antExChuModel.getNdb()); // 尿蛋白 | |
666 | - temp.put("hemoglobin", antExChuModel.getXhdb()); // 血红素 | |
667 | - | |
668 | - ssy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), 0)); | |
669 | - szy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), 0)); | |
670 | - | |
671 | - restList.add(temp); | |
672 | - } | |
673 | - | |
674 | 635 | for (AntenatalExaminationModel antexModel : antexModels) { |
675 | 636 | Map<String, Object> temp = new HashMap<>(); |
676 | 637 | Integer week = DateUtil.getWeek2(p.getLastMenses(), antexModel.getCheckDate()); |
... | ... | @@ -711,6 +672,47 @@ |
711 | 672 | |
712 | 673 | restList.add(temp); |
713 | 674 | } |
675 | + | |
676 | + // 添加初诊list\ | |
677 | + if(antExChuModel != null) { | |
678 | + Map<String, Object> temp = new HashMap<>(); | |
679 | + temp.put("checkTime", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); | |
680 | + Integer week = DateUtil.getWeek2(p.getLastMenses(), antExChuModel.getCheckTime()); | |
681 | + temp.put("week", DateUtil.getWeekDesc(p.getLastMenses(), antExChuModel.getCheckTime())); | |
682 | + temp.put("weight", antExChuModel.getWeight()); | |
683 | + temp.put("bp", parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), "--")); | |
684 | + temp.put("gonggao", antExChuModel.getGonggao()); | |
685 | + temp.put("abdominalCircumference", antExChuModel.getFuwei());// 腹围 | |
686 | + | |
687 | + List<Map> tireData = antExChuModel.getPlacentas(); | |
688 | + String fetalPosition = ""; | |
689 | + String heartRate = ""; | |
690 | + String fetalPresentation = ""; | |
691 | + if(CollectionUtils.isNotEmpty(tireData)) { | |
692 | + for (Map tireDatum : tireData) { | |
693 | + fetalPosition = fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; | |
694 | + heartRate = heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; | |
695 | + fetalPresentation = fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
696 | + } | |
697 | + } else { | |
698 | + fetalPosition = "--"; | |
699 | + heartRate = "--"; | |
700 | + fetalPresentation = "--"; | |
701 | + } | |
702 | + | |
703 | + temp.put("fetalPosition", fetalPosition); // 胎位 | |
704 | + temp.put("heartRate", heartRate); // 胎心 | |
705 | + temp.put("fetalPresentation", fetalPresentation); // 先露 | |
706 | + temp.put("edema",FuZhongEnums.getName(antExChuModel.getEdema())); // 水肿 | |
707 | + temp.put("urineProtein", antExChuModel.getNdb()); // 尿蛋白 | |
708 | + temp.put("hemoglobin", antExChuModel.getXhdb()); // 血红素 | |
709 | + | |
710 | + ssy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), 0)); | |
711 | + szy.set(week, parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), 0)); | |
712 | + | |
713 | + restList.add(temp); | |
714 | + } | |
715 | + | |
714 | 716 | |
715 | 717 | |
716 | 718 |