Commit 4d816d001a50d558692ca5c4b2b3d43777ebfe4a

Authored by liquanyu
1 parent 5474767a7c

儿童建档

Showing 2 changed files with 6 additions and 4 deletions

platform-dal/src/main/java/com/lyms/platform/query/PersonModelQuery.java View file @ 4d816d0
... ... @@ -46,10 +46,11 @@
46 46 public MongoQuery convertToQuery() {
47 47 MongoCondition condition = MongoCondition.newInstance();
48 48  
49   - if (null != cardNo && phone != null) {
50   - MongoCondition con1 = MongoCondition.newInstance("cardNo", cardNo, MongoOper.IS);
51   - MongoCondition con = MongoCondition.newInstance("phone", phone, MongoOper.IS);
52   - condition = condition.orCondition(new MongoCondition[]{con1, con});
  49 + if (null != cardNo) {
  50 + condition = condition.and("cardNo", cardNo, MongoOper.IS);
  51 + }
  52 + if (phone != null) {
  53 + condition = condition.and("phone", phone, MongoOper.IS);
53 54 }
54 55 if (!StringUtils.isEmpty(id)) {
55 56 condition = condition.and("id", id, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 4d816d0
... ... @@ -102,6 +102,7 @@
102 102 {
103 103 PersonModelQuery personModelQuery = new PersonModelQuery();
104 104 personModelQuery.setPhone(yunRequest.getPregnantPhone());
  105 + personModelQuery.setCardNo(yunRequest.getPregnantCertificateNum());
105 106 personModelQuery.setYn(YnEnums.YES.getId());
106 107 List<PersonModel> personModels = personService.queryPersons(personModelQuery);
107 108 PersonModel pmodel = new PersonModel();