jingyuanchao vor 1 Jahr
Ursprung
Commit
87a2c9a912

+ 3 - 0
project_data/sql/0.1.1/soc/soc.sql

@@ -1411,3 +1411,6 @@ ALTER TABLE `iot_alarm_data`
 
 delete from sys_config where config_key='ALARM_LOSE_DURATION';
 INSERT INTO `sys_config`(`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('判定为完整录像的丢失时长', 'ALARM_LOSE_DURATION', '5', 'Y', '超级管理员', '2024-10-15 10:21:10', '', NULL, NULL);
+
+-- 删除脏数据
+delete from iot_device_info where deleted= 1;

+ 3 - 2
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/iot/service/impl/IotDeviceInfoServiceImpl.java

@@ -543,7 +543,8 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
             //处理通道或者动环传感器信息
             for (SubDeviceInfo subDeviceInfo : subDeviceList) {
                 //动环中 控电箱按钮与 市电总回路/八小时总回路通电状态不同步
-                boolean isFusDevice = ProductEnums.FSU_GATEWAY.getProductName().contains(dvsBaseInfo.getProductName()) && (!list.contains(subDeviceInfo.getType()));
+                boolean needSyncTpAsset = ProductEnums.FSU_GATEWAY.getProductName().contains(dvsBaseInfo.getProductName()) && (!list.contains(subDeviceInfo.getType()));
+                boolean isFusDevice = ProductEnums.FSU_GATEWAY.getProductName().contains(dvsBaseInfo.getProductName());
                 String productName = isFusDevice ? subDeviceInfo.getType() : dvsBaseInfo.getProductName();
                 IotDeviceInfo channelInfo = selectByTypeAndHostAndCode(serverInfo.getIotCode(), subDeviceInfo.getParentCode(), productName, subDeviceInfo.getDeviceCode());
 
@@ -554,7 +555,7 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
                     updateChannelInfo(subDeviceInfo, channelInfo, hostInfo);
                     updateChnnelList.add(channelInfo);
                 }
-                if (isFusDevice) {
+                if (needSyncTpAsset) {
                     syncToAssetDeviceList.add(channelInfo);
                 }