From ff0f2f712422eb3f2f0e0dbd7fa1dc6b8e006ec2 Mon Sep 17 00:00:00 2001 From: whyclj <1525436766@qq.com> Date: 星期五, 30 八月 2019 15:39:33 +0800 Subject: [PATCH] 添加61850均衡模块参数表 --- BattMonitor_DB_Builder/src/com/dev/fbs9100/FBS9100_Task_Thread_SQL.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/BattMonitor_DB_Builder/src/com/dev/fbs9100/FBS9100_Task_Thread_SQL.java b/BattMonitor_DB_Builder/src/com/dev/fbs9100/FBS9100_Task_Thread_SQL.java index 91cb299..fa266c6 100644 --- a/BattMonitor_DB_Builder/src/com/dev/fbs9100/FBS9100_Task_Thread_SQL.java +++ b/BattMonitor_DB_Builder/src/com/dev/fbs9100/FBS9100_Task_Thread_SQL.java @@ -557,5 +557,51 @@ } } + /** + * 创建61850均衡供电模块信息表 + * @param pool + * @param recreate_tb + */ + public static void createTB_61850_JHState_TableOnRam(MysqlConnPool pool, boolean recreate_tb) { + String sql_str0 = "DROP TABLE IF EXISTS " + Sql_Mysql.TB_61850_JHState_Table + "; "; + + String sql_str1 = "CREATE TABLE IF NOT EXISTS "+Sql_Mysql.TB_61850_JHState_Table+" (" + + " `num` bigint(20) NOT NULL DEFAULT '0'," + + " `dev_id` int(11) NOT NULL DEFAULT '0'," + + " `dev_version` varchar(255) NOT NULL DEFAULT ''," + + " `input_vol_total` double NOT NULL DEFAULT '0'," + + " `output_vol_total` double NOT NULL DEFAULT '0'," + + " `input_curr_total` double NOT NULL DEFAULT '0'," + + " `output_curr_total` double NOT NULL DEFAULT '0'," + + " `output_vol_one` double NOT NULL DEFAULT '0'," + + " `output_vol_two` double NOT NULL DEFAULT '0'," + + " `output_vol_three` double NOT NULL DEFAULT '0'," + + " `output_vol_four` double NOT NULL DEFAULT '0'," + + " `output_vol_five` double NOT NULL DEFAULT '0'," + + " `output_vol_six` double NOT NULL DEFAULT '0'," + + " `output_vol_seven` double NOT NULL DEFAULT '0'," + + " `output_vol_eight` double NOT NULL DEFAULT '0'," + + " `output_vol_nine` double NOT NULL DEFAULT '0'," + + " `output_vol_ten` double NOT NULL DEFAULT '0'," + + " `dev_temp` double NOT NULL DEFAULT '0'," + + " PRIMARY KEY (`num`)," + + " UNIQUE KEY `index_dev_id_unique` (`dev_id`) USING BTREE" + + ") ENGINE=InnoDB DEFAULT CHARSET=utf8;"; + + Sql_Mysql sql = new Sql_Mysql(pool.getConn()); + try { + if(true == recreate_tb) { + sql.sqlMysqlExecute(sql_str0); + } else { + + } + sql.sqlMysqlExecute(sql_str1); + } catch (SQLException e) { + e.printStackTrace(); + } finally { + sql.close_con(); + } + } + } -- Gitblit v1.9.1