7 changed files with 350 additions and 142 deletions
@ -0,0 +1,27 @@ |
|||
consumer: consumerAXYES2GDJKJC |
|||
ioConfig: |
|||
in: |
|||
http: |
|||
url: https://esproxy.anxinyun.cn/anxincloud_themes/_search |
|||
out: |
|||
http: |
|||
url: https://bmsapi.gdjkjc.cn:13579/Data/AddStatData |
|||
method: "post" |
|||
monitor: |
|||
#振动是触发式,数据迟缓 cron10min也改成1小时一次 最多上报6条,不进行10min实时上报 |
|||
cron10min: 22 0/1 * * * #6/10 * * * * |
|||
#普通类型 特征数据 |
|||
cron1hour: 20 0/1 * * * |
|||
info: |
|||
rc4key: sK3kJttzZyf7aZI94zSYgytBYCrfZRt6yil2 |
|||
queryComponent: |
|||
redis: |
|||
address: 10.8.30.160:30379 |
|||
#结构物id对应 |
|||
structInfo: |
|||
5450: G0000000000001 |
|||
5452: G0000000000002 |
|||
5455: G0000000000003 |
|||
5456: G0000000000004 |
|||
|
|||
|
@ -1,49 +0,0 @@ |
|||
{ |
|||
"consumer": "consumerJSNCGLQL", |
|||
"ioConfig": { |
|||
"in": { |
|||
"mqtt": { |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"userName": "goInOut", |
|||
"password": "", |
|||
"clientId": "goInOut_JSNCGLQL", |
|||
"Topics": [ |
|||
"upload/daas/+" |
|||
] |
|||
} |
|||
}, |
|||
"out": { |
|||
"mqtt": { |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"userName": "upload", |
|||
"password": "", |
|||
"clientId": "goInOut", |
|||
"Topics": [ |
|||
"data/{{.bridgeCode}}/{{.sensorCode}}" |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
"info": { |
|||
"bridgeCode": "G2LR0670320804" |
|||
}, |
|||
"sensorInfo": { |
|||
"ZDsensorMap": { |
|||
"31323_1": "SGQ-RSG-G02-002-01", |
|||
"31323_2": "SGQ-RSG-G02-002-02", |
|||
"31323_3": "SGQ-RSG-G02-002-03", |
|||
"31323_4": "SGQ-RSG-G02-002-04", |
|||
"31323_5": "SGQ-RSG-G02-002-05", |
|||
"31323_6": "SGQ-RSG-G02-002-06", |
|||
"31323_7": "SGQ-RSG-G02-002-07", |
|||
"31323_8": "SGQ-RSG-G02-002-08", |
|||
"61226_1": "SGQ-RSG-G02-002-09", |
|||
"61226_2": "SGQ-RSG-G02-002-10", |
|||
"61226_3": "SGQ-RSG-G02-002-11", |
|||
"61226_4": "SGQ-RSG-G02-002-12", |
|||
"61226_5": "SGQ-RSG-G02-002-13" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
{ |
|||
"consumer": "consumerJSNCGLQL", |
|||
"ioConfig": { |
|||
"in": { |
|||
"mqtt": { |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"userName": "goInOut", |
|||
"password": "", |
|||
"clientId": "goInOut_JSNCGLQL", |
|||
"Topics": [ |
|||
"upload/daas/+" |
|||
] |
|||
} |
|||
}, |
|||
"out": { |
|||
"mqtt": { |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"userName": "upload", |
|||
"password": "", |
|||
"clientId": "goInOut", |
|||
"Topics": [ |
|||
"data/{{.bridgeCode}}/{{.sensorCode}}" |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
"info": { |
|||
"bridgeCode": "G2513LR0470320324" |
|||
}, |
|||
"sensorInfo": { |
|||
"ZDsensorMap": { |
|||
"30000_1": "XHH-RSG-G03-002-06", |
|||
"30000_2": "XHH-RSG-G03-002-05", |
|||
"30000_3": "XHH-RSG-G03-002-04", |
|||
"30000_4": "XHH-RSG-G03-002-03", |
|||
"30000_5": "XHH-RSG-G03-002-02", |
|||
"30000_6": "XHH-RSG-G03-002-01", |
|||
"30000_7": "XHH-RSG-G03-002-12", |
|||
"30000_8": "XHH-RSG-G03-002-11", |
|||
"40000_1": "XHH-RSG-G03-002-10", |
|||
"40000_2": "XHH-RSG-G03-002-09", |
|||
"40000_3": "XHH-RSG-G03-002-08", |
|||
"40000_4": "XHH-RSG-G03-002-07", |
|||
"40000_5": "XHH-RSG-G03-002-02", |
|||
"40000_6": "XHH-RSG-G03-002-04", |
|||
"40000_7": "XHH-RSG-G03-002-01", |
|||
"40000_8": "XHH-RSG-G03-002-03", |
|||
"50000_5": "XHH-RSG-G03-002-05" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,175 @@ |
|||
package GDJKJC |
|||
|
|||
type CommonConeigen struct { |
|||
FactorId int |
|||
ItemsConeigen map[string]ItemCommonConeigen |
|||
} |
|||
|
|||
// CommonConeigen 通用特征数据
|
|||
type ItemCommonConeigen struct { |
|||
Max float64 |
|||
Mean float64 |
|||
Min float64 |
|||
RootMeanSquare float64 |
|||
//绝对值累积量 -数据波动特征- 时间段内的支座位移时程曲线,将后一时刻的支座位移减去前一时刻的支座位移即差分,再取绝对值,再累加
|
|||
AbsDiff float64 |
|||
} |
|||
|
|||
// 车载称重特征数据
|
|||
type CarLoadConeigen struct { |
|||
FactorId int |
|||
Total int64 |
|||
MaxWeight float64 |
|||
MaxWeight1 float64 |
|||
OverWeightCount int64 |
|||
} |
|||
|
|||
type CommonBody struct { |
|||
ThirdChannelCode string `json:"ThirdChannelCode"` //测点通道编号(根据部里文件命名规则)
|
|||
DataTimeUnix int64 `json:"DataTimeUnix"` //时间时间戳毫秒
|
|||
} |
|||
|
|||
type A32WsdBody struct { |
|||
CommonBody |
|||
TempMax float64 `json:"TempMax"` //温度最大值
|
|||
TempMin float64 `json:"TempMin"` //温度最小值
|
|||
TempAvg float64 `json:"TempAvg"` //温度平均值
|
|||
TempDiff float64 `json:"TempDiff"` //最大温差
|
|||
HumMax float64 `json:"HumMax"` //湿度最大值
|
|||
HumMin float64 `json:"HumMin"` //湿度最小值
|
|||
HumAvg float64 `json:"HumAvg"` //湿度平均值
|
|||
WaringDuration float64 `json:"WaringDuration"` //超限持续时间
|
|||
} |
|||
|
|||
type A33IceBody struct { |
|||
CommonBody |
|||
Max float64 `json:"Max"` //最大值
|
|||
Min float64 `json:"Min"` //最小值
|
|||
Avg float64 `json:"Avg"` //平均值
|
|||
} |
|||
|
|||
type A34RainBody struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` //平均值
|
|||
} |
|||
|
|||
type A35CarloadsBody struct { |
|||
CommonBody |
|||
Total int64 `json:"Total"` //车流量
|
|||
MaxWeight float64 `json:"MaxWeight"` //最大总负荷
|
|||
MaxWeight1 float64 `json:"MaxWeight1"` //最大轴重
|
|||
OverWeightCount int64 `json:"OverWeightCount"` //超载车数量
|
|||
} |
|||
|
|||
// A36WindBody 风速风向 10分钟一次
|
|||
type A36WindBody struct { |
|||
CommonBody |
|||
AvgSpeed float64 `json:"AvgSpeed"` //风速平均值
|
|||
AvgDirection float64 `json:"AvgDirection"` //风向平均值
|
|||
AvgDirectionZ float64 `json:"AvgDirectionZ"` //风攻角平均值
|
|||
} |
|||
|
|||
// A37WindPressBody 风压
|
|||
type A37WindPressBody struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` //风压平均值
|
|||
Rms float64 `json:"Rms"` //均方根值
|
|||
} |
|||
|
|||
type A38TemperatureBody struct { |
|||
CommonBody |
|||
Max float64 `json:"Max"` |
|||
Min float64 `json:"Min"` |
|||
Avg float64 `json:"Avg"` |
|||
Diff float64 `json:"Diff"` //最大温差
|
|||
} |
|||
|
|||
// A40DisplacementBody 位移(主梁、塔顶、主缆、高墩墩顶、拱顶)
|
|||
// 10分钟一次
|
|||
type A40DisplacementBody struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` |
|||
Rms float64 `json:"Rms"` //均方根值
|
|||
} |
|||
|
|||
type A41GnssBody struct { |
|||
CommonBody |
|||
XAvg float64 `json:"XAvg"` //横桥向平均值
|
|||
YAvg float64 `json:"YAvg"` //纵桥向平均值
|
|||
ZAvg float64 `json:"ZAvg"` //竖向平均值
|
|||
XMax float64 `json:"XMax"` //横桥向绝对最大值
|
|||
YMax float64 `json:"YMax"` //纵桥向绝对最大值
|
|||
ZMax float64 `json:"ZMax"` //竖向绝对最大值
|
|||
XRms float64 `json:"XRms"` //横桥向均方根值
|
|||
YRms float64 `json:"YRms"` //纵桥向均方根值
|
|||
ZRms float64 `json:"ZRms"` //竖向均方根值
|
|||
} |
|||
|
|||
// A42DisplacementBody 位移(支座位移、梁端纵向位移)
|
|||
type A42DisplacementBody struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` |
|||
Rms float64 `json:"Rms"` |
|||
AbsDiff float64 `json:"AbsDiff"` //绝对值累积量
|
|||
} |
|||
|
|||
// A43AngleBody 梁端转角
|
|||
type A43AngleBody struct { |
|||
CommonBody |
|||
XAvg float64 `json:"XAvg"` |
|||
XMax float64 `json:"XMax"` |
|||
XRms float64 `json:"XRms"` |
|||
YAvg float64 `json:"YAvg"` |
|||
YMax float64 `json:"YMax"` |
|||
YRms float64 `json:"YRms"` |
|||
} |
|||
|
|||
// A44Strain 应变
|
|||
type A44Strain struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` |
|||
} |
|||
|
|||
// A45CableForce 索力
|
|||
type A45CableForce struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` |
|||
Min float64 `json:"Min"` |
|||
Rms float64 `json:"Rms"` //均方根值
|
|||
} |
|||
|
|||
// A48Acc 振动(主梁、索塔、拱圈) 10分钟一次
|
|||
type A48Acc struct { |
|||
CommonBody |
|||
Max float64 `json:"Max"` //绝对最大值
|
|||
Rms float64 `json:"Rms"` //均方根值
|
|||
} |
|||
|
|||
// A50DisplacementBody 位移(支座位移、梁端纵向位移)
|
|||
type A50DisplacementBody struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` //绝对最大值
|
|||
Rms float64 `json:"Rms"` //均方根值
|
|||
} |
|||
|
|||
// A51Crack 裂缝
|
|||
type A51Crack struct { |
|||
CommonBody |
|||
Avg float64 `json:"Avg"` |
|||
Max float64 `json:"Max"` |
|||
} |
|||
|
|||
type A52Corrosion struct { |
|||
CommonBody |
|||
ChlorineMax float64 `json:"ChlorineMax"` //氯离子浓度最大值
|
|||
ChlorineAvg float64 `json:"ChlorineAvg"` //氯离子浓度平均值
|
|||
ChlorineMin float64 `json:"ChlorineMin"` //氯离子浓度最小值
|
|||
CorrosionMax float64 `json:"CorrosionMax"` //侵蚀深度最大值
|
|||
CorrosionAvg float64 `json:"CorrosionAvg"` //侵蚀深度平均值
|
|||
CorrosionMin float64 `json:"CorrosionMin"` //侵蚀深度最小值
|
|||
} |
@ -0,0 +1,92 @@ |
|||
package utils |
|||
|
|||
// 安心云es 主题数据,聚集查询
|
|||
func GetEsAggSubSqlByAxyFactorId(factorId int) string { |
|||
//桥墩倾斜 15 裂缝 18 支座位移20 桥面振动28 加速度三项监测592(承德隧道专用)
|
|||
subAggSQl := "" |
|||
switch factorId { |
|||
case 4: //结构温度
|
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.temperature" |
|||
} |
|||
} |
|||
}` |
|||
case 6: // 索力
|
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.cableForce" |
|||
} |
|||
} |
|||
}` |
|||
case 11: //应变
|
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.strain" |
|||
} |
|||
} |
|||
}` |
|||
case 15: |
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.x" |
|||
} |
|||
}, |
|||
"y": { |
|||
"extended_stats": { |
|||
"field": "data.y" |
|||
} |
|||
} |
|||
}` |
|||
case 18: |
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.crack" |
|||
} |
|||
} |
|||
}` |
|||
case 20: |
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.displacement" |
|||
} |
|||
} |
|||
}` |
|||
case 28: |
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.pv" |
|||
} |
|||
}, |
|||
"y": { |
|||
"extended_stats": { |
|||
"field": "data.trms" |
|||
} |
|||
} |
|||
}` |
|||
case 592: |
|||
subAggSQl = ` |
|||
{ |
|||
"x": { |
|||
"extended_stats": { |
|||
"field": "data.z_acc_speed" |
|||
} |
|||
} |
|||
}` |
|||
} |
|||
return subAggSQl |
|||
} |
Loading…
Reference in new issue