From 04b179d85455ce5e181b21e0d2f10f76b2c37014 Mon Sep 17 00:00:00 2001
From: wangsixiang <2970484253@qq.com>
Date: Wed, 3 Jul 2024 18:15:42 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E6=9C=BA=E9=A2=84=E8=AD=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/business/DcPerceivedEventsWarningMapper.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
index b76ec34d..ea71dd2b 100644
--- a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
+++ b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml
@@ -479,7 +479,7 @@
left join
(select HOUR(warning_time) hours,count(*) num,dc_warning.stake_mark,facility_name from dc_warning
left join dc_facility on dc_warning.stake_mark=dc_facility.stake_mark and dc_facility.facility_type=1
- where date_format(warning_time,'%Y-%m-%d') = date_format('2024-06-25','%Y-%m-%d') and warning_source=6
+ where date_format(warning_time,'%Y-%m-%d') = date_format(#{warningTime},'%Y-%m-%d') and warning_source=6
and dc_facility.id=#{facilityId}
GROUP BY hours) t2
on t1.n = t2.hours
@@ -488,7 +488,7 @@
SELECT distinct DATE(warning.warning_time) AS day, COUNT(*) AS number
FROM dc_warning as warning
left join dc_facility on warning.stake_mark=dc_facility.stake_mark and dc_facility.facility_type=1
- WHERE DATE_FORMAT(warning.warning_time,'%Y-%m') =DATE_FORMAT('2024-06-01','%Y-%m') and warning_source=6
+ WHERE DATE_FORMAT(warning.warning_time,'%Y-%m') =DATE_FORMAT(#{warningTime},'%Y-%m') and warning_source=6
and dc_facility.id=#{facilityId}
GROUP BY day
ORDER BY day;
@@ -502,7 +502,7 @@
) t1 left join
(select month(warning_time) hours,count(*) num from dc_warning t1
left join dc_facility on t1.stake_mark=dc_facility.stake_mark and dc_facility.facility_type=1
- where DATE_FORMAT(t1.warning_time,'%Y')=DATE_FORMAT('2024-01-01','%Y') and warning_source=6
+ where DATE_FORMAT(t1.warning_time,'%Y')=DATE_FORMAT(#{warningTime},'%Y') and warning_source=6
and dc_facility.id=#{facilityId}
GROUP BY hours) t2
on t1.n = t2.hours