|
|
@@ -66,27 +66,27 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
.eq(WorkOrder::getMark, MarkTypeEnum.VALID.getCode()) |
|
|
|
.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>() |
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, x.getId())); |
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId())); |
|
|
|
vo.setQuestionTotal(questionTotal); |
|
|
|
|
|
|
|
//查询未处理问题数 |
|
|
|
Integer unhandledTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() |
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, x.getId()) |
|
|
|
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId()) |
|
|
|
.eq(WorkOrderQuestion::getStatus, 0)); |
|
|
|
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; |
|
|
|
}).collect(Collectors.toList()); |