diff --git a/nflg-wms-repository/src/main/resources/mapper/WmsPoReceiptItemMapper.xml b/nflg-wms-repository/src/main/resources/mapper/WmsPoReceiptItemMapper.xml index a3eda018..10c73ed8 100644 --- a/nflg-wms-repository/src/main/resources/mapper/WmsPoReceiptItemMapper.xml +++ b/nflg-wms-repository/src/main/resources/mapper/WmsPoReceiptItemMapper.xml @@ -7,7 +7,12 @@ from wms_po_receipt where is_completed=false and source_type=0 - and ( order_no ilike #{orederNo} or in_num ilike #{orederNo} ) + and ( + order_no like concat('%', #{orederNo}, '%') + or in_num like concat('%', #{orederNo}, '%') + or exists (select 1 from wms_po_receipt_item where wms_po_receipt.id=wms_po_receipt_item.receive_id + and wms_po_receipt_item.po_num like concat('%', #{orederNo}, '%')) + ) order by id desc diff --git a/nflg-wms-repository/src/main/resources/mapper/WmsQcReceiveMapper.xml b/nflg-wms-repository/src/main/resources/mapper/WmsQcReceiveMapper.xml index 750ee6b8..f1d66e73 100644 --- a/nflg-wms-repository/src/main/resources/mapper/WmsQcReceiveMapper.xml +++ b/nflg-wms-repository/src/main/resources/mapper/WmsQcReceiveMapper.xml @@ -11,7 +11,12 @@ from wms_qc_receive where is_completed !=2 and is_check = true and source_type=0 - and ( in_no ilike concat( '%',#{orderNo},'%') or order_no ilike concat( '%',#{orderNo},'%') ) + and ( in_no like concat( '%',#{orderNo},'%') + or order_no like concat( '%',#{orderNo},'%') + or exists (select 1 from wms_qc_receive_item where wms_qc_receive.id=wms_qc_receive_item.receive_id + and wms_qc_receive_item.po_num + ilike concat('%', #{orderNo}, '%')) + ) order by create_time desc