From 8f2e8522daf081ad4da027c39a776fdd9483b97e Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期一, 15 九月 2025 15:20:51 +0800
Subject: [PATCH] 新需求

---
 ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
index 948a7bd..4d3f316 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -414,9 +414,24 @@
             <if test="deptTag!=null">
                 and p.dept_tag = #{deptTag}
             </if>
+            <if test="address != null">
+                and p.dept_id = #{address}
+            </if>
             ${params.dataScope}
         </where>
     </select>
+    <select id="getAllVideo" resultType="java.lang.Long">
+        SELECT
+               IFNULL(SUM(IF((m.camera_fun_type like '%1%'), 1, 0)), 0) AS video
+        FROM t_monitor m
+                 left join t_yw_point p on m.serial_number = p.serial_number
+    </select>
+
+    <select id="getIdListVideo" resultType="java.lang.String">
+        select m.serial_number
+        FROM t_monitor m where m.camera_fun_type like '%1%'
+    </select>
+
     <select id="assetManagementCount" resultType="java.util.Map">
         SELECT count(*) AS total,
         IFNULL(SUM(IF((m.camera_fun_type like '%1%'), 1, 0)), 0) AS video,
@@ -513,7 +528,7 @@
         u.unit_name AS name,
         CONCAT(MONTH(w.create_time), '鏈�') AS months
         from
-        (select count(m.id) as num from  t_monitor m where m.serial_number IN (SELECT p.serial_number from  t_yw_unit u,t_yw_point p where p.unit_id = u.id and u.id = 21 AND p.examine_status = 1)
+        (select count(m.id) as num from  t_monitor m where m.serial_number IN (SELECT p.serial_number from  t_yw_unit u,t_yw_point p where p.unit_id = u.id and u.id = #{unitId} AND p.examine_status = 1)
         ) as a
         join
         t_work_order w
@@ -694,9 +709,9 @@
         from t_monitor m
             left join t_yw_point p on m.serial_number = p.serial_number
             left join sys_dept d on p.dept_id = d.dept_id
-        where p.online != 0 and p.examine_status = 1
+        where  p.examine_status = 1
     </select>
-
+<!--涓婃柟淇敼浜�  p.online != 0 and-->
     <update id="updateOnlineFromUyOrHk">
         <foreach collection="onlineList" item="online" separator=";">
             UPDATE

--
Gitblit v1.8.0