From fa8ae4322ab7cc3bf6067c418469b158f23efad6 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 24 三月 2025 13:21:13 +0800 Subject: [PATCH] 处理预测累计 --- iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql b/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql index 11158d6..9f63ba2 100644 --- a/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql +++ b/iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql @@ -409,4 +409,35 @@ `collect_time` DATETIME COMMENT '采集时间' , PRIMARY KEY (id) USING BTREE, UNIQUE KEY `uk_point_no` (`point_no`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '测点采集状态表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '测点采集状态表'; + +ALTER TABLE `t_ind_item` ADD COLUMN `solidify_flag` varchar(36) NULL COMMENT '固化标识' AFTER `status`, +MODIFY COLUMN `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' AFTER `create_time`; + +ALTER TABLE `t_ind_item_value` + MODIFY COLUMN `data_time` datetime NULL DEFAULT NULL COMMENT '数据时间' AFTER `item_no`; + +CREATE TABLE `t_arc_data` ( + `id` varchar(36) NOT NULL COMMENT 'id', + `arc_id` varchar(36) DEFAULT NULL COMMENT '归档id', + `code` varchar(30) DEFAULT NULL COMMENT '编码', + `arc_time` varchar(30) DEFAULT NULL COMMENT '归档时间', + `arc_value` DECIMAL(18,6) DEFAULT NULL COMMENT '归档值', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='归档数据表'; + +CREATE TABLE `t_arc_setting` ( + `id` varchar(36) NOT NULL COMMENT 'id', + `code` varchar(30) DEFAULT NULL COMMENT '编码', + `name` varchar(30) DEFAULT NULL COMMENT '名称', + `type` varchar(10) DEFAULT NULL COMMENT '归档周期(shift、day、month、year)', + `point` varchar(36) DEFAULT NULL COMMENT '归档点位', + `calculate` varchar(10) DEFAULT NULL COMMENT '计算方法(none、sum、diff、avg)', + `sort` int COMMENT '排序', + `is_enable` tinyint(1) DEFAULT 1 COMMENT '是否启用', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_code` (`code`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='定时归档设置表'; \ No newline at end of file -- Gitblit v1.9.3