|
@@ -3,10 +3,7 @@ package com.genersoft.iot.vmp.vmanager.gb28181.device;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.genersoft.iot.vmp.conf.DynamicTask;
|
|
import com.genersoft.iot.vmp.conf.DynamicTask;
|
|
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
|
|
-import com.genersoft.iot.vmp.gb28181.bean.Device;
|
|
|
|
|
-import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
|
|
|
|
-import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
|
|
|
|
|
-import com.genersoft.iot.vmp.gb28181.bean.SyncStatus;
|
|
|
|
|
|
|
+import com.genersoft.iot.vmp.gb28181.bean.*;
|
|
|
import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask;
|
|
import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask;
|
|
|
import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask;
|
|
import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask;
|
|
|
import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeTask;
|
|
import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeTask;
|
|
@@ -25,7 +22,6 @@ import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.apache.commons.compress.utils.IOUtils;
|
|
import org.apache.commons.compress.utils.IOUtils;
|
|
|
-import org.apache.http.HttpResponse;
|
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -33,12 +29,10 @@ import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.context.request.async.DeferredResult;
|
|
import org.springframework.web.context.request.async.DeferredResult;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.sip.DialogState;
|
|
|
|
|
import javax.sip.InvalidArgumentException;
|
|
import javax.sip.InvalidArgumentException;
|
|
|
import javax.sip.SipException;
|
|
import javax.sip.SipException;
|
|
|
import java.io.*;
|
|
import java.io.*;
|
|
@@ -88,10 +82,38 @@ public class DeviceQuery {
|
|
|
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
|
|
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
|
|
|
@GetMapping("/devices/{deviceId}")
|
|
@GetMapping("/devices/{deviceId}")
|
|
|
public Device devices(@PathVariable String deviceId){
|
|
public Device devices(@PathVariable String deviceId){
|
|
|
-
|
|
|
|
|
return storager.queryVideoDevice(deviceId);
|
|
return storager.queryVideoDevice(deviceId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Operation(summary = "设备ai查询")
|
|
|
|
|
+ @Parameter(name = "deviceId", description = "设备国标编号", required = true)
|
|
|
|
|
+ @GetMapping("/devAis/{deviceId}")
|
|
|
|
|
+ public List<AiConfig> devAiList(@PathVariable String deviceId){
|
|
|
|
|
+ if (logger.isDebugEnabled()) {
|
|
|
|
|
+ logger.debug("设备ai数据查询");
|
|
|
|
|
+ }
|
|
|
|
|
+ return storager.queryDevAiConfigList(deviceId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "ai数据库查询")
|
|
|
|
|
+ @GetMapping("/aiLibrary")
|
|
|
|
|
+ public List<AiConfig> aiLibrary(){
|
|
|
|
|
+ if (logger.isDebugEnabled()) {
|
|
|
|
|
+ logger.debug("设备ai数据查询");
|
|
|
|
|
+ }
|
|
|
|
|
+ return storager.queryLibraryList();
|
|
|
|
|
+ }
|
|
|
|
|
+ @Operation(summary = "ai库子项数据查询")
|
|
|
|
|
+ @Parameter(name = "libraryId", description = "设备国标编号", required = true)
|
|
|
|
|
+ @GetMapping("/aiLibItem/{libraryId}")
|
|
|
|
|
+ public List<AiConfig> aiLibItem(@PathVariable int libraryId){
|
|
|
|
|
+ if (logger.isDebugEnabled()) {
|
|
|
|
|
+ logger.debug("ai库子项数据查询");
|
|
|
|
|
+ }
|
|
|
|
|
+ return storager.queryItemByLibraryId(libraryId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 分页查询国标设备
|
|
* 分页查询国标设备
|
|
|
* @param page 当前页
|
|
* @param page 当前页
|
|
@@ -343,6 +365,8 @@ public class DeviceQuery {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 设备报警查询请求API接口
|
|
* 设备报警查询请求API接口
|
|
|
* @param deviceId 设备id
|
|
* @param deviceId 设备id
|