Commit 711d818063bfa23df343d3bb8bc09b2097bde97d
1 parent
7aa3d945bf
Exists in
master
and in
6 other branches
证件类型修改为孕妇的
Showing 1 changed file with 5 additions and 5 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
711d818
... | ... | @@ -327,12 +327,12 @@ |
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(userId)), Patients.class); | |
331 | - if(patients != null) { | |
332 | - restMap.put("pcerteTypeId", patients.getPcerteTypeId()); /** 证件类型id */ | |
333 | - } else { | |
334 | - restMap.put("pcerteTypeId", "57e1dd12f0f02e7ca519d6c7"); /** 证件类型id */ | |
335 | 330 | |
331 | + List<Patients> list = mongoTemplate.find(Query.query(Criteria.where("cardNo").is(person.getCardNo())).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); | |
332 | + if(CollectionUtils.isNotEmpty(list)) { | |
333 | + restMap.put("pcerteTypeId", list.get(0).getPcerteTypeId()); /** 证件类型id */ | |
334 | + } else { | |
335 | + restMap.put("pcerteTypeId", "57e1dd12f0f02e7ca519d6c7"); /** 其他*/ | |
336 | 336 | } |
337 | 337 | } else { |
338 | 338 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); |