瀏覽代碼

异常处理

yjwang 1 月之前
父節點
當前提交
462505747a
共有 1 個文件被更改,包括 0 次插入33 次删除
  1. 0 33
      fs-user-app/src/main/java/com/fs/app/controller/PatientController.java

+ 0 - 33
fs-user-app/src/main/java/com/fs/app/controller/PatientController.java

@@ -2,7 +2,6 @@ package com.fs.app.controller;
 
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.json.JSONUtil;
 import com.fs.app.annotation.Login;
 import com.fs.app.param.FsPatientAddEditParam;
 import com.fs.common.annotation.RepeatSubmit;
@@ -13,8 +12,6 @@ import com.fs.his.enums.FsUserIntegralLogTypeEnum;
 import com.fs.his.param.FsUserAddIntegralTemplateParam;
 import com.fs.his.service.IFsPatientService;
 import com.fs.his.service.IFsUserIntegralLogsService;
-import com.fs.his.utils.IdCardUtil;
-import com.fs.system.service.ISysConfigService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -41,8 +38,6 @@ public class PatientController extends  AppBaseController {
     private IFsPatientService patientService;
     @Autowired
     private IFsUserIntegralLogsService userIntegralLogsService;
-    @Autowired
-    private ISysConfigService configService;
 
     @Login
     @ApiOperation("获取病人列表")
@@ -132,19 +127,6 @@ public class PatientController extends  AppBaseController {
             return   R.error("身份证校验错误");
         }
 
-        //三方校验
-        if (isIdVerification == 1){
-            boolean match = true;
-            if (idCardNumber.length() != 18) {
-                match = IdCardUtil.isMatchByMobile(storeConfig,param.getPatientName(), mobile);
-            } else {
-                match = IdCardUtil.isMatchById(storeConfig,param.getPatientName(), param.getIdCard());
-            }
-            if (!match){
-                return R.error("身份证校验错误");
-            }
-        }
-
         FsPatient patient=new FsPatient();
         BeanUtil.copyProperties(param, patient);
         patient.setUserId(Long.parseLong(getUserId()));
@@ -174,7 +156,6 @@ public class PatientController extends  AppBaseController {
         if (!Pattern.matches(regex, idCardNumber)) {
             throw new CustomException("身份证号码不合法");
         }
-
         if (param.getPatientName().length()<2||param.getPatientName().length()>30||!param.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
             return   R.error("就诊人名称不合法");
         }
@@ -210,20 +191,6 @@ public class PatientController extends  AppBaseController {
 //        if (age2 > 200) {
 //            throw new CustomException("年龄超过200岁");
 //        }
-
-        //三方校验
-        if (isIdVerification == 1){
-            boolean match = true;
-            if (idCardNumber.length() != 18) {
-                match = IdCardUtil.isMatchByMobile(storeConfig,param.getPatientName(), mobile);
-            } else {
-                match = IdCardUtil.isMatchById(storeConfig,param.getPatientName(), param.getIdCard());
-            }
-            if (!match){
-                return R.error("身份证校验错误");
-            }
-        }
-
         FsPatient patient=new FsPatient();
         BeanUtil.copyProperties(param, patient);
         patientService.updateFsPatient(patient);