Browse Source

update 支持结构物[5222]隧道河北承德广仁岭隧道(上行) 的加速度三项监测

dev
lucas 3 months ago
parent
commit
3bec4e518d
  1. 9
      adaptors/安心云es主题特征to河北公路设施监测.go
  2. 13
      consumers/consumerHBJCAS.go

9
adaptors/安心云es主题特征to河北公路设施监测.go

@ -89,7 +89,7 @@ func (the Adaptor_AXYES_HBGL) EsAggTopToHBJCAS(structId int64, factorId int, esA
return result
}
func (the Adaptor_AXYES_HBGL) getMonitorTypeByFactorId(factorId int) protoFiles_hb.MonitoryType {
//桥墩倾斜 15 裂缝18 支座位移20 桥面振动28
//桥墩倾斜 15 裂缝18 支座位移20 桥面振动28 加速度三项监测592
switch factorId {
case 15:
return protoFiles_hb.MonitoryType_INC
@ -99,6 +99,8 @@ func (the Adaptor_AXYES_HBGL) getMonitorTypeByFactorId(factorId int) protoFiles_
return protoFiles_hb.MonitoryType_DIS
case 28:
return protoFiles_hb.MonitoryType_VIB
case 592:
return protoFiles_hb.MonitoryType_VIB
default:
log.Printf("factorId=%d,无匹配的MonitorType", factorId)
return protoFiles_hb.MonitoryType_CMM
@ -154,6 +156,11 @@ func (the Adaptor_AXYES_HBGL) EsAgg2StatisticData(factorId int, monitorCode int6
MaxAbsoluteValue: float32(maxAbsoluteValueX),
RootMeanSquare: float32(rootMeanSquareY),
}}
case 592: //加速度三项监测
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_hb.StatisticData_Vib{Vib: &protoFiles_hb.VIBStatistic{
MaxAbsoluteValue: float32(maxAbsoluteValueX),
RootMeanSquare: float32(rootMeanSquareX),
}}
}
return dataDefinitionStatisticData

13
consumers/consumerHBJCAS.go

@ -161,7 +161,7 @@ func (the *consumerHBJCAS) getEs10minAggData() {
//utils.GetTimeRangeBy10min() 由于振动数据实时性问题 改用一小时统一上报
start, end := utils.GetTimeRangeByHour(-1)
log.Printf("查询10min数据时间范围 %s - %s", start, end)
factorIds := []int{28}
factorIds := []int{28, 592} //监测因素 592 -> 结构物[5222]隧道河北承德广仁岭隧道(上行) 的加速度三项监测
structIds := the.getStructIds()
for _, structId := range structIds {
for _, factorId := range factorIds {
@ -316,7 +316,7 @@ func (the *consumerHBJCAS) getESQueryStrBy10min(structureId int64, factorId int,
}
func getEsAggSubSqlByFactorId(factorId int) string {
//桥墩倾斜 15 裂缝 18 支座位移20 桥面振动28
//桥墩倾斜 15 裂缝 18 支座位移20 桥面振动28 加速度三项监测592(承德隧道专用)
subAggSQl := ""
switch factorId {
case 15:
@ -364,6 +364,15 @@ func getEsAggSubSqlByFactorId(factorId int) string {
"field": "data.trms"
}
}
}`
case 592:
subAggSQl = `
{
"x": {
"extended_stats": {
"field": "data.z_acc_speed"
}
}
}`
}
return subAggSQl

Loading…
Cancel
Save