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.
82 lines
2.3 KiB
82 lines
2.3 KiB
2 weeks ago
|
package models
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
const (
|
||
|
// AXY_FactorType_YL 雨量监测
|
||
|
AXY_FactorType_Rain = 3
|
||
|
|
||
|
// AXY_FactorType_Rain_New 雨量新
|
||
|
AXY_FactorType_Rain_New = 422
|
||
|
|
||
|
// AXY_FactorType_BMWY 表面斜监测(GNSS)
|
||
|
AXY_FactorType_BMWY = 13
|
||
|
|
||
|
// AXY_FactorType_NBWY 深部水平位移(双轴倾角转位移)
|
||
|
AXY_FactorType_SBSPWY = 116
|
||
|
|
||
|
// AXY_FactorType_DXSW 地下水位 (m) (马冲20240515确认 不传地下水位和裂缝)
|
||
|
AXY_FactorType_DXSW = 546
|
||
|
|
||
|
//大斜阳
|
||
|
AXY_StructId_DXY = "4570"
|
||
|
//太平堡
|
||
|
AXY_StructId_TPB = "4571"
|
||
|
//唐山冀东
|
||
|
AXY_StructId_TSJD = "3676"
|
||
|
)
|
||
|
|
||
|
type EsAggTop struct {
|
||
|
Took int `json:"took"`
|
||
|
TimedOut bool `json:"timed_out"`
|
||
|
Shards struct {
|
||
|
Total int `json:"total"`
|
||
|
Successful int `json:"successful"`
|
||
|
Skipped int `json:"skipped"`
|
||
|
Failed int `json:"failed"`
|
||
|
} `json:"_shards"`
|
||
|
Hits struct {
|
||
|
Total int `json:"total"`
|
||
|
MaxScore float64 `json:"max_score"`
|
||
|
} `json:"hits"`
|
||
|
Aggregations struct {
|
||
|
SensorId struct {
|
||
|
DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
|
||
|
SumOtherDocCount int `json:"sum_other_doc_count"`
|
||
|
Buckets []Bucket `json:"buckets"`
|
||
|
} `json:"gpBySensorId"`
|
||
|
} `json:"aggregations"`
|
||
|
}
|
||
|
|
||
|
type Bucket struct {
|
||
|
Key int `json:"key"`
|
||
|
DocCount int `json:"doc_count"`
|
||
|
Last struct {
|
||
|
Hits struct {
|
||
|
Total int `json:"total"`
|
||
|
Hits []struct {
|
||
|
Index string `json:"_index"`
|
||
|
Type string `json:"_type"`
|
||
|
Id string `json:"_id"`
|
||
|
Score interface{} `json:"_score"`
|
||
|
Source Source `json:"_source"`
|
||
|
Sort []int64 `json:"sort"`
|
||
|
} `json:"hits"`
|
||
|
} `json:"hits"`
|
||
|
} `json:"last"`
|
||
|
}
|
||
|
|
||
|
type Source struct {
|
||
|
SensorName string `json:"sensor_name"`
|
||
|
FactorName string `json:"factor_name"`
|
||
|
FactorProtoCode string `json:"factor_proto_code"`
|
||
|
Data map[string]float64 `json:"data"`
|
||
|
FactorProtoName string `json:"factor_proto_name"`
|
||
|
Factor int `json:"factor"`
|
||
|
CollectTime time.Time `json:"collect_time"`
|
||
|
Sensor int `json:"sensor"`
|
||
|
Structure int `json:"structure"`
|
||
|
IotaDevice []string `json:"iota_device"`
|
||
|
CreateTime time.Time `json:"create_time"`
|
||
|
}
|