From ef7e86f43eea6fe617323cd027b3cb52a6f0699d Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期四, 22 二月 2024 13:54:50 +0800
Subject: [PATCH] 依据主键查询兴趣点提交
---
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java | 2 ++
ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml | 4 ++++
ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java | 1 +
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java | 6 ++++++
ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java | 7 +++++++
5 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
index 1ba431f..8a8c4ba 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java
@@ -257,4 +257,11 @@
Map<String,Object> result = ardAlarmpointsWellService.getWellDataByPatrolplanIdAndPosition(para,sysConfigResult);
return AjaxResult.success(result);
}
+
+ @GetMapping("/getWellById")
+ @ApiOperation("鏍规嵁鏌ヨ鍏磋叮鐐瑰熀鏈睘鎬�")
+ public AjaxResult getWellById(@RequestBody Map<String,String> para){
+ ArdAlarmpointsWell result = ardAlarmpointsWellService.getWellById(para.get("id"));
+ return AjaxResult.success(result);
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
index 5b4d607..27350cf 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/mapper/ArdAlarmpointsWellMapper.java
@@ -101,4 +101,5 @@
ArdAlarmpointsWell getWellDataByPatrolplanIdAndPosition(@Param("patrolplanId") String patrolplanId,@Param("longitude") Double longitude,@Param("latitude") Double latitude);
+ ArdAlarmpointsWell getWellById(String id);
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
index ae0f9ae..62c34fe 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java
@@ -139,4 +139,6 @@
Map<String,Object> getWellDataByWellId(String wellId, List<SysConfig> config);
Map<String,Object> getWellDataByPatrolplanIdAndPosition(Map<String,Object> para,List<SysConfig> sysConfigResult);
+
+ ArdAlarmpointsWell getWellById(String id);
}
diff --git a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
index 6239f13..fb44bf9 100644
--- a/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java
@@ -838,6 +838,12 @@
}
}
+ @Override
+ public ArdAlarmpointsWell getWellById(String id) {
+ ArdAlarmpointsWell result = ardAlarmpointsWellMapper.getWellById(id);
+ return result;
+ }
+
public int checkTable(String url, String username, String password, String tableName) throws ClassNotFoundException, SQLException {
Connection connection = null;
diff --git a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
index e62fd44..44a6ef9 100644
--- a/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
+++ b/ard-work/src/main/resources/mapper/alarmpoints/ArdAlarmpointsWellMapper.xml
@@ -294,4 +294,8 @@
<= (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>
</mapper>
--
Gitblit v1.9.3