|
|
@ -335,10 +335,11 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity |
|
|
|
Boolean result5 = this.getBaseMapper().insertRole(userId, employeeInfoVO.getRoleIds()); |
|
|
|
Boolean result5 = this.getBaseMapper().insertRole(userId, employeeInfoVO.getRoleIds()); |
|
|
|
|
|
|
|
|
|
|
|
//修改,则先要将该用户对应得审批模板都删除
|
|
|
|
//修改,则先要将该用户对应得审批模板都删除
|
|
|
|
guaranteeFeignService.delUserVisual(employeeInfoVO.getId().intValue()); |
|
|
|
Long id = this.getBaseMapper().selectUserIdByEmpId(employeeInfoVO.getId()); |
|
|
|
|
|
|
|
guaranteeFeignService.delUserVisual(id.intValue()); |
|
|
|
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
|
|
|
|
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
|
|
|
|
if(employeeInfoVO.getRoleIds().contains(1)){ |
|
|
|
if(employeeInfoVO.getRoleIds().contains(1L)){ |
|
|
|
ResponseResult result = guaranteeFeignService.updateManagerVisual(employeeInfoVO.getId().intValue()); |
|
|
|
ResponseResult result = guaranteeFeignService.updateManagerVisual(id.intValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return result1 && result2 && result3 && result4 && result5; |
|
|
|
return result1 && result2 && result3 && result4 && result5; |
|
|
@ -395,6 +396,12 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity |
|
|
|
user.setMotifyTime(new Date()); |
|
|
|
user.setMotifyTime(new Date()); |
|
|
|
Boolean result1 = this.getBaseMapper().insertUser(user); |
|
|
|
Boolean result1 = this.getBaseMapper().insertUser(user); |
|
|
|
EmployeeEntity employee = new EmployeeEntity(); |
|
|
|
EmployeeEntity employee = new EmployeeEntity(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
|
|
|
|
|
|
|
|
if(employeeInfoVO.getRoleIds().contains(1L)){ |
|
|
|
|
|
|
|
ResponseResult result = guaranteeFeignService.updateManagerVisual(user.getId().intValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (result1) { |
|
|
|
if (result1) { |
|
|
|
// 根据新增的user主键id新增初始密码
|
|
|
|
// 根据新增的user主键id新增初始密码
|
|
|
|
Boolean result6 = this.getBaseMapper().updatePassword(user.getId(), Md5Util.md5(PromptSuccess.RESET_PASSWORD + user.getId())); |
|
|
|
Boolean result6 = this.getBaseMapper().updatePassword(user.getId(), Md5Util.md5(PromptSuccess.RESET_PASSWORD + user.getId())); |
|
|
@ -408,10 +415,6 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity |
|
|
|
return result3 && result4 && result5; |
|
|
|
return result3 && result4 && result5; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
|
|
|
|
|
|
|
|
if(employeeInfoVO.getRoleIds().contains(1)){ |
|
|
|
|
|
|
|
ResponseResult result = guaranteeFeignService.updateManagerVisual(employeeInfoVO.getId().intValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|