Commit 7e6584b6699180ad5091b52a41b20c8e270ed2f2

Authored by litao@lymsh.com
1 parent 4e55d42f5f

bbbbbb

Showing 1 changed file with 3 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 7e6584b
... ... @@ -605,12 +605,12 @@
605 605 if(patients == null) {
606 606 return RespBuilder.buildSuccess();
607 607 }
608   - Patients p = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(patients.getPid()).and("type").is(1)), Patients.class);
  608 + Patients p = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(patients.getPid())).with(new Sort(Sort.Direction.DESC, "lastMenses")), Patients.class);
609 609 if(p == null) {
610 610 return RespBuilder.buildSuccess();
611 611 }
612   - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class);
613   - List<AntenatalExaminationModel> antexModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class);
  612 + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("checkTime").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class);
  613 + List<AntenatalExaminationModel> antexModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("checkDate").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class);
614 614  
615 615 Map<String, Object> xyMap = new HashMap<>();
616 616 List<Integer> szyMin = new ArrayList<>();