流程管理模板可见处理

master
shijie 4 years ago
parent ad709c6a29
commit d5f7e05ab3
  1. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgProcessManageController.java
  2. 1
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgProcessManageServiceImpl.java
  3. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/EmployeeDao.java
  4. 17
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  5. 4
      dq-financial-hrms/src/main/resources/mapper/hrms/EmployeeDao.xml

@ -119,7 +119,7 @@ public class DgProcessManageController {
@PostMapping("/updateManagerVisual")
@ApiOperation(value = "设置超管人员可以看到审批模板")
@Transactional
public ResponseResult updateManagerVisual(Integer userId){
public ResponseResult updateManagerVisual(@RequestBody Integer userId){
boolean a = iDgProcessManageService.queryAllModelId(userId);
@ -135,7 +135,7 @@ public class DgProcessManageController {
@PostMapping("/delUserVisual")
@ApiOperation(value = "根据指定用户删除可见审批模板")
@Transactional
public ResponseResult delUserVisual(Integer userId){
public ResponseResult delUserVisual(@RequestBody Integer userId){
boolean a = iDgProcessManageService.delUserVisual(userId);

@ -106,6 +106,7 @@ public class DgProcessManageServiceImpl extends ServiceImpl<DgProcessManageMappe
@Override
public Boolean delUserVisual(Integer userId) {
System.out.println("userId~~~~~~~~~~~~~~~~~~~~~"+userId);
int count = dgProcessManageVisualMapper.delete(new QueryWrapper<DgProcessManageVisual>().eq("user_id", userId));
return count>0?true:false;
}

@ -121,4 +121,6 @@ public interface EmployeeDao extends BaseMapper<EmployeeEntity> {
List<EmployeeTO> getAccountAndDeptNameByIds(@Param("ids")List<Long> ids);
List<EmployeeVO> getUserIdByRoleId();
Long selectUserIdByEmpId(Long id);
}

@ -335,10 +335,11 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
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)){
ResponseResult result = guaranteeFeignService.updateManagerVisual(employeeInfoVO.getId().intValue());
if(employeeInfoVO.getRoleIds().contains(1L)){
ResponseResult result = guaranteeFeignService.updateManagerVisual(id.intValue());
}
return result1 && result2 && result3 && result4 && result5;
@ -395,6 +396,12 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
user.setMotifyTime(new Date());
Boolean result1 = this.getBaseMapper().insertUser(user);
EmployeeEntity employee = new EmployeeEntity();
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
if(employeeInfoVO.getRoleIds().contains(1L)){
ResponseResult result = guaranteeFeignService.updateManagerVisual(user.getId().intValue());
}
if (result1) {
// 根据新增的user主键id新增初始密码
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;
}
}
//如果新增的角色包含超管,则要设置该用户可以看到审批模板
if(employeeInfoVO.getRoleIds().contains(1)){
ResponseResult result = guaranteeFeignService.updateManagerVisual(employeeInfoVO.getId().intValue());
}
return false;
}

@ -669,4 +669,8 @@
u.del_or_not = 0 and er.role_id=1
</select>
<select id="selectUserIdByEmpId" parameterType="long" resultType="long">
SELECT user_id from hrms_employee where id=#{id}
</select>
</mapper>
Loading…
Cancel
Save