调整推流导入的数据格式
parent
d9c0d0637c
commit
1dcb912910
|
@ -87,7 +87,7 @@ public class CommonGBChannel {
|
||||||
@Schema(description = "国标-经度 WGS-84坐标系")
|
@Schema(description = "国标-经度 WGS-84坐标系")
|
||||||
private Double gbLongitude;
|
private Double gbLongitude;
|
||||||
|
|
||||||
@Schema(description = "国标-,纬度 WGS-84坐标系")
|
@Schema(description = "国标-纬度 WGS-84坐标系")
|
||||||
private Double gbLatitude;
|
private Double gbLatitude;
|
||||||
|
|
||||||
@Schema(description = "国标-虚拟组织所属的业务分组ID")
|
@Schema(description = "国标-虚拟组织所属的业务分组ID")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.genersoft.iot.vmp.streamPush.bean;
|
package com.genersoft.iot.vmp.streamPush.bean;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@ -16,14 +17,14 @@ public class StreamPushExcelDto {
|
||||||
private String stream;
|
private String stream;
|
||||||
|
|
||||||
@ExcelProperty("国标ID")
|
@ExcelProperty("国标ID")
|
||||||
private String gbId;
|
private String gbDeviceId;
|
||||||
|
|
||||||
// @ExcelProperty("平台ID")
|
|
||||||
// private String platformId;
|
|
||||||
//
|
|
||||||
// @ExcelProperty("目录ID")
|
|
||||||
// private String catalogId;
|
|
||||||
|
|
||||||
@ExcelProperty("在线状态")
|
@ExcelProperty("在线状态")
|
||||||
private boolean status;
|
private boolean status;
|
||||||
|
|
||||||
|
@Schema(description = "经度 WGS-84坐标系")
|
||||||
|
private Double longitude;
|
||||||
|
|
||||||
|
@Schema(description = "纬度 WGS-84坐标系")
|
||||||
|
private Double latitude;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,21 +81,21 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
|
||||||
public void invoke(StreamPushExcelDto streamPushExcelDto, AnalysisContext analysisContext) {
|
public void invoke(StreamPushExcelDto streamPushExcelDto, AnalysisContext analysisContext) {
|
||||||
if (ObjectUtils.isEmpty(streamPushExcelDto.getApp())
|
if (ObjectUtils.isEmpty(streamPushExcelDto.getApp())
|
||||||
|| ObjectUtils.isEmpty(streamPushExcelDto.getStream())
|
|| ObjectUtils.isEmpty(streamPushExcelDto.getStream())
|
||||||
|| ObjectUtils.isEmpty(streamPushExcelDto.getGbId())) {
|
|| ObjectUtils.isEmpty(streamPushExcelDto.getGbDeviceId())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
|
Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
|
||||||
|
|
||||||
if (gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()) == null) {
|
if (gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()) == null) {
|
||||||
try {
|
try {
|
||||||
gBMap.put(streamPushExcelDto.getApp() + streamPushExcelDto.getStream(), streamPushExcelDto.getGbId());
|
gBMap.put(streamPushExcelDto.getApp() + streamPushExcelDto.getStream(), streamPushExcelDto.getGbDeviceId());
|
||||||
}catch (IllegalArgumentException e) {
|
}catch (IllegalArgumentException e) {
|
||||||
errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbId() + " 国标ID重复使用");
|
errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbDeviceId() + " 国标ID重复使用");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if (!gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()).equals(streamPushExcelDto.getGbId())) {
|
if (!gBMap.get(streamPushExcelDto.getApp() + streamPushExcelDto.getStream()).equals(streamPushExcelDto.getGbDeviceId())) {
|
||||||
errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbId() + " 同样的应用名和流ID使用了不同的国标ID");
|
errorInfoList.add("行:" + rowIndex + ", " + streamPushExcelDto.getGbDeviceId() + " 同样的应用名和流ID使用了不同的国标ID");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
|
||||||
StreamPush streamPush = new StreamPush();
|
StreamPush streamPush = new StreamPush();
|
||||||
streamPush.setApp(streamPushExcelDto.getApp());
|
streamPush.setApp(streamPushExcelDto.getApp());
|
||||||
streamPush.setStream(streamPushExcelDto.getStream());
|
streamPush.setStream(streamPushExcelDto.getStream());
|
||||||
streamPush.setGbDeviceId(streamPushExcelDto.getGbId());
|
streamPush.setGbDeviceId(streamPushExcelDto.getGbDeviceId());
|
||||||
streamPush.setGbStatus(streamPushExcelDto.isStatus()?"ON":"OFF");
|
streamPush.setGbStatus(streamPushExcelDto.isStatus()?"ON":"OFF");
|
||||||
streamPush.setCreateTime(DateUtil.getNow());
|
streamPush.setCreateTime(DateUtil.getNow());
|
||||||
streamPush.setMediaServerId(defaultMediaServerId);
|
streamPush.setMediaServerId(defaultMediaServerId);
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue