From 90c7a2ea78eee7a1a697bdf2c3ca9a5668b50cd9 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 26 Nov 2024 16:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E7=AD=BE=E6=94=B6=E8=87=AA?= =?UTF-8?q?=E6=8F=90BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionSignforServiceImpl.java | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 89bb18417..535798c52 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -1281,13 +1281,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl deliverySelfInfo = null; - if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) { - deliverySelfInfo = distributionDeliverySelfMapper.getDeliverySelfInfo(deliveryListEntity.getId()); - } else { - DistributionDeliveryTripartiteVO deliveryTripartiteInfo = distributionDeliveryTripartiteMapper.getDeliveryTripartiteInfo(deliveryListEntity.getId()); - BeanUtils.copyProperties(deliveryTripartiteInfo, deliverySelfInfo); - } +// List deliverySelfInfo = null; +// if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) { +// deliverySelfInfo = distributionDeliverySelfMapper.getDeliverySelfInfo(deliveryListEntity.getId()); +// } else { +// DistributionDeliveryTripartiteVO deliveryTripartiteInfo = distributionDeliveryTripartiteMapper.getDeliveryTripartiteInfo(deliveryListEntity.getId()); +// BeanUtils.copyProperties(deliveryTripartiteInfo, deliverySelfInfo); +// } //查询该车次负责司机 for (DistributionReservationZeroPackageEntity reservationZeroPackageEntity : reservationZeroPackageEntities) { //查询订单 @@ -1311,13 +1311,18 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverPhone).collect(Collectors.joining(",")); - driverName = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverName).collect(Collectors.joining(",")); - vehicleNub = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getVehicleNub).collect(Collectors.joining(",")); - List collect = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getId).collect(Collectors.toList()); - loadingId = collect.get(0); + List deliverySelfInfo = distributionDeliverySelfMapper.getDeliverySelfInfo(deliveryListEntity.getId()); + if (!deliverySelfInfo.isEmpty()) { + driverPhone = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverPhone).collect(Collectors.joining(",")); + driverName = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getDriverName).collect(Collectors.joining(",")); + vehicleNub = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getVehicleNub).collect(Collectors.joining(",")); + List collect = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).map(DistributionDeliverySelfVO::getId).collect(Collectors.toList()); + loadingId = collect.get(0); + } + } else if ("2".equals(deliveryListEntity.getKind())) { //外协 DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, false);