|
|
@ -7,12 +7,12 @@ import ( |
|
|
"goInOut/consumers/HBJCAS/protoFiles_hb" |
|
|
"goInOut/consumers/HBJCAS/protoFiles_hb" |
|
|
"goInOut/dbOperate" |
|
|
"goInOut/dbOperate" |
|
|
"goInOut/models" |
|
|
"goInOut/models" |
|
|
"google.golang.org/protobuf/proto" |
|
|
|
|
|
"log" |
|
|
"log" |
|
|
"math" |
|
|
"math" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
|
"time" |
|
|
|
|
|
|
|
|
"google.golang.org/protobuf/proto" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
// Adaptor_AXYES_HBGL 统一采集软件数据 转换 湘潭健康监测平台
|
|
|
// Adaptor_AXYES_HBGL 统一采集软件数据 转换 湘潭健康监测平台
|
|
|
@ -108,7 +108,7 @@ func (the Adaptor_AXYES_HBGL) getMonitorTypeByFactorId(factorId int) protoFiles_ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (the Adaptor_AXYES_HBGL) EsAgg2StatisticData(factorId int, monitorCode int64, dateBucket HBJCAS.BucketsXY) *protoFiles_hb.DataDefinition_StatisticData { |
|
|
func (the Adaptor_AXYES_HBGL) EsAgg2StatisticData(factorId int, monitorCode int64, dateBucket HBJCAS.BucketsXY) *protoFiles_hb.DataDefinition_StatisticData { |
|
|
Atime := dateBucket.KeyAsString.Add(-8 * time.Hour).UnixMilli() |
|
|
Atime := dateBucket.KeyAsString.UnixMilli() |
|
|
maxAbsoluteValueX := max(math.Abs(dateBucket.X.Max), math.Abs(dateBucket.X.Min)) |
|
|
maxAbsoluteValueX := max(math.Abs(dateBucket.X.Max), math.Abs(dateBucket.X.Min)) |
|
|
avgValueX := dateBucket.X.Avg |
|
|
avgValueX := dateBucket.X.Avg |
|
|
rootMeanSquareX := math.Sqrt(dateBucket.X.SumOfSquares / float64(dateBucket.X.Count)) |
|
|
rootMeanSquareX := math.Sqrt(dateBucket.X.SumOfSquares / float64(dateBucket.X.Count)) |
|
|
|