diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java index b2eff8618..8a193f4aa 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadWaybillInfoVO.java @@ -29,6 +29,7 @@ public class CarsLoadWaybillInfoVO implements Serializable { private String productPrice; private String productVolume; private String productWeight; + private String chargeTypes; private Integer waybillType; private Long waybillId; private String remark; diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java index 69d02a3fc..bb242c9a7 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadScanVO.java @@ -18,4 +18,5 @@ public class TrunklineCarsLoadScanVO extends TrunklineCarsLoadScanEntity { private BigDecimal price; private String goodsName; + private Integer chargeType; } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java index 98c39d547..b3d459934 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseWaybillVO.java @@ -52,5 +52,6 @@ public class WarehouseWaybillVO extends WarehouseWaybillEntity { private String productVolume; private String productWeight; private BigDecimal totalFee; + private String chargeTypes; } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java index 308839037..3505cd571 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java @@ -199,4 +199,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper findListByIdsAndType(@Param("carsLoadScanIdList") List carsLoadScanIdList, @Param("type") int type); + + void updateWaybillInfoByOrderPackageCodes(@Param("orderPackageCodeList") List orderPackageCodeList, @Param("waybillId") Long waybillId, @Param("waybillNo") String waybillNo); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml index a30ff4dab..c72c58478 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml @@ -1157,9 +1157,11 @@ @@ -1190,4 +1192,15 @@ and type = #{type} + + update logpm_trunkline_cars_load_scan + set waybill_id = #{waybillId}, + waybill_no = #{waybillNo} + where scan_code in + + #{orderPackageCode} + + + + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java index e7ef597e7..1b6e4e903 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderAsyncService.java @@ -34,4 +34,5 @@ public interface IOpenOrderAsyncService { void updatePackageMaterial(List updateMaterialList); + void syncUnloadScanWaybillInfo(List advanceIds, WarehouseWaybillEntity waybillEntity); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java index 83f0c9812..39ab1d1cc 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java @@ -201,4 +201,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService findListByIdsAndType(List carsLoadScanIdList, int type); + + void updateWaybillInfoByOrderPackageCodes(List orderPackageCodeList, Long waybillId, String waybillNo); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java index 7fc70960e..7c30bf0e2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderAsyncServiceImpl.java @@ -74,6 +74,9 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService { private ITrunklineBillladingService trunklineBillladingService; @Autowired private IDistributionParcelListClient distributionParcelListClient; + @Autowired + private ITrunklineCarsLoadScanService carsLoadScanService; + @LogpmAsync("asyncExecutor") @Override @@ -1034,5 +1037,17 @@ public class OpenOrderAsyncServiceImpl implements IOpenOrderAsyncService { } } + @LogpmAsync("asyncExecutor") + @Override + public void syncUnloadScanWaybillInfo(List advanceIds, WarehouseWaybillEntity waybillEntity) { + Long waybillId = waybillEntity.getId(); + String waybillNo = waybillEntity.getWaybillNo(); + List advanceDetailVOList = advanceDetailService.findListByAdvanceIds(advanceIds); + //把advanceDetailVOList中所有元素的orderPackageCode放入一个List + List orderPackageCodeList = advanceDetailVOList.stream().map(TrunklineAdvanceDetailVO::getOrderPackageCode).collect(Collectors.toList()); + carsLoadScanService.updateWaybillInfoByOrderPackageCodes(orderPackageCodeList,waybillId,waybillNo); + + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 2abef04f2..1d20f91d3 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -836,6 +836,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService { String createOperationRemark = "创建运单" + waybillNo + ",时间:" + CommonUtil.dateToStringGeneral(new Date()); openOrderAsyncService.saveLog(waybillId, waybillNo, "10", "创建运单", createOperationRemark, nickName, userId, warehouseId, warehouseName); + openOrderAsyncService.syncUnloadScanWaybillInfo(advanceIds,waybillEntity); + //队列处理包件补数据 carsLoadService.sendRabbitMessageOpenOrder(advanceIds, waybillId); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java index f638d1f30..e82dedf30 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java @@ -499,4 +499,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl orderPackageCodeList, Long waybillId, String waybillNo) { + baseMapper.updateWaybillInfoByOrderPackageCodes(orderPackageCodeList,waybillId,waybillNo); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 564be1628..06d9fec78 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -4638,12 +4638,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl priceMap = new HashMap<>(); Map volumeMap = new HashMap<>(); Map weightMap = new HashMap<>(); + Map chargeTypeMap = new HashMap<>(); for (int i = 0; i < nameArray.length; i++) { priceMap.put(nameArray[i],priceArray[i]); String num = numArray[i]; @@ -4658,6 +4661,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl