Commit cfb1f946fd039daac2cd532936a4da27ddf83b1f
1 parent
7fe5e20d6a
Exists in
master
and in
1 other branch
bug
Showing 2 changed files with 38 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
cfb1f94
... | ... | @@ -442,9 +442,9 @@ |
442 | 442 | m.put("nowWeight", nowWeight); |
443 | 443 | dayWeights2.add(m); |
444 | 444 | patientWeight.setDayWeights2(dayWeights2); |
445 | + dayWeights.put(DateUtil.getyyyy_MM_dd(new Date()), nowWeight); | |
445 | 446 | } |
446 | 447 | |
447 | - dayWeights.put(DateUtil.getyyyy_MM_dd(new Date()), nowWeight); | |
448 | 448 | patientWeight.setCreated(new Date()); |
449 | 449 | patientWeight.setHospitalId(patients.getHospitalId()); |
450 | 450 | if(StringUtils.isNotBlank(patientWeight.getBeforeWeight()) && patientWeight.getBeforeHeight() != null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
cfb1f94
... | ... | @@ -618,13 +618,45 @@ |
618 | 618 | */ |
619 | 619 | private String getCheckTime(String type, String userId) { |
620 | 620 | if(StringUtils.isNotEmpty(type) && StringUtils.isNotEmpty(userId)) { |
621 | - if("1".equals(type)) { | |
622 | - Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); | |
623 | - if(patients != null && patients.getBookbuildingDate() != null) { | |
624 | - return DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()); | |
621 | + if("1".equals(type) || "3".equals(type)) { | |
622 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); | |
623 | + if(patients != null) { | |
624 | + return DateUtil.getyyyy_MM_dd(patients.getCreated()); | |
625 | 625 | } |
626 | 626 | } else if("2".equals(type)) { |
627 | - | |
627 | + AntExChuModel exChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); | |
628 | + if(exChuModel != null) { | |
629 | + return DateUtil.getyyyy_MM_dd(exChuModel.getCreated()); | |
630 | + } | |
631 | + AntenatalExaminationModel antenatalExaminationModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class); | |
632 | + if(antenatalExaminationModel != null) { | |
633 | + return DateUtil.getyyyy_MM_dd(antenatalExaminationModel.getCreated()); | |
634 | + } | |
635 | + } else if("4".equals(type)) { | |
636 | + MaternalDeliverModel md = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), MaternalDeliverModel.class); | |
637 | + if(md != null && md.getCreated() != null) { | |
638 | + return DateUtil.getyyyy_MM_dd(md.getCreated()); | |
639 | + } | |
640 | + } else if("5".equals(type)) { | |
641 | + DischargeAbstractMotherModel dischargeAbstractMotherModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), DischargeAbstractMotherModel.class); | |
642 | + if(dischargeAbstractMotherModel != null) { | |
643 | + return DateUtil.getyyyy_MM_dd(dischargeAbstractMotherModel.getCreateDate()); | |
644 | + } | |
645 | + } else if("6".equals(type)) { | |
646 | + PostReviewModel p = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), PostReviewModel.class); | |
647 | + if(p != null && p.getCreated() != null) { | |
648 | + return DateUtil.getyyyy_MM_dd(p.getCreated()); | |
649 | + } | |
650 | + } else if("7".equals(type)) { | |
651 | + BabyModel b = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), BabyModel.class); | |
652 | + if(b != null && b.getCreated() != null) { | |
653 | + return DateUtil.getyyyy_MM_dd(b.getCreated()); | |
654 | + } | |
655 | + } else if("8".equals(type)) { | |
656 | + BabyCheckModel b = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), BabyCheckModel.class); | |
657 | + if(b != null && b.getCreated() != null) { | |
658 | + return DateUtil.getyyyy_MM_dd(b.getCreated()); | |
659 | + } | |
628 | 660 | } |
629 | 661 | } |
630 | 662 |