Commit 24b23be6cf93112aef66a8ae23b493ce32caa980
1 parent
ac8d7de1c8
Exists in
master
and in
1 other branch
update
Showing 1 changed file with 8 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostkfFaccade.java
View file @
24b23be
... | ... | @@ -231,8 +231,14 @@ |
231 | 231 | { |
232 | 232 | MaternalDeliverModel maternalDeliverModel = list2.get(0); |
233 | 233 | info.put("fmDate",maternalDeliverModel.getDueDate()); |
234 | - info.put("fmDoctor",usersService.getUsers(Integer.parseInt(maternalDeliverModel.getDeliverDoctor())).getName()); | |
235 | - info.put("name",patientsService.findOnePatientById(maternalDeliverModel.getParentId()).getUsername()); | |
234 | + info.put("fmDoctor", usersService.getUsers(Integer.parseInt(maternalDeliverModel.getDeliverDoctor())).getName()); | |
235 | + | |
236 | + Patients patients = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
237 | + if (patients != null) | |
238 | + { | |
239 | + info.put("name",patients.getUsername()); | |
240 | + info.put("age", DateUtil.getAge(patients.getBirth(), maternalDeliverModel.getDueDate1())); | |
241 | + } | |
236 | 242 | } |
237 | 243 | |
238 | 244 | BaseObjectResponse response = new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(CollectionUtils.isNotEmpty(postkfModels) |