- left join sys_enterprise_tradefield t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid
+ left join (select DISTINCT sys_enterpriseid,sa_saleareaid,siteid from sys_enterprise_tradefield) t2 on t1.sys_enterpriseid=t2.sys_enterpriseid and t1.siteid=t2.siteid
left join sa_accountclass t3 on t3.sa_accountclassid=t1.sa_accountclassid and t3.siteid=t1.siteid
where ((t1.type = 1 and t1.class in ('货款', '物流赔偿')) or
on t1.siteid = t2.siteid and t1.sys_enterpriseid = t2.sys_enterpriseid
- left join sys_enterprise_tradefield t3 on t1.sys_enterpriseid=t3.sys_enterpriseid and t1.siteid=t3.siteid
+ left join (select DISTINCT sys_enterpriseid,sa_saleareaid,siteid from sys_enterprise_tradefield) t3 on t1.sys_enterpriseid=t3.sys_enterpriseid and t1.siteid=t3.siteid