临时提交

This commit is contained in:
648540858 2024-10-29 22:11:46 +08:00
parent 13b896ce23
commit 556f0ebf2f

View File

@ -484,12 +484,12 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
// 数据去重 // 数据去重
Set<String> gbIdSet = new HashSet<>(); Set<String> gbIdSet = new HashSet<>();
for (DeviceChannel deviceChannel : deviceChannelList) { for (DeviceChannel deviceChannel : deviceChannelList) {
if (gbIdSet.contains(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId())) { if (gbIdSet.contains(deviceDbId + deviceChannel.getDeviceId())) {
stringBuilder.append(deviceChannel.getDeviceId()).append(","); stringBuilder.append(deviceChannel.getDeviceId()).append(",");
continue; continue;
} }
gbIdSet.add(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId()); gbIdSet.add(deviceDbId + deviceChannel.getDeviceId());
DeviceChannel channelInDb = allChannelMap.get(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId()); DeviceChannel channelInDb = allChannelMap.get(deviceDbId + deviceChannel.getDeviceId());
if (channelInDb != null) { if (channelInDb != null) {
deviceChannel.setStreamId(channelInDb.getStreamId()); deviceChannel.setStreamId(channelInDb.getStreamId());
deviceChannel.setHasAudio(channelInDb.isHasAudio()); deviceChannel.setHasAudio(channelInDb.isHasAudio());
@ -509,7 +509,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
deviceChannel.setUpdateTime(DateUtil.getNow()); deviceChannel.setUpdateTime(DateUtil.getNow());
addChannels.add(deviceChannel); addChannels.add(deviceChannel);
} }
allChannelMap.remove(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId()); allChannelMap.remove(deviceDbId + deviceChannel.getDeviceId());
channels.add(deviceChannel); channels.add(deviceChannel);
if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) { if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) {
if (subContMap.get(deviceChannel.getParentId()) == null) { if (subContMap.get(deviceChannel.getParentId()) == null) {