From 2f292fc78f385cd1840afd88c909df753a193314 Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期三, 23 四月 2025 13:52:36 +0800 Subject: [PATCH] 批量插入 --- ansteel-biz/db/mysql.sql | 85 ++++++++++++++++++++++++------------------ 1 files changed, 49 insertions(+), 36 deletions(-) diff --git a/ansteel-biz/db/mysql.sql b/ansteel-biz/db/mysql.sql index d7c0ce3..bc1754e 100644 --- a/ansteel-biz/db/mysql.sql +++ b/ansteel-biz/db/mysql.sql @@ -247,6 +247,9 @@ ALTER TABLE `t_power_net_factor` ADD COLUMN `cur_flag` int DEFAULT 0 COMMENT '无功返送(1:大于0是,-1:小于0是)'; +ALTER TABLE `t_power_net_factor` + ADD COLUMN `node_code` varchar(50) NULL DEFAULT NULL COMMENT '节点编号'; + -- ---------------------------- -- 电力功率因数-发电机组实时状态 -- ---------------------------- @@ -561,41 +564,33 @@ -- ---------------------------- -- 焦化工序-能耗整体情况 -- ---------------------------- -DROP TABLE IF EXISTS `t_coking_trace_energy`; -CREATE TABLE `t_coking_trace_energy` -( - `id` varchar(36) NOT NULL COMMENT 'id', - `rel_id` varchar(36) NULL DEFAULT NULL COMMENT '关联ID', - `type` varchar(20) NULL DEFAULT NULL COMMENT '类型', - `clock` varchar(20) NULL DEFAULT NULL COMMENT '查询时间', - `steam_p` decimal(10, 4) NULL DEFAULT NULL COMMENT '蒸汽发生', - `steam_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '蒸汽消耗', - `gas_p` decimal(10, 4) NULL DEFAULT NULL COMMENT '煤气发生', - `gas_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '煤气消耗', - `power_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '电力消耗', - PRIMARY KEY (`id`) USING BTREE, - key idx_rel_id (rel_id) -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC COMMENT '焦化工序能耗整体情况'; - - --- ---------------------------- --- 焦化工序-能耗整体情况 --- ---------------------------- -DROP TABLE IF EXISTS `t_coking_trace_energy`; -CREATE TABLE `t_coking_trace_energy` -( - `id` varchar(36) NOT NULL COMMENT 'id', - `rel_id` varchar(36) NULL DEFAULT NULL COMMENT '关联ID', - `type` varchar(20) NULL DEFAULT NULL COMMENT '类型', - `clock` varchar(20) NULL DEFAULT NULL COMMENT '查询时间', - `steam_p` decimal(10, 4) NULL DEFAULT NULL COMMENT '蒸汽发生', - `steam_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '蒸汽消耗', - `gas_p` decimal(10, 4) NULL DEFAULT NULL COMMENT '煤气发生', - `gas_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '煤气消耗', - `power_c` decimal(10, 4) NULL DEFAULT NULL COMMENT '电力消耗', - PRIMARY KEY (`id`) USING BTREE, - key idx_rel_id (rel_id) -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC COMMENT '焦化工序能耗整体情况'; +DROP TABLE IF EXISTS `t_coking_overview`; +CREATE TABLE `t_coking_overview` ( + `id` varchar(36) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id', + `rel_id` varchar(36) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关联ID', + `process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '工序类型', + `sub_process_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '子工序类型', + `clock` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '查询时间', + `steam_p` decimal(10,4) DEFAULT NULL COMMENT '蒸汽发生', + `dj_steam_p` decimal(10,4) DEFAULT NULL COMMENT '吨焦产蒸汽', + `steam_c` decimal(10,4) DEFAULT NULL COMMENT '蒸汽消耗', + `steam_only_c` decimal(10,4) DEFAULT NULL COMMENT '蒸汽单耗', + `steam_v` decimal(10,4) DEFAULT NULL COMMENT '蒸汽量', + `gas_p` decimal(10,4) DEFAULT NULL COMMENT '煤气发生', + `gas_c` decimal(10,4) DEFAULT NULL COMMENT '煤气消耗', + `power_c` decimal(10,4) DEFAULT NULL COMMENT '电力消耗', + `power_only_c` decimal(10,4) DEFAULT NULL COMMENT '电力单耗', + `power_c_standard` decimal(10,4) DEFAULT NULL COMMENT '电耗基准', + `idle_time` decimal(10,4) DEFAULT NULL COMMENT '空转时间', + `bfg_c` decimal(10,4) DEFAULT NULL COMMENT 'BFG消耗', + `cog_p` decimal(10,4) DEFAULT NULL COMMENT 'COG回收', + `cog_c` decimal(10,4) DEFAULT NULL COMMENT 'COG消耗', + `bfg_only_c` decimal(10,4) DEFAULT NULL COMMENT 'BFG单耗', + `cog_only_c` decimal(10,4) DEFAULT NULL COMMENT 'COG单耗', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `process_type_clock_unique` (`process_type`,`sub_process_type`,`clock`), + KEY `idx_rel_id` (`rel_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='工序概况情况'; -- ---------------------------- -- 焦化工序-指标值溯源 @@ -607,6 +602,7 @@ `rel_id` varchar(36) NULL DEFAULT NULL COMMENT '关联ID', `title` varchar(20) NULL DEFAULT NULL COMMENT '标题', `clock` varchar(20) NULL DEFAULT NULL COMMENT '查询时间', + `ind_code` varchar(20) NULL DEFAULT NULL COMMENT '编码', `ind_name` varchar(20) NULL DEFAULT NULL COMMENT '名称', `ind_value` varchar(20) NULL DEFAULT NULL COMMENT '值', `ind_unit` varchar(20) NULL DEFAULT NULL COMMENT '单位', @@ -631,4 +627,21 @@ `active_power` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '有功功率', `sort` varchar(50) DEFAULT NULL COMMENT '排序', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='月最大需量,实测需量,有功功率'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='月最大需量,实测需量,有功功率'; + +ALTER TABLE `t_power_demand` + ADD COLUMN `code` varchar(50) NULL DEFAULT NULL COMMENT '编号'; + + +-- ---------------------------- +-- 负荷移植-调整后的功率因数与无功倒送量 +-- ---------------------------- +CREATE TABLE `t_power_adjusted_factor` ( + `id` varchar(36) NOT NULL, + `code` varchar(50) DEFAULT NULL COMMENT '编码', + `name` varchar(50) DEFAULT NULL COMMENT '名称', + `data_type` varchar(20) NULL DEFAULT NULL COMMENT '数据类型', + `point_no` varchar(50) DEFAULT NULL COMMENT '点位', + `sort` varchar(50) DEFAULT NULL COMMENT '排序', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='调整后的功率因数与无功倒送量'; \ No newline at end of file -- Gitblit v1.9.3