瀏覽代碼

新摄像头

zhaowenrui 1 年之前
父節點
當前提交
79a0359879

+ 15 - 0
src/main/java/com/sooka/sponest/mobile/system/camera/controller/AppCameraController.java

@@ -42,6 +42,21 @@ public class AppCameraController extends AppBaseController {
         return appCameraService.nearCamera(appCameraVO);
     }
 
+
+
+    /**
+     * 附近摄像头列表
+     *
+     * @return AjaxResult
+     * @Version 1.0
+     */
+    @ApiOperation(value = "摄像头列表", notes = "摄像头列表")
+    @PostMapping("newNearCamera")
+    public AjaxResult newNearCamera(@RequestBody AppCameraVO appCameraVO) {
+        startPage();
+        return appCameraService.newNearCamera(appCameraVO);
+    }
+
     /**
      * 所有摄像头列表
      *

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/system/camera/domain/AppCameraVO.java

@@ -21,4 +21,9 @@ public class AppCameraVO {
      * 探头ID
      */
     private String cameraId;
+
+    /**
+     * 类型
+     */
+    private String type;
 }

+ 2 - 0
src/main/java/com/sooka/sponest/mobile/system/camera/service/AppCameraService.java

@@ -20,6 +20,8 @@ public interface AppCameraService {
      */
     public AjaxResult nearCamera(AppCameraVO appCameraVO);
 
+    public AjaxResult newNearCamera(AppCameraVO appCameraVO);
+
     public AjaxResult listCamera(CentermonitorTCamera centermonitorTCamera);
 
     public AppCameraListBO detail(AppCameraVO appCameraVO);

+ 19 - 0
src/main/java/com/sooka/sponest/mobile/system/camera/service/impl/AppCameraServiceImpl.java

@@ -34,6 +34,25 @@ public class AppCameraServiceImpl implements AppCameraService {
         return AjaxResult.success(objectMap);
     }
 
+
+    /**
+     * 附近摄像头列表
+     *
+     * @return
+     * @Version 1.0
+     */
+    @Override
+    public AjaxResult newNearCamera(AppCameraVO appCameraVO) {
+        String longitude = appCameraVO.getLongitude();
+        String latitude = appCameraVO.getLatitude();
+        String type = appCameraVO.getType();
+        List list = (ArrayList) remoteMonitorBaseService.findCameraByEventCoordinate(longitude, latitude,type).get("data");
+        Map<String, Object> objectMap = new HashMap<>();
+        objectMap.put("total", list.size());
+        objectMap.put("list", list);
+        return AjaxResult.success(objectMap);
+    }
+
     /**
      * 所有摄像头列表
      *