From 0fcab0d733d09a4b6dd4037bb008d88b48816287 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 31 Oct 2023 20:19:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=9B=B6=E6=8B=85=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=8B=86=E5=8D=95=E6=80=BB=E8=AE=A2=E5=8D=95=E5=9C=A8?= =?UTF-8?q?=E5=BA=93=E4=BB=B6=E6=95=B0=E4=B8=8D=E5=87=8F=E5=B0=91=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/IDistributionStockArticleClient.java | 3 +++ .../distribution/feign/DistributionStockArticleClient.java | 5 +++++ .../mapper/DistributionStockArticleMapper.java | 2 ++ .../distribution/mapper/DistributionStockArticleMapper.xml | 6 ++++++ .../service/IDistributionStockArticleService.java | 2 ++ .../service/impl/DistributionStockArticleServiceImpl.java | 5 +++++ .../warehouse/controller/WarehouseWaybillController.java | 7 +++++++ .../service/impl/WarehouseWaybillServiceImpl.java | 5 +++++ 8 files changed, 35 insertions(+) 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 02bbf3795..0d293de12 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 @@ -101,4 +101,7 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/findShelfNumByOrderCodeAndWarehouseId") Map findShelfNumByOrderCodeAndWarehouseId(@RequestParam String orderCode, @RequestParam Long warehouseId); + + @GetMapping(API_PREFIX + "/submitHandleNumByOrderId") + void submitHandleNumByOrderId(@RequestParam Integer subNum, @RequestParam Long articleId); } 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 7ca004af3..049aaf615 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 @@ -186,4 +186,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle return distributionStockArticleService.findShelfNumByOrderCodeAndWarehouseId(orderCode,warehouseId); } + @Override + public void submitHandleNumByOrderId(Integer subNum, Long articleId) { + distributionStockArticleService.submitHandleNumByOrderId(subNum,articleId); + } + } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java index 7e1989161..f377861bf 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java @@ -115,4 +115,6 @@ public interface DistributionStockArticleMapper extends BaseMapper selectListGrounding(@Param("ids")List ids); Map findShelfNumByOrderCodeAndWarehouseId(@Param("orderCode")String orderCode, @Param("warehouseId")Long warehouseId); + + void submitHandleNumByOrderId(@Param("subNum") Integer subNum, @Param("articleId") Long articleId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index 73e6a9cb9..e7b096db3 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -663,5 +663,11 @@ AND warehouse_id = #{warehouseId} + + update logpm_distribution_stock_article + set hand_quantity = hand_quantity - #{subNum} + where id = #{articleId} + and hand_quantity - #{subNum} >= 0 + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java index 56a3f9fa4..63fb3dd53 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockArticleService.java @@ -182,4 +182,6 @@ public interface IDistributionStockArticleService extends BaseService selectTemplate(List ids); Map findShelfNumByOrderCodeAndWarehouseId(String orderCode, Long warehouseId); + + void submitHandleNumByOrderId(Integer subNum, Long articleId); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index fdb474a8a..fc5c5a543 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -1241,6 +1241,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl 30) { diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index 7e77cc81c..3be4b1940 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -395,6 +395,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl articleList = distributionStockArticleClient.likeOrderSelfNumbering(orderSelfNum); List parcelListEntityList = distributionParcelListClient.findEntityListByOrderCode(orderSelfNum, warehouseId); int size = articleList.size(); + Integer subNum = 0; for (int i = 0; i < splitOrderDTOList.size(); i++) { SplitOrderDTO splitOrderDTO = splitOrderDTOList.get(i); DistributionStockArticleEntity entity = new DistributionStockArticleEntity(); @@ -497,9 +498,13 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl