lyq 2 月之前
父節點
當前提交
eec3c7de02

+ 10 - 0
src/main/java/com/sooka/sponest/monitor/dahua/controller/DahuaController.java

@@ -272,6 +272,16 @@ public class DahuaController {
     }
 
     /**
+     * 根据通道编号查询配置任务 以及预置点裁剪信息
+     * */
+    @Log(title = "大华", businessType = BusinessType.OTHER)
+    @ApiOperation(value = "根据通道编号查询配置任务 以及预置点裁剪信息", notes = "根据通道编号查询配置任务 以及预置点裁剪信息")
+    @GetMapping("/algorithmTask")
+    public AjaxResult algorithmTask(String channelId) {
+        return dahuaService.algorithmTask(channelId);
+    }
+
+    /**
      * rtsp实时预览
      * */
     @Log(title = "大华", businessType = BusinessType.OTHER)

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/dahua/service/DahuaService.java

@@ -125,5 +125,7 @@ public interface DahuaService {
      */
     AjaxResult calPTAngleAndSitPosition(JSONObject json);
 
+    AjaxResult algorithmTask(String channelId);
+
     AjaxResult startVideo(String channelId);
 }

+ 16 - 0
src/main/java/com/sooka/sponest/monitor/dahua/service/impl/DahuaServiceImpl.java

@@ -903,6 +903,22 @@ public class DahuaServiceImpl extends BaseService implements DahuaService {
     }
 
     @Override
+    public AjaxResult algorithmTask(String channelId) {
+        String prBody = "";
+        try {
+            IccHttpHttpRequest pr = new IccHttpHttpRequest(host + "/evo-apigw/evo-gmai/1.4.0/api/algorithmTask/page?page=1&pageSize=100&taskName=&enabled=&channelCodes=" + channelId, Method.GET);
+            pr.getHttpRequest()
+                    .header("Authorization", "bearer " + getTokenByPassword())
+                    .header("User-Id", "1");
+            prBody = pr.execute();
+            return AjaxResult.success("操作成功", JSON.parseObject(prBody));
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            return AjaxResult.error("操作失败", JSON.parseObject(prBody));
+        }
+    }
+
+    @Override
     public AjaxResult startVideo(String channelId) {
         Map<String, Object> param = new HashMap<>();
         Map<String, Object> data = new HashMap<>();