Commit bfe19e95df8193a99e008caeb1d69129f9efca8d
1 parent
cb0768a6cb
Exists in
dev
6:判断建当时,档案号是否重复
Showing 1 changed file with 13 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
bfe19e9
| ... | ... | @@ -301,11 +301,6 @@ |
| 301 | 301 | br.setErrormsg("该高危专案档案号已存在"); |
| 302 | 302 | return br; |
| 303 | 303 | } |
| 304 | - if(CollectionUtils.isNotEmpty(patients) && !(patients.get(0).getFileCode().length() >0)){ | |
| 305 | - br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
| 306 | - br.setErrormsg("该档案号已存在"); | |
| 307 | - return br; | |
| 308 | - } | |
| 309 | 304 | if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) {//todowtt |
| 310 | 305 | if (CollectionUtils.isNotEmpty(patients) && patients.get(0).getLastMenses().getTime() < DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()).getTime()) { |
| 311 | 306 | br.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
| ... | ... | @@ -315,6 +310,19 @@ |
| 315 | 310 | } |
| 316 | 311 | } |
| 317 | 312 | |
| 313 | + if (StringUtils.isNotEmpty(yunRequest.getFileCode())) { | |
| 314 | + patientsQuery.setCardNo(null); | |
| 315 | + patientsQuery.setPhone(null); | |
| 316 | + patientsQuery.setFileCode(yunRequest.getFileCode()); | |
| 317 | + //判断该手机号码在 孕期内有没有建档 | |
| 318 | + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); | |
| 319 | + if(CollectionUtils.isNotEmpty(patients)){ | |
| 320 | + br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
| 321 | + br.setErrormsg("该档案号已存在"); | |
| 322 | + return br; | |
| 323 | + } | |
| 324 | + | |
| 325 | + } | |
| 318 | 326 | //就诊卡号判断 |
| 319 | 327 | // if (StringUtils.isNotEmpty(yunRequest.getVcCardNo())) { |
| 320 | 328 | // patientsQuery.setCardNo(null); |