|
|
@ -27,8 +27,14 @@ func (the Adaptor_AXYES_HBGL) Transform(structId int64, factorId int, rawMsg str |
|
|
|
if err != nil { |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
Payload := the.EsAggTopToHBJCAS(structId, factorId, esAggDateHistogram) |
|
|
|
if len(Payload) == 0 { |
|
|
|
return needPush |
|
|
|
} |
|
|
|
|
|
|
|
needPush = append(needPush, NeedPush{ |
|
|
|
Payload: the.EsAggTopToHBJCAS(structId, factorId, esAggDateHistogram), |
|
|
|
Payload: Payload, |
|
|
|
}) |
|
|
|
return needPush |
|
|
|
} |
|
|
@ -64,10 +70,8 @@ func (the Adaptor_AXYES_HBGL) EsAggTopToHBJCAS(structId int64, factorId int, esA |
|
|
|
UniqueCode: strconv.FormatInt(uniqueCode, 10), //乃积沟大桥
|
|
|
|
DataBody: the.EsAgg2StatisticData(factorId, monitorCode, dateBucket), |
|
|
|
} |
|
|
|
|
|
|
|
complexData.SensorData = append(complexData.SensorData, dataDefinition) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
result, _ = proto.Marshal(complexData) |
|
|
|