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