From ef1a8783c51b990248096481ba60224a7b0941b2 Mon Sep 17 00:00:00 2001 From: zhangyuxiang <1323804152@qq.com> Date: Wed, 13 Aug 2025 10:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=89=E5=90=91=E4=BD=8D?= =?UTF-8?q?=E7=A7=BB=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...云es主题特征to河北公路设施监测.go | 6 +++--- consumers/consumerZWYHBJCAS.go | 2 +- utils/anxinyunEsAggQuery.go | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/adaptors/知物云es主题特征to河北公路设施监测.go b/adaptors/知物云es主题特征to河北公路设施监测.go index 9c421bc..7463380 100644 --- a/adaptors/知物云es主题特征to河北公路设施监测.go +++ b/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), diff --git a/consumers/consumerZWYHBJCAS.go b/consumers/consumerZWYHBJCAS.go index 1fb86b1..a513157 100644 --- a/consumers/consumerZWYHBJCAS.go +++ b/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 { diff --git a/utils/anxinyunEsAggQuery.go b/utils/anxinyunEsAggQuery.go index c8da216..90b4299 100644 --- a/utils/anxinyunEsAggQuery.go +++ b/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 = `