临时提交

This commit is contained in:
panlinlin
2024-07-11 23:52:34 +08:00
parent 6619c5c53d
commit 0853d7e842
5 changed files with 151 additions and 75 deletions

View File

@@ -117,7 +117,7 @@ public class CatalogDataCatch {
// 超过五秒收不到消息任务超时, 只更新这一部分数据, 收到数据与声明的总数一致,则重置通道数据,数据不全则只对收到的数据做更新操作
if (catalogData.getStatus().equals(CatalogData.CatalogDataStatus.runIng)) {
if (catalogData.getTotal() == catalogData.getChannelList().size()) {
deviceChannelService.resetChannels(catalogData.getDevice().getDeviceId(), catalogData.getChannelList());
deviceChannelService.resetChannels(catalogData.getDevice().getId(), catalogData.getChannelList());
}else {
deviceChannelService.updateChannels(catalogData.getDevice(), catalogData.getChannelList());
}

View File

@@ -130,7 +130,7 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
if (catalogDataCatch.get(take.getDevice().getDeviceId()).size() == sumNum) {
// 数据已经完整接收, 此时可能存在某个设备离线变上线的情况,但是考虑到性能,此处不做处理,
// 目前支持设备通道上线通知时和设备上线时向上级通知
boolean resetChannelsResult = deviceChannelService.resetChannels(take.getDevice().getDeviceId(), catalogDataCatch.get(take.getDevice().getDeviceId()));
boolean resetChannelsResult = deviceChannelService.resetChannels(device.getId(), catalogDataCatch.get(take.getDevice().getDeviceId()));
if (!resetChannelsResult) {
String errorMsg = "接收成功,写入失败,共" + sumNum + "条,已接收" + catalogDataCatch.get(take.getDevice().getDeviceId()).size() + "";
catalogDataCatch.setChannelSyncEnd(take.getDevice().getDeviceId(), errorMsg);