Browse Source

工单查询修改

master
汤建军 8 months ago
parent
commit
27a68c81c2
  1. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -933,7 +933,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class); AftersalesWorkOrderEntity workOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesWorkOrderEntity.class);
IPage<AftersalesWorkOrderEntity> iPage = baseMapper.pageListOwn(page, workOrderEntity); IPage<AftersalesWorkOrderEntity> iPage = baseMapper.pageListOwn(page, workOrderEntity);
if (iPage.getRecords().isEmpty()) {
log.error(">>>>>>>>>>>>>>>>>>查询工单列表为空");
return null;
}
// 获取售后工单的ID 集合 // 获取售后工单的ID 集合
List<Long> workOrderIds = iPage.getRecords().stream().map(AftersalesWorkOrderEntity::getId).collect(Collectors.toList()); List<Long> workOrderIds = iPage.getRecords().stream().map(AftersalesWorkOrderEntity::getId).collect(Collectors.toList());
@ -942,6 +945,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
LambdaQueryWrapper<AftersalesCompletionRecipientEntity> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<AftersalesCompletionRecipientEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(AftersalesCompletionRecipientEntity::getWorkOrderId,workOrderIds); queryWrapper.in(AftersalesCompletionRecipientEntity::getWorkOrderId,workOrderIds);
List<AftersalesCompletionRecipientEntity> list = completionRecipientService.list(queryWrapper); List<AftersalesCompletionRecipientEntity> list = completionRecipientService.list(queryWrapper);
// 收款方分组 // 收款方分组
Map<Long, List<AftersalesCompletionRecipientEntity>> collect = list.stream().collect(Collectors.groupingBy(AftersalesCompletionRecipientEntity::getWorkOrderId)); Map<Long, List<AftersalesCompletionRecipientEntity>> collect = list.stream().collect(Collectors.groupingBy(AftersalesCompletionRecipientEntity::getWorkOrderId));

Loading…
Cancel
Save