Browse Source

市配主司机BUG修复

master
汤建军 7 months ago
parent
commit
0b39fe9f55
  1. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -3576,6 +3576,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
break;
}
List<DistributionDeliverySelfDTO> allocationInfo = deliveryListDTO.getAllocationInfo();
if (Strings.isBlank(deliveryListDTO.getMasterDriverName())){
//无主司机信息 进行主司机默认赋予
deliveryListDTO.setMasterDriverName(allocationInfo.get(0).getDriverName());
}
if (Func.isEmpty(allocationInfo)) {
//这里就表示是三方配送
DistributionDeliveryTripartiteDTO tripartite = deliveryListDTO.getTripartite();
@ -3593,7 +3597,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else {
StringBuilder driverNames = new StringBuilder();
StringBuilder vehicleNubs = new StringBuilder();
if (Func.isEmpty(deliveryListDTO.getMasterDriverName()) || Func.isEmpty(deliveryListDTO.getMasterVehicleNub())) {
if (Func.isEmpty( deliveryListDTO.getMasterDriverName()) || Func.isEmpty(deliveryListDTO.getMasterVehicleNub())) {
//检测无主司机 进行随机赋予主司机
deliveryListDTO.setMasterDriverName(allocationInfo.get(0).getDriverName());
deliveryListDTO.setMasterVehicleNub(allocationInfo.get(0).getVehicleNub());
@ -3604,7 +3608,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (a.getDriverName().equals(deliveryListDTO.getMasterDriverName()) && a.getVehicleNub().equals(deliveryListDTO.getMasterVehicleNub())) {
deliverySelfEntity.setIsMaster(ServiceConstant.IS_MASTER_YES);
driverNames.append(deliverySelfEntity.getDriverName()).append("(主),");
} else {
driverNames.append(deliverySelfEntity.getDriverName()).append(",");
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2381,6 +2381,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
//自主配送
List<DistributionDeliverySelfDTO> allocationInfo = allocationDTO.getAllocationInfo();
if (Strings.isBlank(allocationDTO.getMasterDriverName())){
//无主司机信息 进行主司机默认赋予
allocationDTO.setMasterDriverName(allocationInfo.get(0).getDriverName());
}
allocationInfo.forEach(a -> {
DistributionDeliverySelfEntity distributionDeliverySelfEntity = Func.copy(a, DistributionDeliverySelfEntity.class);
//设置车辆编号

Loading…
Cancel
Save