demand: TMS系统 - 运单管理 - 寄件运单查询/寄件运单查询新/派件运单查询/中心运单查询 - 新增查询条件“现金客户” 导出的数据也包含现金客户

This commit is contained in:
aike 2026-01-05 13:29:08 +08:00
parent 79a22e4171
commit 4f7d7b9ac5

View File

@ -1731,6 +1731,9 @@
<if test="updateSite != null and updateSite != ''"> and a.update_site=#{updateSite}</if>
<if test="params.moneyUserId != null and params.moneyUserId != ''">
AND mu.id = #{params.moneyUserId}
</if>
<if test="params.problemQueryType != null and params.problemQueryType == 1 and params.problemQueryIds != null and params.problemQueryIds !=''">
and exists (
select 1 from emis_waybill_problem_info ewpi where a.bill_code=ewpi.bill_code and ewpi.del_flag='0' and FIND_IN_SET( ewpi.`problem_type`, #{params.problemQueryIds} )
@ -1885,7 +1888,17 @@
</if>
<if test="params.moneyUserId != null and params.moneyUserId != ''">
or EXISTS (
select 1 from emis_money_user emu where wss.money_user_id=emu.id and emu.id=#{params.moneyUserId} and emu.del_flag='0'
select 1 from emis_waybill_other wss_mu
inner join emis_money_user emu on wss_mu.money_user_id=emu.id and emu.del_flag='0'
left join sys_user su_payee on emu.payee=su_payee.emp_name and su_payee.del_flag='0'
left join sys_user su_salesmen on emu.salesmen=su_salesmen.emp_name and su_salesmen.del_flag='0'
left join sys_user su_sales_support on emu.sales_support=su_sales_support.emp_name and su_sales_support.del_flag='0'
where wss_mu.waybill_id=a.id and wss_mu.del_flag='0'
and (
su_payee.owner_site_code=#{params.privSiteCode}
or su_salesmen.owner_site_code=#{params.privSiteCode}
or su_sales_support.owner_site_code=#{params.privSiteCode}
)
)
</if>
@ -3085,6 +3098,9 @@
<if test="params.printFlag != null ">
and a.bl_print=#{params.printFlag}
</if>
<if test="params.moneyUserId != null and params.moneyUserId != ''">
AND mu.id = #{params.moneyUserId}
</if>
<if test="params.isNeedPack != null and params.isNeedPack == 1">
and not EXISTS ( select 1 from emis_tms_pack_dtl etp where etp.del_flag='0' and etp.main_bill_code=a.bill_code )
@ -3123,7 +3139,17 @@
</if>
<if test="params.moneyUserId != null and params.moneyUserId != ''">
or EXISTS (
select 1 from emis_money_user emu where wss.money_user_id=emu.id and emu.id=#{params.moneyUserId} and emu.del_flag='0'
select 1 from emis_waybill_other wss_mu
inner join emis_money_user emu on wss_mu.money_user_id=emu.id and emu.del_flag='0'
left join sys_user su_payee on emu.payee=su_payee.emp_name and su_payee.del_flag='0'
left join sys_user su_salesmen on emu.salesmen=su_salesmen.emp_name and su_salesmen.del_flag='0'
left join sys_user su_sales_support on emu.sales_support=su_sales_support.emp_name and su_sales_support.del_flag='0'
where wss_mu.waybill_id=a.id and wss_mu.del_flag='0'
and (
su_payee.owner_site_code=#{params.privSiteCode}
or su_salesmen.owner_site_code=#{params.privSiteCode}
or su_sales_support.owner_site_code=#{params.privSiteCode}
)
)
</if>