diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 092f76e58..a9a677f8c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -6583,4 +6583,41 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl getShippingInformation(IPage page, DistributionDeliveryListDTO distributionDeliveryInfoDTO) { + IPage iPage= baseMapper.getShippingInformation(page,distributionDeliveryInfoDTO); + if(!iPage.getRecords().isEmpty()){ + iPage.getRecords().forEach( i ->{ + if("1".equals(i.getKind())){ + //自主 + //查询司机信息 + List distributionDeliverySelfEntities = distributionDeliverySelfMapper.selectList(Wrappers.query().lambda() + .eq(DistributionDeliverySelfEntity::getDeliveryId, i.getId()) + ); + if(!distributionDeliverySelfEntities.isEmpty()){ + String collect = distributionDeliverySelfEntities.stream().map(DistributionDeliverySelfEntity::getDriverName).collect(Collectors.joining(",")); + i.setDriverName(collect); + } + }else{ + //三方 + List list = distributionDeliveryTripartiteService.list(Wrappers.query().lambda() + .eq(DistributionDeliveryTripartiteEntity::getDeliveryId, i.getId()) + ); + if(!list.isEmpty()){ + String collect = list.stream().map(DistributionDeliveryTripartiteEntity::getDriverName).collect(Collectors.joining(",")); + i.setDriverName(collect); + } + } + }); + } + + return iPage; + } }