IEC61850_ForPowerSupply_ForNW/src/com/power/data/PowerData_RT_Array.java
@@ -54,7 +54,7 @@
         sql.sqlMysqlUseDB(Sql_Mysql.DB_PWRDEV_INF);
         
         String sql_str = "SELECT DISTINCT "
               + " PowerDeviceId,PowerDeviceIp,ProtocolName"
               + " PowerDeviceId,PowerDeviceIp,ProtocolName,StationId"
               + " FROM " + Sql_Mysql.TB_PWRDEV_INF
               + " ORDER BY PowerDeviceId ASC";
   
@@ -68,6 +68,8 @@
            String pwrdevip = res.getString("PowerDeviceIp").trim();
            String pwrdevprotname = res.getString("ProtocolName").trim();
            
            String stationId = res.getString("StationId").trim();
            //logger.info("Select res: pwrdevid = " + pwrdevid + "-- IP = " + pwrdevip);
            
            for(int n=0;n<Data_Array.size();n++) {
@@ -75,13 +77,18 @@
               
               if(rtd.PowerDevDeviceId == pwrdevid) {
                  
                  if(pwrdevip != rtd.PowerDevDeviceIp) {
                  if(!rtd.PowerDevDeviceIp.equals(pwrdevip)) {
                     rtd.PowerDevDeviceIp = pwrdevip;
                  }
                  
                  if(pwrdevprotname != rtd.PowerDevProtocolName) {
                  if(!rtd.PowerDevProtocolName.equals(pwrdevprotname)) {
                     rtd.PowerDevProtocolName = pwrdevprotname;
                  }
                  if(!rtd.StationId.equals(stationId)) {
                     rtd.StationId = stationId;
                  }
                  
                  pwrDev_exists = true;
                  break;
@@ -98,6 +105,7 @@
               rtdata.PowerDevDeviceId = pwrdevid;
               rtdata.PowerDevDeviceIp = pwrdevip;
               rtdata.PowerDevProtocolName = pwrdevprotname;
               rtdata.StationId = stationId;
               
               //logger.info("Insert: pwrdevid = " + pwrdevid + "-- IP = " + pwrdevip);