| | |
| | | if (StringUtils.isNotBlank(timingTask.getTaskName())) { |
| | | queryWrapper.like(TimingTask::getTaskName, timingTask.getTaskName()); |
| | | } |
| | | queryWrapper.orderByDesc(TimingTask::getCreateTime); |
| | | IPage<TimingTask> taskPage = timingTaskMapper.selectPage(page, queryWrapper); |
| | | |
| | | // 2. 如果没有数据,直接返回空分页 |
| | |
| | | .filter(StringUtils::isNotBlank) |
| | | .map(Long::valueOf) |
| | | .forEach(userIds::add); |
| | | } |
| | | }); |
| | | |
| | | // 收集验收入ID |
| | | taskPage.getRecords().forEach(task -> { |
| | | if (task.getInspectionAcceptorId() != null) { |
| | | userIds.add(task.getInspectionAcceptorId()); |
| | | } |
| | | }); |
| | | |
| | |
| | | dto.setInspector(inspectorNickNames); |
| | | } |
| | | |
| | | // 设置验收人昵称 |
| | | if (task.getInspectionAcceptorId() != null) { |
| | | dto.setInspectionAcceptor(userNickNameMap.getOrDefault(task.getInspectionAcceptorId(), "未知用户")); |
| | | } |
| | | |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | |