| | |
| | | } |
| | | taskVO.setHandlerName(sysUser.getNickName()); |
| | | } |
| | | // 绑定的是角色,查出角色名称 |
| | | // 绑定的是角色或者部门 |
| | | } else if (StringUtils.isNotBlank(identityLink.getGroupId())) { |
| | | SysRole role = sysRoleService.selectRoleById(Long.parseLong(identityLink.getGroupId())); |
| | | if (Objects.nonNull(role)) { |
| | | taskVO.setHandlerUnitId(Long.parseLong(identityLink.getGroupId())); |
| | | taskVO.setHandlerUnitName("由拥有角色:【" + role.getRoleName() + "】的人处理"); |
| | | taskVO.setHandlerName("暂未处理"); |
| | | taskVO.setHandlerId(null); |
| | | if (identityLink.getGroupId().startsWith("dept")) { // 部门的id是加了前缀的如:dept:1 |
| | | String[] split = identityLink.getGroupId().split(":"); |
| | | if (split.length > 1) { |
| | | // 部门 |
| | | SysDept dept = sysDeptService.selectDeptById(Long.parseLong(split[1])); |
| | | if (Objects.nonNull(dept)) { |
| | | taskVO.setHandlerUnitId(dept.getDeptId()); |
| | | taskVO.setHandlerUnitName(dept.getDeptName()); |
| | | taskVO.setHandlerName("暂未处理"); |
| | | taskVO.setHandlerId(null); |
| | | } |
| | | } |
| | | } else { |
| | | SysRole role = sysRoleService.selectRoleById(Long.parseLong(identityLink.getGroupId())); |
| | | if (Objects.nonNull(role)) { |
| | | taskVO.setHandlerUnitId(Long.parseLong(identityLink.getGroupId())); |
| | | taskVO.setHandlerUnitName("由拥有角色:【" + role.getRoleName() + "】的人处理"); |
| | | taskVO.setHandlerName("暂未处理"); |
| | | taskVO.setHandlerId(null); |
| | | } |
| | | } |
| | | } |
| | | } |