From da2c594ade5d69621dd11a13bb758477e2dc079e Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 07 五月 2025 15:57:51 +0800
Subject: [PATCH] 危化品新版修改

---
 hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml b/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
index 0392338..766f4cd 100644
--- a/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
+++ b/hazmat-system/src/main/resources/mapper/system/HzWarningMapper.xml
@@ -63,7 +63,19 @@
     </select>
 
     <select id="selectWarningCount" resultType="java.lang.Integer" parameterType="java.lang.Long">
-        select count(1) from hz_warning where company_id=#{companyId} and state=0
+        select count(1) from hz_warning where  state=0
+        <if test="companyId != null">
+            and company_id=#{companyId}
+        </if>
+    </select>
+    <select id="dailyWarningStatic" resultType="com.gkhy.hazmat.system.domain.vo.HzEntryRecordVO">
+        SELECT
+            DATE_FORMAT(create_time, '%m-%d') AS day,
+            COUNT(*) AS count
+        FROM hz_warning
+        WHERE create_time BETWEEN #{startDate} AND #{endDate}
+        GROUP BY day
+        ORDER BY day
     </select>
 
 

--
Gitblit v1.9.2