Commit 3aefdb747e39d0d45ac13ccde69f1e70610e1cfc
1 parent
deb55fe52c
Exists in
master
and in
6 other branches
证件类型修改为孕妇的
Showing 1 changed file with 12 additions and 2 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
3aefdb7
... | ... | @@ -327,8 +327,18 @@ |
327 | 327 | restMap.put("vcCardNo", baby.getVcCardNo()); /** 就诊卡号 */ |
328 | 328 | // restMap.put("cardNo", baby.getCardNo()); /** 证件号 */ |
329 | 329 | restMap.put("cardNo", person.getCardNo()); /** 证件号 */ |
330 | - Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(baby.getParentId())), Patients.class); | |
331 | - restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */ | |
330 | + Patients patients = mongoTemplate.findById(baby.getParentId(), Patients.class); | |
331 | + if(patients != null) { | |
332 | + restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */ | |
333 | + } else { | |
334 | + BasicConfig basicConfig = mongoTemplate.findOne(Query.query(Criteria.where("name").is("证件类型")), BasicConfig.class); | |
335 | + if(basicConfig != null) { | |
336 | + BasicConfig other = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(basicConfig.getId()).and("name").is("其他")), BasicConfig.class); | |
337 | + if(other != null) { | |
338 | + restMap.put("pcerteTypeId", other.getId()); | |
339 | + } | |
340 | + } | |
341 | + } | |
332 | 342 | } else { |
333 | 343 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); |
334 | 344 | if(patients != null) { |