Browse Source

针对esTo广东平台上隆江新增的监测因素处理

dev
zhangyuxiang 2 weeks ago
parent
commit
88325ae70d
  1. 2
      consumers/consumerAXYES2GDJKJC.go
  2. 11
      utils/anxinyunEsAggQuery.go

2
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)
}

11
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 = `

Loading…
Cancel
Save