Prechádzať zdrojové kódy

调整推流导入的数据格式

648540858 1 rok pred
rodič
commit
1dcb912910

+ 1 - 1
src/main/java/com/genersoft/iot/vmp/gb28181/bean/CommonGBChannel.java

@@ -87,7 +87,7 @@ public class CommonGBChannel {
     @Schema(description = "国标-经度 WGS-84坐标系")
     private Double gbLongitude;
 
-    @Schema(description = "国标-,纬度 WGS-84坐标系")
+    @Schema(description = "国标-纬度 WGS-84坐标系")
     private Double gbLatitude;
 
     @Schema(description = "国标-虚拟组织所属的业务分组ID")

+ 8 - 7
src/main/java/com/genersoft/iot/vmp/streamPush/bean/StreamPushExcelDto.java

@@ -1,6 +1,7 @@
 package com.genersoft.iot.vmp.streamPush.bean;
 
 import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 @Data
@@ -16,14 +17,14 @@ public class StreamPushExcelDto {
     private String stream;
 
     @ExcelProperty("国标ID")
-    private String gbId;
-
-//    @ExcelProperty("平台ID")
-//    private String platformId;
-//
-//    @ExcelProperty("目录ID")
-//    private String catalogId;
+    private String gbDeviceId;
 
     @ExcelProperty("在线状态")
     private boolean status;
+
+    @Schema(description = "经度 WGS-84坐标系")
+    private Double longitude;
+
+    @Schema(description = "纬度 WGS-84坐标系")
+    private Double latitude;
 }

+ 6 - 6
src/main/java/com/genersoft/iot/vmp/streamPush/enent/StreamPushUploadFileHandler.java

@@ -81,21 +81,21 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
     public void invoke(StreamPushExcelDto streamPushExcelDto, AnalysisContext analysisContext) {
         if (ObjectUtils.isEmpty(streamPushExcelDto.getApp())
                 || ObjectUtils.isEmpty(streamPushExcelDto.getStream())
-                || ObjectUtils.isEmpty(streamPushExcelDto.getGbId())) {
+                || ObjectUtils.isEmpty(streamPushExcelDto.getGbDeviceId())) {
             return;
         }
         Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
 
         if (gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()) == null) {
             try {
-                gBMap.put(streamPushExcelDto.getApp() + streamPushExcelDto.getStream(), streamPushExcelDto.getGbId());
+                gBMap.put(streamPushExcelDto.getApp() + streamPushExcelDto.getStream(), streamPushExcelDto.getGbDeviceId());
             }catch (IllegalArgumentException e) {
-                errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbId() + " 国标ID重复使用");
+                errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbDeviceId() + " 国标ID重复使用");
                 return;
             }
         }else {
-            if (!gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()).equals(streamPushExcelDto.getGbId())) {
-                errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbId() + " 同样的应用名和流ID使用了不同的国标ID");
+            if (!gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()).equals(streamPushExcelDto.getGbDeviceId())) {
+                errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbDeviceId() + " 同样的应用名和流ID使用了不同的国标ID");
                 return;
             }
         }
@@ -103,7 +103,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
         StreamPush streamPush = new StreamPush();
         streamPush.setApp(streamPushExcelDto.getApp());
         streamPush.setStream(streamPushExcelDto.getStream());
-        streamPush.setGbDeviceId(streamPushExcelDto.getGbId());
+        streamPush.setGbDeviceId(streamPushExcelDto.getGbDeviceId());
         streamPush.setGbStatus(streamPushExcelDto.isStatus()?"ON":"OFF");
         streamPush.setCreateTime(DateUtil.getNow());
         streamPush.setMediaServerId(defaultMediaServerId);

BIN
web_src/static/file/推流通道导入.zip