2025-07-22 18:43:17 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.nflg.wms.repository.mapper.WmsSrmOrderMapper">
|
2025-07-28 18:22:40 +08:00
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.SrmOrderVO">
|
|
|
|
|
select a.iu_code,a.note_num,a.purchase_group,a.waybill_num,a.supplier_num,a.create_time, a.delivery_note_date
|
|
|
|
|
,a.ou_code,
|
|
|
|
|
b.supplier_name from wms_srm_order a left join user_supplier b on a.supplier_num=b.supplier_code
|
2025-07-22 18:43:17 +08:00
|
|
|
|
2025-07-28 18:22:40 +08:00
|
|
|
<if test="request.noteNum !=null and request.noteNum !='' ">
|
|
|
|
|
and a.note_num like concat('%', #{request.noteNum}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="request.supplierNum !=null and request.supplierNum !='' ">
|
|
|
|
|
and a.supplier_num =#{request.supplierNum}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="request.poNum !=null and request.poNum !='' ">
|
|
|
|
|
and EXISTS (select 1 from wms_srm_order_item where a.id=wms_srm_order_item.order_id and
|
|
|
|
|
wms_srm_order_item.po_num like concat('%', #{request.poNum}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="request.itemCode !=null and request.itemCode !='' ">
|
|
|
|
|
and EXISTS (select 1 from wms_srm_order_item where a.id=wms_srm_order_item.order_id and
|
|
|
|
|
wms_srm_order_item.item_code like concat('%', #{request.itemCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="request.startDate !=null and request.startDate !='' ">
|
|
|
|
|
and a.delivery_note_date >= #{request.startDate}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="request.endDate !=null and request.endDate !='' ">
|
|
|
|
|
and a.delivery_note_date <= #{request.endDate}
|
|
|
|
|
</if>
|
|
|
|
|
order by a.delivery_note_date desc
|
|
|
|
|
</select>
|
2025-07-22 18:43:17 +08:00
|
|
|
</mapper>
|