| | |
| | | " PRIMARY KEY (`num`) USING BTREE" + |
| | | ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机房内阻测试计划信息表';"; |
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn()); |
| | | ResultSet res = null; |
| | | try { |
| | | if(true == recreate) { |
| | | sql.sqlMysqlExecute(sql_str01); |
| | | } |
| | | sql.sqlMysqlExecute(sql_str02); |
| | | |
| | | |
| | | res = sql.sqlMysqlQuery(" SELECT DISTINCT(StationId) FROM " + Sql_Mysql.BattInf_Table + |
| | | " WHERE StationId NOT IN (" + |
| | | " SELECT stationid " + |
| | | " FROM " + Sql_Mysql.Tb_Resset_Station_Table + |
| | | " )"); |
| | | while(res.next()) { |
| | | String station_id = res.getString("StationId"); |
| | | sql.sqlMysqlExecute("INSERT INTO web_site.tb_resset_station(stationid) VALUES("+station_id+");"); |
| | | } |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if(null != res) { |
| | | try { |
| | | res.close(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | sql.close_con(); |
| | | } |
| | | } |