|
@@ -231,6 +231,12 @@ public class MzPatientMiController {
|
|
|
resultMap.put("message", "保存病人信息失败,已经存在相同的身份证号码记录");
|
|
|
return resultMap;
|
|
|
}
|
|
|
+ MzPatientMi dbMzPatientMi=mzPatientMiService.queryByIcCardNo(mzPatientMi.getIcCardNo());
|
|
|
+ if(dbMzPatientMi!=null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "新增病人信息失败,已经存在相同的诊疗卡");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
int num=mzPatientMiService.saveMzPatientMi(mzPatientMi);
|
|
|
if(num==1){
|
|
|
resultMap.put("code", 0);
|
|
@@ -278,6 +284,12 @@ public class MzPatientMiController {
|
|
|
resultMap.put("message", "修改病人信息失败,已经存在相同的身份证号码记录");
|
|
|
return resultMap;
|
|
|
}
|
|
|
+ MzPatientMi dbMzPatientMi=mzPatientMiService.queryByIcCardNo(mzPatientMi.getIcCardNo());
|
|
|
+ if(dbMzPatientMi!=null && !dbMzPatientMi.getPatientId().equals(mzPatientMi.getPatientId())){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "修改病人信息失败,已经存在相同的诊疗卡");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
int num=mzPatientMiService.modifyMzPatientMi(mzPatientMi);
|
|
|
if(num==1){
|
|
|
resultMap.put("code", 0);
|