Commit 96ba4f9929d91df77e4d491a1aa496333d981b7c
1 parent
d6034626b2
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 4 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyHealthFacade.java
View file @
96ba4f9
... | ... | @@ -1008,7 +1008,6 @@ |
1008 | 1008 | * @return |
1009 | 1009 | */ |
1010 | 1010 | public BaseResponse chkRecordLst(String id) { |
1011 | - List<Map> lst=new ArrayList<>(); | |
1012 | 1011 | Map<String, Object> rsMap = new HashMap<>(); |
1013 | 1012 | //儿童建档信息 |
1014 | 1013 | BabyModel babyModel = mongoTemplate.findOne(new Query(Criteria.where("_id").in(id)).with(new Sort(Sort.Direction.DESC, "created")), BabyModel.class); |
1015 | 1014 | |
1016 | 1015 | |
1017 | 1016 | |
1018 | 1017 | |
... | ... | @@ -1030,18 +1029,17 @@ |
1030 | 1029 | Criteria criteriaCheck = Criteria.where("buildId").is(id); |
1031 | 1030 | List<BabyCheckModel> babyCheckModelList = mongoTemplate.find(new Query(criteriaCheck).with(new Sort(Sort.Direction.DESC, "created")), BabyCheckModel.class); |
1032 | 1031 | if(CollectionUtils.isEmpty(babyCheckModelList)){ |
1033 | - return RespBuilder.buildSuccess(null); | |
1032 | + return RespBuilder.buildSuccess(rsMap); | |
1034 | 1033 | } |
1034 | + List<Map> lst=new ArrayList<>(); | |
1035 | 1035 | for (BabyCheckModel babyCheckModel : babyCheckModelList) { |
1036 | + | |
1036 | 1037 | Map<String, Object> rs = new HashMap<>(); |
1037 | 1038 | //儿保检查数据 |
1038 | 1039 | rs.put("babyCheckModel",new BeanMap(babyCheckModel)); |
1039 | - //新生儿访视模型 | |
1040 | - BabyVisitModel babyVisitModel = mongoTemplate.findOne(new Query(Criteria.where("parentid").is(id).and("created").is(DateUtil.addMonth(new Date(), babyCheckModel.getTcType()))).with(new Sort(Sort.Direction.DESC, "created")), BabyVisitModel.class); | |
1041 | - rs.put("babyVisitModel",new BeanMap(babyVisitModel)); | |
1042 | 1040 | lst.add(rs); |
1043 | 1041 | } |
1044 | - rsMap.put("checkModel",lst); | |
1042 | + rsMap.put("CheckModel",lst); | |
1045 | 1043 | return RespBuilder.buildSuccess(rsMap); |
1046 | 1044 | } |
1047 | 1045 |