|
@@ -51,13 +51,14 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
for _, c := range this.Datas {
|
|
|
m := &biservice.DistributeClueShowss{}
|
|
|
m.PositionId = c.PositionId
|
|
|
- m.CompanyCounts = 0
|
|
|
m.ClueCount = 0
|
|
|
if this.DataType == 1 {
|
|
|
m.CompanyCount = 0
|
|
|
+ m.CompanyCounts = 0
|
|
|
m.MinCount = 0
|
|
|
} else {
|
|
|
m.CompanyCount = c.DistributedCount
|
|
|
+ m.CompanyCounts = c.DistributedCount
|
|
|
}
|
|
|
rdata = append(rdata, m)
|
|
|
pArr = append(pArr, strconv.FormatInt(c.PositionId, 10))
|
|
@@ -142,22 +143,22 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
if k == 0 {
|
|
|
minCount = r.CompanyCounts
|
|
|
}
|
|
|
- if r.CompanyCounts < minCount && r.CompanyCounts < r.CompanyCount {
|
|
|
+ if r.CompanyCounts < minCount {
|
|
|
minCount = r.CompanyCounts
|
|
|
}
|
|
|
}
|
|
|
for k, r := range rdata {
|
|
|
- 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
|
|
|
- }
|
|
|
+ // 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
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
if this.DataType == 1 {
|
|
|
rdata[minIndex].CompanyCount++
|