From a8395146b319d746a27d9ea2d7adb2aaec5ccdb8 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 19 四月 2024 17:56:20 +0800 Subject: [PATCH] 考核规则图标存储 --- ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml index 9fe7ef1..e75c2f6 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml @@ -57,7 +57,7 @@ <if test="siteType != null "> and site_type = #{siteType}</if> <if test="macAddr != null and macAddr != ''"> and mac_addr = #{macAddr}</if> <if test="ip != null and ip != ''"> and ip = #{ip}</if> - <if test="cameraFunType != null and cameraFunType != ''"> and camera_fun_type = #{cameraFunType}</if> + <if test="cameraFunType != null and cameraFunType != ''"> and camera_fun_type like concat('%', #{cameraFunType}, '%')</if> <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if> <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if> <if test="cameraCaptureArea != null and cameraCaptureArea != ''"> and camera_capture_area = #{cameraCaptureArea}</if> @@ -225,4 +225,28 @@ #{id} </foreach> </delete> + + <select id="getVideoCount" resultType="java.util.Map"> + SELECT count(*) AS totalPosts, + IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, + IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, + IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, + -1 as noStore, + -1 as partStore, + IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage, + -1 as totalFace, + -1 as totalCar + FROM t_monitor + WHERE camera_fun_type like concat('%', #{cameraFunType}, '%') + </select> + + <select id="recoveryException" resultType="java.util.Map"> + SELECT count(*) AS totalPosts, + IFNULL(SUM(IF(on_state = 1, 1, 0)), 0) AS totalMembers, + IFNULL(SUM(IF(on_state = 2, 1, 0)), 0) AS postsPercentage, + IFNULL(SUM(IF(default_order = 1, 1, 0)), 0) AS totalViews, + IFNULL(ROUND(SUM(IF(on_state = 1, 1, 0)) / count(*) * 100, 2), 0) as viewsPercentage + FROM t_monitor + WHERE recovery = 1 + </select> </mapper> -- Gitblit v1.8.0