648540858
2022-07-25 91dc4566a26862abef9aa2352d2ddf2279e5e8e8
修复级联无通道时更新停止在等待更新的问题
5个文件已修改
32 ■■■■■ 已修改文件
src/main/java/com/genersoft/iot/vmp/gb28181/bean/CatalogData.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SyncStatus.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_src/src/components/dialog/SyncChannelProgress.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/gb28181/bean/CatalogData.java
@@ -3,8 +3,14 @@
import java.time.Instant;
import java.util.List;
/**
 * @author lin
 */
public class CatalogData {
    private int sn; // 命令序列号
    /**
     * 命令序列号
     */
    private int sn;
    private int total;
    private List<DeviceChannel> channelList;
    private Instant lastTime;
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SyncStatus.java
@@ -2,11 +2,14 @@
/**
 * 摄像机同步状态
 * @author lin
 */
public class SyncStatus {
    private int total;
    private int current;
    private String errorMsg;
    private boolean syncIng;
    public int getTotal() {
        return total;
@@ -31,4 +34,12 @@
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
    public boolean isSyncIng() {
        return syncIng;
    }
    public void setSyncIng(boolean syncIng) {
        this.syncIng = syncIng;
    }
}
src/main/java/com/genersoft/iot/vmp/gb28181/session/CatalogDataCatch.java
@@ -84,6 +84,11 @@
        syncStatus.setCurrent(catalogData.getChannelList().size());
        syncStatus.setTotal(catalogData.getTotal());
        syncStatus.setErrorMsg(catalogData.getErrorMsg());
        if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end)) {
            syncStatus.setSyncIng(false);
        }else {
            syncStatus.setSyncIng(true);
        }
        return syncStatus;
    }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java
@@ -111,6 +111,7 @@
                        int sumNum = Integer.parseInt(sumNumElement.getText());
                        if (sumNum == 0) {
                            logger.info("收到来自设备【{}】的通道: 0个", take.getDevice().getDeviceId());
                            // 数据已经完整接收
                            storager.cleanChannelsForDevice(take.getDevice().getDeviceId());
                            catalogDataCatch.setChannelSyncEnd(take.getDevice().getDeviceId(), null);
web_src/src/components/dialog/SyncChannelProgress.vue
@@ -63,6 +63,7 @@
          }
          if (res.data.data != null) {
            if (res.data.syncIng) {
            if (res.data.data.total == 0) {
              if (res.data.data.errorMsg !== null ){
                this.msg = res.data.data.errorMsg;
@@ -89,8 +90,12 @@
                }
              }
            }
            }else {
              this.syncStatus = "success"
              this.percentage = 100;
              this.msg = '同步成功';
          }
          }
        }else {
          if (this.syncFlag) {
            this.syncStatus = "success"