医护人员信息修改

This commit is contained in:
zhangheng 2023-12-18 13:22:16 +08:00
parent 64e302d8b9
commit 30f5c87bb1

View File

@ -213,9 +213,11 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
} else {
// 修改用户信息
SysUser updUser = userList.get(0);
int nurseStationUserCount = nurseStationPersonMapper.getNurseStationUserCount(updUser.getPhonenumber());
if (nurseStationUserCount > 0) {
throw new ServiceException("您输入的联系电话" + hospitalPersonInfo.getPersonPhone() + "重复!");
if (!hospitalPersonInfo.getPersonPhone().equals(updUser.getPhonenumber())){
int nurseStationUserCount = nurseStationPersonMapper.getNurseStationUserCount(hospitalPersonInfo.getPersonPhone());
if (nurseStationUserCount > 0) {
throw new ServiceException("您输入的联系电话" + hospitalPersonInfo.getPersonPhone() + "重复!");
}
}
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
updUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));