From 686c587744cf0933b4022a1b741f8f50658e2632 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期日, 28 四月 2024 15:40:19 +0800
Subject: [PATCH] 视频标签提交
---
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 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..97f4d7d 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -294,4 +294,45 @@
<= (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)*/
+ 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