From 624518dd175cf61d8e1615eec5492006c5ae1636 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Mon, 18 Sep 2023 14:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7=20?= =?UTF-8?q?=E5=95=86=20=E5=B8=82=E5=BA=93=E4=BD=8D=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockupAppController.java | 3 +- .../mapper/DistributionParcelListMapper.java | 2 +- .../mapper/DistributionParcelListMapper.xml | 4 +- .../mapper/DistributionReservationMapper.xml | 38 +------ .../mapper/DistributionStockupMapper.java | 2 +- .../mapper/DistributionStockupMapper.xml | 4 +- .../mapper/DistrilbutionBillStockMapper.xml | 11 ++- .../IDistributionParcelListService.java | 2 +- .../DistributionParcelListServiceImpl.java | 10 +- .../DistributionStockArticleServiceImpl.java | 2 +- .../impl/DistributionStockupServiceImpl.java | 98 ++++++++++++++++--- 11 files changed, 115 insertions(+), 61 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 eb6c5d157..d38f14801 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 @@ -281,6 +281,7 @@ public class DistributionStockupAppController extends BladeController { DistributionStockupOrderInfoVO infoVO = distributionStockupService.selectOrderInfoSelf(stockupDTO); return R.data(infoVO); } else { + // DistributionStockupOrderInfoVO infoVO = distributionStockupService.selectOrderInfo(stockupDTO); return R.data(infoVO); } @@ -461,8 +462,8 @@ public class DistributionStockupAppController extends BladeController { rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_SCAN_EXCHANGE, RabbitConstant.STOCKUP_SCAN_ROUTING, map); String audioValue = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "1"); - //查询是否货位数据是否该下架 + //查询是否货位数据是否该下架 distributionAsyncService.stockupSelfOffShelf(stockupDTO); return Resp.scanSuccess("扫描成功!", audioValue); case 2: 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 3afb48544..2073dc3c5 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 @@ -58,7 +58,7 @@ public interface DistributionParcelListMapper extends BaseMapper selectOrderInfoList(@Param("reservationId") Long reservationId, @Param("stockArticleId") Long stockArticleId, @Param("stockupId") Long stockupId,@Param("trayId") Long trayId); + List selectOrderInfoList(StockupDTO stockupDTO); List selectWarehouseAreaByReservationId(@Param("reservationId") Long reservationId); 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 fed18126c..b47f08571 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 @@ -201,7 +201,7 @@ and CONCAT(ldpl.cargo_title,'-',ldpl.shelf_title,'-',ldpl.goods_allocation) = #{allocation} and ldpl.pallet = #{pallet} and ldr.is_deleted = 0 --> - select ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id parceListId,ldpl.material_name materialName, + select DISTINCT ldpl.order_code orderCode,ldpl.order_package_code packageBarCode, 1 goodsType,ldrp.parce_list_id parceListId,ldpl.material_name materialName, lwug.allocation_title allocationTitle,lwtg.tray_code trayCode,lwug.position_code positionCode,lwug.allocation_id allocationId from logpm_distribution_reservation_package ldrp LEFT JOIN logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id @@ -250,7 +250,7 @@ from logpm_distribution_stockup_info ldsi LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id - LEFT JOIN logpm_distribution_stock lds on ldpl.id = lds.parcel_list_id + LEFT JOIN logpm_distribution_stock lds on ldpl.id = lds.parcel_list_id and lds.stockup_id = ldsi.stockup_id ldsi.stockup_id =#{id} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index be33d7d96..b3b4bfea9 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -196,45 +196,13 @@ ldsa.order_code, ldrs.stock_article_id, ldpl.pallet --> - select DISTINCT CONCAT(lwug.position_code ) allocation , lwtg.tray_code pallet,lwug.area_id areaId, - lwug.shelf_id shelfId,lwug.allocation_id allocationId,lwtg.tray_id trayId,ldpl.order_code orderCode,ldpl.stock_article_id stockArticleId , - CASE WHEN lwug.id is null THEN - ( - (select COUNT(id) - from logpm_distribution_parcel_list - where stock_article_id = ldpl.stock_article_id) - ( - select COUNT(lwug.id) - from logpm_distribution_parcel_list dpl - LEFT JOIN logpm_warehouse_updown_goods lwug on dpl.id = lwug.association_id - where dpl.stock_article_id = ldpl.stock_article_id - ) - )ELSE ( - select COUNT(wug.id) - from logpm_distribution_reservation_stockarticle ldrs - LEFT JOIN logpm_distribution_parcel_list ldpl on ldrs.stock_article_id = ldpl.stock_article_id - LEFT JOIN logpm_warehouse_updown_goods wug on wug.association_id = ldpl.id - where ldrs.reservation_id = ldrp.reservation_id and ldrs.stock_article_id = ldpl.stock_article_id and wug.allocation_id = lwug.allocation_id - ) - END planNum, - CASE WHEN lwug.allocation_id is null THEN - ( - select COUNT(ldplw.id) - COUNT(lwu.id) - from logpm_distribution_parcel_list ldplw - LEFT JOIN logpm_warehouse_updown_goods lwu on ldplw.id = lwu.association_id and lwu.association_type = '3' - LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = lwu.association_id - - where ldplw.stock_article_id = ldpl.stock_article_id - ) ELSE ( - select COUNT(lds.id) - from logpm_distribution_parcel_list ldplw - LEFT JOIN logpm_warehouse_updown_goods lwu on ldplw.id = lwu.association_id and lwu.association_type = '3' - LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = lwu.association_id - where ldplw.stock_article_id = ldpl.stock_article_id and lwu.allocation_id = lwug.allocation_id - ) END scanNum + select DISTINCT CONCAT(lwug.position_code ) allocation , lwtg.tray_code pallet,lwug.area_id areaId,ldpl.id parcelListId,lds.id stockId, + lwug.shelf_id shelfId,lwug.allocation_id allocationId,lwtg.tray_id trayId,ldpl.order_code orderCode,ldpl.stock_article_id stockArticleId from logpm_distribution_reservation_package ldrp LEFT JOIN logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id LEFT JOIN logpm_warehouse_updown_goods lwug on ldpl.id = lwug.association_id LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = lwug.association_id + LEFT JOIN logpm_distribution_stock lds on lds.parcel_list_id = ldpl.id and lds.reservation_id = ldrp.reservation_id ldrp.reservation_id = #{reservationId} and ldrp.packet_bar_status in (1,3) 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 678497fac..d1fb051fb 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 @@ -183,5 +183,5 @@ public interface DistributionStockupMapper extends BaseMapper stockupOffShelf(StockupDTO stockupDTO); + List stockupOffShelf(@Param("param")StockupDTO 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 31ecaa7b0..08529ab80 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 @@ -223,14 +223,14 @@ from logpm_distribution_stockup ds LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id and ldrp.packet_bar_status in (1,3) - LEFT JOIN logpm_distribution_stock ldsk on ldsk.parcel_list_id = ldrp.parce_list_id + LEFT JOIN logpm_distribution_stock ldsk on ldsk.parcel_list_id = ldrp.parce_list_id and ldsk.stockup_id =ds.id where ds.id = lds.id )+( select COUNT(DISTINCT ldsk.id) from logpm_distribution_stockup ds LEFT JOIN logpm_distribution_stockup_info ldsi on ds.id = ldsi.stockup_id LEFT JOIN logpm_distribution_reservation_stocklist ldrs on ldrs.reservation_id = ldsi.reservation_id and ldrs.stock_list_status in (1,3) - LEFT JOIN logpm_distribution_stock ldsk on ldsk.stock_list_id = ldrs.stocklist_id + LEFT JOIN logpm_distribution_stock ldsk on ldsk.stock_list_id = ldrs.stocklist_id and ldsk.stockup_id =ds.id where ds.id = lds.id and ldsk.stockup_id = lds.id ) realNum from logpm_distribution_stockup lds diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml index 1cea2bb45..713baf5e4 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml @@ -47,7 +47,7 @@