From fae230d502e7193313800053b64abb515445d1b3 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Fri, 10 Oct 2025 15:49:42 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20=20=20TMS=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=20-=20=E5=AE=A2=E6=88=B7=E8=B4=A6=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20-=20=E6=9C=88=E7=BB=93=E8=B4=A6=E5=8D=95=E6=A0=B8=E9=94=80?= =?UTF-8?q?=20-=20=E8=BF=90=E5=8D=95=E6=94=B6=E6=AC=BE=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=87=8D=E5=A4=8D=E6=95=B0=E6=8D=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committer: heyu --- .../mapper/EmisSettlePayRelMapper.xml | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml index 5c581f0ee..675fd9e78 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettlePayRelMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -32,16 +32,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.update_time, a.create_site, a.update_site, - (select r.apply_seq_no - from emis_settle_pay_invoice_rel r - where r.pay_id = a.pay_id and r.del_flag = '0' - limit 1) as apply_seq_no + ( + select r.apply_seq_no + from emis_settle_invoice_rel r + where r.bill_no = a.bill_no + and r.del_flag = '0' + and exists ( + select 1 from emis_settle_pay_invoice_rel p + where p.apply_seq_no = r.apply_seq_no + and p.pay_id = a.pay_id + and p.del_flag = '0' + ) + limit 1 + ) as apply_seq_no from emis_settle_pay_rel a - + - + insert into emis_settle_pay_rel @@ -164,4 +173,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} - \ No newline at end of file +