|
|
@@ -516,9 +516,14 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
|
|
|
//逻辑删除Dvs扩展信息
|
|
|
iIotDeviceInfoExtendService.deleteDeviceExtendByTokenAndDeviceType(serverInfo.getIotCode(), BaseDeviceTypeEnum.Dvs.getCode());
|
|
|
iIotDeviceInfoExtendService.deleteDeviceExtendByTokenAndDeviceType(serverInfo.getIotCode(), BaseDeviceTypeEnum.FSU.getCode());
|
|
|
+ //删除门禁主机和对讲主机
|
|
|
+ iIotDeviceInfoExtendService.deleteDeviceExtendByTokenAndDeviceType(serverInfo.getIotCode(), BaseDeviceTypeEnum.Host_Talk.getCode());
|
|
|
+ iIotDeviceInfoExtendService.deleteDeviceExtendByTokenAndDeviceType(serverInfo.getIotCode(), BaseDeviceTypeEnum.Host_Door.getCode());
|
|
|
+
|
|
|
|
|
|
List<DvsBaseInfo> dvsBaseInfoList = dataList.stream().filter(r -> ObjectUtil.equal(r.getType(), BaseDeviceTypeEnum.Dvs.name())
|
|
|
- || ObjectUtil.equal(r.getType(), BaseDeviceTypeEnum.FSU.name())).collect(Collectors.toList());
|
|
|
+ || ObjectUtil.equal(r.getType(), BaseDeviceTypeEnum.FSU.name()) || ObjectUtil.equal(r.getType(), BaseDeviceTypeEnum.Host_Talk.name())
|
|
|
+ || ObjectUtil.equal(r.getType(), BaseDeviceTypeEnum.Host_Door.name())).collect(Collectors.toList());
|
|
|
if (ObjectUtil.isEmpty(dvsBaseInfoList)) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -548,9 +553,10 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
|
|
|
updateHostList.add(hostInfo);
|
|
|
}
|
|
|
syncToAssetDeviceList.add(hostInfo);
|
|
|
- if (BaseDeviceTypeEnum.Dvs.name().equals(dvsBaseInfo.getType())) {
|
|
|
+ if (BaseDeviceTypeEnum.Dvs.name().equals(dvsBaseInfo.getType()) || BaseDeviceTypeEnum.Host_Door.name().equals(dvsBaseInfo.getType())
|
|
|
+ || BaseDeviceTypeEnum.Host_Talk.name().equals(dvsBaseInfo.getType())) {
|
|
|
//处理主机扩展信息
|
|
|
- IotDeviceInfoExtend extend = iIotDeviceInfoExtendService.selectByProductDeviceNameAndToken(serverInfo.getIotCode(), BaseDeviceTypeEnum.Dvs.getCode(), dvsBaseInfo.getDeviceCode());
|
|
|
+ IotDeviceInfoExtend extend = iIotDeviceInfoExtendService.selectByProductDeviceNameAndToken(serverInfo.getIotCode(), code, dvsBaseInfo.getDeviceCode());
|
|
|
if (extend == null) {
|
|
|
addListExtend.add(createIotDeviceInfoExtend(dvsBaseInfo, hostInfo.getId(), serverInfo.getIotCode()));
|
|
|
} else {
|