| | |
| | | import com.ycl.domain.vo.FormDetailVO; |
| | | import com.ycl.flow.FindNextNodeUtil; |
| | | import com.ycl.service.ISysFormService; |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import com.ycl.system.service.ISysDictDataService; |
| | | import com.ycl.system.service.ISysDictTypeService; |
| | | import com.ycl.system.service.ISysUserService; |
| | |
| | | private final TaskService taskService; |
| | | private final HistoryService historyService; |
| | | private final ISysUserService sysUserService; |
| | | private final ISysDeptService deptService; |
| | | private final ISysDictTypeService sysDictDService; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public List<String> getCurrentUserGroups() { |
| | | String deptId = "dept:" + SecurityUtils.getLoginUser().getDeptId(); |
| | | List<String> roleIds; |
| | | if (CollectionUtils.isEmpty(SecurityUtils.getLoginUser().getUser().getRoles())) { |
| | | roleIds = new ArrayList<>(1); |
| | | } else { |
| | | roleIds = SecurityUtils.getLoginUser().getUser().getRoles().stream().map(role -> role.getRoleId() + "").collect(Collectors.toList()); |
| | | } |
| | | roleIds.add(deptId); |
| | | if (Objects.nonNull(SecurityUtils.getLoginUser().getDeptId())) { |
| | | List<Long> deptIds = deptService.getChildIds(SecurityUtils.getLoginUser().getDeptId()); |
| | | List<String> deptIdList = deptIds.stream().map(id -> "dept:" + id).collect(Collectors.toList()); |
| | | roleIds.addAll(deptIdList); |
| | | } |
| | | return roleIds; |
| | | } |
| | | |