From a25e56f9b6d726fea4902aff33b473824c4bb4a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com> Date: Fri, 6 Feb 2026 16:05:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8A=E6=97=B6=E5=BA=93=E5=AD=98=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialInventoryMapper.xml | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml index dac1c75a0..d25637f67 100644 --- a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml +++ b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml @@ -533,10 +533,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND d.del_flag = 1 LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number WHERE - c.del_flag = 1 + c.del_flag = 1 and d.STATUS = 3 and e.STATUS = 3 AND e.warehouse_id = a.warehouse_id AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_id) AND c.material_base_info_id = a.material_base_info_id + and (c.BATCH_REF_NO = a.batch_ref_no or (c.BATCH_REF_NO is null and a.BATCH_REF_NO is null)) + and (c.SHEET_REF_NO = a.sheet_ref_no or (c.SHEET_REF_NO is null and a.SHEET_REF_NO is null)) + and (c.BOX_PALLET_NO = a.BOX_PALLET_NO or (c.BOX_PALLET_NO is null and a.BOX_PALLET_NO is null)) + and (c.EXT_ATTR_1 = a.EXT_ATTR_1 or (c.EXT_ATTR_1 is null and a.EXT_ATTR_1 is null)) + and (c.EXT_ATTR_2 = a.EXT_ATTR_2 or (c.EXT_ATTR_2 is null and a.EXT_ATTR_2 is null)) + and (c.EXT_ATTR_3 = a.EXT_ATTR_3 or (c.EXT_ATTR_3 is null and a.EXT_ATTR_3 is null)) + and (c.EXT_ATTR_4 = a.EXT_ATTR_4 or (c.EXT_ATTR_4 is null and a.EXT_ATTR_4 is null)) + and (c.PRODUCTION_DATE = a.PRODUCTION_DATE or (c.PRODUCTION_DATE is null and a.PRODUCTION_DATE is null)) + and (c.EXPIRY_DATE = a.EXPIRY_DATE or (c.EXPIRY_DATE is null and a.EXPIRY_DATE is null)) + and (c.INVENTORY_DATE = a.INVENTORY_DATE or (c.INVENTORY_DATE is null and a.INVENTORY_DATE is null)) ), 0 )> #{receivedQuantityStart} @@ -553,10 +563,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND d.del_flag = 1 LEFT JOIN stock_in_order e ON d.in_order_number = e.in_order_number WHERE - c.del_flag = 1 + c.del_flag = 1 and d.STATUS = 3 and e.STATUS = 3 AND e.warehouse_id = a.warehouse_id AND (a.shipper_id IS NULL OR e.shipper_id = a.shipper_id) AND c.material_base_info_id = a.material_base_info_id + and (c.BATCH_REF_NO = a.batch_ref_no or (c.BATCH_REF_NO is null and a.BATCH_REF_NO is null)) + and (c.SHEET_REF_NO = a.sheet_ref_no or (c.SHEET_REF_NO is null and a.SHEET_REF_NO is null)) + and (c.BOX_PALLET_NO = a.BOX_PALLET_NO or (c.BOX_PALLET_NO is null and a.BOX_PALLET_NO is null)) + and (c.EXT_ATTR_1 = a.EXT_ATTR_1 or (c.EXT_ATTR_1 is null and a.EXT_ATTR_1 is null)) + and (c.EXT_ATTR_2 = a.EXT_ATTR_2 or (c.EXT_ATTR_2 is null and a.EXT_ATTR_2 is null)) + and (c.EXT_ATTR_3 = a.EXT_ATTR_3 or (c.EXT_ATTR_3 is null and a.EXT_ATTR_3 is null)) + and (c.EXT_ATTR_4 = a.EXT_ATTR_4 or (c.EXT_ATTR_4 is null and a.EXT_ATTR_4 is null)) + and (c.PRODUCTION_DATE = a.PRODUCTION_DATE or (c.PRODUCTION_DATE is null and a.PRODUCTION_DATE is null)) + and (c.EXPIRY_DATE = a.EXPIRY_DATE or (c.EXPIRY_DATE is null and a.EXPIRY_DATE is null)) + and (c.INVENTORY_DATE = a.INVENTORY_DATE or (c.INVENTORY_DATE is null and a.INVENTORY_DATE is null)) ), 0 ) < #{receivedQuantityEnd} @@ -609,12 +629,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sum( c.picking_quantity ) FROM picking_material_detail c - LEFT JOIN picking_order d ON c.picking_order_number = d.order_number + LEFT JOIN picking_order d ON c.picking_order_number = d.PICKING_ORDER_NUMBER + left join STOCK_OUT_ORDER e ON d.ORDER_NUMBER = e.OUT_ORDER_NUMBER WHERE - c.del_flag = 1 + c.del_flag = 1 and d.STATUS = 3 and e.STATUS = 7 AND d.warehouse_id = a.warehouse_id AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_id) AND c.material_base_info_id = a.material_base_info_id + AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID ), 0 ) > #{pickQuantityStart} @@ -627,12 +649,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sum( c.picking_quantity ) FROM picking_material_detail c - LEFT JOIN picking_order d ON c.picking_order_number = d.order_number + LEFT JOIN picking_order d ON c.picking_order_number = d.PICKING_ORDER_NUMBER + left join STOCK_OUT_ORDER e ON d.ORDER_NUMBER = e.OUT_ORDER_NUMBER WHERE - c.del_flag = 1 + c.del_flag = 1 and d.STATUS = 3 and e.STATUS = 7 AND d.warehouse_id = a.warehouse_id AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_id) AND c.material_base_info_id = a.material_base_info_id + AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID ), 0 ) < #{pickQuantityEnd} @@ -653,13 +677,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM OUT_MATERIAL_DETAIL c LEFT JOIN STOCK_OUT_ORDER d ON c.OUT_ORDER_NUMBER = d.OUT_ORDER_NUMBER + LEFT JOIN HANDOVER_TASK_ORDER e ON d.OUT_ORDER_NUMBER = e.ORDER_NUMBER WHERE - d.CHECK_STATUS = 2 + d.CHECK_STATUS = 2 and e.STATUS = 1 AND d.DEL_FLAG = 1 AND c.DEL_FLAG = 1 + and e.del_flag = 1 AND d.warehouse_id = a.warehouse_id AND (a.shipper_id IS NULL OR d.shipper_id = a.shipper_id) AND c.material_base_info_id = a.material_base_info_id + AND c.MATERIAL_INVENTORY_ID = a.MATERIAL_INVENTORY_ID ), 0 ) = #{checkQuantity}