|
@@ -97,7 +97,7 @@ func (t *OwnerService) OwnerlList() map[string]interface{} {
|
|
|
//处理状态初始化
|
|
|
ProcessingStatusInit(t.PositionId, dataMap, t.ProcessingStatus)
|
|
|
//监控状态处理
|
|
|
- MonitorStatusInit(t.PositionId, dataMap, t.SourceType)
|
|
|
+ //MonitorStatusInit(t.PositionId, dataMap, t.SourceType)
|
|
|
//项目数量查询
|
|
|
buyerArr := []string{}
|
|
|
for _, value := range *dataMap {
|
|
@@ -115,7 +115,7 @@ func (t *OwnerService) OwnerlList() map[string]interface{} {
|
|
|
a8 := time.Now().Unix()
|
|
|
fmt.Println("状态用时", a8-a7)
|
|
|
//监控状态处理
|
|
|
- MonitorStatusInit(t.PositionId, dataMap, t.SourceType)
|
|
|
+ /*MonitorStatusInit(t.PositionId, dataMap, t.SourceType)*/
|
|
|
a9 := time.Now().Unix()
|
|
|
fmt.Println("监控用时", a9-a8)
|
|
|
}
|
|
@@ -549,11 +549,11 @@ func BuyerProjectMerge(dataMap, projectMap *map[string]map[string]interface{}, s
|
|
|
if count >= 2 {
|
|
|
highSuccessNumber++
|
|
|
}
|
|
|
- if sourceType == "1" {
|
|
|
+ /*if sourceType == "1" {
|
|
|
if count < 2 {
|
|
|
continue
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
returnData = append(returnData, BuyerProject{
|
|
|
BuyerId: buyerId,
|
|
|
BuyerName: buyerName,
|
|
@@ -571,11 +571,11 @@ func BuyerProjectMerge(dataMap, projectMap *map[string]map[string]interface{}, s
|
|
|
CId: gconv.String(buyerMap["cId"]),
|
|
|
})
|
|
|
} else {
|
|
|
- if sourceType == "1" {
|
|
|
+ /*if sourceType == "1" {
|
|
|
if count < 2 {
|
|
|
continue
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
returnData = append(returnData, BuyerProject{
|
|
|
BuyerId: buyerId,
|
|
|
BuyerName: buyerName,
|
|
@@ -619,16 +619,16 @@ func MonitorStatusInit(positionId int64, dataMap *map[string]map[string]interfac
|
|
|
v["isMonitor"] = true
|
|
|
(*newMap)[k] = v
|
|
|
} else {
|
|
|
- if sourceType != "2" {
|
|
|
+ /*if sourceType != "2" {
|
|
|
v["isMonitor"] = false
|
|
|
(*newMap)[k] = v
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
- if sourceType == "2" {
|
|
|
+ /*if sourceType == "2" {
|
|
|
*dataMap = *newMap
|
|
|
return
|
|
|
- }
|
|
|
+ }*/
|
|
|
if newMap != nil {
|
|
|
*dataMap = *newMap
|
|
|
}
|
|
@@ -794,10 +794,10 @@ func ProjectHandle(buyerArr []string, entAccountId int64, entName, area, project
|
|
|
|
|
|
}
|
|
|
if entName != "" {
|
|
|
- sql = `{"query":{"bool":{"must":[{"multi_match":{"query":"%s","type":"phrase","fields":["buyer.mbuyer"]}}%s%s]}},"aggs":{"buyer_count":{"terms":{"field":"buyer","size":500,"order":{"zbtime_count":"desc"}},"aggs":{"area_count":{"terms":{"field":"area"}},"buyer_id":{"terms":{"field":"buyer_id"}},"money_count":{"sum":{"field":"project_money"}},"zbtime_count":{"max":{"field":"zbtime"}}}}},"size":0}`
|
|
|
+ sql = `{"query":{"bool":{"must_not":[{"term":{"project_bidstatus":1}}],"must":[{"multi_match":{"query":"%s","type":"phrase","fields":["buyer.mbuyer"]}}%s%s]}},"aggs":{"buyer_count":{"terms":{"field":"buyer","size":500,"order":{"zbtime_count":"desc"}},"aggs":{"area_count":{"terms":{"field":"area"}},"buyer_id":{"terms":{"field":"buyer_id"}},"money_count":{"sum":{"field":"project_money"}},"zbtime_count":{"max":{"field":"zbtime"}}}}},"size":0}`
|
|
|
sqlStr = fmt.Sprintf(sql, entName, common.If(area != "", fmt.Sprintf(`,{"term":{"area":"%s"}}`, area), ""), common.If(projectType == "1", propertyFormStr, ""))
|
|
|
} else {
|
|
|
- sql = `{"query":{"bool":{"must":[{"terms":{"buyer":[%s]}}%s%s]}},"aggs":{"buyer_count":{"terms":{"field":"buyer","size":500,"order":{"zbtime_count":"desc"}},"aggs":{"area_count":{"terms":{"field":"area"}},"buyer_id":{"terms":{"field":"buyer_id"}},"money_count":{"sum":{"field":"project_money"}},"zbtime_count":{"max":{"field":"zbtime"}}}}},"size":0}`
|
|
|
+ sql = `{"query":{"bool":{"must_not":[{"term":{"project_bidstatus":1}}],"must":[{"terms":{"buyer":[%s]}}%s%s]}},"aggs":{"buyer_count":{"terms":{"field":"buyer","size":500,"order":{"zbtime_count":"desc"}},"aggs":{"area_count":{"terms":{"field":"area"}},"buyer_id":{"terms":{"field":"buyer_id"}},"money_count":{"sum":{"field":"project_money"}},"zbtime_count":{"max":{"field":"zbtime"}}}}},"size":0}`
|
|
|
sqlStr = fmt.Sprintf(sql, strings.Join(buyerArr, ","), common.If(area != "", fmt.Sprintf(`,{"term":{"area":"%s"}}`, area), ""), common.If(projectType == "1", propertyFormStr, ""))
|
|
|
}
|
|
|
startTime := time.Now().Unix()
|