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