From ae64126733bedc1a15a0177b105fec7f499ada81 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期一, 05 八月 2024 11:01:01 +0800
Subject: [PATCH] 电磁锁加入使能修改及判断提交
---
ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml b/ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml
index 38ff325..09e84ed 100644
--- a/ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml
+++ b/ard-work/src/main/resources/mapper/device/ArdCamerasMapper.xml
@@ -15,6 +15,7 @@
<result property="gdtype" column="gdtype"/>
<result property="factory" column="factory"/>
<result property="chanNum" column="channel"/>
+ <result property="startChan" column="start_chan"/>
<result property="longitude" column="longitude"/>
<result property="latitude" column="latitude"/>
<result property="altitude" column="altitude"/>
@@ -48,6 +49,7 @@
c.gdtype,
c.factory,
c.channel,
+ c.start_chan,
c.longitude,
c.latitude,
c.altitude,
@@ -86,6 +88,7 @@
<if test="gdtype != null and gdtype != ''">and c.gdtype = #{gdtype}</if>
<if test="factory != null and factory != ''">and c.factory = #{factory}</if>
<if test="chanNum != null ">and c.channel = #{chanNum}</if>
+ <if test="startChan != null ">and c.start_chan = #{startChan}</if>
<if test="longitude != null ">and c.longitude = #{longitude}</if>
<if test="latitude != null ">and c.latitude = #{latitude}</if>
<if test="altitude != null ">and c.altitude = #{altitude}</if>
@@ -104,6 +107,7 @@
WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) ))
</if>
<if test="towerId != null ">and c.tower_id = #{towerId}</if>
+ <if test="state != null ">and c.state = #{state}</if>
<!-- 鏁版嵁鑼冨洿杩囨护 -->
${params.dataScope}
</where>
@@ -122,6 +126,7 @@
<if test="gdtype != null and gdtype != ''">and c.gdtype = #{gdtype}</if>
<if test="factory != null and factory != ''">and c.factory = #{factory}</if>
<if test="chanNum != null ">and c.channel = #{chanNum}</if>
+ <if test="startChan != null ">and c.start_chan= #{startChan}</if>
<if test="longitude != null ">and c.longitude = #{longitude}</if>
<if test="latitude != null ">and c.latitude = #{latitude}</if>
<if test="altitude != null ">and c.altitude = #{altitude}</if>
@@ -140,6 +145,7 @@
<if test="camMaxVisibleDistance != null ">and c.cam_max_visible_distance = #{camMaxVisibleDistance}</if>
<if test="camAlarmGuideEnable != null ">and c.cam_alarm_guide_enable = #{camAlarmGuideEnable}</if>
<if test="loginId != null ">and c.login_id = #{loginId}</if>
+ <if test="state != null ">and c.state = #{state}</if>
</where>
</select>
<select id="selectArdCamerasById" parameterType="String" resultMap="ArdCamerasResult">
@@ -161,6 +167,7 @@
<if test="factory != null">factory,</if>
<if test="towerId != null">tower_id,</if>
<if test="chanNum != null">channel,</if>
+ <if test="startChan != null">start_chan,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="altitude != null">altitude,</if>
@@ -181,6 +188,7 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
+ <if test="state != null">state,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -194,6 +202,7 @@
<if test="factory != null">#{factory},</if>
<if test="towerId != null">#{towerId},</if>
<if test="chanNum != null">#{chanNum},</if>
+ <if test="startChan != null">#{startChan},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="altitude != null">#{altitude},</if>
@@ -214,6 +223,7 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
+ <if test="state != null">#{state},</if>
</trim>
</insert>
@@ -230,6 +240,7 @@
<if test="factory != null">factory = #{factory},</if>
<if test="towerId != null">tower_id = #{towerId},</if>
<if test="chanNum != null">channel = #{chanNum},</if>
+ <if test="startChan != null">start_chan = #{startChan},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="altitude != null">altitude = #{altitude},</if>
@@ -345,7 +356,7 @@
ac.gdtype,ac.state,sdd.dict_label as "dictLabel",sdd0.dict_label as factory,
case sdd0.dict_label
when '娴峰悍' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/h264/ch1/main/av_stream')
- when '澶у崕' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&subtype=1')
+ when '澶у崕' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&subtype=0')
end as rtsp
from ard_cameras ac
inner join sys_dict_data sdd on ac.gdtype = sdd.dict_value
@@ -363,7 +374,7 @@
ac.gdtype,ac.state,sdd.dict_label as "dictLabel",sdd0.dict_label as factory,
case sdd0.dict_label
when '娴峰悍' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/h264/ch1/main/av_stream')
- when '澶у崕' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&subtype=1')
+ when '澶у崕' then concat('rtsp://',ac.username,':',ac.password,'@',ac.ip,':',ac.rtsp_port,'/cam/realmonitor?channel=1&subtype=0')
end as rtsp from sys_user_role sur
inner join sys_role_dept srd on sur.role_id = srd.role_id
inner join ard_cameras ac on srd.dept_id = ac.dept_id
@@ -394,4 +405,15 @@
inner join sys_config sc on sc.config_key = 'dayNightTime'
where ac.device_id = #{id}
</select>
+ <select id="findTowerCamerasBySubAndOwnDeptIds" parameterType="java.lang.String" resultMap = "ArdCamerasResult">
+ select * from ard_cameras where dept_id in
+ <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
+ #{deptId}
+ </foreach>
+ and tower_id is not null
+ order by create_time desc
+ </select>
+ <update id="resetCameraLoginId">
+ update ard_cameras set login_id = -1
+ </update>
</mapper>
--
Gitblit v1.9.3