From 88325ae70daed063b6f079b7637e78885f0af3c8 Mon Sep 17 00:00:00 2001 From: zhangyuxiang <1323804152@qq.com> Date: Wed, 21 Jan 2026 09:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9esTo=E5=B9=BF=E4=B8=9C?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=B8=8A=E9=9A=86=E6=B1=9F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=9A=84=E7=9B=91=E6=B5=8B=E5=9B=A0=E7=B4=A0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerAXYES2GDJKJC.go | 2 +- utils/anxinyunEsAggQuery.go | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/consumers/consumerAXYES2GDJKJC.go b/consumers/consumerAXYES2GDJKJC.go index d61e301..054411b 100644 --- a/consumers/consumerAXYES2GDJKJC.go +++ b/consumers/consumerAXYES2GDJKJC.go @@ -140,7 +140,7 @@ func (the *consumerAXYES2GDJKJC) getStructIdsBySlope() []int { func (the *consumerAXYES2GDJKJC) getEs1HourAggData() { start, end := utils.GetTimeRangeByHour(-1) log.Printf("查询数据时间范围 %s - %s", start, end) - hourFactorIds := []int{11, 15, 18, 63} //应变11 桥墩倾斜15 裂缝监测18 支护结构变形63 + hourFactorIds := []int{11, 15, 18, 63, 31} //应变11 桥墩倾斜15 裂缝监测18 支护结构变形63 水位 31 structIds := the.getStructIdsByBridge() the.handlerHourAggData(start, end, "bridge", structIds, hourFactorIds) } diff --git a/utils/anxinyunEsAggQuery.go b/utils/anxinyunEsAggQuery.go index 90b4299..ba58e89 100644 --- a/utils/anxinyunEsAggQuery.go +++ b/utils/anxinyunEsAggQuery.go @@ -64,7 +64,7 @@ func GetEsAggSubSqlByAxyFactorId(factorId int) string { } } }` - case 28: + case 25, 28: subAggSQl = ` { "x": { @@ -77,6 +77,15 @@ func GetEsAggSubSqlByAxyFactorId(factorId int) string { "field": "data.trms" } } +}` + case 31: + subAggSQl = ` +{ + "x": { + "extended_stats": { + "field": "data.waterLevel" + } + } }` case 592: subAggSQl = `