|
@@ -30,9 +30,10 @@ var (
|
|
|
FieldsDetail = `"purchasing","projectname.pname"`
|
|
|
Fields = `"projectname.pname"`
|
|
|
BWCount = Top1000
|
|
|
+ BWDCount = BWDistribution
|
|
|
)
|
|
|
|
|
|
-func MAInit(limit, timeOut, projectNumLimit, keyWordsCount, pCount, minKCount, maxPCount, bwc int, ptIndex, ptType string, fields []string) {
|
|
|
+func MAInit(limit, timeOut, projectNumLimit, keyWordsCount, pCount, minKCount, maxPCount, bwc, bwdc int, ptIndex, ptType string, fields []string) {
|
|
|
if limit == 0 {
|
|
|
limit = 5
|
|
|
}
|
|
@@ -77,6 +78,9 @@ func MAInit(limit, timeOut, projectNumLimit, keyWordsCount, pCount, minKCount, m
|
|
|
if bwc > 0 {
|
|
|
BWCount = bwc
|
|
|
}
|
|
|
+ if bwdc > 0 {
|
|
|
+ BWDCount = bwdc
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// AnalysisRequestParam 接口原请求参数
|
|
@@ -1466,7 +1470,8 @@ func (a *AnalysisEntity) BuyerWinnerAnalysis() map[string]interface{} {
|
|
|
bc = fmt.Sprintf(buyerCount, BWCount, Top30)
|
|
|
bs = fmt.Sprintf(buyerSortprice, BWCount, Top30)
|
|
|
}
|
|
|
- datas = append(datas, buyerProcurementScale, bc, bs)
|
|
|
+ bps := fmt.Sprintf(buyerProcurementScale, BWDCount)
|
|
|
+ datas = append(datas, bps, bc, bs)
|
|
|
//中标单位-规模分布
|
|
|
//winner_scalefmt := fmt.Sprintf(winner_procurement_scale, sortprice_str)
|
|
|
|
|
@@ -1477,7 +1482,8 @@ func (a *AnalysisEntity) BuyerWinnerAnalysis() map[string]interface{} {
|
|
|
wc = fmt.Sprintf(winnerCount, BWCount, Top30)
|
|
|
ws = fmt.Sprintf(winnerSortprice, BWCount, Top30)
|
|
|
}
|
|
|
- datas = append(datas, winnerProcurementScale, wc, ws)
|
|
|
+ wps := fmt.Sprintf(winnerProcurementScale, BWDCount)
|
|
|
+ datas = append(datas, wps, wc, ws)
|
|
|
finalSql := fmt.Sprintf(a.GetCommonQuerySqlWithAggs(), strings.Join(datas, ","))
|
|
|
log.Printf("final PurchasingAnalysiseQuery sql: %s", finalSql)
|
|
|
t := time.Now()
|