| | |
| | | `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
| | | `tag_name` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点名称', |
| | | `data_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据类型', |
| | | `tag_id` int NOT NULL COMMENT '顺序号', |
| | | `tag_id` int default NULL COMMENT '顺序号', |
| | | `tag_desc` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci default NULL COMMENT '测点描述', |
| | | `enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用', |
| | | `device` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联设备', |
| | |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='KIO测点表'; |
| | | |
| | | CREATE TABLE t_da_point( |
| | | `id` VARCHAR(255) NOT NULL COMMENT 'ID' , |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `point_no` VARCHAR(36) COMMENT '测点编码' , |
| | | `point_name` VARCHAR(36) COMMENT '测点名称' , |
| | | `point_type` VARCHAR(10) COMMENT '测点类型' , |
| | |
| | | `source_type` VARCHAR(10) COMMENT '数据源类型', |
| | | `source_id` VARCHAR(36) COMMENT '数据源ID', |
| | | `tag_no` VARCHAR(64) COMMENT '测点Tag', |
| | | `dimension` INT COMMENT '尺度' , |
| | | `dimension` INT COMMENT '平滑尺度(min)' , |
| | | `value_type` VARCHAR(36) COMMENT '值类型(数字量,模拟量)', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`point_id`) USING BTREE, |
| | | KEY `uk_tag_no` (`tag_no`) USING BTREE |
| | |
| | | CREATE TABLE t_da_math_point( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `point_id` VARCHAR(36) COMMENT '测点ID' , |
| | | `expression` VARCHAR(500) COMMENT '计算公式' , |
| | | `expression` VARCHAR(2000) COMMENT '计算公式' , |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`point_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计算点表'; |
| | |
| | | INSERT INTO `t_da_sequence_num` (`id`, `code`, `name`, `sequence_num`, `prefix`) VALUES ('2', 'POINT_C', '计算点编码', 100000, 'C'); |
| | | |
| | | CREATE TABLE `t_http_api` ( |
| | | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID', |
| | | `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编码', |
| | | `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称', |
| | | `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'URL', |
| | | `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '方法', |
| | | `param` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数', |
| | | `descp` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', |
| | | `status` int NULL DEFAULT NULL COMMENT '状态', |
| | | `creator` VARCHAR(255) COMMENT '创建人' , |
| | | `id` varchar(36) NOT NULL COMMENT 'ID', |
| | | `code` varchar(32) NOT NULL COMMENT '编码', |
| | | `name` varchar(32) NOT NULL COMMENT '名称', |
| | | `url` varchar(100) NOT NULL COMMENT 'URL', |
| | | `method` varchar(10) NULL DEFAULT NULL COMMENT '请求方法', |
| | | `param` varchar(200) NULL DEFAULT NULL COMMENT '参数', |
| | | `descp` varchar(100) NULL DEFAULT NULL COMMENT '描述', |
| | | `is_auth` tinyint(1) NOT NULL COMMENT '是否认证', |
| | | `auth_url` varchar(36) NULL DEFAULT NULL COMMENT '认证地址', |
| | | `creator` VARCHAR(64) COMMENT '创建人' , |
| | | `create_time` DATETIME COMMENT '创建时间' , |
| | | `updater` VARCHAR(255) COMMENT '修改人' , |
| | | `updater` VARCHAR(64) COMMENT '修改人' , |
| | | `update_time` DATETIME COMMENT '修改时间' , |
| | | PRIMARY KEY (`ID`) USING BTREE, |
| | | UNIQUE KEY `uk_code` (`code`) USING BTREE |
| | | ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Api接口' ROW_FORMAT = DYNAMIC; |
| | | |
| | | |
| | | CREATE TABLE `t_http_token` ( |
| | | `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, |
| | | `api_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, |
| | | `login_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, |
| | | `client_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, |
| | | `client_secret` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, |
| | | `username` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, |
| | | `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, |
| | | `token` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'token', |
| | | `id` varchar(36) NOT NULL COMMENT 'ID', |
| | | `login_url` varchar(200) DEFAULT NULL COMMENT '登录地址', |
| | | `client_id` varchar(100) DEFAULT NULL COMMENT 'ClientId', |
| | | `client_secret` varchar(100) DEFAULT NULL COMMENT 'ClientSecret', |
| | | `username` varchar(50) DEFAULT NULL COMMENT '用户名', |
| | | `password` varchar(50) DEFAULT NULL COMMENT '密码', |
| | | `refresh_freq` varchar(10) DEFAULT NULL COMMENT '刷新频率', |
| | | `token` varchar(2000) DEFAULT NULL COMMENT 'token', |
| | | `expire_time` datetime DEFAULT NULL COMMENT '过期时间', |
| | | `update_time` datetime DEFAULT NULL COMMENT '更新时间', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `uk_api_id` (`api_id`) USING BTREE |
| | | UNIQUE KEY `uk_login_url` (`login_url`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='接口Token'; |
| | | |
| | | CREATE TABLE `t_http_tag` ( |
| | | `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '查询号', |
| | | `http_api_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'HTTP 接口代码', |
| | | `tag_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点编码', |
| | | `tag_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点名称', |
| | | `id` varchar(36) NOT NULL COMMENT 'ID', |
| | | `api_id` varchar(36) NOT NULL COMMENT '接口ID', |
| | | `tag_name` varchar(64) NOT NULL COMMENT '标签名称', |
| | | `data_type` varchar(16) NOT NULL COMMENT '数据类型', |
| | | `enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用', |
| | | `tag_desc` varchar(64) DEFAULT NULL COMMENT '描述', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='接口Tag表'; |
| | | ) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT='接口Tag表'; |
| | | |
| | | CREATE TABLE t_ind_item_atom( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_id` VARCHAR(36) COMMENT '指标ID' , |
| | | `data_source` VARCHAR(20) COMMENT '数据源', |
| | | `query_sql` VARCHAR(500) COMMENT '查询语句', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '原子指标'; |
| | | -- 指标管理------------ |
| | | CREATE TABLE t_ind_data_set( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `name` VARCHAR(30) NOT NULL COMMENT '名称' , |
| | | `data_source` VARCHAR(64) NOT NULL COMMENT '数据源ID', |
| | | `query_sql` VARCHAR(200) NOT NULL COMMENT '查询语句', |
| | | `remark` VARCHAR(100) COMMENT '备注', |
| | | `sort` int COMMENT '排序', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标数据集'; |
| | | |
| | | CREATE TABLE t_ind_data_set_field( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `data_set_id` VARCHAR(36) NOT NULL COMMENT '数据集ID' , |
| | | `field_code` VARCHAR(30) COMMENT '英文名' , |
| | | `field_name` VARCHAR(30) COMMENT '中文名' , |
| | | `field_type` VARCHAR(30) COMMENT '数据类型' , |
| | | `sort` int COMMENT '排序', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | INDEX `idx_data_set_id` (`data_set_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标数据集字段'; |
| | | |
| | | CREATE TABLE t_ind_item_category( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `label` VARCHAR(20) COMMENT '标签' , |
| | | `pid` VARCHAR(36) COMMENT '父ID', |
| | | `sort` int COMMENT '排序', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标分类'; |
| | | |
| | | CREATE TABLE t_ind_item( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_no` VARCHAR(36) COMMENT '指标编码' , |
| | | `item_name` VARCHAR(36) COMMENT '指标名称' , |
| | | `item_type` VARCHAR(10) COMMENT '指标类型' , |
| | | `coefficient` decimal(10, 4) COMMENT '系数', |
| | | `precision` int COMMENT '指标精度', |
| | | `business_type` VARCHAR(10) COMMENT '业务类型', |
| | | `time_range` VARCHAR(20) COMMENT '时间范围' , |
| | | `time_granularity` VARCHAR(10) COMMENT '时间粒度' , |
| | | `remark` VARCHAR(255) COMMENT '备注' , |
| | | `is_enable` tinyint(1) COMMENT '是否启用' , |
| | | `creator` VARCHAR(36) COMMENT '创建人' , |
| | | `create_time` DATETIME COMMENT '创建时间' , |
| | | `updater` VARCHAR(36) COMMENT '修改人' , |
| | | `update_time` DATETIME COMMENT '修改时间' , |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_no` (`item_no`) USING BTREE |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_no` VARCHAR(36) COMMENT '指标编码' , |
| | | `item_name` VARCHAR(36) COMMENT '指标名称' , |
| | | `item_type` VARCHAR(20) COMMENT '指标类型' , |
| | | `item_category` VARCHAR(36) COMMENT '指标分类' , |
| | | `coefficient` decimal(10, 4) COMMENT '转换系数', |
| | | `precision` int COMMENT '指标精度', |
| | | `time_granularity` VARCHAR(10) COMMENT '时间粒度' , |
| | | `unit` VARCHAR(10) COMMENT '数量单位' , |
| | | `remark` VARCHAR(255) COMMENT '备注' , |
| | | `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE INDEX `uk_item_no` (`item_no`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '指标项表'; |
| | | |
| | | CREATE TABLE t_ind_item_atom( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_id` VARCHAR(36) COMMENT '指标ID' , |
| | | `data_source` VARCHAR(20) COMMENT '数据源', |
| | | `query_sql` VARCHAR(500) COMMENT '查询语句', |
| | | `data_source` VARCHAR(64) COMMENT '数据源', |
| | | `data_set` VARCHAR(64) COMMENT '数据集', |
| | | `using_field` VARCHAR(64) COMMENT '使用字段', |
| | | `stat_func` VARCHAR(64) COMMENT '统计方式', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`item_id`) USING BTREE |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '原子指标'; |
| | | |
| | | CREATE TABLE t_ind_item_der( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_id` VARCHAR(36) COMMENT '指标ID' , |
| | | `atom_item_id` VARCHAR(36) COMMENT '原子指标ID' , |
| | | `time_label` VARCHAR(20) COMMENT '时间标识', |
| | | `time_limit` VARCHAR(20) COMMENT '时间限定', |
| | | `time_start` DATETIME COMMENT '开始时间', |
| | | `time_end` DATETIME COMMENT '结束时间', |
| | | `dimension` VARCHAR(200) COMMENT '分析维度', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '派生指标'; |
| | | |
| | | CREATE TABLE t_ind_item_cal( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | |
| | | `expression` varchar(100) DEFAULT NULL COMMENT '计算表达式', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计算指标'; |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '复合指标'; |
| | | |
| | | CREATE TABLE t_ind_item_derive( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_id` VARCHAR(36) COMMENT '指标ID' , |
| | | `limit_time` varchar(100) DEFAULT NULL COMMENT '时间限定', |
| | | `limit_business` varchar(100) DEFAULT NULL COMMENT '业务限定', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_item_id` (`item_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '派生指标'; |
| | | |
| | | CREATE TABLE `t_ind_item_value` ( |
| | | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id', |
| | | `item_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '指标编码', |
| | | `data_time` varchar(36) DEFAULT NULL COMMENT '数据时间', |
| | | `data_time` varchar(20) DEFAULT NULL COMMENT '数据时间', |
| | | `data_value` decimal(24,6) DEFAULT NULL COMMENT '数据值', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | KEY `idx_item_no` (`item_no`) USING BTREE, |
| | | KEY `idx_data_time` (`data_time`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='指标值表'; |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='指标值表'; |
| | | |
| | | |
| | | -- 计划数据------------ |
| | | CREATE TABLE t_plan_data_set( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `name` VARCHAR(30) NOT NULL COMMENT '名称' , |
| | | `data_source` VARCHAR(64) NOT NULL COMMENT '数据源ID', |
| | | `query_sql` VARCHAR(300) NOT NULL COMMENT '查询语句', |
| | | `remark` VARCHAR(100) COMMENT '备注', |
| | | `sort` int COMMENT '排序', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计划数据集'; |
| | | |
| | | |
| | | CREATE TABLE t_plan_item_category( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `label` VARCHAR(20) COMMENT '标签' , |
| | | `pid` VARCHAR(36) COMMENT '父ID', |
| | | `sort` int COMMENT '排序', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计划数据分类'; |
| | | |
| | | CREATE TABLE t_plan_item( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `item_no` VARCHAR(36) COMMENT '指标编码' , |
| | | `item_name` VARCHAR(36) COMMENT '指标名称' , |
| | | `item_category` VARCHAR(36) COMMENT '指标分类', |
| | | `time_granularity` VARCHAR(10) COMMENT '时间粒度', |
| | | `data_set` VARCHAR(64) COMMENT '数据集', |
| | | `remark` VARCHAR(255) COMMENT '备注' , |
| | | `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', |
| | | `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者', |
| | | `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', |
| | | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE INDEX `uk_item_no` (`item_no`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '计划数据项'; |
| | | |
| | | CREATE TABLE t_da_cumulate_point( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `point_id` VARCHAR(36) COMMENT '测点ID' , |
| | | `moment_point` VARCHAR(36) COMMENT '瞬时测点' , |
| | | `length` int COMMENT '累计长度', |
| | | `divisor` int COMMENT '除数', |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`point_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '累计点表'; |
| | | INSERT INTO `t_da_sequence_num` (`id`, `code`, `name`, `sequence_num`, `prefix`) VALUES ('8', 'POINT_L', '累计点编码', 100001, 'L'); |
| | | INSERT INTO `iailab_plat_system`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1673, 4, '累计点', 'CUMULATE', 'data_point_type', 0, '', '', '', '142', '2024-12-10 10:13:12', '142', '2024-12-10 10:13:12', b'0'); |
| | | |
| | | CREATE TABLE t_da_point_collect_status( |
| | | `id` VARCHAR(36) NOT NULL COMMENT 'ID' , |
| | | `point_no` VARCHAR(36) NOT NULL COMMENT '测点编码', |
| | | `collect_value` VARCHAR(24) COMMENT '采集值', |
| | | `collect_quality` VARCHAR(5) COMMENT '采集质量', |
| | | `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 = '测点采集状态表'; |