Ver código fonte

Merge branch 'dev2.8' of http://192.168.3.207:8080/jianyu/ent into dev2.8

luwenna 3 anos atrás
pai
commit
a8ef2bfe02

+ 7 - 7
entniche/src/service/customer/customer.go

@@ -1066,8 +1066,8 @@ func GetAggs(index, itype, query string) (aggs elastic1.Aggregations, res []map[
 
 //潜在客户 获取省份和城市
 func GetEntPC(entName []string) []map[string]interface{} {
-	query := fmt.Sprintf(pcquery, "buyer_name", `"`+strings.Join(entName, `","`)+`"`)
-	list := *elastic.Get("buyer", "buyer", query)
+	query := fmt.Sprintf(pcquery, "company_name", `"`+strings.Join(entName, `","`)+`"`)
+	list := *elastic.Get("qyxy", "qyxy", query)
 	return list
 }
 
@@ -1100,17 +1100,17 @@ func analysisDataByBuyer(res []Bucket) []*PTComs {
 				for _, v := range pcData {
 					province := ""
 					city := ""
-					if v["province"] != nil {
-						province = qutil.ObjToString(v["province"])
+					if v["company_area"] != nil {
+						province = qutil.ObjToString(v["company_area"])
 					}
 					//排除全国
 					if strings.Contains(province, "全国") {
 						continue
 					}
-					if v["city"] != nil {
-						city = qutil.ObjToString(v["city"])
+					if v["company_city"] != nil {
+						city = qutil.ObjToString(v["company_city"])
 					}
-					EnterPOC[v["name"].(string)] = PCInfo{
+					EnterPOC[v["company_name"].(string)] = PCInfo{
 						Province: province,
 						City:     city,
 					}

+ 1 - 1
entniche/src/service/reportform/departmentBoard.go

@@ -550,7 +550,7 @@ func (b *Board) MultiTrackCustomer() {
 		endTime = parse2.Format("2006-01-02") + " 23:59:59"
 	}
 	res := util.Mysql.SelectBySql("SELECT DISTINCT b.id,b.name,b.industry,b.area,b.address FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = ? ) AND a.time >= ? AND a.time <= ? LIMIT "+fmt.Sprint(page)+","+fmt.Sprint(pageSize), departId, startTime, endTime)
-	count := util.Mysql.CountBySql("SELECT count( DISTINCT b.id) as count FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = 3388 ) AND a.time >= ? AND a.time <= ?  ORDER BY time DESC ", departId, startTime, endTime)
+	count := util.Mysql.CountBySql("SELECT count( DISTINCT b.id) as count FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = ? ) AND a.time >= ? AND a.time <= ?  ORDER BY time DESC ", departId, startTime, endTime)
 	b.ServeJson(Result{Error_code: 1, Error_msg: "查询成功", Data: map[string]interface{}{"list": res, "count": count}})
 }