From cb415813de667096290d6bd0f924f5b523104117 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期一, 10 十一月 2025 17:41:04 +0800
Subject: [PATCH] 报备工单bug修改,定时任务在线问题修改新增导出扣分明细功能
---
ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml | 48 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
index fa79b60..a89efce 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -97,6 +97,8 @@
#{number}
</foreach>
</select>
+
+
<!-- TODO:寮傚父鎭㈠鐩戞帶鍜屾槸鍚︿骇鐢熷伐鍗曞瓧娈�-->
<select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO">
select m.id, m.serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude,
@@ -256,6 +258,7 @@
</select>
+<!-- TODO -->
<select id="exportTMonitorList" resultType="com.ycl.platform.domain.excel.TMonitorExp">
select m.id, m.serial_number, name, ip, camera_fun_type,
CASE
@@ -288,6 +291,7 @@
<if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if>
<if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if>
<if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if>
+ <if test="address != null and address !=''">and d.dept_id = #{address}</if>
</where>
</select>
<select id="selectMonitorVOList" resultType="com.ycl.platform.domain.vo.TMonitorVO">
@@ -663,9 +667,18 @@
COUNT(p2.id) AS errorNum,
COUNT(p3.id) AS normalNum
FROM t_monitor
- LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1<if test="dataScope == 1"> AND p1.province_tag_video = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if>
- LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if>
- LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_video = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1
+ <if test="dataScope == 1"> AND p1.province_tag_video = 1 </if>
+ <if test="dataScope == 3"> AND p1.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p1.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id
+ <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if>
+ <if test="dataScope == 3"> AND p2.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p2.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id
+ <if test="dataScope == 1"> AND p3.province_tag_video = 1 </if>
+ <if test="dataScope == 3"> AND p3.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p3.dept_id = #{deptId} </if>
WHERE INSTR(camera_fun_type, 1)
UNION ALL
SELECT
@@ -685,9 +698,18 @@
COUNT(p2.id) AS errorNum,
COUNT(p3.id) AS normalNum
FROM t_monitor
- LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag_face = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if>
- LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id<if test="dataScope == 1"> AND p2.province_tag_face = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if>
- LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_face = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1
+ <if test="dataScope == 1"> AND p1.province_tag_face = 1 </if>
+ <if test="dataScope == 3"> AND p1.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p1.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND (p2.online = -1 OR p2.ping_online = -1) AND p1.id = p2.id
+ <if test="dataScope == 1"> AND p2.province_tag_face = 1 </if>
+ <if test="dataScope == 3"> AND p2.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p2.dept_id = #{deptId} </if>
+ LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND (p3.online = 1 AND p3.ping_online = 1 ) AND p1.id = p3.id
+ <if test="dataScope == 1"> AND p3.province_tag_face = 1 </if>
+ <if test="dataScope == 3"> AND p3.dept_tag = 1 </if>
+ <if test="deptId != null"> AND p3.dept_id = #{deptId} </if>
WHERE INSTR(camera_fun_type, 3)
</select>
<select id="monitorRate" resultType="com.ycl.platform.domain.vo.screen.MonitorRateVO">
@@ -840,7 +862,19 @@
AND t_monitor.serial_number = t_yw_point.serial_number )
</foreach>
</update>
-
+ <update id="batchUpdatePingOnline">
+ <foreach collection="ipList" item="ip" separator=";">
+ UPDATE
+ t_yw_point
+ SET
+ online = #{online},
+ update_time = #{date}
+ WHERE
+ EXISTS (SELECT 1 FROM t_monitor
+ WHERE ip = #{ip}
+ AND t_monitor.serial_number = t_yw_point.serial_number )
+ </foreach>
+ </update>
<update id="updateOnlineFromHk">
<foreach collection="onlineList" item="online" separator=";">
UPDATE
--
Gitblit v1.8.0