2025-08-22 18:24:08 +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.WmsQcReceiveMapper">
|
|
|
|
|
|
2025-08-24 11:18:30 +08:00
|
|
|
<select id="getTasks" resultType="com.nflg.wms.common.pojo.vo.QCTaskVO">
|
|
|
|
|
select id,
|
|
|
|
|
in_no as task_num,
|
|
|
|
|
order_no as note_num,
|
|
|
|
|
create_time,
|
|
|
|
|
factory_code
|
|
|
|
|
from wms_qc_receive
|
2025-09-21 23:06:27 +08:00
|
|
|
where is_completed !=2 and is_check = true and sourceType=0
|
2025-09-02 09:24:11 +08:00
|
|
|
<if test="orderNo != null and orderNo != ''">
|
2025-09-22 17:47:51 +08:00
|
|
|
and ( in_no ilike concat( '%',#{orderNo},'%') or order_no ilike concat( '%',#{orderNo},'%') )
|
2025-09-02 09:24:11 +08:00
|
|
|
</if>
|
2025-08-24 11:18:30 +08:00
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.QCReceiptVO">
|
|
|
|
|
select a.id,
|
|
|
|
|
a.in_no as in_num,
|
|
|
|
|
b.note_num,
|
|
|
|
|
b.ou_code,
|
|
|
|
|
b.iu_code,
|
|
|
|
|
b.purchase_group,
|
|
|
|
|
b.delivery_note_date,
|
|
|
|
|
b.waybill_num,
|
|
|
|
|
c.supplier_name,
|
|
|
|
|
b.supplier_num,
|
|
|
|
|
a.is_completed,
|
|
|
|
|
a.create_time as receive_time,
|
|
|
|
|
a.update_time as in_time,
|
|
|
|
|
a.create_user_name as receive_user_name,
|
2025-09-08 11:51:34 +08:00
|
|
|
a.update_user_name as in_user_name,
|
2025-09-21 23:06:27 +08:00
|
|
|
a.is_check,
|
|
|
|
|
a.source_type
|
2025-08-24 11:18:30 +08:00
|
|
|
from wms_qc_receive a
|
|
|
|
|
left join
|
|
|
|
|
wms_srm_order b on a.order_no = b.note_num
|
|
|
|
|
left join user_supplier c on b.supplier_num = c.supplier_code
|
|
|
|
|
<where>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.inNum !=null and request.inNum !=''">
|
2025-09-22 17:47:51 +08:00
|
|
|
and a.in_no ilike concat('%', #{request.inNum}, '%')
|
2025-08-24 11:18:30 +08:00
|
|
|
</if>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.orderNo !=null and request.orderNo !=''">
|
2025-09-22 17:47:51 +08:00
|
|
|
and b.note_num ilike concat('%', #{request.orderNo}, '%')
|
2025-08-24 11:18:30 +08:00
|
|
|
</if>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.supplierNum !=null and request.supplierNum !=''">
|
2025-08-24 11:18:30 +08:00
|
|
|
and b.supplier_num =#{request.supplierNum}
|
|
|
|
|
</if>
|
2025-09-10 21:37:58 +08:00
|
|
|
<if test="request.poNumber !=null and request.poNumber !='' ">
|
|
|
|
|
and EXISTS (SELECT 1 FROM wms_qc_receive_item WHERE wms_qc_receive_item.receive_id = a.id and
|
2025-09-22 17:47:51 +08:00
|
|
|
wms_qc_receive_item.po_num ilike concat('%', #{request.poNumber}, '%'))
|
2025-09-10 21:37:58 +08:00
|
|
|
</if>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.receiveStartDate !=null">
|
2025-08-24 11:18:30 +08:00
|
|
|
and a.create_time >= #{request.receiveStartDate}
|
|
|
|
|
</if>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.receiveEndDate !=null">
|
2025-08-24 11:18:30 +08:00
|
|
|
and a.create_time < #{request.receiveEndDate}
|
|
|
|
|
</if>
|
2025-09-10 21:37:58 +08:00
|
|
|
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.deliveryStartDate !=null">
|
|
|
|
|
and b.delivery_note_date >= #{request.deliveryStartDate}
|
2025-08-24 11:18:30 +08:00
|
|
|
</if>
|
2025-08-26 09:03:32 +08:00
|
|
|
<if test="request.deliveryEndDate !=null">
|
|
|
|
|
and b.delivery_note_date < #{request.deliveryEndDate}
|
2025-08-24 11:18:30 +08:00
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by a.create_time desc
|
|
|
|
|
</select>
|
2025-08-22 18:24:08 +08:00
|
|
|
</mapper>
|