Commit f5aa43ad17fe59eae208e677cb02de8404e96db7

Authored by liquanyu
1 parent 4e05133e26

孕妇建档校验

Showing 1 changed file with 14 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ f5aa43a
... ... @@ -72,16 +72,27 @@
72 72 patientsQuery.setType(1);
73 73 patientsQuery.setHospitalId(yunRequest.getHospitalId());
74 74  
75   - patientsQuery.setCardNo(yunRequest.getPregnantCertificateNum());
76   -
77 75 if (yunRequest.getPregnantCertificateNum() != null)
78 76 {
  77 + patientsQuery.setCardNo(yunRequest.getPregnantCertificateNum());
79 78 //判断该身份证号码是否有孕妇建档 在该医院
80 79 List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
81 80 if (CollectionUtils.isNotEmpty(patients))
82 81 {
83 82 br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
84   - br.setErrormsg("孕妇在该医院已建档");
  83 + br.setErrormsg("该身份证在医院已经建档");
  84 + return br;
  85 + }
  86 + }
  87 + if (yunRequest.getPregnantPhone() != null)
  88 + {
  89 + patientsQuery.setPhone(yunRequest.getPregnantPhone());
  90 + //判断该手机号码在 孕期内有没有建档
  91 + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  92 + if (CollectionUtils.isNotEmpty(patients))
  93 + {
  94 + br.setErrorcode(ErrorCodeConstants.DATA_EXIST);
  95 + br.setErrormsg("该手机号码已经建档");
85 96 return br;
86 97 }
87 98 }