|
@@ -117,7 +117,7 @@
|
|
left join common_company c on c.comp_id = s.comp_id and c.delete_flag = 0
|
|
left join common_company c on c.comp_id = s.comp_id and c.delete_flag = 0
|
|
left join contract_management_info m on m.comp_id = s.comp_id and m.contract_no = s.contract_no and m.delete_flag = 0
|
|
left join contract_management_info m on m.comp_id = s.comp_id and m.contract_no = s.contract_no and m.delete_flag = 0
|
|
left join contract_goods_info g on m.id=g.contract_id and g.delete_flag = 0
|
|
left join contract_goods_info g on m.id=g.contract_id and g.delete_flag = 0
|
|
- left join customer_info i on (i.comp_name = m.seller and customer_type='企业客户') or (i.customer_name = m.seller and customer_type='个人客户')
|
|
|
|
|
|
+ left join customer_info i on ((i.comp_name = m.seller and customer_type='企业客户') or (i.customer_name = m.seller and customer_type='个人客户'))
|
|
and i.customer_phone = m.seller_phone and i.delete_flag = 0
|
|
and i.customer_phone = m.seller_phone and i.delete_flag = 0
|
|
WHERE s.delete_flag = '0'
|
|
WHERE s.delete_flag = '0'
|
|
AND s.comp_id = #{compId}
|
|
AND s.comp_id = #{compId}
|