| | |
| | | // + " WHERE PowerDeviceId=" + dev_id + " AND alm_type= "+ alm_type_id;
|
| | |
|
| | | //将当前设备实时告警表中的历史告警记录插入到设备历史告警表中
|
| | | String sql_str2 = " INSERT INTO " + Sql_Mysql.PWRDEV_ALARM_VERIFY_TABLE+"(record_id,PowerDeviceId,alm_type,alm_level,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type,alm_trigger,alm_severity)(SELECT record_id,PowerDeviceId,alm_type,alm_level,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type,alm_trigger,alm_severity from "+Sql_Mysql.TB_PWRDEV_ALARM+" WHERE PowerDeviceId = " + alm.pwrdev_id + " and alm_type = " + alm.alm_type + " and alm_cleared_type = " + PwrDeviceAlarm_Data.ALM_CLEARED_TYPE_HIST + ");";
|
| | | String sql_str2 = " INSERT INTO " + Sql_Mysql.PWRDEV_ALARM_VERIFY_TABLE+"(record_id,PowerDeviceId,alm_type,alm_level,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type,alm_trigger,alm_severity,alm_solekey)(SELECT record_id,PowerDeviceId,alm_type,alm_level,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type,alm_trigger,alm_severity,num from "+Sql_Mysql.TB_PWRDEV_ALARM+" WHERE PowerDeviceId = " + alm.pwrdev_id + " and alm_type = " + alm.alm_type + " and alm_cleared_type = " + PwrDeviceAlarm_Data.ALM_CLEARED_TYPE_HIST + ");";
|
| | |
|
| | | //将实时告警表中的非实时告警删除
|
| | | String sql_str3 = " DELETE FROM " + Sql_Mysql.TB_PWRDEV_ALARM +" WHERE PowerDeviceId = "+ alm.pwrdev_id + " and alm_type = " + alm.alm_type + " and alm_cleared_type = " + PwrDeviceAlarm_Data.ALM_CLEARED_TYPE_HIST;
|