From e330d16f2f6e7d67dfd885e9e4ef44a84df6498d Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 13 Nov 2025 09:54:24 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20tms-=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8-=E6=9C=88=E7=BB=93=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=87=BA=E8=B4=A7=E7=BB=9F=E8=AE=A1-=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E4=B8=8D=E5=87=86=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D=20committer:=20heyu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/EmisWaybillMapper.xml | 129 +++++++++++++++++- 1 file changed, 125 insertions(+), 4 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml index 653255a7a..b8d0d566a 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillMapper.xml @@ -4014,7 +4014,7 @@ IFNULL(SUM(CASE WHEN a.receive_country != '0086' AND NOT (a.send_country = '0086' AND tl.trans_type IN ('1','2','3','4','5')) THEN a.bill_weight ELSE 0 END), 0) AS otherWeight FROM emis_waybill a LEFT JOIN emis_trans_line tl ON a.trans_line_type = tl.line_code AND tl.del_flag = '0' - LEFT JOIN emis_customer_user cu ON a.customer_code = cu.customer_code AND cu.del_flag = '0' + LEFT JOIN emis_customer_user cu ON a.cust_no = cu.monthly_pay_code AND cu.del_flag = '0' a.del_flag = '0' AND a.order_status !='0' @@ -4051,7 +4051,121 @@ - AND a.receive_country = #{receiveCountry} + + + AND a.receive_country NOT IN ('0086','0084','0855','0095','0880','0856','0066') + + + AND a.receive_country = #{receiveCountry} + + + + + + AND cu.sales_executive LIKE CONCAT('%', #{salesExecutive}, '%') + + + + AND cu.sales_support LIKE CONCAT('%', #{salesSupport}, '%') + + + + AND cu.salesmen LIKE CONCAT('%', #{salesmen}, '%') + + + + AND ( + cu.sales_executive = #{params.privEmpName} + OR cu.sales_support = #{params.privEmpName} + OR cu.salesmen = #{params.privEmpName} + OR cu.salesmen IN ( + SELECT salesmen FROM emis_salesmen_rel esr + WHERE esr.del_flag = '0' + AND esr.bl_open = '1' + AND NOW() = ]]> esr.start_date + AND NOW() esr.end_date + AND esr.sales_ass = #{params.privEmpName} + ) + ) + + + GROUP BY a.cust_no + ORDER BY a.cust_name + + + +