From ab7c1b76fa25da9f2df82d339e2709faec75e9ae Mon Sep 17 00:00:00 2001 From: liusuyi <1951119284@qq.com> Date: 星期五, 21 六月 2024 09:08:38 +0800 Subject: [PATCH] 修改:本地录像以用户id和相机id作为唯一标识录制 增加:定时删除非当日本地录像缓存文件 周期:10分钟 --- ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml index e62fd44..65a9bc3 100644 --- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml +++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml @@ -294,4 +294,37 @@ <= (select cast(sc.config_value as decimal) from sys_config sc where sc.config_key = 'appAlarmPointsDistance') order by f_compute_distance(cast(#{longitude} as decimal),cast(#{latitude} as decimal),aaw.longitude,aaw.latitude) desc limit 1 offset 0 </select> + + <select id="getWellById" resultMap="ArdAlarmpointsWellOnlyResult"> + select aaw.* from ard_alarmpoints_well aaw where aaw.id = #{id} + </select> + + + <select id="conditionList" resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell"> + Select * from ard_alarmpoints_well well + where WHERE well.well_id = #{wellId} + and well.dept_id in + <foreach item="deptList" collection="deptList" open="(" separator="," close=")"> + #{deptList} + </foreach> + </select> + + <select id="getArdAlarmpointsWellByDeptIdAndDistance" resultMap="ArdAlarmpointsWellOnlyResult"> + select * from ard_alarmpoints_well aaw + where aaw.dept_id in ( + with recursive rsd as ( + select sd.dept_id from sys_dept sd where sd.dept_id = #{deptId} + union + select csd.dept_id from sys_dept csd inner join rsd on rsd.dept_id = csd.parent_id + ) + select * from rsd) and f_compute_distance(aaw.longitude,aaw.latitude,cast(#{lonM} as numeric),cast(#{latM} as numeric)) <= (select max(t.distance) from ( + select f_compute_distance(cast(#{lonM} as numeric),cast(#{latM} as numeric),cast(#{lonA} as numeric),cast(#{latA} as numeric)) as distance + union + select f_compute_distance(cast(#{lonM} as numeric),cast(#{latM} as numeric),cast(#{lonB} as numeric),cast(#{latB} as numeric)) as distance + union + select f_compute_distance(cast(#{lonM} as numeric),cast(#{latM} as numeric),cast(#{lonC} as numeric),cast(#{latC} as numeric)) as distance + union + select f_compute_distance(cast(#{lonM} as numeric),cast(#{latM} as numeric),cast(#{lonD} as numeric),cast(#{latD} as numeric)) as distance + )t) + </select> </mapper> -- Gitblit v1.9.3