You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
800 B
35 lines
800 B
package adaptors
|
|
|
|
import (
|
|
"encoding/json"
|
|
"goInOut/models"
|
|
"strings"
|
|
)
|
|
|
|
// Adaptor_AXYES_HBGL 统一采集软件数据 转换 湘潭健康监测平台
|
|
type Adaptor_AXYES_HBGL struct {
|
|
//传感器code转换信息
|
|
GnssMap map[string]string
|
|
RainMap map[string]string
|
|
NBWYMap map[string]string
|
|
DXSWMap map[string]string
|
|
//一些必要信息
|
|
Info map[string]string
|
|
}
|
|
|
|
func (the Adaptor_AXYES_HBGL) Transform(rawMsg string) []NeedPush {
|
|
esAggDateHistogram := models.EsThemeAggDateHistogram{}
|
|
var needPush []NeedPush
|
|
err := json.Unmarshal([]byte(rawMsg), &esAggDateHistogram)
|
|
if err != nil {
|
|
return nil
|
|
}
|
|
return needPush
|
|
}
|
|
|
|
func (the Adaptor_AXYES_HBGL) EsAggTopToHBKS(esAggTop models.EsAggTop) (result []byte) {
|
|
|
|
fileContent := strings.Builder{}
|
|
|
|
return []byte(fileContent.String())
|
|
}
|
|
|