|
@@ -8,48 +8,55 @@ const (
|
|
//中标单位分布
|
|
//中标单位分布
|
|
winner_procurement_scale = `"winner_amount_distribution": {"terms": {"field": "entidlist","size": 0},"aggs": {"amount": {"sum": {"field": "sortprice"}}}}`
|
|
winner_procurement_scale = `"winner_amount_distribution": {"terms": {"field": "entidlist","size": 0},"aggs": {"amount": {"sum": {"field": "sortprice"}}}}`
|
|
|
|
|
|
|
|
+ localMultiMatch = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["purchasing","pname"]}}`
|
|
|
|
+ query_bool_must_and = `{"bool": {"must": [%s]%s}}`
|
|
PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
|
|
PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
|
|
query_bool_must = `{"terms": {%s}}`
|
|
query_bool_must = `{"terms": {%s}}`
|
|
- query_bool_must_and = `{"bool": {"must": [%s]%s}}`
|
|
|
|
- localMultiMatch = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["purchasing","pname"]}}`
|
|
|
|
)
|
|
)
|
|
|
|
|
|
type Aggregation struct {
|
|
type Aggregation struct {
|
|
- ProjectAmount struct {
|
|
|
|
- Value float64 `json:"value"`
|
|
|
|
- } `json:"project_amount"`
|
|
|
|
- BuyerAmountDistribution struct {
|
|
|
|
- Buckets []struct {
|
|
|
|
|
|
+ WinnerAmountDistribution struct {
|
|
|
|
+ DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
|
|
|
|
+ SumOtherDocCount int `json:"sum_other_doc_count"`
|
|
|
|
+ Buckets []struct {
|
|
Key string `json:"key"`
|
|
Key string `json:"key"`
|
|
DocCount int `json:"doc_count"`
|
|
DocCount int `json:"doc_count"`
|
|
Amount struct {
|
|
Amount struct {
|
|
Value float64 `json:"value"`
|
|
Value float64 `json:"value"`
|
|
} `json:"amount"`
|
|
} `json:"amount"`
|
|
} `json:"buckets"`
|
|
} `json:"buckets"`
|
|
- } `json:"buyer_amount_distribution"`
|
|
|
|
-
|
|
|
|
- WinnerAmountDistribution struct {
|
|
|
|
- Buckets []struct {
|
|
|
|
|
|
+ } `json:"winner_amount_distribution"`
|
|
|
|
+ ProjectCount struct {
|
|
|
|
+ DocCount int `json:"doc_count"`
|
|
|
|
+ } `json:"project_count"`
|
|
|
|
+ ProjectAmount struct {
|
|
|
|
+ Value float64 `json:"value"`
|
|
|
|
+ } `json:"project_amount"`
|
|
|
|
+ ProjectCountNot0 struct {
|
|
|
|
+ DocCount int `json:"doc_count"`
|
|
|
|
+ } `json:"project_count_not0"`
|
|
|
|
+ BuyerclassScale struct {
|
|
|
|
+ DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
|
|
|
|
+ SumOtherDocCount int `json:"sum_other_doc_count"`
|
|
|
|
+ Buckets []struct {
|
|
|
|
+ Area string `json:"key"`
|
|
|
|
+ AreaTotal int `json:"doc_count"`
|
|
|
|
+ BuyclassAmount struct {
|
|
|
|
+ Value int `json:"doc_count"`
|
|
|
|
+ } `json:"buyerclass_total"`
|
|
|
|
+ } `json:"buckets"`
|
|
|
|
+ } `json:"buyerclass_scale"`
|
|
|
|
+ BuyerAmountDistribution struct {
|
|
|
|
+ DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
|
|
|
|
+ SumOtherDocCount int `json:"sum_other_doc_count"`
|
|
|
|
+ Buckets []struct {
|
|
Key string `json:"key"`
|
|
Key string `json:"key"`
|
|
DocCount int `json:"doc_count"`
|
|
DocCount int `json:"doc_count"`
|
|
Amount struct {
|
|
Amount struct {
|
|
Value float64 `json:"value"`
|
|
Value float64 `json:"value"`
|
|
} `json:"amount"`
|
|
} `json:"amount"`
|
|
} `json:"buckets"`
|
|
} `json:"buckets"`
|
|
- } `json:"winner_amount_distribution"`
|
|
|
|
-
|
|
|
|
- BuyerclassScale struct {
|
|
|
|
- Buckets []struct {
|
|
|
|
- Area string `json:"key"`
|
|
|
|
- AreaTotal int64 `json:"doc_count"`
|
|
|
|
- AreaAmount struct {
|
|
|
|
- Value float64 `json:"value"`
|
|
|
|
- } `json:"area_amount"`
|
|
|
|
- BuyclassAmount struct {
|
|
|
|
- Value float64 `json:"value"`
|
|
|
|
- } `json:"buyerclass_amount"`
|
|
|
|
- }
|
|
|
|
- } `json:"buyerclass_scale"`
|
|
|
|
|
|
+ } `json:"buyer_amount_distribution"`
|
|
}
|
|
}
|
|
|
|
|
|
type MarketAnalysisEntity struct {
|
|
type MarketAnalysisEntity struct {
|