|
@ -121,7 +121,7 @@ func (t *AggThresholdHandler) judgeThreshold(aggData *common_models.AggData) *co |
|
|
overThresholdItem := aggThreshold.FindThresholdInRange(protoItemThs, val) |
|
|
overThresholdItem := aggThreshold.FindThresholdInRange(protoItemThs, val) |
|
|
if overThresholdItem != nil { |
|
|
if overThresholdItem != nil { |
|
|
// content 格式如:应变的10分钟聚集变化率:-0.60με,超1级阈值[-1~-0.5]
|
|
|
// content 格式如:应变的10分钟聚集变化率:-0.60με,超1级阈值[-1~-0.5]
|
|
|
content := fmt.Sprintf("%s的%s变化率:%.2f%s,超%d级阈值[%s]", protoItem.Name, aggTypeStr, val, protoItem.UnitName, overThresholdItem.Level, overThresholdItem.RangeText()) |
|
|
content := fmt.Sprintf("%s的%s变化率:%f%s,超%d级阈值[%s]", protoItem.Name, aggTypeStr, val, protoItem.UnitName, overThresholdItem.Level, overThresholdItem.RangeText()) |
|
|
ls = append(ls, common_models.ThresholdAlarmDetail{Level: overThresholdItem.Level, Content: content}) |
|
|
ls = append(ls, common_models.ThresholdAlarmDetail{Level: overThresholdItem.Level, Content: content}) |
|
|
} |
|
|
} |
|
|
//log.Printf("[aggThreshold judgeThreshold] 测点[sensorId: %d] fieldName: %s, ChangedVal (float64): %f\n", aggData.SensorId, fieldName, val)
|
|
|
//log.Printf("[aggThreshold judgeThreshold] 测点[sensorId: %d] fieldName: %s, ChangedVal (float64): %f\n", aggData.SensorId, fieldName, val)
|
|
|