Commit 43d203354309e7edb6df91649b28c75c93592634
1 parent
39c93e1d8c
Exists in
master
and in
6 other branches
逻辑更改
Showing 1 changed file with 13 additions and 11 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
43d2033
... | ... | @@ -254,17 +254,19 @@ |
254 | 254 | |
255 | 255 | /** 1=孕妇 2=儿童 3=产妇 */ |
256 | 256 | PersonModel person = mongoTemplate.findById(userId, PersonModel.class); |
257 | - if(person != null && person.getType() == 2) { | |
258 | - BabyModel baby = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), BabyModel.class); | |
259 | - restMap.put("vcCardNo", baby.getVcCardNo()); /** 就诊卡号 */ | |
260 | - restMap.put("cardNo", baby.getCardNo()); /** 证件号 */ | |
261 | - restMap.put("pcerteTypeId", baby.getFcertTypeId()); /** 证件类型id */ | |
262 | - } else { | |
263 | - Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); | |
264 | - if(patients != null) { | |
265 | - restMap.put("vcCardNo", patients.getVcCardNo()); /** 就诊卡号 */ | |
266 | - restMap.put("cardNo", patients.getCardNo()); /** 证件号 */ | |
267 | - restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */ | |
257 | + if(person != null){ | |
258 | + if(person.getType() == 2) { | |
259 | + BabyModel baby = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), BabyModel.class); | |
260 | + restMap.put("vcCardNo", baby.getVcCardNo()); /** 就诊卡号 */ | |
261 | + restMap.put("cardNo", baby.getCardNo()); /** 证件号 */ | |
262 | + restMap.put("pcerteTypeId", baby.getFcertTypeId()); /** 证件类型id */ | |
263 | + } else { | |
264 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); | |
265 | + if(patients != null) { | |
266 | + restMap.put("vcCardNo", patients.getVcCardNo()); /** 就诊卡号 */ | |
267 | + restMap.put("cardNo", patients.getCardNo()); /** 证件号 */ | |
268 | + restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */ | |
269 | + } | |
268 | 270 | } |
269 | 271 | } |
270 | 272 |