|
|
@@ -533,6 +533,12 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
// 验证是否存在这个用户
|
|
|
SysUser u = userMapper.checkJobNumber(user.getJobNumber(),company);
|
|
|
if (StringUtils.isNull(u)){
|
|
|
+ if (StringUtils.isEmpty(user.getDeptName())){
|
|
|
+ throw new ServiceException("部门数据异常");
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(user.getFullJob())){
|
|
|
+ throw new ServiceException("全职/兼职数据异常");
|
|
|
+ }
|
|
|
user.setPassword(SecurityUtils.encryptPassword(password));
|
|
|
user.setCreateBy(operName);
|
|
|
user.setUserId(null);
|
|
|
@@ -574,6 +580,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
user.setSuperiorId(sysUser.getUserId());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (user.getDeptName()!=null&&!user.getDeptName().equals(u.getDeptName())){
|
|
|
SysDept sysDept = deptService.selectByDepName(user.getDeptName(), company);
|
|
|
if (sysDept !=null){
|