From e03a3567aa5ae98cf3d17efcf8bae535d13d3860 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 02 四月 2025 20:15:27 +0800 Subject: [PATCH] POINT columnItem.getDataLength() - 1 --- iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 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 a46288f..31bcd5a 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 @@ -324,6 +324,8 @@ UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '派生指标'; +ALTER TABLE t_ind_item_der ADD COLUMN month_start int COMMENT '月周期开始日'; + CREATE TABLE t_ind_item_cal( `id` VARCHAR(36) NOT NULL COMMENT 'ID' , `item_id` VARCHAR(36) COMMENT '指标ID' , @@ -415,4 +417,29 @@ 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`; \ No newline at end of file + 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