浏览代码

刷iot_alarm_data表历史数据source_type和field_code字段

xujie 1 年之前
父节点
当前提交
76f288f699
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      project_data/sql/0.1.1/soc/soc.sql

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

@@ -1412,5 +1412,15 @@ 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);
 
+-- 刷iot_alarm_data的历史数据,source_type和field_code字段
+update iot_alarm_data set source_type = 'FSU_TemperatureAndHumidity',field_code='temperature' where source_type = '4183' and field_code = '4183_1';
+update iot_alarm_data set source_type = 'FSU_TemperatureAndHumidity',field_code='humidity' where source_type = '4183' and field_code = '4183_2';
+update iot_alarm_data set source_type = 'FSU_Smoke',field_code='alarm' where source_type = '4182' and field_code = '4182';
+update iot_alarm_data set source_type = 'FSU_Water',field_code='alarm' where source_type = '4184' and field_code = '4184';
+update iot_alarm_data set source_type = 'FSU_Infrared',field_code='alarm' where source_type = '4181' and field_code = '4181';
+update iot_alarm_data set source_type = 'FSU_DoorMagnetic',field_code='alarm' where source_type = '4188' and field_code = '4188';
+update iot_alarm_data set source_type = 'FSU_Gas',field_code='alarm' where source_type = '41885' and field_code = '41885';
+update iot_alarm_data set source_type = 'FSU_Theft',field_code='alarm' where source_type = '41881' and field_code = '41881';
+
 -- 删除脏数据
 delete from iot_device_info where deleted= 1;