Browse Source

update add 挠度监测 19 特征数据支持

dev
lucas 2 months ago
parent
commit
3c8ba3dc95
  1. 6
      adaptors/知物云es主题特征to中交华联.go
  2. 11
      consumers/consumerGZG2ZJHL.go

6
adaptors/知物云es主题特征to中交华联.go

@ -173,6 +173,12 @@ func (the Adaptor_ZWYES_ZJHL) EsAgg2StatisticData(factorId int, monitorCode int6
RootMeanSquare: float32(rootMeanSquareX), RootMeanSquare: float32(rootMeanSquareX),
TotalAbsoluteValue: float32(dateBucket.X.Max - dateBucket.X.Min), 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: //支座位移 case 20: //支座位移
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl.StatisticData_Dis{Dis: &protoFiles_zjhl.DISStatistic{ dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl.StatisticData_Dis{Dis: &protoFiles_zjhl.DISStatistic{
MaxAbsoluteValue: float32(maxAbsoluteValueX), MaxAbsoluteValue: float32(maxAbsoluteValueX),

11
consumers/consumerGZG2ZJHL.go

@ -314,7 +314,7 @@ func (the *consumerGZG2ZJHL) getESQueryStrBy10min(structureId int64, factorId in
} }
func getEsAggSubSqlByZwyFactorId(factorId int) string { func getEsAggSubSqlByZwyFactorId(factorId int) string {
//桥墩倾斜 15 裂缝 18 支座位移20 桥面振动28 加速度三项监测592(承德隧道专用) //桥墩倾斜 15 裂缝 18 支座位移20 挠度19 桥面振动28 加速度三项监测592(承德隧道专用)
subAggSQl := "" subAggSQl := ""
switch factorId { switch factorId {
case 4: //结构温度 case 4: //结构温度
@ -366,6 +366,15 @@ func getEsAggSubSqlByZwyFactorId(factorId int) string {
"field": "data.crack" "field": "data.crack"
} }
} }
}`
case 19:
subAggSQl = `
{
"x": {
"extended_stats": {
"field": "data.deflection"
}
}
}` }`
case 20: case 20:
subAggSQl = ` subAggSQl = `

Loading…
Cancel
Save