|
@@ -142,25 +142,39 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
cluename := common.ObjToString(v["cluename"])
|
|
cluename := common.ObjToString(v["cluename"])
|
|
minCount, minIndex := int64(0), 0
|
|
minCount, minIndex := int64(0), 0
|
|
for k, r := range rdata {
|
|
for k, r := range rdata {
|
|
- if k == 0 {
|
|
|
|
- minCount = r.CompanyCounts
|
|
|
|
|
|
+ if this.DataType == 1 {
|
|
|
|
+ if k == 0 {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if r.CompanyCounts < r.CompanyCount {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- if r.CompanyCounts < minCount {
|
|
|
|
- minCount = r.CompanyCounts
|
|
|
|
|
|
+ }
|
|
|
|
+ for _, r := range rdata {
|
|
|
|
+ if this.DataType == 1 {
|
|
|
|
+ if r.CompanyCounts < minCount {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if r.CompanyCounts < minCount && r.CompanyCounts < r.CompanyCount {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for k, r := range rdata {
|
|
for k, r := range rdata {
|
|
- // if this.DataType == 1 {
|
|
|
|
- if r.CompanyCounts <= minCount {
|
|
|
|
- minCount = r.CompanyCounts
|
|
|
|
- minIndex = k
|
|
|
|
|
|
+ if this.DataType == 1 {
|
|
|
|
+ if r.CompanyCounts <= minCount {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ minIndex = k
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if r.CompanyCounts <= minCount && r.CompanyCounts < r.CompanyCount {
|
|
|
|
+ minCount = r.CompanyCounts
|
|
|
|
+ minIndex = k
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- // } else {
|
|
|
|
- // if r.CompanyCounts <= minCount && r.CompanyCounts < r.CompanyCount {
|
|
|
|
- // minCount = r.CompanyCounts
|
|
|
|
- // minIndex = k
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
}
|
|
}
|
|
if this.DataType == 1 {
|
|
if this.DataType == 1 {
|
|
rdata[minIndex].CompanyCount++
|
|
rdata[minIndex].CompanyCount++
|