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 74929194e..3624383b6 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 @@ -136,4 +136,7 @@ public interface IDistributionStockArticleClient { @GetMapping(API_PREFIX + "/findZeroListByWarehouseId") IPage findZeroListByWarehouseId(@RequestParam Long warehouseId, @RequestParam Integer pageNum, @RequestParam Integer pageSize); + + @GetMapping(API_PREFIX + "/submitHandleNumAndTotalNumberByOrderId") + void submitHandleNumAndTotalNumberByOrderId(@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 639986d33..fa491b5d9 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 @@ -278,4 +278,9 @@ public class DistributionStockArticleClient implements IDistributionStockArticle return distributionStockArticleService.findZeroListByWarehouseId(warehouseId,pageNum,pageSize); } + @Override + public void submitHandleNumAndTotalNumberByOrderId(Integer subNum, Long articleId) { + distributionStockArticleService.submitHandleNumAndTotalNumberByOrderId(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 d974cd400..41c29358c 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 @@ -179,4 +179,6 @@ public interface DistributionStockArticleMapper extends BaseMapper getOrderListByWaybill(@Param("waybillNumber") String waybillNumber); List findListByOrderCodeLike(@Param("orderCode") String orderCode); + + void submitHandleNumAndTotalNumberByOrderId(@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 001597a3c..2e769b63c 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 @@ -1064,4 +1064,12 @@ AND waybill_number != '' + + update logpm_distribution_stock_article + set total_number = total_number - #{subNum}, + hand_quantity = hand_quantity - #{subNum}, + incoming_num = incoming_num - #{subNum} + where id = #{articleId} + + 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 e884a75e6..9a8fee6e1 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 @@ -229,4 +229,7 @@ public interface IDistributionStockArticleService extends BaseService findListByOrderCodeLike(String orderCode); + + void submitHandleNumAndTotalNumberByOrderId(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 7629c2902..f8392b7ac 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 @@ -56,7 +56,6 @@ import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusCon import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant; -import org.springblade.common.constant.reservation.ReservationOrderStatusConstant; import org.springblade.common.constant.reservation.ReservationPackageStatusConstant; import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; @@ -1784,6 +1783,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl