From c5ade5154e2cc99fdf31551bf4cfb1828b238e30 Mon Sep 17 00:00:00 2001 From: aike <17730485278@139.com> Date: Wed, 15 Apr 2026 10:38:26 +0800 Subject: [PATCH] =?UTF-8?q?demand:=20=20=20=20=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=A5=E5=8D=95=E6=97=B6=E6=9F=A5=E8=AF=A6=E6=83=85=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/EmisSettleBillMapper.xml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml index 5085eda64..c53a8e197 100644 --- a/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisSettleBillMapper.xml @@ -1445,8 +1445,24 @@ and a.payment_status in ('0','2') - and a.payment_70_due_date is not null - and DATE(a.payment_70_due_date) CURDATE() + and ( + case + when a.settle_type = '2' and a.credit_period = 7 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 7 DAY)) + when a.settle_type = '2' and a.credit_period = 15 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 15 DAY)) + when a.settle_type = '2' and a.credit_period = 30 then LAST_DAY(DATE_ADD(a.payment_due_date, INTERVAL 1 MONTH)) + when a.settle_type = '2' and a.credit_period in (35,45) then LAST_DAY(a.payment_due_date) + else DATE(a.payment_due_date) + end + ) is not null + and DATE( + case + when a.settle_type = '2' and a.credit_period = 7 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 7 DAY)) + when a.settle_type = '2' and a.credit_period = 15 then DATE(DATE_ADD(a.payment_due_date, INTERVAL 15 DAY)) + when a.settle_type = '2' and a.credit_period = 30 then LAST_DAY(DATE_ADD(a.payment_due_date, INTERVAL 1 MONTH)) + when a.settle_type = '2' and a.credit_period in (35,45) then LAST_DAY(a.payment_due_date) + else DATE(a.payment_due_date) + end + ) CURDATE()