|
|
@ -13,7 +13,6 @@ import ( |
|
|
|
"math" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
|
// Adaptor_AXYES_HBGL 统一采集软件数据 转换 湘潭健康监测平台
|
|
|
@ -104,7 +103,7 @@ func (the Adaptor_AXYES_GDJKJC) getMonitorTypeByFactorId(factorId int) protoFile |
|
|
|
} |
|
|
|
|
|
|
|
func (the Adaptor_AXYES_GDJKJC) EsAgg2StatisticData(factorId int, monitorCode string, dateBucket HBJCAS.BucketsXY) (dataBytes []byte) { |
|
|
|
Atime := dateBucket.KeyAsString.Add(-8 * time.Hour).UnixMilli() |
|
|
|
Atime := dateBucket.KeyAsString.UnixMilli() |
|
|
|
maxAbsoluteValueX := max(math.Abs(dateBucket.X.Max), math.Abs(dateBucket.X.Min)) |
|
|
|
avgValueX := dateBucket.X.Avg |
|
|
|
rootMeanSquareX := math.Sqrt(dateBucket.X.SumOfSquares / float64(dateBucket.X.Count)) |
|
|
|