소스 검색

日志添加

WH01243 1 년 전
부모
커밋
d30d9aefa0
1개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 15 3
      service/company.go

+ 15 - 3
service/company.go

@@ -68,8 +68,15 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq, allocationCap int
 		//现有数据查询
 		existingCount := JyBiTidb.CountBySql(`select count(1) from dwd_f_crm_clue_info where position_id=? and  is_assign=1 and trailstatus != '08' `, m.PositionId)
 		m.ExistingCount = existingCount
-		if existingCount > allocationCap {
-			continue
+		if existingCount >= allocationCap {
+			if this.DataType != 1 {
+				return &biservice.DistributeClueShowResp{
+					ErrorCode: 1,
+					ErrorMsg:  "线索已达上限",
+				}
+			} else {
+				continue
+			}
 		}
 		if this.DataType == 1 {
 			m.CompanyCount = 0
@@ -144,7 +151,9 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq, allocationCap int
 						isOk = false
 						if this.DataType == 3 {
 							dclue(id, positionId, this.IsTask, this.PositionId) //分线索
+							fmt.Println("11111111", id, positionId)
 						}
+
 					}
 				}
 				if isOk {
@@ -235,7 +244,8 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq, allocationCap int
 							rdata[sindex].ClueCount += int64(len(v))
 							if this.DataType == 3 {
 								for _, vv := range v {
-									dclue(vv, paid, this.IsTask, this.PositionId) //分线索
+									dclue(vv, paid, this.IsTask, this.PositionId) //分线索*/
+									fmt.Println("2222", vv, paid)
 								}
 							}
 						}
@@ -317,6 +327,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq, allocationCap int
 						}
 					}
 				}
+				fmt.Println(222, minIndex)
 				if minIndex >= len(rdata) {
 					continue
 				}
@@ -346,6 +357,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq, allocationCap int
 								}()
 								id := common.Int64All(i["id"])
 								dclue(id, rdata[minIndex].PositionId, this.IsTask, this.PositionId)
+								fmt.Println("3333", id, rdata[minIndex].PositionId)
 							}(i)
 						}
 						wg.Wait()