From 3c8ba3dc95284e1107d8454897f63cce635d81c5 Mon Sep 17 00:00:00 2001 From: lucas Date: Mon, 24 Feb 2025 13:10:30 +0800 Subject: [PATCH] =?UTF-8?q?update=20add=20=E6=8C=A0=E5=BA=A6=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=2019=20=E7=89=B9=E5=BE=81=E6=95=B0=E6=8D=AE=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptors/知物云es主题特征to中交华联.go | 6 ++++++ consumers/consumerGZG2ZJHL.go | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/adaptors/知物云es主题特征to中交华联.go b/adaptors/知物云es主题特征to中交华联.go index c9349bc..2fb7a52 100644 --- a/adaptors/知物云es主题特征to中交华联.go +++ b/adaptors/知物云es主题特征to中交华联.go @@ -173,6 +173,12 @@ func (the Adaptor_ZWYES_ZJHL) EsAgg2StatisticData(factorId int, monitorCode int6 RootMeanSquare: float32(rootMeanSquareX), TotalAbsoluteValue: float32(dateBucket.X.Max - dateBucket.X.Min), }} + case 19: //挠度监测 + dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl.StatisticData_Hpt{Hpt: &protoFiles_zjhl.HPTStatistic{ + MaxAbsoluteValue: float32(maxAbsoluteValueX), + AvgValue: float32(avgValueX), + RootMeanSquare: float32(rootMeanSquareX), + }} case 20: //支座位移 dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl.StatisticData_Dis{Dis: &protoFiles_zjhl.DISStatistic{ MaxAbsoluteValue: float32(maxAbsoluteValueX), diff --git a/consumers/consumerGZG2ZJHL.go b/consumers/consumerGZG2ZJHL.go index d216c21..548de0f 100644 --- a/consumers/consumerGZG2ZJHL.go +++ b/consumers/consumerGZG2ZJHL.go @@ -314,7 +314,7 @@ func (the *consumerGZG2ZJHL) getESQueryStrBy10min(structureId int64, factorId in } func getEsAggSubSqlByZwyFactorId(factorId int) string { - //桥墩倾斜 15 裂缝 18 支座位移20 桥面振动28 加速度三项监测592(承德隧道专用) + //桥墩倾斜 15 裂缝 18 支座位移20 挠度19 桥面振动28 加速度三项监测592(承德隧道专用) subAggSQl := "" switch factorId { case 4: //结构温度 @@ -366,6 +366,15 @@ func getEsAggSubSqlByZwyFactorId(factorId int) string { "field": "data.crack" } } +}` + case 19: + subAggSQl = ` +{ + "x": { + "extended_stats": { + "field": "data.deflection" + } + } }` case 20: subAggSQl = `