From 8fd99421ca71b594f1fd847da1928c328bfef878 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期一, 30 十月 2023 15:16:55 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java b/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
index 52b4eec..a6e4edc 100644
--- a/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
+++ b/ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
@@ -178,28 +178,29 @@
//鎷︽埅鎵嬪姩寮曞
ArdCameraNoGuideZone ardCameraNoGuideZone = new ArdCameraNoGuideZone();
ardCameraNoGuideZone.setCameraId(cmd.getCameraId());
+ ardCameraNoGuideZone.setEnabled("1");
//鑾峰彇褰撳墠鐩告満鐨勭寮曞彲瑙嗗煙鍒楄〃
List<ArdCameraNoGuideZone> ardCameraNoGuideZones = ardCameraNoGuideZoneService.selectArdCameraNoGuideZoneList(ardCameraNoGuideZone);
if (ardCameraNoGuideZones.size() > 0) {
//鑾峰彇鍒板綋鍓嶇浉鏈虹殑鍧愭爣闆嗗悎
- List<Point> pointList = new ArrayList<>();
for(ArdCameraNoGuideZone zone:ardCameraNoGuideZones) {
String[] parts = zone.getPoi().split(",");
+ List<Point> pointList = new ArrayList<>();
for (int i = 0; i < parts.length; i += 3) {
Point point = new Point();
point.setLongitude(Double.valueOf(parts[i]));
point.setLatitude(Double.valueOf(parts[i + 1]));
pointList.add(point);
}
- }
- double lon = cmd.getTargetPosition()[0];
- double lat = cmd.getTargetPosition()[1];
- Point targetPoint = new Point(lon, lat);
- //鍒ゆ柇寮曞鐩爣鏄惁鍦ㄥ潗鏍囬泦鍚堢粍鎴愮殑澶氳竟褰㈠唴
- boolean inPolygon = GisUtil.isInPolygon(targetPoint, pointList);
- if(inPolygon)
- {
- return AjaxResult.error("寮曞鍧愭爣浣嶄簬绂佸紩鍙鍩熷唴");
+ double lon = cmd.getTargetPosition()[0];
+ double lat = cmd.getTargetPosition()[1];
+ Point targetPoint = new Point(lon, lat);
+ //鍒ゆ柇寮曞鐩爣鏄惁鍦ㄥ潗鏍囬泦鍚堢粍鎴愮殑澶氳竟褰㈠唴
+ boolean inPolygon = GisUtil.isInPolygon(targetPoint, pointList);
+ if(inPolygon)
+ {
+ return AjaxResult.error("寮曞鍧愭爣浣嶄簬绂佸紩鍙鍩熷唴");
+ }
}
}
return toAjax(cameraSdkService.guideTargetPosition(cmd));
--
Gitblit v1.9.3