Commit fa24841fcc85d50881f074b456e819f3374eb997
1 parent
a0ed0038e7
Exists in
master
and in
1 other branch
修改建档时对身份证的唯一性判断
Showing 1 changed file with 10 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
fa24841
| ... | ... | @@ -241,11 +241,20 @@ |
| 241 | 241 | if (StringUtils.isNotEmpty(addRequest.getCertificateNum())) { |
| 242 | 242 | //判断该证件号码是否在该医院建档 |
| 243 | 243 | query.setCertificateNum(addRequest.getCertificateNum()); |
| 244 | - query.setCertificateTypeId(addRequest.getCertificateTypeId()); | |
| 245 | 244 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); |
| 246 | 245 | if (CollectionUtils.isNotEmpty(modelList)){ |
| 247 | 246 | br.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
| 248 | 247 | br.setErrormsg("该证件号在医院已经建档"); |
| 248 | + return br; | |
| 249 | + } | |
| 250 | + } | |
| 251 | + | |
| 252 | + if (StringUtils.isNotEmpty(addRequest.getPhone())){ | |
| 253 | + query.setPhone(addRequest.getPhone()); | |
| 254 | + List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); | |
| 255 | + if (CollectionUtils.isNotEmpty(modelList)){ | |
| 256 | + br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
| 257 | + br.setErrormsg("该手机号在医院已经建档"); | |
| 249 | 258 | return br; |
| 250 | 259 | } |
| 251 | 260 | } |