|
@@ -117,6 +117,8 @@ func FormatData(data map[string]interface{}, item string) (bool, bool, bool) {
|
|
|
belong_to = common.ObjToString((*userInfo)["belong_to"])
|
|
|
}
|
|
|
} else if item == "saleLeads" { //留资
|
|
|
+ //线索名称打印
|
|
|
+ log.Println(1111, common.ObjToString(data["company"]))
|
|
|
userId = common.ObjToString(data["userid"])
|
|
|
if !mongodb.IsObjectIdHex(userId) {
|
|
|
positionId = userId
|
|
@@ -217,9 +219,11 @@ func FormatData(data map[string]interface{}, item string) (bool, bool, bool) {
|
|
|
phone = common.ObjToString(data["phone"])
|
|
|
sourceId = common.Int64All(data["sourceId"])
|
|
|
}
|
|
|
+ log.Println(222, cluename)
|
|
|
if cluename == "" && item != "message" && item != "orders" && item != "readClue" && item != "rebind" && item != "allocation" {
|
|
|
cluename = phone //没有线索名,手机号代替
|
|
|
}
|
|
|
+ log.Println(333, cluename)
|
|
|
cluename = strings.ReplaceAll(cluename, " ", "")
|
|
|
isGroup, isCommerce := GetCompanyType(cluename) //判断是否集团公司、工商库
|
|
|
if source == "0104" || strings.HasPrefix(belong_to, "02") || source == "0102" || source == "0103" || phone == "" { //参照用户来源代码表
|
|
@@ -280,6 +284,7 @@ func FormatData(data map[string]interface{}, item string) (bool, bool, bool) {
|
|
|
log.Println("线索分配失败,线索过滤top_cluetype!!", item, uId, phone, userId)
|
|
|
return true, true, true
|
|
|
}
|
|
|
+ log.Println("人员选择", level, cluename, phone, isGroup, isCommerce)
|
|
|
position_id, seatNumber, saleName, saleData, pIsOk, isFreeze, noticePositionId := autoDraw(level, cluename, phone, isGroup, isCommerce) //查询当前分配次数最少的,如果当前线索有销售,此次找出的不会+1
|
|
|
log.Println("data -------", position_id, seatNumber, saleName, pIsOk, isFreeze, noticePositionId)
|
|
|
if position_id > 0 && seatNumber != "" {
|