|
@@ -14,6 +14,7 @@ import com.ruoyi.common.redis.service.RedisService;
|
|
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
import com.sooka.sponest.monitor.camera.domain.*;
|
|
|
import com.sooka.sponest.monitor.camera.service.ICentermonitorTCameraService;
|
|
|
+import com.sooka.sponest.monitor.camera.service.ICentermonitorTCamerachannelService;
|
|
|
import com.sooka.sponest.monitor.device.mapper.CentermonitorTMonitoringEquipmentPositionMapper;
|
|
|
import com.sooka.sponest.monitor.util.HikSubscription;
|
|
|
import io.swagger.annotations.*;
|
|
@@ -26,9 +27,9 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.BufferedReader;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
|
|
|
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
|
|
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
|
@@ -55,7 +56,9 @@ public class CentermonitorTCameraController extends BaseController {
|
|
|
|
|
|
@Resource
|
|
|
private CentermonitorTMonitoringEquipmentPositionMapper centermonitorTMonitoringEquipmentPositionMapper;
|
|
|
-
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ICentermonitorTCamerachannelService centermonitorTCamerachannelService;
|
|
|
/**
|
|
|
* 根据ID查询摄像头详细信息
|
|
|
*/
|
|
@@ -127,6 +130,8 @@ public class CentermonitorTCameraController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 导出摄像头列表
|
|
|
*/
|
|
@@ -802,6 +807,24 @@ public class CentermonitorTCameraController extends BaseController {
|
|
|
return AjaxResult.success(centermonitorTCameraService.selectDeviceTreeDataByLabelId(labelId));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据经纬度查询周边摄像头
|
|
|
+ */
|
|
|
+ @GetMapping("/findNearbyCamerasByType")
|
|
|
+ @ApiOperation("根据经纬度查询周边摄像头")
|
|
|
+ public AjaxResult findNearbyCamerasByType(
|
|
|
+ @RequestParam(value = "longitude") String longitude,
|
|
|
+ @RequestParam(value = "latitude") String latitude,
|
|
|
+ @RequestParam(value = "type") String type) {
|
|
|
+ try {
|
|
|
+ List<CentermonitorTCamera> cameraList = centermonitorTCameraService.findCameraByEventCoordinate(longitude, latitude, type);
|
|
|
+ return AjaxResult.success(cameraList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ return AjaxResult.error("查询周边摄像头失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|