|
@@ -90,10 +90,38 @@ 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)
|
|
|
+ // 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)
|
|
|
ch <- true
|
|
@@ -102,7 +130,10 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
wg.Done()
|
|
|
<-ch
|
|
|
}()
|
|
|
- for _, a := range clueArr {
|
|
|
+ for _, v := range *ldata {
|
|
|
+ id := common.Int64All(v["id"])
|
|
|
+ positionId := common.Int64All(v["position_id"])
|
|
|
+ ids := strconv.FormatInt(id, 10)
|
|
|
if a == ids {
|
|
|
isOk = false
|
|
|
log.Println("isOk2 ", isOk)
|
|
@@ -112,15 +143,17 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- log.Println("isOk2 ", isOk, ids)
|
|
|
+ log.Println("isOk1 ", isOk, a)
|
|
|
if isOk {
|
|
|
clueArrSync.Lock()
|
|
|
- clueArrs = append(clueArrs, ids)
|
|
|
+ clueArrs = append(clueArrs, a)
|
|
|
clueArrSync.Unlock()
|
|
|
}
|
|
|
}(isOk)
|
|
|
}
|
|
|
wg.Wait()
|
|
|
+ } else {
|
|
|
+ clueArrs = strings.Split(this.ClueIdList, ",")
|
|
|
}
|
|
|
//
|
|
|
log.Println("clueArrs ", clueArrs)
|