| | |
| | | " `route_num` tinyint(4) DEFAULT '1' COMMENT '交流ABC几路设置'," +
|
| | | " `exception_cause` varchar(45) DEFAULT NULL COMMENT '异常原因'," +
|
| | | " `exception_cause_analysis` varchar(255) DEFAULT NULL COMMENT '异常原因分析'," +
|
| | | " `acvol_high_limit` float NOT NULL DEFAULT '200' COMMENT '交流上限阈值'," + |
| | | " `acvol_low_limit` float NOT NULL DEFAULT '200' COMMENT '交流下限阈值'," + |
| | | " `dcoutvol_low_limit` float NOT NULL DEFAULT '43.2' COMMENT '直流输出电压下限阈值'," + |
| | | " PRIMARY KEY (`num`)," +
|
| | | " KEY `index_station_id` (`StationId`)," +
|
| | | " KEY `index_powerdev_id` (`PowerDeviceId`)," +
|
| | |
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Pwrdev_Inf_Table
|
| | | + " ADD COLUMN `exception_cause_analysis` varchar(255) DEFAULT NULL COMMENT '异常原因分析';");
|
| | | }
|
| | | res = null;
|
| | | //添加字段acvol_high_limit ----- 交流上限阈值
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_pwrdev_inf'"
|
| | | + " AND table_name='tb_pwrdev_inf'"
|
| | | + " AND column_name='acvol_high_limit'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Pwrdev_Inf_Table |
| | | + " ADD COLUMN `acvol_high_limit` float NOT NULL DEFAULT '200' COMMENT '交流上限阈值';");
|
| | | }
|
| | | res = null;
|
| | | //添加字段acvol_low_limit ----- 交流下限阈值
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_pwrdev_inf'"
|
| | | + " AND table_name='tb_pwrdev_inf'"
|
| | | + " AND column_name='acvol_low_limit'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Pwrdev_Inf_Table |
| | | + " ADD COLUMN `acvol_low_limit` float NOT NULL DEFAULT '200' COMMENT '交流下限阈值';");
|
| | | }
|
| | | res = null;
|
| | | //添加字段dcoutvol_low_limit ----- 直流输出电压下限阈值
|
| | | res = sql.sqlMysqlQuery("SELECT * FROM information_schema.columns"
|
| | | + " WHERE table_schema='db_pwrdev_inf'"
|
| | | + " AND table_name='tb_pwrdev_inf'"
|
| | | + " AND column_name='dcoutvol_low_limit'");
|
| | | if(false == res.next()) {
|
| | | sql.sqlMysqlExecute("ALTER TABLE " + Sql_Mysql.Pwrdev_Inf_Table |
| | | + " ADD COLUMN `dcoutvol_low_limit` float NOT NULL DEFAULT '43.2' COMMENT '直流输出电压下限阈值';");
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | } finally {
|