|
@@ -457,16 +457,13 @@ func autoDraw(mode, cluename, phone string, isGroup, isCommerce int) (positionId
|
|
|
positionId = common.Int64All(v["position_id"])
|
|
|
} else {
|
|
|
if common.Int64All(v["count"]) <= res {
|
|
|
-<<<<<<< HEAD
|
|
|
seatNumber1 := common.ObjToString(v["seatNumber"])
|
|
|
if !FindUpperLimit(seatNumber1, "seatNumber") {
|
|
|
res = common.Int64All(v["count"])
|
|
|
seatNumber = common.ObjToString(v["seatNumber"])
|
|
|
}
|
|
|
-=======
|
|
|
res = common.Int64All(v["count"])
|
|
|
positionId = common.Int64All(v["position_id"])
|
|
|
->>>>>>> origin/feature/v1.5.2
|
|
|
}
|
|
|
}
|
|
|
countres++
|
|
@@ -526,24 +523,21 @@ func GetCompanyType(companyName string) (int, int) {
|
|
|
return isGroup, isCommerce
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
// 查询是否达上限
|
|
|
func FindUpperLimit(positionId string, dataType string) bool {
|
|
|
if positionId == "" {
|
|
|
return false
|
|
|
}
|
|
|
- fmt.Println(2222)
|
|
|
if dataType == "positionId" {
|
|
|
return TiDb.CountBySql(`select count(1) from dwd_f_crm_clue_info where position_id=? and is_assign=1 and trailstatus != '08' `, positionId) >= 400
|
|
|
} else {
|
|
|
return TiDb.CountBySql(`select count(1) from dwd_f_crm_clue_info where seatNumber=? and is_assign and trailstatus != '08' `, positionId) >= 400
|
|
|
}
|
|
|
-=======
|
|
|
+}
|
|
|
func getSeatNumberPositionId(seatNumber string) (positionId int64) {
|
|
|
saleData := TiDb.FindOne("dwd_f_crm_personnel_management", map[string]interface{}{"seat_number": seatNumber}, "", "")
|
|
|
if saleData != nil && len(*saleData) > 0 {
|
|
|
positionId = common.Int64All((*saleData)["position_id"])
|
|
|
}
|
|
|
return
|
|
|
->>>>>>> origin/feature/v1.5.2
|
|
|
}
|