From 4f7d7b9ac53a518634e399190a303d099665ac39 Mon Sep 17 00:00:00 2001
From: aike <17730485278@139.com>
Date: Mon, 5 Jan 2026 13:29:08 +0800
Subject: [PATCH] =?UTF-8?q?demand:=20=20TMS=E7=B3=BB=E7=BB=9F=20-=20?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E7=AE=A1=E7=90=86=20-=20=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2/=E5=AF=84=E4=BB=B6?=
=?UTF-8?q?=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=96=B0/=E6=B4=BE?=
=?UTF-8?q?=E4=BB=B6=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2/=E4=B8=AD?=
=?UTF-8?q?=E5=BF=83=E8=BF=90=E5=8D=95=E6=9F=A5=E8=AF=A2=20-=20=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E2=80=9C=E7=8E=B0?=
=?UTF-8?q?=E9=87=91=E5=AE=A2=E6=88=B7=E2=80=9D=20=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E4=B9=9F=E5=8C=85=E5=90=AB=E7=8E=B0?=
=?UTF-8?q?=E9=87=91=E5=AE=A2=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/mapper/EmisWaybillMapper.xml | 30 +++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
index f2d88ae2c..63b74fc0c 100644
--- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml
@@ -1731,6 +1731,9 @@
and a.update_site=#{updateSite}
+
+ AND mu.id = #{params.moneyUserId}
+
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 @@
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}
+ )
)
@@ -3085,6 +3098,9 @@
and a.bl_print=#{params.printFlag}
+
+ AND mu.id = #{params.moneyUserId}
+
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 @@
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}
+ )
)