From 422c20509de2f05bb92d776f1a843472eb009539 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 23 Jan 2026 17:10:44 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=E5=8F=91=E7=A5=A8=E4=BD=9C=E5=BA=9F?= =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/EmisInvoiceCancellationMapper.xml | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml index 24d121cf2..789186a6b 100644 --- a/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisInvoiceCancellationMapper.xml @@ -139,8 +139,25 @@ and rel.apply_seq_no = i.apply_seq_no and b.cust_no = #{params.custNo}) - - and c.apply_site_code = #{params.privSiteCode} + + + and EXISTS( + select 1 from emis_settle_bill x2,emis_settle_invoice_bill_rel x3 + where x2.del_flag = '0' and x3.del_flag = '0' + and i.apply_seq_no=x3.apply_seq_no and x2.settle_bill_no=x3.settle_bill_no + AND ( + x2.salesmen = #{params.privEmpName} + OR x2.payee = #{params.privEmpName} + OR x2.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 c.id, c.invoice_id, c.apply_seq_no, c.apply_date, c.apply_reason, c.apply_text_url,