Commit a1e040fe418e144533cb37e28a46a7f1000dc195
1 parent
e8a5f9baa7
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 9 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
a1e040f
... | ... | @@ -582,13 +582,15 @@ |
582 | 582 | List<BabyNerveMovementModel> models = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId)).with(new Sort(new Sort.Order(Sort.Direction.DESC, "createTime"))), BabyNerveMovementModel.class); |
583 | 583 | List<Map<String, String>> list = new LinkedList<>(); |
584 | 584 | if (CollectionUtils.isNotEmpty(models)) { |
585 | - BabyNerveMovementModel model = models.get(0); | |
586 | - Map<String, String> stringStringMap = BeanUtils.objectToStringMap(model); | |
587 | - stringStringMap.put("ageStr", DateUtil.getBabyMonthAge(model.getBirth(), new Date())); | |
588 | - stringStringMap.put("checkTimeStr", DateUtil.getyyyy_MM_dd(model.getCheckTime())); | |
589 | - stringStringMap.put("checkDoctorStr", usersMapper.getUsers(Integer.parseInt(model.getCheckDoctor())).getName()); | |
590 | - stringStringMap.put("birthStr", DateUtil.getyyyy_MM_dd(model.getBirth())); | |
591 | - list.add(stringStringMap); | |
585 | + for(BabyNerveMovementModel model : models) | |
586 | + { | |
587 | + Map<String, String> stringStringMap = BeanUtils.objectToStringMap(model); | |
588 | + stringStringMap.put("ageStr", DateUtil.getBabyMonthAge(model.getBirth(), new Date())); | |
589 | + stringStringMap.put("checkTimeStr", DateUtil.getyyyy_MM_dd(model.getCheckTime())); | |
590 | + stringStringMap.put("checkDoctorStr", usersMapper.getUsers(Integer.parseInt(model.getCheckDoctor())).getName()); | |
591 | + stringStringMap.put("birthStr", DateUtil.getyyyy_MM_dd(model.getBirth())); | |
592 | + list.add(stringStringMap); | |
593 | + } | |
592 | 594 | } |
593 | 595 | BaseResponse baseResponse = new BaseResponse(); |
594 | 596 | baseResponse.setObject(list); |