From 4e898fc20e14d08e01e3076680d0f9f8eac64f53 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 5 Jan 2026 11:38:36 +0800 Subject: [PATCH 1/5] =?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 --- .../src/main/resources/mapper/EmisWaybillMapper.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index e56704a08..dbe862add 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1731,9 +1731,6 @@ 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} ) @@ -1886,6 +1883,11 @@ select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode} ) + + or EXISTS ( + select 1 from emis_money_user emu where wss.money_user_id=emu.money_user_id and emu.money_user_id=#{params.moneyUserId} and emu.del_flag='0' + ) + or a.salesmen=#{params.privEmpName} or a.payee=#{params.privEmpName} @@ -3119,6 +3121,11 @@ select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode} ) + + or EXISTS ( + select 1 from emis_money_user emu where wss.money_user_id=emu.money_user_id and emu.money_user_id=#{params.moneyUserId} and emu.del_flag='0' + ) + or a.salesmen=#{params.privEmpName} or a.payee=#{params.privEmpName} From 79a22e4171bdc9e02d762f603415149171c03f90 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 5 Jan 2026 13:02:54 +0800 Subject: [PATCH 2/5] =?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 --- emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index dbe862add..f2d88ae2c 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1885,7 +1885,7 @@ or EXISTS ( - select 1 from emis_money_user emu where wss.money_user_id=emu.money_user_id and emu.money_user_id=#{params.moneyUserId} and emu.del_flag='0' + select 1 from emis_money_user emu where wss.money_user_id=emu.id and emu.id=#{params.moneyUserId} and emu.del_flag='0' ) @@ -3123,7 +3123,7 @@ or EXISTS ( - select 1 from emis_money_user emu where wss.money_user_id=emu.money_user_id and emu.money_user_id=#{params.moneyUserId} and emu.del_flag='0' + select 1 from emis_money_user emu where wss.money_user_id=emu.id and emu.id=#{params.moneyUserId} and emu.del_flag='0' ) 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 3/5] =?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} + ) ) From 05bd48d43753512d1b770e53e86f67e320cfb17a Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 5 Jan 2026 13:33:56 +0800 Subject: [PATCH 4/5] =?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 --- emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 63b74fc0c..de2587b03 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -2805,6 +2805,7 @@ from emis_waybill a left join emis_customer_user a4 on a.cust_no = a4.monthly_pay_code and a4.del_flag = '0' left join emis_waybill_other wss on a.id = wss.waybill_id and wss.del_flag = '0' + left join emis_money_user mu on wss.money_user_id=mu.id and mu.del_flag='0' a.del_flag='0' and a.order_status !='0' and a.order_status!='2' and a.id = #{id} From f008dd2a947aece3e04a3ebd11f15c49114ec8b3 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Mon, 5 Jan 2026 13:50:27 +0800 Subject: [PATCH 5/5] =?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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index de2587b03..7769a2b2d 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -1941,6 +1941,7 @@ from emis_waybill a left join emis_customer_user a4 on a.cust_no=a4.monthly_pay_code and a4.del_flag='0' left join emis_waybill_other wss on a.id=wss.waybill_id and wss.del_flag='0' + left join emis_money_user mu on wss.money_user_id=mu.id and mu.del_flag='0' a.del_flag='0' and a.order_status !='0' and a.order_status!='2' and a.id = #{id} @@ -2256,6 +2257,9 @@ and DATEDIFF(NOW(), a.send_date) 10 + + AND mu.id = #{params.moneyUserId} + and ( @@ -2271,6 +2275,21 @@ select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode} ) + + or EXISTS ( + 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} + ) + ) + or a.salesmen=#{params.privEmpName} or a.payee=#{params.privEmpName}