|
|
|
|
|
|
|
|
if (null == query.getPage() && null == query.getLimit()) { |
|
|
if (null == query.getPage() && null == query.getLimit()) { |
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
} |
|
|
} |
|
|
//获取分页数据 |
|
|
|
|
|
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
|
|
IPage<WorkOrderHandleVo> pageData = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
|
|
//根据工单id获取对应的问题集合 |
|
|
//根据工单id获取对应的问题集合 |
|
|
List<WorkOrderFile> workOrderFiles = workOrderFileMapper.selectList(Wrappers.<WorkOrderFile>lambdaQuery() |
|
|
List<WorkOrderFile> workOrderFiles = workOrderFileMapper.selectList(Wrappers.<WorkOrderFile>lambdaQuery() |
|
|
.eq(WorkOrderFile::getWorkOrderId, query.getId())); |
|
|
.eq(WorkOrderFile::getWorkOrderId, query.getId())); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
//工单子表获取对应的问题集合id |
|
|
//工单子表获取对应的问题集合id |
|
|
List<String> inspectionFiledIds = workOrderFiles.stream().map(o -> o.getInspectionFileId()).collect(Collectors.toList()); |
|
|
List<String> inspectionFiledIds = workOrderFiles.stream().map(o -> o.getInspectionFileId()).collect(Collectors.toList()); |
|
|
List<InspectionFile> inspectionFilesList = inspectionFileMapper.selectBatchIds(inspectionFiledIds); |
|
|
|
|
|
//设置分页 |
|
|
|
|
|
IPage<InspectionFile> inspectionFilePageData = page.setRecords(inspectionFilesList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取分页数据 |
|
|
|
|
|
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
|
|
IPage<WorkOrderHandleVo> pageData = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
|
|
//获取当前分配人对应的工单分页数据 |
|
|
|
|
|
IPage<InspectionFile> inspectionFilePageData = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery() |
|
|
|
|
|
.in(InspectionFile::getId, inspectionFiledIds)); |
|
|
List<WorkOrderHandleVo> list = inspectionFilePageData.getRecords().stream().map(t -> { |
|
|
List<WorkOrderHandleVo> list = inspectionFilePageData.getRecords().stream().map(t -> { |
|
|
WorkOrderHandleVo vo = new WorkOrderHandleVo(); |
|
|
WorkOrderHandleVo vo = new WorkOrderHandleVo(); |
|
|
BeanUtils.copyProperties(t, vo); |
|
|
BeanUtils.copyProperties(t, vo); |