Browse Source

增加三向位移的处理

dev
zhangyuxiang 7 days ago
parent
commit
ef1a8783c5
  1. 6
      adaptors/知物云es主题特征to河北公路设施监测.go
  2. 2
      consumers/consumerZWYHBJCAS.go
  3. 14
      utils/anxinyunEsAggQuery.go

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

@ -91,7 +91,7 @@ func (the Adaptor_ZWYES_HBGL) EsAggTopToHBJCAS(structId int64, factorId int, esA
func (the Adaptor_ZWYES_HBGL) getMonitorTypeByFactorId(factorId int) protoFiles_hb.MonitoryType {
//隧道 拱顶沉降 102
//边坡 雨量 55 表面位移62
//桥梁 桥墩转角 1914 挠度 19 挠度 1917 横向加速度 1919 纵向加速度 1920 竖向加速度 1944
//桥梁 桥墩转角 1914,1945 挠度 19 挠度 1917 横向加速度 1919 纵向加速度 1920 竖向加速度 1944
switch factorId {
case 55:
return protoFiles_hb.MonitoryType_PWS
@ -99,7 +99,7 @@ func (the Adaptor_ZWYES_HBGL) getMonitorTypeByFactorId(factorId int) protoFiles_
return protoFiles_hb.MonitoryType_DBWY
case 102:
return protoFiles_hb.MonitoryType_GDCJ
case 1914:
case 1914, 1945:
return protoFiles_hb.MonitoryType_INC
case 19, 1917:
return protoFiles_hb.MonitoryType_HPT
@ -165,7 +165,7 @@ func (the Adaptor_ZWYES_HBGL) EsAgg2StatisticData(factorId int, monitorCode int6
RootMeanSquare: float32(rootMeanSquareX),
TotalAbsoluteValue: float32(dateBucket.X.Max - dateBucket.X.Min),
}}
case 1914: //桥墩转角
case 1914, 1945: //桥墩转角
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_hb.StatisticData_Inc{Inc: &protoFiles_hb.INCStatistic{
MaxAbsoluteValueX: float32(maxAbsoluteValueX),
AvgValueX: float32(avgValueX),

2
consumers/consumerZWYHBJCAS.go

@ -176,7 +176,7 @@ func (the *consumerZWYHBJCAS) getStructIds() []int64 {
func (the *consumerZWYHBJCAS) getEs1HourAggData() {
start, end := utils.GetTimeRangeByHour(-1)
log.Printf("查询数据时间范围 %s - %s", start, end)
hourFactorIds := []int{62, 102, 1914, 19, 1917}
hourFactorIds := []int{62, 102, 1914, 19, 1917, 1945}
structIds := the.getStructIds()
for _, structId := range structIds {
for _, factorId := range hourFactorIds {

14
utils/anxinyunEsAggQuery.go

@ -137,6 +137,20 @@ func GetEsAggSubSqlByAxyFactorId(factorId int) string {
"field": "data.y"
}
}
}`
case 1945:
subAggSQl = `
{
"x": {
"extended_stats": {
"field": "data.anglex"
}
},
"y": {
"extended_stats": {
"field": "data.angley"
}
}
}`
case 19:
subAggSQl = `

Loading…
Cancel
Save