| | |
| | | List<String> strings = new ArrayList<>(); |
| | | strings.add(id); |
| | | TProjectDept projectDept = projectDeptService.getById(id); |
| | | if (projectDept.getParentId().equals("0")){ |
| | | List<String> collect = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()) |
| | | .list().stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | if (projectDept!=null){ |
| | | if (projectDept.getParentId().equals("0")){ |
| | | List<String> collect = projectDeptService.lambdaQuery().eq(TProjectDept::getParentId, projectDept.getId()) |
| | | .list().stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | strings.addAll(collect); |
| | | } |
| | | }else{ |
| | | List<String> collect = deptService.lambdaQuery().eq(TDept::getId, id) |
| | | .list().stream().map(TDept::getId).collect(Collectors.toList()); |
| | | strings.addAll(collect); |
| | | } |
| | | |
| | | List<SysUser> res = sysUserService.selectUserByDeptId(strings); |
| | | return R.ok(res); |
| | | } |