From 43e2d6c5a9463be44f4ea4542d83882d687c09d1 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 27 Dec 2024 16:17:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B6=E6=8B=85=E7=AD=BE=E6=94=B6=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E5=8F=B8=E6=9C=BA=E5=92=8C=E8=BD=A6=E8=BE=86ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionSignforServiceImpl.java | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 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 aa974ed04..36e335493 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 @@ -1363,6 +1363,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl list = Func.toLongList(zeroPackageIds); @@ -1421,18 +1426,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl 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); + List driverInfo = deliverySelfInfo.stream().filter(f -> 2 == f.getIsMaster()).collect(Collectors.toList()); + if (driverInfo.size() == 1) { + DistributionDeliverySelfVO distributionDeliverySelfVO = driverInfo.get(0); + driverPhone = distributionDeliverySelfVO.getDriverPhone(); + driverName = distributionDeliverySelfVO.getDriverName(); + vehicleNub = distributionDeliverySelfVO.getVehicleNub(); + loadingId = distributionDeliverySelfVO.getId(); + driverId = distributionDeliverySelfVO.getDriverId(); + vehicId = distributionDeliverySelfVO.getVehicleId(); + }else { + return R.fail("查询司机配置错误"); + } } - } else if ("2".equals(deliveryListEntity.getKind())) { //外协 DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, false); @@ -1460,6 +1472,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl