|
|
|
@ -84,10 +84,10 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
|
|
|
|
|
// 按签收车次+签收车次分组封装为map
|
|
|
|
|
Map<String, List<QualityDeliverEntity>> collect = new HashMap<>(); |
|
|
|
|
for (QualityDeliverEntity entity : entities) { |
|
|
|
|
if (!collect.containsKey(entity.getSignCarNumber() + entity.getSignTrainNumber())) { |
|
|
|
|
collect.put(entity.getSignCarNumber() + entity.getSignTrainNumber(), CollUtil.newArrayList(entity)); |
|
|
|
|
if (!collect.containsKey(entity.getSignCarNumber() + entity.getPlanTrainNumber())) { |
|
|
|
|
collect.put(entity.getSignCarNumber() + entity.getPlanTrainNumber(), CollUtil.newArrayList(entity)); |
|
|
|
|
} else { |
|
|
|
|
collect.get(entity.getSignCarNumber() + entity.getSignTrainNumber()).add(entity); |
|
|
|
|
collect.get(entity.getSignCarNumber() + entity.getPlanTrainNumber()).add(entity); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -110,20 +110,20 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
|
|
|
|
|
BigDecimal pointAllowCost = BigDecimal.ZERO; |
|
|
|
|
BigDecimal guarCost = BigDecimal.ZERO; |
|
|
|
|
BigDecimal fuelCost = BigDecimal.ZERO; |
|
|
|
|
trainDetailEntity.setSettlementStatus("未结算"); |
|
|
|
|
for (QualityDeliverEntity qualityDeliverEntity : value) { |
|
|
|
|
trainDetailEntity.setTotalOrderQuantity(qualityDeliverEntity.getOrderNumber()); |
|
|
|
|
trainDetailEntity.setDeliveryVehicle(qualityDeliverEntity.getSignCarNumber()); |
|
|
|
|
trainDetailEntity.setDistributionModel(qualityDeliverEntity.getSignCarType()); |
|
|
|
|
trainDetailEntity.setTrainNumber(qualityDeliverEntity.getSignTrainNumber()); |
|
|
|
|
trainDetailEntity.setTrainNumber(qualityDeliverEntity.getPlanTrainNumber()); |
|
|
|
|
// 签收车次号 = 配送任务车次号 取配送时间
|
|
|
|
|
if (ObjectUtil.equals(qualityDeliverEntity.getSignTrainNumber(), qualityDeliverEntity.getDealerCode())) { |
|
|
|
|
Date deliveryTime = qualityDeliverEntity.getDeliveryTime(); |
|
|
|
|
if (ObjectUtil.isNotEmpty(deliveryTime)) { |
|
|
|
|
trainDetailEntity.setDeliveryDate(DateUtil.formatDate(deliveryTime)); |
|
|
|
|
} |
|
|
|
|
String deliveryType = qualityDeliverEntity.getDeliveryType(); |
|
|
|
|
if (StrUtil.isNotEmpty(deliveryType)) { |
|
|
|
|
trainDetailEntity.setDistributionType(deliveryType); |
|
|
|
|
} |
|
|
|
|
Date deliveryTime = qualityDeliverEntity.getDeliveryTime(); |
|
|
|
|
if (ObjectUtil.isNotEmpty(deliveryTime)) { |
|
|
|
|
trainDetailEntity.setDeliveryDate(DateUtil.formatDate(deliveryTime)); |
|
|
|
|
} |
|
|
|
|
String deliveryType = qualityDeliverEntity.getDeliveryType(); |
|
|
|
|
if (StrUtil.isNotEmpty(deliveryType)) { |
|
|
|
|
trainDetailEntity.setDistributionType(deliveryType); |
|
|
|
|
} |
|
|
|
|
trainDetailEntity.setDestinationWarehouse(qualityDeliverEntity.getWarehouseName()); |
|
|
|
|
trainDetailEntity.setDeliveryDriver(qualityDeliverEntity.getSignUserName()); |
|
|
|
@ -177,6 +177,8 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
|
|
|
|
|
if (CollUtil.isNotEmpty(orderCodeSet)) { |
|
|
|
|
trainDetailEntity.setPlannedTotalQuantity(orderCodeSet.size()); |
|
|
|
|
} |
|
|
|
|
trainDetailEntity.setTotalReceiptCost(Convert.toInt(totalSignNumber)); |
|
|
|
|
trainDetailEntity.setTotalLoadedPieces(Convert.toInt(totalLoadNumber)); |
|
|
|
|
trainDetailEntity.setDistributionCost(Convert.toDouble(distributionCost)); |
|
|
|
|
trainDetailEntity.setStairCarryingFee(Convert.toDouble(apstairsCost)); |
|
|
|
|
trainDetailEntity.setGoodsAllocationCost(Convert.toDouble(apartCost)); |
|
|
|
@ -389,7 +391,7 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(CollUtil.isNotEmpty(qualityDeliverEntityMap)){ |
|
|
|
|
if (CollUtil.isNotEmpty(qualityDeliverEntityMap)) { |
|
|
|
|
// 发送消息
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|