| | |
| | | createBattscrap_TABLE(pool, recreate); |
| | | |
| | | createBattspare_Record_TABLE(pool, recreate); |
| | | |
| | | createA059_Station_Inf_TABLE(pool,recreate); //一体机预加载配置信息 |
| | | } |
| | | |
| | | |
| | | |
| | | private static void createA059_Station_Inf_TABLE(MysqlConnPool pool, boolean recreate) { |
| | | String sql_str01 = " DROP TABLE IF EXISTS "+Sql_Mysql.A059_Station_Inf_TABLE; |
| | | String sql_str02 = "CREATE TABLE IF NOT EXISTS " + Sql_Mysql.A059_Station_Inf_TABLE + " (" + |
| | | " `num` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增主键'," + |
| | | " `station_province` varchar(255) NOT NULL DEFAULT '' COMMENT 'ʡ'," + |
| | | " `station_city` varchar(255) NOT NULL DEFAULT '' COMMENT '市'," + |
| | | " `station_county` varchar(255) NOT NULL DEFAULT '' COMMENT '区县'," + |
| | | " `station_name` varchar(255) NOT NULL DEFAULT '' COMMENT '机房名称'," + |
| | | " `dev_name` varchar(255) NOT NULL DEFAULT '' COMMENT '设备名称'," + |
| | | " `batt_name` varchar(255) NOT NULL DEFAULT '' COMMENT '电池组名称'," + |
| | | " `mon_count` int(11) NOT NULL DEFAULT '0' COMMENT '单体个数'," + |
| | | " `monStdCap` float NOT NULL DEFAULT '0' COMMENT '标称容量'," + |
| | | " `monStdVol` float NOT NULL DEFAULT '0' COMMENT '标称单体电压'," + |
| | | " `load_curr` float NOT NULL DEFAULT '0' COMMENT '负载电流'," + |
| | | " `video_url` varchar(255) NOT NULL DEFAULT '' COMMENT '视频监控序列号'," + |
| | | " `dev_num` varchar(255) NOT NULL DEFAULT '' COMMENT '设备编号'," + |
| | | " `last_update_time` datetime NOT NULL DEFAULT '2000-01-01 00:00:00' COMMENT '上一次更新时间'," + |
| | | " PRIMARY KEY (`num`)" + |
| | | ") ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;"; |
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn()); |
| | | try { |
| | | if(true == recreate) { |
| | | sql.sqlMysqlExecute(sql_str01); |
| | | } |
| | | sql.sqlMysqlExecute(sql_str02); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | sql.close_con(); |
| | | } |
| | | } |
| | | |
| | | private static void createBattspare_Record_TABLE(MysqlConnPool pool, boolean recreate) { |