From 43b6ab16ed0480a09dce7b7c5a3ecdfbef3e41a5 Mon Sep 17 00:00:00 2001
From: baizonghao <1719256278@qq.com>
Date: 星期六, 04 三月 2023 12:07:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml b/ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml
index 1cfa75b..a5e5ea6 100644
--- a/ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml
@@ -257,4 +257,73 @@
         group by
             ubc.alarm_time
     </select>
+
+
+
+
+<!--    鍒嗛〉鏁伴噺-->
+    <select id="getTotalByType" resultType="java.lang.Integer">
+        SELECT
+        count(*) num
+        FROM
+        `ums_base_case` AS ubc
+        JOIN ums_violations AS uv ON ubc.id = uv.id
+        LEFT JOIN ums_data_dictionary AS t3 ON uv.category_id = t3.id
+        LEFT JOIN ums_data_dictionary AS t4 ON uv.type_id = t4.id
+        LEFT JOIN ums_sccg_region t5 ON ubc.street_id = t5.id
+        WHERE
+        ubc.category =1
+        and t4.`name` is NOT NULL
+        <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
+            and ubc.create_time between #{startTime} and #{endTime}
+        </if>
+    </select>
+    <select id="getTotalByStreet" resultType="java.lang.Integer">
+        SELECT
+        count(*) num
+        FROM
+        `ums_base_case` AS ubc
+        JOIN ums_violations AS uv ON ubc.id = uv.id
+        LEFT JOIN ums_data_dictionary AS t3 ON uv.category_id = t3.id
+        LEFT JOIN ums_data_dictionary AS t4 ON uv.type_id = t4.id
+        LEFT JOIN ums_sccg_region t5 ON ubc.street_id = t5.id
+        WHERE
+        ubc.category =1
+        and t4.`name` is NOT NULL
+        <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
+            and ubc.create_time between #{startTime} and #{endTime}
+        </if>
+    </select>
+    <select id="getTotalBySite" resultType="java.lang.Integer">
+        SELECT
+        count(*) num
+        FROM
+        `ums_base_case` AS ubc
+        JOIN ums_violations AS uv ON ubc.id = uv.id
+        LEFT JOIN ums_data_dictionary AS t3 ON uv.category_id = t3.id
+        LEFT JOIN ums_data_dictionary AS t4 ON uv.type_id = t4.id
+        LEFT JOIN ums_sccg_region t5 ON ubc.street_id = t5.id
+        WHERE
+        ubc.category = 1
+        AND t4.`name` IS NOT NULL
+        <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
+            and ubc.create_time between #{startTime} and #{endTime}
+        </if>
+    </select>
+    <select id="getTotalByTime" resultType="java.lang.Integer">
+        SELECT
+        count(*) num
+        FROM
+        `ums_base_case` AS ubc
+        JOIN ums_violations AS uv ON ubc.id = uv.id
+        LEFT JOIN ums_data_dictionary AS t3 ON uv.category_id = t3.id
+        LEFT JOIN ums_data_dictionary AS t4 ON uv.type_id = t4.id
+        LEFT JOIN ums_sccg_region t5 ON ubc.street_id = t5.id
+        WHERE
+        ubc.category = 1
+        AND t4.`name` IS NOT NULL
+        <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
+            and ubc.alarm_time between #{startTime} and #{endTime}
+        </if>
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0