|
@@ -117,6 +117,7 @@ func WorkDataHandle(company, phone, demand, name, product string, acceptanceData
|
|
|
"operator_id": -1,
|
|
|
})
|
|
|
} else {
|
|
|
+ log.Println("工单分配程序:", positionId)
|
|
|
if positionId == 0 {
|
|
|
//线索变更
|
|
|
ok, data, saleData = FindPosition(0, "", gconv.String(acceptanceData["creator_time"]))
|
|
@@ -124,6 +125,7 @@ func WorkDataHandle(company, phone, demand, name, product string, acceptanceData
|
|
|
log.Println(positionId, "用户查询失败")
|
|
|
return false
|
|
|
}
|
|
|
+ log.Println("按照比例抽取人数:", gconv.Int64(data["position_id"]), gconv.String(data["name"]))
|
|
|
WorkUpdateClue(*uCount, saleData, "", "", uId, "5", "169", "新增线索", "主动咨询客服留资客户", cluename, name, gconv.String(data["name"]), phone, "", "", "", "", "", "", gconv.String(data["seat_number"]), "", gconv.Int64(data["position_id"]), "", "", "", []string{}, "", isGroup, isCommerce, true, demand)
|
|
|
} else {
|
|
|
ok, data, saleData = FindPosition(positionId, trailstatus, gconv.String(acceptanceData["creator_time"]))
|
|
@@ -322,7 +324,7 @@ func FindNumber(moudle string) string {
|
|
|
|
|
|
// 人员查询
|
|
|
func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int64, administrators1, administrators3 map[string]interface{}, creatorTime string) map[string]interface{} {
|
|
|
- log.Println("分配比例查询", proportion1, proportion3, deptCount1, deptCount3)
|
|
|
+
|
|
|
if deptCount1 == 0 {
|
|
|
return administrators1
|
|
|
}
|
|
@@ -330,6 +332,7 @@ func GetAllocation(proportion1, proportion3 float64, deptCount1, deptCount3 int6
|
|
|
return administrators3
|
|
|
}
|
|
|
nowAllocationRatio := math.Round(gconv.Float64(deptCount1 / deptCount3))
|
|
|
+ log.Println("分配比例查询", proportion1, proportion3, deptCount1, deptCount3, nowAllocationRatio, cfg.AllocationRatio)
|
|
|
if cfg.AllocationRatio == 0 {
|
|
|
//重新计算
|
|
|
cfg.AllocationRatio = math.Round(proportion1 / proportion3)
|