Commit f28ae73b7efee12e9db6710fc7b942bc693e6783
1 parent
5a097c1069
Exists in
master
and in
6 other branches
妇女建档增加配偶信息
Showing 2 changed files with 16 additions and 6 deletions
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
View file @
f28ae73
| ... | ... | @@ -113,6 +113,7 @@ |
| 113 | 113 | |
| 114 | 114 | private List<String> hospitalIds; |
| 115 | 115 | private String queryNo; |
| 116 | + private String spouseName; | |
| 116 | 117 | |
| 117 | 118 | public String getQueryNo() { |
| 118 | 119 | return queryNo; |
| ... | ... | @@ -174,6 +175,10 @@ |
| 174 | 175 | condition = condition.and("streetRegisterId", streetRegisterId, MongoOper.IS); |
| 175 | 176 | } |
| 176 | 177 | |
| 178 | + if (StringUtils.isNotBlank(spouseName)) { | |
| 179 | + condition = condition.and("spouseName", "^"+spouseName, MongoOper.LIKE); | |
| 180 | + } | |
| 181 | + | |
| 177 | 182 | if (StringUtils.isNotBlank(vcCardNo)) { |
| 178 | 183 | condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); |
| 179 | 184 | } |
| 180 | 185 | |
| 181 | 186 | |
| ... | ... | @@ -234,13 +239,10 @@ |
| 234 | 239 | MongoCondition con2 = MongoCondition.newInstance("username", "^"+queryNo, MongoOper.LIKE); |
| 235 | 240 | MongoCondition con3 = MongoCondition.newInstance("vcCardNo", queryNo, MongoOper.IS); |
| 236 | 241 | MongoCondition con4 = MongoCondition.newInstance("certificateNum", queryNo, MongoOper.IS); |
| 237 | - MongoCondition con5 = MongoCondition.newInstance("spouseCardNo", queryNo, MongoOper.IS); | |
| 238 | - MongoCondition con6 = MongoCondition.newInstance("spousePhone", queryNo, MongoOper.IS); | |
| 239 | - MongoCondition con7 = MongoCondition.newInstance("spouseName", "^"+queryNo, MongoOper.LIKE); | |
| 240 | 242 | if(c1!=null) { |
| 241 | - c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria()); | |
| 243 | + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria()); | |
| 242 | 244 | }else { |
| 243 | - c1 = c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria(); | |
| 245 | + c1 = c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria(); | |
| 244 | 246 | } |
| 245 | 247 | //condition = condition.and("id", id, MongoOper.IS).orCondition(); |
| 246 | 248 | } |
| ... | ... | @@ -249,6 +251,14 @@ |
| 249 | 251 | condition = condition.andCondition(new MongoCondition(c1)); |
| 250 | 252 | } |
| 251 | 253 | return condition.toMongoQuery(); |
| 254 | + } | |
| 255 | + | |
| 256 | + public String getSpouseName() { | |
| 257 | + return spouseName; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public void setSpouseName(String spouseName) { | |
| 261 | + this.spouseName = spouseName; | |
| 252 | 262 | } |
| 253 | 263 | |
| 254 | 264 | public Date getStartBuildDay() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
f28ae73
| ... | ... | @@ -917,7 +917,7 @@ |
| 917 | 917 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 918 | 918 | archiveQuery.setSex(sexId); |
| 919 | 919 | archiveQuery.setHospitalId(hospital); |
| 920 | - archiveQuery.setQueryNo(name); | |
| 920 | + archiveQuery.setSpouseName(name); | |
| 921 | 921 | List<ResidentsArchiveModel> archiveModelList = residentsArchiveService.queryResident(archiveQuery); |
| 922 | 922 | |
| 923 | 923 | List<Map> list = new ArrayList<>(); |