wurui 3 долоо хоног өмнө
parent
commit
352b1875bd

+ 6 - 2
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/service/TargetDemandService.java

@@ -577,9 +577,13 @@ public class TargetDemandService extends ServiceImpl<TargetDemandMapper, TargetD
             QueryTargetPointBatchDTO SceneTargetPoint = new QueryTargetPointBatchDTO();
             SceneTargetPoint.setId(UUID.randomUUID().toString());
             SceneTargetPoint.setCreatedDate(new Date());
-            SceneTargetPoint.setLatitude(BigDecimal.valueOf(pointDTO.getLat()));
+
+            SceneTargetPoint.setLatitude(BigDecimal.valueOf(pointDTO.getLng()));
+
             SceneTargetPoint.setSource(1);
-            SceneTargetPoint.setLongitude(BigDecimal.valueOf(pointDTO.getLng()));
+
+            SceneTargetPoint.setLongitude(BigDecimal.valueOf(pointDTO.getLat()));
+
             SceneTargetPoint.setTargetId(targetId);
             SceneTargetPoint.setSequence(pointDTO.getSequence());
             SceneTargetPoint.setMovingEvgSpeed(pointDTO.getMovingEvgSpeed());

+ 4 - 4
orbit-base-plan/base-plan-service/src/main/java/com/base/plan/utils/LaLonUtil.java

@@ -35,10 +35,10 @@ public class LaLonUtil {
         double offsetLatitude = width / 111000; // 纬度方向上的偏移量(单位:米)
 
         // 根据中心点和偏移量计算矩形四个顶点的经纬度坐标
-        Coordinate corner1 = new Coordinate(centerLongitude - offsetLongitude, centerLatitude - offsetLatitude);
-        Coordinate corner2 = new Coordinate(centerLongitude + offsetLongitude, centerLatitude - offsetLatitude);
-        Coordinate corner3 = new Coordinate(centerLongitude + offsetLongitude, centerLatitude + offsetLatitude);
-        Coordinate corner4 = new Coordinate(centerLongitude - offsetLongitude, centerLatitude + offsetLatitude);
+        Coordinate corner1 = new Coordinate(startLond - offsetLongitude, strLatd - offsetLatitude);
+        Coordinate corner2 = new Coordinate(startLond + offsetLongitude, strLatd - offsetLatitude);
+        Coordinate corner3 = new Coordinate(endLond + offsetLongitude, endLatd + offsetLatitude);
+        Coordinate corner4 = new Coordinate(endLond - offsetLongitude, endLatd + offsetLatitude);
         PointRpcDTO pointRpcDTO1=new PointRpcDTO();
         pointRpcDTO1.setSort("1");
         pointRpcDTO1.setSerial("1");