|
@@ -3,6 +3,10 @@ package common
|
|
|
const (
|
|
|
//客户分布
|
|
|
aggs_buyerclass = `"buyerclass_scale":{"terms":{"field":"buyerclass","exclude":["其它",""]},"aggs":{"buyerclass_amount":{"sum":{"field":"sortprice"}},"buyerclass_total":{"filter":{}}}}`
|
|
|
+ //超前项目数量
|
|
|
+ projectsNumber = `"projects_number":{"terms":{"field":"subtype"}}`
|
|
|
+ projectsSort = `,"sort": [{"publishtime":"desc"}]`
|
|
|
+
|
|
|
//采购单位分布
|
|
|
buyer_procurement_scale = `"project_amount":{"sum":{"field":"sortprice"}},"buyer_amount_distribution": {"terms": {"field": "buyer","size": 0},"aggs": {"amount": {"sum": {"field": "sortprice"}}}}`
|
|
|
//中标单位分布
|
|
@@ -12,8 +16,19 @@ const (
|
|
|
query_bool_must_and = `{"bool": {"must": [%s]%s}}`
|
|
|
PSearch_DecMust = `"bidstatus": ["中标","成交","合同","单一"]`
|
|
|
query_bool_must = `{"terms": {%s}}`
|
|
|
+
|
|
|
+ bidTime = `{"":{"publishtime":{"gt":%d}}}`
|
|
|
)
|
|
|
|
|
|
+type SuperProjects struct {
|
|
|
+ ProjectsNumber struct {
|
|
|
+ Buckets []struct {
|
|
|
+ Key string `json:"key"`
|
|
|
+ DocCount int `json:"doc_count"`
|
|
|
+ } `json:"buckets"`
|
|
|
+ } `json:"projects_number"`
|
|
|
+}
|
|
|
+
|
|
|
type Aggregation struct {
|
|
|
WinnerAmountDistribution struct {
|
|
|
DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"`
|
|
@@ -64,15 +79,18 @@ type MarketAnalysisEntity struct {
|
|
|
//BaseParam AnalysisRequestParam
|
|
|
FormatParam AnalysisRequestFormat
|
|
|
//UId, Pid string
|
|
|
+ Types int //1 f分析报告 2超前项目
|
|
|
+ Size int
|
|
|
}
|
|
|
|
|
|
// AnalysisRequestFormat 格式化后参数
|
|
|
type AnalysisRequestFormat struct {
|
|
|
KeysItems []keyWordGroup
|
|
|
//Area, City []string //省份城市
|
|
|
- //STime, ETime int64 //开始结束时间
|
|
|
+ STime, ETime int64 //开始结束时间
|
|
|
//Industry []string //行业
|
|
|
//BuyerClass []string //采购单位类型
|
|
|
+ SubType []string //采购单位类型
|
|
|
}
|
|
|
|
|
|
// keyWordGroup 订阅词结构体
|