From 88bca9debcc8ce769245073728342365675872ac Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Thu, 5 Feb 2026 11:07:10 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20=E7=BA=A2=E5=86=B2=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=9B=B8=E5=85=B3=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/EmisSettleInvoiceRecordMapper.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emis-biz/src/main/resources/mapper/EmisSettleInvoiceRecordMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettleInvoiceRecordMapper.xml index a7cd829fc..4bbd0925c 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettleInvoiceRecordMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettleInvoiceRecordMapper.xml @@ -531,6 +531,17 @@ on rel.settle_bill_no = b.settle_bill_no and b.del_flag = '0' left join emis_settle_invoice_rel r on a.apply_seq_no = r.apply_seq_no and r.del_flag = '0' + left join ( + select ch1.* + from emis_settle_invoice_ch_record ch1 + inner join ( + select apply_seq_no, max(id) as max_id + from emis_settle_invoice_ch_record + where del_flag = '0' + group by apply_seq_no + ) ch2 on ch1.apply_seq_no = ch2.apply_seq_no and ch1.id = ch2.max_id + where ch1.del_flag = '0' + ) ch on a.apply_seq_no = ch.apply_seq_no where a.del_flag = '0' and find_in_set(a.apply_seq_no, #{applySeqNo})