xuzhiheng 1 rok pred
rodič
commit
5081413c37
1 zmenil súbory, kde vykonal 4 pridanie a 34 odobranie
  1. 4 34
      service/company.go

+ 4 - 34
service/company.go

@@ -55,6 +55,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
 		m.ClueCount = 0
 		if this.DataType == 1 {
 			m.CompanyCount = 0
+			m.MinCount = 0
 		}
 		rdata = append(rdata, m)
 		pArr = append(pArr, strconv.FormatInt(c.PositionId, 10))
@@ -71,10 +72,10 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
 				if r.PositionId == sPositionId {
 					if this.DataType == 1 {
 						rdata[k].CompanyCount++
-					} else {
-						rdata[k].CompanyCounts++
-						rdata[k].ClueCount += int64(count)
+						rdata[k].MinCount++
 					}
+					rdata[k].CompanyCounts++
+					rdata[k].ClueCount += int64(count)
 				}
 			}
 
@@ -90,37 +91,6 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
 		clueArr := strings.Split(this.ClueIdList, ",")
 		wg := new(sync.WaitGroup)
 		ch := make(chan bool, 20)
-		// for _, v := range *ldata {
-		// 	id := common.Int64All(v["id"])
-		// 	positionId := common.Int64All(v["position_id"])
-		// 	ids := strconv.FormatInt(id, 10)
-		// 	isOk := true
-		// 	wg.Add(1)
-		// 	ch <- true
-		// 	go func(isOk bool) {
-		// 		defer func() {
-		// 			wg.Done()
-		// 			<-ch
-		// 		}()
-		// 		for _, a := range clueArr {
-		// 			if a == ids {
-		// 				isOk = false
-		// 				log.Println("isOk2 ", isOk)
-		// 				if this.DataType == 3 {
-		// 					//分线索
-		// 					dclue(id, positionId, this.IsTask, this.PositionId)
-		// 				}
-		// 			}
-		// 		}
-		// 		log.Println("isOk2 ", isOk, ids)
-		// 		if isOk {
-		// 			clueArrSync.Lock()
-		// 			clueArrs = append(clueArrs, ids)
-		// 			clueArrSync.Unlock()
-		// 		}
-		// 	}(isOk)
-		// }
-
 		for _, a := range clueArr {
 			isOk := true
 			wg.Add(1)