|
@@ -1080,32 +1080,33 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
|
|
upperLimitCount := 0
|
|
upperLimitCount := 0
|
|
isFull := false
|
|
isFull := false
|
|
for _, m := range *cdata {
|
|
for _, m := range *cdata {
|
|
- positionid := gconv.Int64(m["position_id"])
|
|
|
|
|
|
+ positionid1 := gconv.Int64(m["position_id"])
|
|
for _, v := range *pdata {
|
|
for _, v := range *pdata {
|
|
resign := common.IntAll(v["resign"])
|
|
resign := common.IntAll(v["resign"])
|
|
assign_type := common.IntAll(v["assign_type"])
|
|
assign_type := common.IntAll(v["assign_type"])
|
|
role_id := common.IntAll(v["role_id"])
|
|
role_id := common.IntAll(v["role_id"])
|
|
- if positionid == common.Int64All(v["position_id"]) {
|
|
|
|
|
|
+ if positionid1 == common.Int64All(v["position_id"]) {
|
|
if resign == 0 && (assign_type == 1 || role_id == 8) {
|
|
if resign == 0 && (assign_type == 1 || role_id == 8) {
|
|
- if !FindUpperLimit(gconv.String(positionid), mode, true) {
|
|
|
|
- personMap[positionid] = true
|
|
|
|
|
|
+ if !FindUpperLimit(gconv.String(positionid1), mode, true) {
|
|
|
|
+ personMap[positionid1] = true
|
|
m["saleName"] = common.ObjToString(v["name"])
|
|
m["saleName"] = common.ObjToString(v["name"])
|
|
cdataNew = append(cdataNew, m)
|
|
cdataNew = append(cdataNew, m)
|
|
} else {
|
|
} else {
|
|
upperLimitCount++
|
|
upperLimitCount++
|
|
- upperLimitPersonMap[positionid] = true
|
|
|
|
|
|
+ upperLimitPersonMap[positionid1] = true
|
|
m["saleName"] = common.ObjToString(v["name"])
|
|
m["saleName"] = common.ObjToString(v["name"])
|
|
upperLimitCdataNew = append(upperLimitCdataNew, m)
|
|
upperLimitCdataNew = append(upperLimitCdataNew, m)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if len(cdataNew) == 0 && len(upperLimitCdataNew) > 0 {
|
|
|
|
- //没有达上限的人数为0 全部都是达上限的
|
|
|
|
- personMap = upperLimitPersonMap
|
|
|
|
- cdataNew = upperLimitCdataNew
|
|
|
|
- isFull = true
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if len(cdataNew) == 0 && len(upperLimitCdataNew) > 0 {
|
|
|
|
+ //没有达上限的人数为0 全部都是达上限的
|
|
|
|
+ personMap = upperLimitPersonMap
|
|
|
|
+ cdataNew = upperLimitCdataNew
|
|
|
|
+ isFull = true
|
|
}
|
|
}
|
|
//查询是否都有没有离职
|
|
//查询是否都有没有离职
|
|
if len(personMap) != 0 && len(cdataNew) > 0 {
|
|
if len(personMap) != 0 && len(cdataNew) > 0 {
|