diff --git a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml index 53f67c3e4..270753689 100644 --- a/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml +++ b/mhd_wms/src/main/resources/mapper/materialInventory/MaterialInventoryMapper.xml @@ -401,11 +401,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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 and c.SHEET_REF_NO = a.sheet_ref_no - and c.BOX_PALLET_NO = a.BOX_PALLET_NO and c.EXT_ATTR_1 = a.EXT_ATTR_1 - and c.EXT_ATTR_2 = a.EXT_ATTR_2 and c.EXT_ATTR_3 = a.EXT_ATTR_3 - and c.EXT_ATTR_4 = a.EXT_ATTR_4 and c.PRODUCTION_DATE = a.PRODUCTION_DATE - and c.EXPIRY_DATE = a.EXPIRY_DATE and c.INVENTORY_DATE = a.INVENTORY_DATE + 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 ) received_quantity,