From ba6b259982b4a115ab2b751a08522215dc557f1c Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期日, 28 四月 2024 16:33:39 +0800
Subject: [PATCH] 视频标签遗漏提交
---
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
index 5d4b794..99dc9e6 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -300,13 +300,39 @@
</select>
- <select id="conditionList" parameterType="List"
- resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo">
+ <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 collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
+ <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)*/
+ 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,#{lonM},#{latM}) <= (select max(t.distance) from (
+ select f_compute_distance(#{lonM},#{latM},#{lonA},#{latA}) as distance
+ union
+ select f_compute_distance(#{lonM},#{latM},#{lonB},#{latB}) as distance
+ union
+ select f_compute_distance(#{lonM},#{latM},#{lonC},#{latC}) as distance
+ union
+ select f_compute_distance(#{lonM},#{latM},#{lonD},#{latD}) as distance
+ )t)
+ </select>
</mapper>
--
Gitblit v1.9.3