|
|
|
|
|
|
|
|
.eq(WorkOrder::getMark, MarkTypeEnum.VALID.getCode()) |
|
|
.eq(WorkOrder::getMark, MarkTypeEnum.VALID.getCode()) |
|
|
.orderByDesc(WorkOrder::getCreateTime)); |
|
|
.orderByDesc(WorkOrder::getCreateTime)); |
|
|
|
|
|
|
|
|
pageData.getRecords().stream().map(x ->{ |
|
|
|
|
|
WorkOrderInfoVO vo = new WorkOrderInfoVO(); |
|
|
|
|
|
BeanUtils.copyProperties(x, vo); |
|
|
|
|
|
|
|
|
pageData.getRecords().stream().map(vo -> { |
|
|
|
|
|
|
|
|
//查询问题总数 |
|
|
//查询问题总数 |
|
|
Integer questionTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
Integer questionTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
.eq(WorkOrderQuestion::getWorkOrderId, x.getId())); |
|
|
|
|
|
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId())); |
|
|
vo.setQuestionTotal(questionTotal); |
|
|
vo.setQuestionTotal(questionTotal); |
|
|
|
|
|
|
|
|
//查询未处理问题数 |
|
|
//查询未处理问题数 |
|
|
Integer unhandledTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
Integer unhandledTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
.eq(WorkOrderQuestion::getWorkOrderId, x.getId()) |
|
|
|
|
|
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId()) |
|
|
.eq(WorkOrderQuestion::getStatus, 0)); |
|
|
.eq(WorkOrderQuestion::getStatus, 0)); |
|
|
vo.setUnhandledTotal(unhandledTotal); |
|
|
vo.setUnhandledTotal(unhandledTotal); |
|
|
|
|
|
|
|
|
//处理人员名称 |
|
|
//处理人员名称 |
|
|
List<String> assignUser = Arrays.asList(x.getAssignUser().split(",")); |
|
|
|
|
|
List<Integer> assignUserInteger = assignUser.stream().map(Integer::parseInt).collect(Collectors.toList()); |
|
|
|
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().in(User::getId, assignUserInteger)); |
|
|
|
|
|
List<String> assignUserNameList = userList.stream().map(User::getRealname).collect(Collectors.toList()); |
|
|
|
|
|
vo.setAssignUserName(String.join(",",assignUserNameList)); |
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(vo.getAssignUser())) { |
|
|
|
|
|
List<String> assignUser = Arrays.asList(vo.getAssignUser().split(",")); |
|
|
|
|
|
List<Integer> assignUserInteger = assignUser.stream().map(Integer::parseInt).collect(Collectors.toList()); |
|
|
|
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().in(User::getId, assignUserInteger)); |
|
|
|
|
|
List<String> assignUserNameList = userList.stream().map(User::getRealname).collect(Collectors.toList()); |
|
|
|
|
|
vo.setAssignUserName(String.join(",", assignUserNameList)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return vo; |
|
|
return vo; |
|
|
}).collect(Collectors.toList()); |
|
|
}).collect(Collectors.toList()); |