|
|
@ -35,7 +35,7 @@ func (the Adaptor_ZWYES_ZJHL) Transform(structId int64, factorId int, rawMsg str |
|
|
|
} |
|
|
|
|
|
|
|
Payload := the.EsAggTopToHBJCAS(structId, factorId, esAggDateHistogram) |
|
|
|
if len(Payload) >= 0 { |
|
|
|
if len(Payload) == 0 { |
|
|
|
return needPush |
|
|
|
} |
|
|
|
|
|
|
@ -72,7 +72,7 @@ func (the Adaptor_ZWYES_ZJHL) EsAggTopToHBJCAS(structId int64, factorId int, esA |
|
|
|
} |
|
|
|
monitorCode := the.getPointCodeFromLabel(station.Labels) |
|
|
|
if monitorCode == 0 { |
|
|
|
log.Printf("redis 获取[s:%d,f:%d]测点[%d]标签[%s],信息转换int64异常,跳过", structId, factorId, sensorId, station.Labels) |
|
|
|
log.Printf("redis 获取[s:%d,f:%d]测点[%d],标签信息[%s]转换int64异常,跳过", structId, factorId, sensorId, station.Labels) |
|
|
|
continue |
|
|
|
} |
|
|
|
|
|
|
@ -169,7 +169,7 @@ func (the Adaptor_ZWYES_ZJHL) EsAgg2StatisticData(factorId int, monitorCode int6 |
|
|
|
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl_v3.StatisticData_Hsd{Hsd: &protoFiles_zjhl_v3.HSDStatistic{ |
|
|
|
TrafficFlow: int32(dateBucket.X.Count), |
|
|
|
MaxTotalLoad: int32(maxAbsoluteValueX), |
|
|
|
//MaxAxleLoad: 0, //目前无法支持统计 字符串类型,先不上传
|
|
|
|
MaxAxleLoad: 0, //目前无法支持统计 字符串类型, 和李晓敏确认 按0上报
|
|
|
|
OverLoadCount: int32(dateBucket.Y.Sum), |
|
|
|
AvgLoad: float32(avgValueX), |
|
|
|
}} |
|
|
@ -212,6 +212,17 @@ func (the Adaptor_ZWYES_ZJHL) EsAgg2StatisticData(factorId int, monitorCode int6 |
|
|
|
MaxAbsoluteValue: float32(maxAbsoluteValueX), |
|
|
|
RootMeanSquare: float32(rootMeanSquareY), |
|
|
|
}} |
|
|
|
case 883: //湿度 ->最终拼接为 温湿度
|
|
|
|
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl_v3.StatisticData_Rhs{Rhs: &protoFiles_zjhl_v3.RHSStatistic{ |
|
|
|
//MaxTemperature: float32(dateBucket.X.Max),
|
|
|
|
//MinTemperature: float32(dateBucket.X.Min),
|
|
|
|
//AvgTemperature: float32(avgValueX),
|
|
|
|
//MaxTemperatureDifference: float32(dateBucket.X.Max - dateBucket.X.Min),
|
|
|
|
MaxHumidity: float32(dateBucket.X.Max), |
|
|
|
MinHumidity: float32(dateBucket.X.Min), |
|
|
|
AvgHumidity: float32(avgValueX), |
|
|
|
HumidityExceedDuration: 0, |
|
|
|
}} |
|
|
|
case 935: //gnss
|
|
|
|
dataDefinitionStatisticData.StatisticData.DataBody = &protoFiles_zjhl_v3.StatisticData_Gnss{Gnss: &protoFiles_zjhl_v3.GNSSStatistic{ |
|
|
|
// 统计时间范围内的空间变形X绝对最大值
|
|
|
|