|
|
@@ -1222,7 +1222,7 @@ drop table if exists websocket_notice_log;
|
|
|
CREATE TABLE `websocket_notice_log` (
|
|
|
`id` bigint NOT NULL,
|
|
|
`iot_alarm_id` bigint DEFAULT NULL,
|
|
|
- `org_id` bigint DEFAULT NULL,
|
|
|
+ `org_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
|
|
`user_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
|
|
`is_do` int DEFAULT NULL COMMENT '是否处理:0.否 1.是',
|
|
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
|
|
@@ -1407,4 +1407,45 @@ ALTER TABLE `iot_alarm_data`
|
|
|
MODIFY COLUMN `source_type` varchar(64) NULL DEFAULT NULL COMMENT '报警源类型(设备类型)' AFTER `device_id`;
|
|
|
|
|
|
ALTER TABLE `iot_alarm_data`
|
|
|
- MODIFY COLUMN `source_type_des` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警源类型(设备类型) 中文' AFTER `source_type`;
|
|
|
+ MODIFY COLUMN `source_type_des` varchar(125) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警源类型(设备类型) 中文' AFTER `source_type`;
|
|
|
+
|
|
|
+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;
|
|
|
+
|
|
|
+-- 修改短信发送表的type字段,将4181-41885修改为对应的productType
|
|
|
+update sms_send_record set type = 'FSU_Infrared' where type = '4181';
|
|
|
+update sms_send_record set type = 'FSU_Smoke' where type = '4182';
|
|
|
+update sms_send_record set type = 'FSU_TemperatureAndHumidity' where type = '4183';
|
|
|
+update sms_send_record set type = 'FSU_Water' where type = '4184';
|
|
|
+update sms_send_record set type = 'FSU_DoorMagnetic' where type = '4188';
|
|
|
+update sms_send_record set type = 'FSU_Theft' where type = '41881';
|
|
|
+update sms_send_record set type = 'FSU_Gas' where type = '41885';
|
|
|
+
|
|
|
+-- 短信提醒类型字典表修改
|
|
|
+delete from sys_dict_type where dict_type = 'sms_notify_type';
|
|
|
+INSERT INTO `sys_dict_type`(`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('短信提醒类型', 'sms_notify_type', '0', '超级管理员', '2024-06-06 14:15:13', '', NULL, NULL);
|
|
|
+
|
|
|
+delete from sys_dict_data where dict_type = 'sms_notify_type';
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '临期提醒', '10100', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:15:50', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '逾期提醒', '10200', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:16:03', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, '水浸告警', 'FSU_Water', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:17:15', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, '温湿度告警', 'FSU_TemperatureAndHumidity', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:17:42', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '烟感告警', 'FSU_Smoke', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:18:09', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '红外告警', 'FSU_Infrared', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:18:28', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '燃气告警', 'FSU_Gas', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:18:53', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (8, '防盗告警', 'FSU_Theft', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:19:44', '', NULL, NULL);
|
|
|
+INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (9, '门磁告警', 'FSU_DoorMagnetic', 'sms_notify_type', NULL, 'default', 'N', '0', '超级管理员', '2024-06-06 14:20:53', '', NULL, NULL);
|
|
|
+
|