|
@@ -381,7 +381,7 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
|
|
|
saleData = *pdata
|
|
|
for _, v := range *pdata {
|
|
|
resign := common.IntAll(v["resign"])
|
|
|
- if seatNumber == common.ObjToString(v["seat_number"]) {
|
|
|
+ if positionId == common.Int64All(v["position_id"]) {
|
|
|
if resign == 1 { //离职分配,找到的销售离职了,分给组员,没离职就给他
|
|
|
sdata := TiDb.SelectBySql(`SELECT b.name,b.position_id,b.seat_number from dwd_d_crm_department_level_succbi a INNER JOIN dwd_f_crm_personnel_management b on a.position_id = b.position_id where a.bi_pcode = (SELECT bi_pcode from dwd_d_crm_department_level_succbi where position_id = ?) and b.role_id = 3`, positionId)
|
|
|
if sdata != nil && len(*sdata) > 0 {
|