From 3eddfc41323c56219f9e71b405a815d52d3db4a4 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期三, 27 九月 2023 12:03:25 +0800
Subject: [PATCH] 优化获取附近井接口坐标分离
---
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/IArdAlarmpointsWellService.java | 2 +-
ard-work/src/main/java/com/ruoyi/alarmpoints/well/service/impl/ArdAlarmpointsWellServiceImpl.java | 4 +---
ard-work/src/main/java/com/ruoyi/alarmpoints/well/controller/ArdAlarmpointsWellController.java | 4 ++--
3 files changed, 4 insertions(+), 6 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 93096ba..4df23f5 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
@@ -217,11 +217,11 @@
@PostMapping("/getNearbyWells")
@ApiOperation("鏌ヨ闄勮繎鐨勬墍鏈変簳")
- public AjaxResult getNearbyWells(Double[] position, Long deptId, Integer pageNum, Integer pageSize) {
+ public AjaxResult getNearbyWells(Double longitude,Double latitude, Long deptId, Integer pageNum, Integer pageSize) {
JpaPageInfo jpaPageInfo = new JpaPageInfo();
jpaPageInfo.setPageNum(pageNum);
jpaPageInfo.setPageSize(pageSize);
- List<ArdAlarmpointsWell> nearbyWellList = ardAlarmpointsWellService.getNearbyWellList(position, deptId, 1000);
+ List<ArdAlarmpointsWell> nearbyWellList = ardAlarmpointsWellService.getNearbyWellList(longitude,latitude, deptId, 1000);
jpaPageInfo.doPage(nearbyWellList);
return AjaxResult.success(jpaPageInfo);
}
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 6e41484..a002a4d 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
@@ -122,5 +122,5 @@
* 鍒樿嫃涔�
* 2023/9/27 10:26:35
*/
- List<ArdAlarmpointsWell> getNearbyWellList(Double[] position, Long deptId,Integer range);
+ List<ArdAlarmpointsWell> getNearbyWellList(Double longitudeCenter,Double latitudeCenter, Long deptId,Integer range);
}
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 6843b20..b2c5e8a 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
@@ -296,11 +296,9 @@
}
@Override
- public List<ArdAlarmpointsWell> getNearbyWellList(Double[] position, Long deptId, Integer range) {
+ public List<ArdAlarmpointsWell> getNearbyWellList(Double longitudeCenter,Double latitudeCenter, Long deptId, Integer range) {
List<ArdAlarmpointsWell> nearbyWellList = new ArrayList<>();
try {
- Double longitudeCenter = position[0];
- Double latitudeCenter = position[1];
if (longitudeCenter != null && latitudeCenter != null) {
ArdAlarmpointsWell ardAlarmpointsWell=new ArdAlarmpointsWell();
ardAlarmpointsWell.setDeptId(deptId);
--
Gitblit v1.9.3