Commit 5cff25f2fb59549ebf08b567b37ddadd7acb41d8
1 parent
2ca13a52d1
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 10 additions and 5 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
5cff25f
... | ... | @@ -330,11 +330,16 @@ |
330 | 330 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); |
331 | 331 | if (patients != null) { |
332 | 332 | //徐倩要求添加的 ,以后有什么问题她负责 20180712 |
333 | - couponInfo.setUseDate(new Date()); | |
334 | - //couponInfo.setUseDate(patients.getBookbuildingDate()); | |
335 | - couponInfo.setOperatorUseId(patients.getBookbuildingDoctor()); | |
336 | - couponInfo.setUsedHospitalId(patients.getHospitalId()); | |
337 | - couponInfo.setUsedId(patients.getId()); | |
333 | + try { | |
334 | + AntExRecordModel antExRecordModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patients.getId())), AntExRecordModel.class); | |
335 | + couponInfo.setUseDate(new Date()); | |
336 | + //couponInfo.setUseDate(patients.getBookbuildingDate()); | |
337 | + couponInfo.setOperatorUseId(antExRecordModel.getCheckDoctor()); | |
338 | + couponInfo.setUsedHospitalId(patients.getHospitalId()); | |
339 | + couponInfo.setUsedId(patients.getId()); | |
340 | + } catch (Exception e) { | |
341 | + e.printStackTrace(); | |
342 | + } | |
338 | 343 | } |
339 | 344 | } else { |
340 | 345 | BabyModel baby = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), BabyModel.class); |