diff --git a/consumers/consumerAxySkAlarm.go b/consumers/consumerAxySkAlarm.go index 07260a9..8fefac9 100644 --- a/consumers/consumerAxySkAlarm.go +++ b/consumers/consumerAxySkAlarm.go @@ -313,8 +313,8 @@ func (the *consumerAxySkAlarm) skAlarmInfo(alarmInfoTemplate *models.EsAlarm, le AlarmTypeCode: "3077", AlarmCode: fmt.Sprintf("3077000%d", level), Content: detail, - Time: alarmTime.Add(8 * time.Hour).Format("2006-01-02T15:04:05.000+0800"), - SourceTypeId: 2, // 0:DTU, 1:传感器, 2:测点 + Time: time.Now().Format("2006-01-02T15:04:05.000+0800"), //避免历史告警触发 导致首次详情被覆盖//alarmTime.Add(8 * time.Hour).Format("2006-01-02T15:04:05.000+0800"), + SourceTypeId: 2, // 0:DTU, 1:传感器, 2:测点 Sponsor: "goInOut_axySkAlarm", Extras: nil, SubDevices: triggerTypeCodes, @@ -427,8 +427,6 @@ func (the *consumerAxySkAlarm) isRuleAlarm(trigger AXY_SK.AlarmTrigger, stationA dt = stationAlarm.Alarm3007.EndTime } triggerTypeCodes = append(triggerTypeCodes, stationAlarm.Alarm3007.AlarmTypeCode) - } else { - detail += fmt.Sprintf("测量值恢复正常") } case 1: if stationAlarm.Alarm3008 != nil && stationAlarm.Alarm3008.CurrentLevel <= trigger.AlarmLevel { @@ -438,8 +436,6 @@ func (the *consumerAxySkAlarm) isRuleAlarm(trigger AXY_SK.AlarmTrigger, stationA dt = stationAlarm.Alarm3008.EndTime } triggerTypeCodes = append(triggerTypeCodes, stationAlarm.Alarm3008.AlarmTypeCode) - } else { - detail += fmt.Sprintf("变化速率恢复正常") } }