iec61852_forQGN/batt_61852_dev_x64_logs/error-20240711-1.log.gzBinary files differ
iec61852_forQGN/batt_61852_dev_x64_logs/info-20240711-1.log.gzBinary files differ
iec61852_forQGN/bin/com/dec/fbs9100/BTS_61851_SocketClient.classBinary files differ
iec61852_forQGN/bin/com/dec/fbs9100/BattRealDataPro_Thread.classBinary files differ
iec61852_forQGN/bin/com/dec/fbs9100/FBS9100_Task_Thread_SQL.classBinary files differ
iec61852_forQGN/src/com/dec/fbs9100/BTS_61851_SocketClient.java
@@ -36,6 +36,7 @@ import com.battdata_rt.BattData_RT; import com.battdata_rt.BattData_RT_Array; import com.dec.fbs9100.FBS9100_TestTime; import com.mysql.jdbc.exceptions.MySQLTimeoutException; /****************************************************************************************************/ public class BTS_61851_SocketClient extends Thread { @@ -239,6 +240,7 @@ FBS9100_Task_Thread_SQL.queryFBS9100SysParamBydev_id(m_ConnPool, m_StatAndParam); // 查询系统参数 FBS9100_Task_Thread_SQL.queryDev6185AlmParamBydev_id(m_ConnPool, m_StatAndParam); // 查询告警参数 } } @@ -433,10 +435,9 @@ //System.err.println(m_StatAndParam); if (m_StatAndParam != null) { FBS9100_Task_Thread_SQL.updateFbs9100StateByDev_Id(m_ConnPool, m_StatAndParam); FBS9100_Task_Thread_SQL.inseartOrUpdateFBS9100SFODState(m_ConnPool, m_StatAndParam, m_StatAndParam.fbs9100s_fod_state); //FBS9100_Task_Thread_SQL.inseartOrUpdateFBS9100SFODState(m_ConnPool, m_StatAndParam, m_StatAndParam.fbs9100s_fod_state); FBS9100_Task_Thread_SQL.insertOrUpdateJhStateTable(m_ConnPool, m_StatAndParam); //FBS9100_Task_Thread_SQL.insertOrUpdateJhStateTable(m_ConnPool, m_StatAndParam); FBS9100_Task_Thread_SQL.insertBTSEventRecordTable(m_ConnPool, events); // 记录历史事件和告警 @@ -467,7 +468,7 @@ } //---------------------------------------------------------------------------------// if (m_FBS_VCData.m_SysState.ErrCommCount > 20) { logger.printf(Level.DEBUG, "DevId:%d, DevIp:%s, ComErrorCnt:%d, CommThread break now.", logger.printf(Level.ERROR, "DevId:%d, DevIp:%s, ComErrorCnt:%d, CommThread break now.", m_StatAndParam.dev_id, m_StatAndParam.dev_ipaddr, m_FBS_VCData.m_SysState.ErrCommCount) ; @@ -477,13 +478,15 @@ break; } // ---------------------------------------------------------------------------------// } catch (InterruptedException e) { logger.error(e.toString(), e); } catch (Exception e) { try { /** * 2024-09-06 异常结束时,跳出通信线程,重新连接设备,修复异常掉线无法重连 */ sleep(1000); logger.error("IP:" + FBSDeviceIp + " " + this.getName() + " - BTS_IEC61851_ClientThread DisConnect By " + e.toString()); break; } catch (InterruptedException e1) { // TODO Auto-generated catch block logger.error(e1.toString(), e1); } } iec61852_forQGN/src/com/dec/fbs9100/BattRealDataPro_Thread.java
@@ -25,7 +25,7 @@ Logger logger = null; public static int MinRecordTimeLong = 60; //每次记录的最短时间间隔 public static int MaxRecordTimeLong = 366*3; //最大记录历史数据时间 public static int MaxRecordTimeLong = 90; //最大记录历史数据时间 public BattRealDataPro_Thread(MysqlConnPool con_pool, AppConfig cfg, BattData_RT_Array data) { logger = LogManager.getLogger(this.getClass()); iec61852_forQGN/src/com/dec/fbs9100/FBS9100_Task_Thread_SQL.java
@@ -717,8 +717,9 @@ { String sql_str = "SELECT * FROM " + Sql_Mysql.FBS9100SetParam_Table; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; try { res = sql.sqlMysqlQuery(sql_str); while(res.next()) { FBS9100_StatAndParam param = null; @@ -774,8 +775,9 @@ { String sql_str = "SELECT * FROM " + Sql_Mysql.FBS9100SetParam_Table + " where dev_id = " + param.dev_id; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; try { res = sql.sqlMysqlQuery(sql_str); if(res.next()) { if(null != param) { @@ -928,7 +930,6 @@ String sql_str_update = "UPDATE " + sql_str_base + " WHERE dev_id=" + param.dev_id; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = null; try { sql.sqlMysqlExecute(sql_str_update); } catch (SQLException e) { @@ -943,8 +944,9 @@ //System.out.println(param.dev_id); String sql_str = "SELECT * FROM " + Sql_Mysql.FBS9100SetDLParam_Table + " where dev_id = " + param.dev_id; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; try { res = sql.sqlMysqlQuery(sql_str); if(res.next()) { if(null != param) { @@ -1446,8 +1448,9 @@ public static void queryFBS9100SysParamBydev_id(MysqlConnPool con_pool, FBS9100_StatAndParam param) { String sql_str = "SELECT * FROM " + Sql_Mysql.FBS9100SysParam_Table + " where dev_id = " + param.dev_id; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; try { res = sql.sqlMysqlQuery(sql_str); if(res.next()) { if(null != param) { @@ -1496,8 +1499,9 @@ public static void queryDev6185AlmParamBydev_id(MysqlConnPool con_pool, FBS9100_StatAndParam param) { String sql_str = "SELECT * FROM " + Sql_Mysql.Dev_6185_AlmParam + " where dev_id = " + param.dev_id; Sql_Mysql sql = new Sql_Mysql(con_pool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; try { res = sql.sqlMysqlQuery(sql_str); if(res.next()) { if(null != param) { @@ -1710,9 +1714,10 @@ public static void queryBTS61851OffLineyhPlanOnRam(MysqlConnPool m_ConnPool, FBS9100_StatAndParam param) { String sql_str = " SELECT * FROM " + Sql_Mysql.FBS9100_offlineyhplan + " WHERE dev_id = " + param.dev_id ; Sql_Mysql sql = new Sql_Mysql(m_ConnPool); ResultSet res = sql.sqlMysqlQuery(sql_str); ResultSet res = null; BTS61850_OffLineYHPlan plan = param.bts61850_OffLineYHPlan; try { res = sql.sqlMysqlQuery(sql_str); if(res.next()) { plan.OffLineYH_Cycle = res.getInt("OffLineYH_Cycle"); plan.OffLineYHOnceCycle = res.getInt("OffLineYHOnceCycle"); @@ -1727,6 +1732,13 @@ } catch (SQLException e) { sql.logger.error("FBS9100_Task_Thread_SQL.queryBTS61850OffLineyhPlanOnRam():" + e.toString(), e); } finally { if(null != res) { try { res.close(); } catch (SQLException e) { sql.logger.error("FBS9100_Task_Thread_SQL.queryBTS61850OffLineyhPlanOnRam():" + e.toString(), e); } } sql.close_con(); } }