From b0eae65fa3e7cd92ed98cef01f49aae72689c7af Mon Sep 17 00:00:00 2001
From: yishiqihuasheng <1191093413@qq.com>
Date: Mon, 5 Jun 2023 14:15:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=B7=A5=E8=AE=A4=E8=AF=81=E4=BC=98?=
=?UTF-8?q?=E5=8C=96date=5Fformat=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/BaseSggxcxMapper.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
index f4ba951e..c64a71af 100644
--- a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
+++ b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
@@ -71,7 +71,7 @@
t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.settlement_no,t.ele_invoice_no
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq
- WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
+ WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08'))
and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
@@ -81,14 +81,14 @@
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
- and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
+ and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or
- date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or
- date_format(t.invoice_date,'%Y%m%d') >=
+ t.invoice_date <= c.select_start_date or
+ t.invoice_date >=
c.select_end_date or d.tj_status in ('1','2'))
@@ -395,7 +395,7 @@
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t left join t_dx_tax_current c on t.gf_tax_no = c.taxno
left join t_dx_dk_count d on c.taxno = d.taxno and c.current_tax_period = d.skssq
- WHERE date_format(t.invoice_date,'%Y-%m-%d') between #{kpksrq} and #{kpjsrq}
+ WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08'))
and t.rzh_yesorno = '0'
and t.auth_status in('0','5','6')
@@ -408,14 +408,14 @@
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
- and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
+ and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount <0 or t.tax_amount <0 or
- date_format(t.invoice_date,'%Y%m%d') <= c.select_start_date or
- date_format(t.invoice_date,'%Y%m%d') >=
+ t.invoice_date <= c.select_start_date or
+ t.invoice_date >=
c.select_end_date or d.tj_status in ('1','2'))