医护人员信息修改
This commit is contained in:
parent
7d34eb30ba
commit
64e302d8b9
@ -196,6 +196,10 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new ServiceException("已存在用户名为" + hospitalPersonInfo.getPersonAccount() + "的用户,请重新输入用户名");
|
throw new ServiceException("已存在用户名为" + hospitalPersonInfo.getPersonAccount() + "的用户,请重新输入用户名");
|
||||||
}
|
}
|
||||||
|
int nurseStationUserCount = nurseStationPersonMapper.getNurseStationUserCount(StringUtils.isBlank(hospitalPersonInfo.getPersonPhone()) ? "" : hospitalPersonInfo.getPersonPhone());
|
||||||
|
if (nurseStationUserCount > 0) {
|
||||||
|
throw new ServiceException("您输入的联系电话" + hospitalPersonInfo.getPersonPhone() + "重复!");
|
||||||
|
}
|
||||||
SysUser newUser = new SysUser();
|
SysUser newUser = new SysUser();
|
||||||
newUser.setUserName(hospitalPersonInfo.getPersonAccount());
|
newUser.setUserName(hospitalPersonInfo.getPersonAccount());
|
||||||
newUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
newUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
||||||
@ -209,6 +213,10 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
|||||||
} else {
|
} else {
|
||||||
// 修改用户信息
|
// 修改用户信息
|
||||||
SysUser updUser = userList.get(0);
|
SysUser updUser = userList.get(0);
|
||||||
|
int nurseStationUserCount = nurseStationPersonMapper.getNurseStationUserCount(updUser.getPhonenumber());
|
||||||
|
if (nurseStationUserCount > 0) {
|
||||||
|
throw new ServiceException("您输入的联系电话" + hospitalPersonInfo.getPersonPhone() + "重复!");
|
||||||
|
}
|
||||||
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||||
updUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
updUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
||||||
updUser.setNickName(hospitalPersonInfo.getPersonName());
|
updUser.setNickName(hospitalPersonInfo.getPersonName());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user