From c145fc5224e8ed6f59907003e83670e47a984d58 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Tue, 14 May 2024 14:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E6=8E=A7=E4=BA=8B=E4=BB=B6=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/business/DcTrafficIncidentsMapper.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml index 4bb2278e..f4695f04 100644 --- a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml @@ -186,7 +186,7 @@ ifNull(t2.buses,0) buses, ifNull(t2.tankers,0) tankers from dc_event t1 - left join dc_event_vehicle_accident t2 on t1.id = t2.id + left join dc_event_accident t2 on t1.id = t2.id where t1.event_type = '1' and t1.direction = #{direction} and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(#{startTime},'%Y%m%d') @@ -326,13 +326,13 @@ where t1.event_type = '1' and t1.direction = #{direction} - and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 DAY),'%Y%m%d') + and DATE_FORMAT(t1.start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m%d') - and DATE_FORMAT(t1.start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 MONTH),'%Y%m') + and DATE_FORMAT(t1.start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m') - and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) and QUARTER(t1.start_time) = QUARTER(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) + and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR)) and QUARTER(t1.start_time) = QUARTER(#{startTime}) and YEAR(t1.start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR)) @@ -384,13 +384,13 @@ from dc_event where event_type = '1' and direction = #{direction} - and DATE_FORMAT(start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 DAY),'%Y%m%d') + and DATE_FORMAT(start_time,'%Y%m%d') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m%d') - and DATE_FORMAT(start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 MONTH),'%Y%m') + and DATE_FORMAT(start_time,'%Y%m') = DATE_FORMAT(DATE_SUB(#{startTime},INTERVAL 1 YEAR),'%Y%m') - and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) and QUARTER(start_time) = QUARTER(DATE_SUB(#{startTime},INTERVAL 1 QUARTER)) + and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR)) and QUARTER(start_time) = QUARTER(#{startTime}) and YEAR(start_time) = YEAR(DATE_SUB(#{startTime},INTERVAL 1 YEAR))