From 333fa01daf88e9a4a3777df6f6f428f9d20c1db9 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Wed, 15 Nov 2023 10:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98=E5=93=81?= =?UTF-8?q?=E9=85=8D=E8=B4=A7=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionStockupAppController.java | 3 +++ .../mapper/DistributionReservationMapper.xml | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 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 403deaba6..dadf6c5c5 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 @@ -761,6 +761,9 @@ public class DistributionStockupAppController extends BladeController { if(ObjectUtils.isNull(list)){ throw new ServiceException("没有查询到包件信息"); } + if(!list.get(0).getConditions().equals("2")){ + throw new ServiceException("当前包件不是库存品,无法备货!!"); + } WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity(); warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId()); warehouseUpdownGoodsEntity.setAssociationId(list.get(0).getId()); 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 a8cb46aa4..1bab985f1 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 @@ -209,9 +209,20 @@ <!– and lwug.association_type = '3' and lwtg.association_type = '3' –> --> - 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 and ldpl.order_package_status != '70' + LEFT JOIN logpm_distribution_stock_article ldsa on ldpl.stock_article_id = ldsa.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 = ldpl.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) and ldsa.is_zero = #{isZero} + + + @@ -254,7 +264,7 @@ from logpm_distribution_parcel_list ldpl LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3' and ldpl.warehouse_id = lwug.warehouse_id - where ldpl.order_code = ldst.incoming_batch + where ldpl.order_code = ldst.incoming_batch and ldpl.conditions = '2' ) END allocation, ldrs.id deliveryDetailsId