Commit 1b05d57f authored by Smile's avatar Smile

需求128后台-集运-包裹列表-单个预报,客户联系人关联导致数据量不对

parent bf805fb9
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
o.channel_id o.channel_id
FROM ecw_cons cons FROM ecw_cons cons
left join ecw_customer ec on cons.customer_id = ec.id left join ecw_customer ec on cons.customer_id = ec.id
left join ecw_customer_contacts eccs on ec.id = eccs.customer_id
left join ecw_warehouse_line el on cons.warehouse_line_id = el.id left join ecw_warehouse_line el on cons.warehouse_line_id = el.id
left join ecw_warehouse ew_start ON ew_start.id = el.start_warehouse_id left join ecw_warehouse ew_start ON ew_start.id = el.start_warehouse_id
left join ecw_warehouse ew_dest ON ew_dest.id = el.dest_warehouse_id left join ecw_warehouse ew_dest ON ew_dest.id = el.dest_warehouse_id
...@@ -62,8 +61,13 @@ ...@@ -62,8 +61,13 @@
AND (cons.`express_no` is not null and cons.`express_no` != '' and cons.`express_no` != #{query.eqNumberKey}) AND (cons.`express_no` is not null and cons.`express_no` != '' and cons.`express_no` != #{query.eqNumberKey})
</if> </if>
<if test="query.customerKey != null and query.customerKey != '' "> <if test="query.customerKey != null and query.customerKey != '' ">
AND EXISTS (
SELECT 1
FROM ecw_customer_contacts eccs
WHERE eccs.customer_id = ec.id
AND concat(IFNULL(cons.`customer_number`,''), IFNULL(eccs.`phone_new`,'')) like AND concat(IFNULL(cons.`customer_number`,''), IFNULL(eccs.`phone_new`,'')) like
concat("%",concat(#{query.customerKey},"%")) concat("%",concat(#{query.customerKey},"%"))
)
</if> </if>
<if test="query.customerName != null and query.customerName != '' "> <if test="query.customerName != null and query.customerName != '' ">
AND ec.name like concat("%",concat(#{query.customerName},"%")) AND ec.name like concat("%",concat(#{query.customerName},"%"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment