Browse Source

河北公路监测上报时间修改,去掉原先减8小时逻辑

dev
zhangyuxiang 1 month ago
parent
commit
9e85e96562
  1. 6
      adaptors/安心云es主题特征to河北公路设施监测.go

6
adaptors/安心云es主题特征to河北公路设施监测.go

@ -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))

Loading…
Cancel
Save