| | |
| | | } |
| | | |
| | | // 通过多个属性查找并解除报警(更新结束时间) |
| | | bool AlarmManager::clearAlarmByAttributes(int nId, int nSeverityLevel, int nDeviceId, int nUnitId, const std::string& strDescription, const std::string& endTime) { |
| | | bool AlarmManager::clearAlarmByAttributes(int nId, int nDeviceId, int nUnitId, const std::string& endTime) { |
| | | if (!m_pDB) { |
| | | return false; |
| | | } |
| | |
| | | for (AlarmDataMap::const_iterator it = m_mapCache.begin(); it != m_mapCache.end(); ++it) { |
| | | const AlarmData& alarm = it->second; |
| | | if (alarm.nId == nId && |
| | | alarm.nSeverityLevel == nSeverityLevel && |
| | | alarm.nDeviceId == nDeviceId && |
| | | alarm.nUnitId == nUnitId && |
| | | alarm.strDescription == strDescription) { |
| | | alarm.nUnitId == nUnitId) { |
| | | |
| | | alarmEventId = it->first; |
| | | break; |