| | |
| | | List<String> collect = list.stream().map(TTask::getId).collect(Collectors.toList()); |
| | | |
| | | List<LocationListTaskVO> res = new ArrayList<>(); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(pageInfo); |
| | | } |
| | | List<TTaskDetail> taskDetails = tTaskDetailService.list(Wrappers.lambdaQuery(TTaskDetail.class) |
| | | .in(TTaskDetail::getTaskId,collect) |
| | | .eq(TTaskDetail::getClearStatus, 2) |
| | |
| | | @ApiOperation(value = "根据部门/项目部id查询巡检员列表 不分页") |
| | | @GetMapping(value = "/listUsers") |
| | | public R<List<SysUser>> listUsers(@RequestParam String id) { |
| | | List<SysUser> res = sysUserService.selectUserByDeptId(id); |
| | | List<String> strings = new ArrayList<>(); |
| | | strings.add(id); |
| | | TProjectDept projectDept = projectDeptService.getById(id); |
| | | 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); |
| | | } |
| | | @Log(title = "新增点位", businessType = BusinessType.INSERT) |