From bf1393a6103cad1d1d55e0d15c29fa9ef38c373d Mon Sep 17 00:00:00 2001 From: lucas Date: Tue, 2 Sep 2025 10:42:54 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8F=8C=E6=8E=A7=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20=E9=87=87=E7=94=A8=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=97=B6=E9=97=B4=20=E9=81=BF=E5=85=8D=20=E5=8E=9F=E6=9C=89?= =?UTF-8?q?=E9=87=87=E7=94=A8=E5=91=8A=E8=AD=A6=E6=97=B6=E9=97=B4=20?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=20=E9=A6=96=E6=9D=A1=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=8F=AF=E8=83=BD=E8=A2=AB=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerAxySkAlarm.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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("变化速率恢复正常") } }