Commit a5b8a67bb0cc631d2769dd8fd5c59245bff78a1e
1 parent
1fe043b581
Exists in
master
and in
6 other branches
妇女建档增加配偶信息
Showing 2 changed files with 16 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
View file @
a5b8a67
... | ... | @@ -176,7 +176,7 @@ |
176 | 176 | } |
177 | 177 | |
178 | 178 | if (StringUtils.isNotBlank(spouseName)) { |
179 | - condition = condition.and("spouseName", "^"+spouseName, MongoOper.LIKE); | |
179 | + condition = condition.and("spouseName", spouseName, MongoOper.LIKE); | |
180 | 180 | } |
181 | 181 | |
182 | 182 | if (StringUtils.isNotBlank(vcCardNo)) { |
183 | 183 | |
184 | 184 | |
... | ... | @@ -239,10 +239,13 @@ |
239 | 239 | MongoCondition con2 = MongoCondition.newInstance("username", "^"+queryNo, MongoOper.LIKE); |
240 | 240 | MongoCondition con3 = MongoCondition.newInstance("vcCardNo", queryNo, MongoOper.IS); |
241 | 241 | MongoCondition con4 = MongoCondition.newInstance("certificateNum", queryNo, MongoOper.IS); |
242 | + MongoCondition con5 = MongoCondition.newInstance("spouseCardNo", queryNo, MongoOper.IS); | |
243 | + MongoCondition con6 = MongoCondition.newInstance("spousePhone", queryNo, MongoOper.IS); | |
244 | + MongoCondition con7 = MongoCondition.newInstance("spouseName", "^"+queryNo, MongoOper.LIKE); | |
242 | 245 | if(c1!=null) { |
243 | - c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria()); | |
246 | + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria()); | |
244 | 247 | }else { |
245 | - c1 = c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria(); | |
248 | + c1 = c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria(); | |
246 | 249 | } |
247 | 250 | //condition = condition.and("id", id, MongoOper.IS).orCondition(); |
248 | 251 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
a5b8a67
... | ... | @@ -915,9 +915,17 @@ |
915 | 915 | ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery(); |
916 | 916 | archiveQuery.setYn(YnEnums.YES.getId()); |
917 | 917 | String hospital = autoMatchFacade.getHospitalId(userId); |
918 | - archiveQuery.setSex(sexId); | |
918 | + if (SystemConfig.MAN_ID.equals(sexId)) | |
919 | + { | |
920 | + archiveQuery.setSex(SystemConfig.WOMAN_ID); | |
921 | + } | |
922 | + else | |
923 | + { | |
924 | + archiveQuery.setSex(SystemConfig.MAN_ID); | |
925 | + } | |
926 | + | |
919 | 927 | archiveQuery.setHospitalId(hospital); |
920 | - archiveQuery.setSpouseName(name); | |
928 | + archiveQuery.setUsername(name); | |
921 | 929 | List<ResidentsArchiveModel> archiveModelList = residentsArchiveService.queryResident(archiveQuery); |
922 | 930 | |
923 | 931 | List<Map> list = new ArrayList<>(); |