From 2efe1568897c72c64bb4c1420fadec553ecffcab Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Sat, 11 Nov 2023 14:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7=E8=B4=A7?= =?UTF-8?q?=E4=BD=8D=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockupAppController.java | 36 +++++++++++++++---- .../mapper/DistributionStockupMapper.java | 10 +++++- .../mapper/DistributionStockupMapper.xml | 27 ++++++++++++++ .../service/IDistributionStockupService.java | 18 ++++++++-- .../impl/DistributionStockupServiceImpl.java | 10 ++++++ 5 files changed, 91 insertions(+), 10 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index fd653f79f..4fba54874 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -87,6 +87,7 @@ public class DistributionStockupAppController extends BladeController { private final IDistributionStockArticleService distributionStockArticleService; private final IDistributionParcelListService distributionParcelListService; private final IDistributionReservationPackageService distributionReservationPackageService; + private final IDistributionReservationStocklistService distributionReservationStocklistService; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient; private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient; @@ -465,14 +466,35 @@ public class DistributionStockupAppController extends BladeController { log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId()); return R.fail(3002, "备货库存品ID不能为空"); } - List list = distributionStockupService.getLocationSelection(stockupDTO); //自提 - if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ - return R.data(list); - } - List listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO); //商配 - if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ - return R.data(listMarket); + //查询库存品信息 + DistributionReservationStocklistEntity byId = distributionReservationStocklistService.getById(stockupDTO.getDeliveryDetailsId()); + if(ObjectUtils.isNotNull(byId)){ + DistributionStockListEntity byId1 = iDistributionStockListService.getById(byId.getStocklistId()); + if(byId1.getSourceType().equals("2")){ + //导入 + List list = distributionStockupService.getLocationSelection(stockupDTO); //自提 + if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ + return R.data(list); + } + List listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO); //商配 + if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ + return R.data(listMarket); + } + }else{ + //订单 + List list = distributionStockupService.getLocationSelectionOrder(stockupDTO); //自提 + if(!list.isEmpty() && ObjectUtils.isNotNull(list.get(0))){ + return R.data(list); + } + List listMarket = distributionStockupService.getLocationMarketSelectionOrder(stockupDTO); //商配 + if(!listMarket.isEmpty() && ObjectUtils.isNotNull(listMarket.get(0))){ + return R.data(listMarket); + } + + } + } + return Resp.scanFail("当前待备货的库存品未上架,请上架后在继续备货操作!!!","当前待备货的库存品未上架,请上架后在继续备货操作!!!"); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java index 3f55506a9..e93b7dd6d 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java @@ -181,14 +181,22 @@ public interface DistributionStockupMapper extends BaseMapper stockupOffShelf(@Param("param")StockupDTO stockupDTO); /** - * 自提 + * 自提查询导入查询 * @param stockupDTO * @return */ List getLocationSelection(@Param("param") StockupDTO stockupDTO); + /** + * 自提查询订单查询 + * @param stockupDTO + * @return + */ + List getLocationSelectionOrder(@Param("param") StockupDTO stockupDTO); List getLocationMarketSelection(@Param("param")StockupDTO stockupDTO); + List getLocationMarketSelectionOrder(@Param("param")StockupDTO stockupDTO); + /** * 零担没有货位的查询 * @param stockupDTO diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index 2f57e5b15..61538875b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -155,6 +155,18 @@ + + +