From 8d052b8b3c697bb7465192b9142ae0324ea69a1f Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 19 Mar 2025 17:48:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D=202.?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/IDistributionParcelListClient.java | 3 + .../feign/DistributionParcelListClient.java | 5 ++ .../mapper/DistributionParcelListMapper.java | 2 + .../mapper/DistributionParcelListMapper.xml | 7 ++ .../IDistributionParcelListService.java | 2 + .../DistributionParcelListServiceImpl.java | 5 ++ .../logpm/report/mapper/ReportTimeMapper.xml | 4 +- .../vo/ReportCheckWaybillTimeDetailVO.java | 2 +- .../mapper/TrunklineCarsLoadScanMapper.java | 2 + .../mapper/TrunklineCarsLoadScanMapper.xml | 7 ++ .../ITrunklineCarsLoadScanService.java | 1 + .../TrunklineCarsLoadScanServiceImpl.java | 5 ++ .../impl/TrunklineCarsLoadServiceImpl.java | 89 ++++++++++++++----- 13 files changed, 109 insertions(+), 25 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java index a89ff380d..4100a3beb 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java @@ -326,5 +326,8 @@ public interface IDistributionParcelListClient { @PostMapping(API_PREFIX + "/findListZhaoBuDaoYuanYin") List findListZhaoBuDaoYuanYin(@RequestBody FindParamterDTO findParamterD); + + @PostMapping(API_PREFIX + "/findListByOrderPackageCodeAndStatusAndNoWarehouseId") + List findListByOrderPackageCodeAndStatusAndNoWarehouseId(@RequestParam String orderPackageCode, @RequestParam String number, @RequestParam Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java index 11052b0b4..35d36ab71 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java @@ -694,4 +694,9 @@ public class DistributionParcelListClient implements IDistributionParcelListClie return distributionParcelListService.list(queryWrapper); } + @Override + public List findListByOrderPackageCodeAndStatusAndNoWarehouseId(String orderPackageCode, String orderPackageCodeStatus, Long warehouseId) { + return distributionParcelListService.findListByOrderPackageCodeAndStatusAndNoWarehouseId(orderPackageCode,orderPackageCodeStatus,warehouseId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java index 716014af9..41c23c1ea 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java @@ -351,4 +351,6 @@ public interface DistributionParcelListMapper extends BaseMapper findSignOrderPackageCodes(@Param("orderPackageCodeList") List orderPackageCodeList); List findListByOrderCodeAndWarehouseIdAndConditions(@Param("orderCode") String orderCode, @Param("warehouseId") Long warehouseId, @Param("conditions") Integer conditions); + + List findListByOrderPackageCodeAndStatusAndNoWarehouseId(@Param("orderPackageCode") String orderPackageCode, @Param("orderPackageCodeStatus") String orderPackageCodeStatus, @Param("warehouseId") Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml index 6c01e9b7e..59f3c7bb9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml @@ -2345,5 +2345,12 @@ and is_deleted = 0 + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java index 1740f454a..a28689a2f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java @@ -326,4 +326,6 @@ public interface IDistributionParcelListService extends BaseService findSignOrderPackageCodes(List orderPackageCodeList); List findListByOrderCodeAndWarehouseIdAndConditions(String orderCode, Long warehouseId, Integer iconditions); + + List findListByOrderPackageCodeAndStatusAndNoWarehouseId(String orderPackageCode, String orderPackageCodeStatus, Long warehouseId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 984a0c94f..494361248 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -1681,4 +1681,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl findListByOrderCodeAndWarehouseIdAndConditions(String orderCode, Long warehouseId, Integer conditions) { return baseMapper.findListByOrderCodeAndWarehouseIdAndConditions(orderCode,warehouseId,conditions); } + + @Override + public List findListByOrderPackageCodeAndStatusAndNoWarehouseId(String orderPackageCode, String orderPackageCodeStatus, Long warehouseId) { + return baseMapper.findListByOrderPackageCodeAndStatusAndNoWarehouseId(orderPackageCode,orderPackageCodeStatus,warehouseId); + } } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml index cfcc3a2ca..3cd5fae03 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml @@ -2800,7 +2800,7 @@ AND ltcll.start_date is not null - and ltcls.id is null + AND (ltcls.id IS NULL or ltcll.start_date IS NULL) and ltcls.id is null @@ -2901,7 +2901,7 @@ AND ltcll.start_date is not null - and ltcls.id is null + AND (ltcls.id IS NULL or ltcll.start_date IS NULL) and ltcls.id is null diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeDetailVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeDetailVO.java index 89ff22012..ea7bcd87b 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeDetailVO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeDetailVO.java @@ -145,7 +145,7 @@ public class ReportCheckWaybillTimeDetailVO implements Serializable { @ExcelProperty(value = "总费用") private BigDecimal totalFee; - @ExcelProperty(value = "开单费用") + @ExcelProperty(value = "预估总费用") private BigDecimal systemTotalFee; @ExcelProperty(value = "提货费") 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 44deeb387..f745b77da 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 @@ -205,4 +205,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper findRetentionPackage(@Param("orderPackageCode") String orderPackageCode, @Param("warehouseId") Long warehouseId); String findBrandNameByCarLoadCode(@Param("loadCode") String loadCode); + + int findEntityByOrderPackageCodeAndUnloadTime(@Param("orderPackageCode") String orderPackageCode, @Param("unloadTime") Date unloadTime); } 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 a1431f19a..30e4c8607 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 @@ -1228,5 +1228,12 @@ + + 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 1080baaf1..9e3f587ec 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 @@ -213,4 +213,5 @@ public interface ITrunklineCarsLoadScanService extends BaseService { String orderPackageCode = carsLoadScanEntity.getScanCode(); + Date unloadTime = carsLoadScanEntity.getUnloadTime(); TrunklineAdvanceDetailEntity trunklineAdvanceDetailEntity = advanceDetailMap.get(orderPackageCode); if(!Objects.isNull(trunklineAdvanceDetailEntity)){ orderPackageCodeSet.add(orderPackageCode); @@ -13317,7 +13320,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl updateParceList = new ArrayList<>(); udateAdvanceDetailList.forEach(trunklineAdvanceDetailEntity -> { + String orderPackageCode = trunklineAdvanceDetailEntity.getOrderPackageCode(); - List list = distributionParcelListClient.findListByOrderPackageCodeAndStatus(orderPackageCode,"20"); - //把list通过warehouseId进行分组 + String reserve5 = trunklineAdvanceDetailEntity.getReserve5(); + Date unloadTime = CommonUtil.StringToDate(reserve5); - if(CollUtil.isNotEmpty(list)){ - list.forEach(distributionParcelListEntity -> { + //查询是否有在系统无编码后进行卸车的数据 + int unloadNum = trunklineCarsLoadScanService.findEntityByOrderPackageCodeAndUnloadTime(orderPackageCode,unloadTime); + if(unloadNum > 0){ + DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, warehouseId); + if(!Objects.isNull(parcelListEntity)){ DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); - updateEntity.setId(distributionParcelListEntity.getId()); + updateEntity.setId(parcelListEntity.getId()); updateEntity.setOrderPackageStatus("60"); - updateEntity.setOrderCode(distributionParcelListEntity.getOrderCode()); - updateEntity.setWarehouseId(distributionParcelListEntity.getWarehouseId()); + updateEntity.setOrderCode(parcelListEntity.getOrderCode()); + updateEntity.setWarehouseId(parcelListEntity.getWarehouseId()); updateParceList.add(updateEntity); - }); + } + }else{ + List list = distributionParcelListClient.findListByOrderPackageCodeAndStatusAndNoWarehouseId(orderPackageCode,"20",warehouseId); + if(CollUtil.isNotEmpty(list)) { + list.forEach(distributionParcelListEntity -> { + DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); + updateEntity.setId(distributionParcelListEntity.getId()); + updateEntity.setOrderPackageStatus("60"); + updateEntity.setOrderCode(distributionParcelListEntity.getOrderCode()); + updateEntity.setWarehouseId(distributionParcelListEntity.getWarehouseId()); + updateParceList.add(updateEntity); + }); + } } - }); - distributionParcelListClient.updateList(updateParceList); - advanceService.saveOrderAndPackages(udateAdvanceDetailList, warehouseId); + + + + +// List updateParceList = new ArrayList<>(); +// udateAdvanceDetailList.forEach(trunklineAdvanceDetailEntity -> { +// String orderPackageCode = trunklineAdvanceDetailEntity.getOrderPackageCode(); +// List list = distributionParcelListClient.findListByOrderPackageCodeAndStatus(orderPackageCode,"20"); +// //把list通过warehouseId进行分组 +// +// if(CollUtil.isNotEmpty(list)){ +// list.forEach(distributionParcelListEntity -> { +// DistributionParcelListEntity updateEntity = new DistributionParcelListEntity(); +// updateEntity.setId(distributionParcelListEntity.getId()); +// updateEntity.setOrderPackageStatus("60"); +// updateEntity.setOrderCode(distributionParcelListEntity.getOrderCode()); +// updateEntity.setWarehouseId(distributionParcelListEntity.getWarehouseId()); +// updateParceList.add(updateEntity); +// }); +// } +// +// }); +// distributionParcelListClient.updateList(updateParceList); + List updateNowWarehouseList = new ArrayList<>(); udateAdvanceDetailList.forEach(trunklineAdvanceDetailEntity -> {