|
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.util.IdcardUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.PhoneUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.ccsens.client.service.IHmsService; |
|
|
|
import com.ccsens.client.service.ILtHisConnectionService; |
|
|
|
@ -145,10 +144,6 @@ public class PmsController extends BaseController { |
|
|
|
log.info("手机号为空"); |
|
|
|
throw new BaseException(ErrorConstant.MOBILE_NULL_ERROR); |
|
|
|
} |
|
|
|
if (!PhoneUtil.isMobile(patientDto.getMobile()) && !PhoneUtil.isTel(patientDto.getMobile())) { |
|
|
|
//若手机号存在则验证手机号的格式是否正确
|
|
|
|
throw new BaseException(ErrorConstant.MOBILE_ERROR); |
|
|
|
} |
|
|
|
//校验身份证格式
|
|
|
|
if (StrUtil.isEmpty(patientDto.getIdcard())) { |
|
|
|
throw new BaseException(ErrorConstant.ID_CARD_NULL); |
|
|
|
@ -171,10 +166,6 @@ public class PmsController extends BaseController { |
|
|
|
} else { |
|
|
|
//修改时手机号和身份证号不为空,则校验
|
|
|
|
if (StrUtil.isNotEmpty(patientDto.getMobile())) { |
|
|
|
if (!PhoneUtil.isMobile(patientDto.getMobile()) && !PhoneUtil.isTel(patientDto.getMobile())) { |
|
|
|
//若手机号存在则验证手机号的格式是否正确
|
|
|
|
throw new BaseException(ErrorConstant.MOBILE_ERROR); |
|
|
|
} |
|
|
|
//使用md5加密手机号
|
|
|
|
if (flag) { |
|
|
|
// patientDto.setMobile(Md5Utils.hash(patientDto.getMobile()));
|
|
|
|
@ -229,10 +220,6 @@ public class PmsController extends BaseController { |
|
|
|
// log.info("手机号为空");
|
|
|
|
// throw new BaseException(ErrorConstant.MOBILE_NULL_ERROR);
|
|
|
|
// }
|
|
|
|
if (StrUtil.isNotEmpty(patientDto.getMobile()) && !PhoneUtil.isMobile(patientDto.getMobile()) && !PhoneUtil.isTel(patientDto.getMobile())) { |
|
|
|
//若手机号存在则验证手机号的格式是否正确
|
|
|
|
throw new BaseException(ErrorConstant.MOBILE_ERROR); |
|
|
|
} |
|
|
|
//校验身份证格式
|
|
|
|
if (StrUtil.isEmpty(patientDto.getIdcard())) { |
|
|
|
throw new BaseException(ErrorConstant.ID_CARD_NULL); |
|
|
|
@ -260,10 +247,6 @@ public class PmsController extends BaseController { |
|
|
|
} else { |
|
|
|
//修改时手机号和身份证号不为空,则校验
|
|
|
|
if (StrUtil.isNotEmpty(patientDto.getMobile())) { |
|
|
|
if (!PhoneUtil.isMobile(patientDto.getMobile()) && !PhoneUtil.isTel(patientDto.getMobile())) { |
|
|
|
//若手机号存在则验证手机号的格式是否正确
|
|
|
|
throw new BaseException(ErrorConstant.MOBILE_ERROR); |
|
|
|
} |
|
|
|
if (flag) { |
|
|
|
//使用md5加密手机号
|
|
|
|
// patientDto.setMobile(Md5Utils.hash(patientDto.getMobile()));
|
|
|
|
|