| | |
| | | sql.sqlMysqlUseDB(Sql_Mysql.DB_PWRDEV_INF);
|
| | |
|
| | | String sql_str = "SELECT DISTINCT "
|
| | | + " PowerDeviceId,PowerDeviceIp,ProtocolName,StationIP "
|
| | | + " PowerDeviceId,PowerDeviceIp,ProtocolName,StationIP,is_ac_cabinet,is_dc_cabinet,is_highfreq_cabinet "
|
| | | + " FROM " + Sql_Mysql.TB_PWRDEV_INF
|
| | | + " ORDER BY PowerDeviceId ASC";
|
| | |
|
| | |
| | | String StationIP = res.getString("StationIP").trim();
|
| | | String PowerDevProtocolIndex = "";
|
| | |
|
| | | int is_ac_cabinet = res.getInt("is_ac_cabinet");
|
| | | int is_dc_cabinet = res.getInt("is_dc_cabinet");
|
| | | int is_highfreq_cabinet = res.getInt("is_highfreq_cabinet");
|
| | | if(pwrdevprotname.endsWith("2")) {
|
| | | //紫晶第二套电源
|
| | | PowerDevProtocolIndex = "2";
|
| | |
| | | rtd.PowerDevProtocolName = pwrdevprotname;
|
| | | }
|
| | |
|
| | | if(is_ac_cabinet != rtd.is_ac_cabinet) {
|
| | | rtd.is_ac_cabinet = is_ac_cabinet;
|
| | | }
|
| | | |
| | | if(is_dc_cabinet != rtd.is_dc_cabinet) {
|
| | | rtd.is_dc_cabinet = is_dc_cabinet;
|
| | | }
|
| | | |
| | | if(is_highfreq_cabinet != rtd.is_highfreq_cabinet) {
|
| | | rtd.is_highfreq_cabinet = is_highfreq_cabinet;
|
| | | }
|
| | | |
| | | pwrDev_exists = true;
|
| | | break;
|
| | | }
|
| | |
| | |
|
| | | rtdata.PowerDevProtocolIndex = PowerDevProtocolIndex;
|
| | |
|
| | | rtdata.is_ac_cabinet = is_ac_cabinet;
|
| | | rtdata.is_dc_cabinet = is_dc_cabinet;
|
| | | rtdata.is_highfreq_cabinet = is_highfreq_cabinet;
|
| | | |
| | | //logger.info("Insert: pwrdevid = " + pwrdevid + "-- IP = " + pwrdevip);
|
| | |
|
| | | //插入一条记录
|