From 44fa3b1139b24b65d902a97e2a1ccb69d2896b00 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 30 Aug 2024 09:27:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDistributionStockArticleClient.java | 2 + .../feign/DistributionStockArticleClient.java | 10 +++ .../mapper/TrunklineCarsLoadMapper.xml | 2 + .../mapper/TrunklineCarsLoadScanMapper.xml | 2 +- .../impl/TrunklineCarsLoadServiceImpl.java | 32 +++++---- .../TrunklineWaybillTrackServiceImpl.java | 70 +++++++++---------- 6 files changed, 68 insertions(+), 50 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java index df9c448e7..926d966f9 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java @@ -211,4 +211,6 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/findSignNumByWaybillNo") Integer findSignNumByWaybillNo(@RequestParam String waybillNo, @RequestParam Long destinationWarehouseId); + @GetMapping(API_PREFIX + "/addSignNum") + void addSignNum(@RequestParam Long orderId, @RequestParam Integer unloadNum); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java index 3d78aa64d..76c45f506 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java @@ -414,4 +414,14 @@ public class DistributionStockArticleClient implements IDistributionStockArticle return distributionStockArticleService.findSignNumByWaybillNo(waybillNo,destinationWarehouseId); } + @Override + public void addSignNum(Long orderId, Integer unloadNum) { + DistributionStockArticleEntity stockArticle = distributionStockArticleService.getById(orderId); + Integer signinQuantity = stockArticle.getSigninQuantity(); + DistributionStockArticleEntity updateEntity = new DistributionStockArticleEntity(); + updateEntity.setId(orderId); + updateEntity.setSigninQuantity(signinQuantity+unloadNum); + distributionStockArticleService.updateById(updateEntity); + } + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml index a9d626ec7..c2accde79 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml @@ -404,6 +404,8 @@ ltcl.cars_no carsNo, ltcl.carrier_name carrierName, ltcl.carrier_time carrierTime, + ltcl.driver_name driverName, + ltcl.driver_mobile driverMobile, ltcl.pay_method payMethod, ltcl.count_transport_cost countTransportCost, ltcl.replace_price replacePrice, 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 9b8e2f006..0455bf279 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 @@ -451,7 +451,7 @@ lww.consignee_mobile consigneeMobile, IFNULL(ltco.plan_num,0) AS planNum, sum(case when ltcls.scan_status != 1 then ltcls.num else 0 end) unloadNum, - sum( ltcls.num ) AS smallTota + IFNULL(sum( ltcls.num ),0) AS smallTotal from logpm_trunkline_cars_load_scan ltcls left join logpm_trunkline_cars_order ltco on ltco.order_code = ltcls.order_code and ltco.waybill_no = ltcls.waybill_no and ltco.load_id = ltcls.load_id and ltco.node_id = ltcls.warehouse_id left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltcls.order_code and ldsa.warehouse_id = ltcls.from_warehouse_id 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 d4816a506..a33e10310 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 @@ -2958,10 +2958,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); - orderPackageCodes.add(orderPackageCode); - String content = "包件在 " + warehouseName + " " + (StringUtil.isBlank(trayName) ? "扫码" : "托盘(" + trayName + ")") + " 装车, 车次号:"+loadCode+" ,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName() + ",数据来源仓库 " + fromWarehouseName; - packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode(), content); + String loadType = carsLoadEntity.getLoadType(); + if(!"4".equals(loadType)){ + List orderPackageCodes = new ArrayList<>(); + orderPackageCodes.add(orderPackageCode); + String content = "包件在 " + warehouseName + " " + (StringUtil.isBlank(trayName) ? "扫码" : "托盘(" + trayName + ")") + " 装车, 车次号:"+loadCode+" ,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName() + ",数据来源仓库 " + fromWarehouseName; + packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode(), content); + } trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, orderPackageCode, 1, 1, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); @@ -4329,10 +4332,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl