xuzhiheng 1 rok pred
rodič
commit
6eb86f99c2

+ 29 - 0
rpc/biService.proto

@@ -145,10 +145,38 @@ message OperateReq {
 message CompanyReq {
 	string companyName = 1;
 }
+
 message CompanyResp {
 	int64 status = 1;
 }
 
+message DistributeClueShowReq {
+	int64 positionId = 1;
+	int64 dataType = 2;
+	string clueIdList = 3;
+	repeated DistributeClueShows datas = 4;
+	int64 IsTask = 5;
+}
+
+message DistributeClueShows {
+	int64 positionId = 1;
+	int64 distributedCount = 2;
+}
+
+message DistributeClueShowss {
+	int64 positionId = 1;
+	int64 companyCount = 2;
+	int64 clueCount = 3;
+	int64 minCount = 4;
+	int64 companyCounts = 5;
+}
+
+message DistributeClueShowResp {
+	int64 error_code = 1;
+	string error_msg = 2;
+	repeated DistributeClueShowss data = 3;
+}
+
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -166,4 +194,5 @@ service BiService {
 	rpc allProjectExport (ExportReq) returns (BiReply); //项目全量导出
 	rpc infoOperate (OperateReq) returns (BiReply); //数据操作
 	rpc getCompanyType (CompanyReq) returns (CompanyResp); //判断公司类型
+	rpc distributeClueShow (DistributeClueShowReq) returns (DistributeClueShowResp); //批量分配展示
 }

+ 34 - 24
rpc/biservice/biservice.go

@@ -13,30 +13,34 @@ import (
 )
 
 type (
-	AddProject        = pb.AddProject
-	AddProjectReq     = pb.AddProjectReq
-	AddProjectResp    = pb.AddProjectResp
-	BiReply           = pb.BiReply
-	BiResp            = pb.BiResp
-	CallReq           = pb.CallReq
-	ClueAddReq        = pb.ClueAddReq
-	ClueImport        = pb.ClueImport
-	ClueImportReq     = pb.ClueImportReq
-	ClueImportResp    = pb.ClueImportResp
-	CompanyReq        = pb.CompanyReq
-	CompanyResp       = pb.CompanyResp
-	DistributeClueReq = pb.DistributeClueReq
-	DistributeDatas   = pb.DistributeDatas
-	DrawClueReq       = pb.DrawClueReq
-	ExportReq         = pb.ExportReq
-	GetInfoIdResp     = pb.GetInfoIdResp
-	MyDataAsset       = pb.MyDataAsset
-	MyDataAssetReq    = pb.MyDataAssetReq
-	MyDataAssetResp   = pb.MyDataAssetResp
-	MyInfoReq         = pb.MyInfoReq
-	OperateReq        = pb.OperateReq
-	Param             = pb.Param
-	SqlManageReq      = pb.SqlManageReq
+	AddProject             = pb.AddProject
+	AddProjectReq          = pb.AddProjectReq
+	AddProjectResp         = pb.AddProjectResp
+	BiReply                = pb.BiReply
+	BiResp                 = pb.BiResp
+	CallReq                = pb.CallReq
+	ClueAddReq             = pb.ClueAddReq
+	ClueImport             = pb.ClueImport
+	ClueImportReq          = pb.ClueImportReq
+	ClueImportResp         = pb.ClueImportResp
+	CompanyReq             = pb.CompanyReq
+	CompanyResp            = pb.CompanyResp
+	DistributeClueReq      = pb.DistributeClueReq
+	DistributeClueShowReq  = pb.DistributeClueShowReq
+	DistributeClueShowResp = pb.DistributeClueShowResp
+	DistributeClueShows    = pb.DistributeClueShows
+	DistributeClueShowss   = pb.DistributeClueShowss
+	DistributeDatas        = pb.DistributeDatas
+	DrawClueReq            = pb.DrawClueReq
+	ExportReq              = pb.ExportReq
+	GetInfoIdResp          = pb.GetInfoIdResp
+	MyDataAsset            = pb.MyDataAsset
+	MyDataAssetReq         = pb.MyDataAssetReq
+	MyDataAssetResp        = pb.MyDataAssetResp
+	MyInfoReq              = pb.MyInfoReq
+	OperateReq             = pb.OperateReq
+	Param                  = pb.Param
+	SqlManageReq           = pb.SqlManageReq
 
 	BiService interface {
 		MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error)
@@ -55,6 +59,7 @@ type (
 		AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*BiReply, error)
 		InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*BiReply, error)
 		GetCompanyType(ctx context.Context, in *CompanyReq, opts ...grpc.CallOption) (*CompanyResp, error)
+		DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 	}
 
 	defaultBiService struct {
@@ -147,3 +152,8 @@ func (m *defaultBiService) GetCompanyType(ctx context.Context, in *CompanyReq, o
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.GetCompanyType(ctx, in, opts...)
 }
+
+func (m *defaultBiService) DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.DistributeClueShow(ctx, in, opts...)
+}

+ 5 - 0
rpc/internal/server/biserviceserver.go

@@ -101,3 +101,8 @@ func (s *BiServiceServer) GetCompanyType(ctx context.Context, in *pb.CompanyReq)
 	l := logic.NewGetCompanyTypeLogic(ctx, s.svcCtx)
 	return l.GetCompanyType(in)
 }
+
+func (s *BiServiceServer) DistributeClueShow(ctx context.Context, in *pb.DistributeClueShowReq) (*pb.DistributeClueShowResp, error) {
+	l := logic.NewDistributeClueShowLogic(ctx, s.svcCtx)
+	return l.DistributeClueShow(in)
+}

+ 484 - 109
rpc/pb/biService.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.27.1
+// 	protoc-gen-go v1.28.1
 // 	protoc        v3.19.4
 // source: biService.proto
 
@@ -1620,6 +1620,282 @@ func (x *CompanyResp) GetStatus() int64 {
 	return 0
 }
 
+type DistributeClueShowReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PositionId int64                  `protobuf:"varint,1,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	DataType   int64                  `protobuf:"varint,2,opt,name=dataType,proto3" json:"dataType,omitempty"`
+	ClueIdList string                 `protobuf:"bytes,3,opt,name=clueIdList,proto3" json:"clueIdList,omitempty"`
+	Datas      []*DistributeClueShows `protobuf:"bytes,4,rep,name=datas,proto3" json:"datas,omitempty"`
+	IsTask     int64                  `protobuf:"varint,5,opt,name=IsTask,proto3" json:"IsTask,omitempty"`
+}
+
+func (x *DistributeClueShowReq) Reset() {
+	*x = DistributeClueShowReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[24]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DistributeClueShowReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DistributeClueShowReq) ProtoMessage() {}
+
+func (x *DistributeClueShowReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[24]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DistributeClueShowReq.ProtoReflect.Descriptor instead.
+func (*DistributeClueShowReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *DistributeClueShowReq) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+func (x *DistributeClueShowReq) GetDataType() int64 {
+	if x != nil {
+		return x.DataType
+	}
+	return 0
+}
+
+func (x *DistributeClueShowReq) GetClueIdList() string {
+	if x != nil {
+		return x.ClueIdList
+	}
+	return ""
+}
+
+func (x *DistributeClueShowReq) GetDatas() []*DistributeClueShows {
+	if x != nil {
+		return x.Datas
+	}
+	return nil
+}
+
+func (x *DistributeClueShowReq) GetIsTask() int64 {
+	if x != nil {
+		return x.IsTask
+	}
+	return 0
+}
+
+type DistributeClueShows struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PositionId       int64 `protobuf:"varint,1,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	DistributedCount int64 `protobuf:"varint,2,opt,name=distributedCount,proto3" json:"distributedCount,omitempty"`
+}
+
+func (x *DistributeClueShows) Reset() {
+	*x = DistributeClueShows{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[25]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DistributeClueShows) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DistributeClueShows) ProtoMessage() {}
+
+func (x *DistributeClueShows) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[25]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DistributeClueShows.ProtoReflect.Descriptor instead.
+func (*DistributeClueShows) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *DistributeClueShows) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+func (x *DistributeClueShows) GetDistributedCount() int64 {
+	if x != nil {
+		return x.DistributedCount
+	}
+	return 0
+}
+
+type DistributeClueShowss struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PositionId    int64 `protobuf:"varint,1,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	CompanyCount  int64 `protobuf:"varint,2,opt,name=companyCount,proto3" json:"companyCount,omitempty"`
+	ClueCount     int64 `protobuf:"varint,3,opt,name=clueCount,proto3" json:"clueCount,omitempty"`
+	MinCount      int64 `protobuf:"varint,4,opt,name=minCount,proto3" json:"minCount,omitempty"`
+	CompanyCounts int64 `protobuf:"varint,5,opt,name=companyCounts,proto3" json:"companyCounts,omitempty"`
+}
+
+func (x *DistributeClueShowss) Reset() {
+	*x = DistributeClueShowss{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[26]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DistributeClueShowss) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DistributeClueShowss) ProtoMessage() {}
+
+func (x *DistributeClueShowss) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[26]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DistributeClueShowss.ProtoReflect.Descriptor instead.
+func (*DistributeClueShowss) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *DistributeClueShowss) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+func (x *DistributeClueShowss) GetCompanyCount() int64 {
+	if x != nil {
+		return x.CompanyCount
+	}
+	return 0
+}
+
+func (x *DistributeClueShowss) GetClueCount() int64 {
+	if x != nil {
+		return x.ClueCount
+	}
+	return 0
+}
+
+func (x *DistributeClueShowss) GetMinCount() int64 {
+	if x != nil {
+		return x.MinCount
+	}
+	return 0
+}
+
+func (x *DistributeClueShowss) GetCompanyCounts() int64 {
+	if x != nil {
+		return x.CompanyCounts
+	}
+	return 0
+}
+
+type DistributeClueShowResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrorCode int64                   `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
+	ErrorMsg  string                  `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
+	Data      []*DistributeClueShowss `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *DistributeClueShowResp) Reset() {
+	*x = DistributeClueShowResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[27]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DistributeClueShowResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DistributeClueShowResp) ProtoMessage() {}
+
+func (x *DistributeClueShowResp) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[27]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DistributeClueShowResp.ProtoReflect.Descriptor instead.
+func (*DistributeClueShowResp) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *DistributeClueShowResp) GetErrorCode() int64 {
+	if x != nil {
+		return x.ErrorCode
+	}
+	return 0
+}
+
+func (x *DistributeClueShowResp) GetErrorMsg() string {
+	if x != nil {
+		return x.ErrorMsg
+	}
+	return ""
+}
+
+func (x *DistributeClueShowResp) GetData() []*DistributeClueShowss {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 
 var file_biService_proto_rawDesc = []byte{
@@ -1798,51 +2074,94 @@ var file_biService_proto_rawDesc = []byte{
 	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
 	0x4e, 0x61, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52,
 	0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xb2, 0x05, 0x0a, 0x09,
-	0x42, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x79, 0x44,
-	0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74,
-	0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x4d, 0x79, 0x44, 0x61,
-	0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x61,
-	0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50,
-	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50,
-	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x67, 0x65,
-	0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f,
-	0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66,
-	0x6f, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43,
-	0x6c, 0x75, 0x65, 0x12, 0x0c, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65,
-	0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x19, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c,
-	0x6c, 0x52, 0x65, 0x71, 0x1a, 0x07, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a,
-	0x0e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x12,
-	0x12, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65,
-	0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f,
-	0x72, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52,
-	0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0b,
-	0x2e, 0x43, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64,
-	0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0c,
-	0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x74, 0x12, 0x0e, 0x2e, 0x43,
-	0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43,
-	0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a,
-	0x0a, 0x61, 0x75, 0x74, 0x6f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x08, 0x2e, 0x43, 0x61,
-	0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f,
-	0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x71, 0x6c, 0x4d, 0x61, 0x6e,
-	0x61, 0x67, 0x65, 0x12, 0x0d, 0x2e, 0x53, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52,
-	0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06,
-	0x6d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0a, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0d,
-	0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e,
-	0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
-	0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74,
-	0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a,
-	0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x4f,
-	0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x12, 0x2b, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
-	0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52,
-	0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70,
-	0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x15,
+	0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68,
+	0x6f, 0x77, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
+	0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74,
+	0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70,
+	0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x4c, 0x69, 0x73,
+	0x74, 0x12, 0x2a, 0x0a, 0x05, 0x64, 0x61, 0x74, 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x14, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75,
+	0x65, 0x53, 0x68, 0x6f, 0x77, 0x73, 0x52, 0x05, 0x64, 0x61, 0x74, 0x61, 0x73, 0x12, 0x16, 0x0a,
+	0x06, 0x49, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x49,
+	0x73, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x61, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
+	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10,
+	0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75,
+	0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73,
+	0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x73,
+	0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+	0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
+	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x65, 0x43, 0x6f,
+	0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
+	0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x43,
+	0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x7f, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b,
+	0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x69, 0x73, 0x74,
+	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x73, 0x73,
+	0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf9, 0x05, 0x0a, 0x09, 0x42, 0x69, 0x53, 0x65, 0x72,
+	0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73,
+	0x73, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73,
+	0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f,
+	0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f,
+	0x49, 0x64, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52,
+	0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x0c,
+	0x2e, 0x44, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41,
+	0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a,
+	0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a,
+	0x07, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x74,
+	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x2e, 0x44, 0x69, 0x73,
+	0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f,
+	0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x2d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x2e,
+	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e,
+	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27,
+	0x0a, 0x07, 0x63, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x43, 0x6c, 0x75, 0x65,
+	0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a,
+	0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x65, 0x49,
+	0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d,
+	0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d,
+	0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f,
+	0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71,
+	0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x0d,
+	0x2e, 0x53, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e,
+	0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x79, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x0a, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e,
+	0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e,
+	0x66, 0x6f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28,
+	0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x6f,
+	0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x08,
+	0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x6f,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+	0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2b,
+	0x0a, 0x0e, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x0b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e,
+	0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x12, 0x64,
+	0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f,
+	0x77, 0x12, 0x16, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c,
+	0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x44, 0x69, 0x73, 0x74,
+	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65,
+	0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
@@ -1857,32 +2176,36 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
 var file_biService_proto_goTypes = []interface{}{
-	(*MyDataAssetReq)(nil),    // 0: MyDataAssetReq
-	(*MyDataAssetResp)(nil),   // 1: MyDataAssetResp
-	(*MyDataAsset)(nil),       // 2: MyDataAsset
-	(*AddProjectReq)(nil),     // 3: AddProjectReq
-	(*AddProjectResp)(nil),    // 4: AddProjectResp
-	(*AddProject)(nil),        // 5: AddProject
-	(*GetInfoIdResp)(nil),     // 6: GetInfoIdResp
-	(*DrawClueReq)(nil),       // 7: DrawClueReq
-	(*CallReq)(nil),           // 8: CallReq
-	(*BiResp)(nil),            // 9: BiResp
-	(*BiReply)(nil),           // 10: BiReply
-	(*DistributeClueReq)(nil), // 11: DistributeClueReq
-	(*DistributeDatas)(nil),   // 12: DistributeDatas
-	(*ClueImportReq)(nil),     // 13: ClueImportReq
-	(*ClueImportResp)(nil),    // 14: ClueImportResp
-	(*ClueImport)(nil),        // 15: ClueImport
-	(*ClueAddReq)(nil),        // 16: ClueAddReq
-	(*SqlManageReq)(nil),      // 17: SqlManageReq
-	(*MyInfoReq)(nil),         // 18: MyInfoReq
-	(*Param)(nil),             // 19: Param
-	(*ExportReq)(nil),         // 20: ExportReq
-	(*OperateReq)(nil),        // 21: OperateReq
-	(*CompanyReq)(nil),        // 22: CompanyReq
-	(*CompanyResp)(nil),       // 23: CompanyResp
+	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
+	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
+	(*MyDataAsset)(nil),            // 2: MyDataAsset
+	(*AddProjectReq)(nil),          // 3: AddProjectReq
+	(*AddProjectResp)(nil),         // 4: AddProjectResp
+	(*AddProject)(nil),             // 5: AddProject
+	(*GetInfoIdResp)(nil),          // 6: GetInfoIdResp
+	(*DrawClueReq)(nil),            // 7: DrawClueReq
+	(*CallReq)(nil),                // 8: CallReq
+	(*BiResp)(nil),                 // 9: BiResp
+	(*BiReply)(nil),                // 10: BiReply
+	(*DistributeClueReq)(nil),      // 11: DistributeClueReq
+	(*DistributeDatas)(nil),        // 12: DistributeDatas
+	(*ClueImportReq)(nil),          // 13: ClueImportReq
+	(*ClueImportResp)(nil),         // 14: ClueImportResp
+	(*ClueImport)(nil),             // 15: ClueImport
+	(*ClueAddReq)(nil),             // 16: ClueAddReq
+	(*SqlManageReq)(nil),           // 17: SqlManageReq
+	(*MyInfoReq)(nil),              // 18: MyInfoReq
+	(*Param)(nil),                  // 19: Param
+	(*ExportReq)(nil),              // 20: ExportReq
+	(*OperateReq)(nil),             // 21: OperateReq
+	(*CompanyReq)(nil),             // 22: CompanyReq
+	(*CompanyResp)(nil),            // 23: CompanyResp
+	(*DistributeClueShowReq)(nil),  // 24: DistributeClueShowReq
+	(*DistributeClueShows)(nil),    // 25: DistributeClueShows
+	(*DistributeClueShowss)(nil),   // 26: DistributeClueShowss
+	(*DistributeClueShowResp)(nil), // 27: DistributeClueShowResp
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -1890,43 +2213,47 @@ var file_biService_proto_depIdxs = []int32{
 	12, // 2: DistributeClueReq.datas:type_name -> DistributeDatas
 	15, // 3: ClueImportResp.data:type_name -> ClueImport
 	19, // 4: SqlManageReq.params:type_name -> Param
-	0,  // 5: BiService.myDataAsset:input_type -> MyDataAssetReq
-	3,  // 6: BiService.addProject:input_type -> AddProjectReq
-	3,  // 7: BiService.getInfoId:input_type -> AddProjectReq
-	7,  // 8: BiService.drawClue:input_type -> DrawClueReq
-	8,  // 9: BiService.Call:input_type -> CallReq
-	11, // 10: BiService.distributeClue:input_type -> DistributeClueReq
-	13, // 11: BiService.clueImport:input_type -> ClueImportReq
-	16, // 12: BiService.clueAdd:input_type -> ClueAddReq
-	13, // 13: BiService.clueImportTt:input_type -> ClueImportReq
-	8,  // 14: BiService.autoFollow:input_type -> CallReq
-	17, // 15: BiService.sqlManage:input_type -> SqlManageReq
-	18, // 16: BiService.myInfo:input_type -> MyInfoReq
-	20, // 17: BiService.allInfoExport:input_type -> ExportReq
-	20, // 18: BiService.allProjectExport:input_type -> ExportReq
-	21, // 19: BiService.infoOperate:input_type -> OperateReq
-	22, // 20: BiService.getCompanyType:input_type -> CompanyReq
-	1,  // 21: BiService.myDataAsset:output_type -> MyDataAssetResp
-	4,  // 22: BiService.addProject:output_type -> AddProjectResp
-	6,  // 23: BiService.getInfoId:output_type -> GetInfoIdResp
-	4,  // 24: BiService.drawClue:output_type -> AddProjectResp
-	9,  // 25: BiService.Call:output_type -> BiResp
-	4,  // 26: BiService.distributeClue:output_type -> AddProjectResp
-	14, // 27: BiService.clueImport:output_type -> ClueImportResp
-	4,  // 28: BiService.clueAdd:output_type -> AddProjectResp
-	14, // 29: BiService.clueImportTt:output_type -> ClueImportResp
-	14, // 30: BiService.autoFollow:output_type -> ClueImportResp
-	10, // 31: BiService.sqlManage:output_type -> BiReply
-	10, // 32: BiService.myInfo:output_type -> BiReply
-	10, // 33: BiService.allInfoExport:output_type -> BiReply
-	10, // 34: BiService.allProjectExport:output_type -> BiReply
-	10, // 35: BiService.infoOperate:output_type -> BiReply
-	23, // 36: BiService.getCompanyType:output_type -> CompanyResp
-	21, // [21:37] is the sub-list for method output_type
-	5,  // [5:21] is the sub-list for method input_type
-	5,  // [5:5] is the sub-list for extension type_name
-	5,  // [5:5] is the sub-list for extension extendee
-	0,  // [0:5] is the sub-list for field type_name
+	25, // 5: DistributeClueShowReq.datas:type_name -> DistributeClueShows
+	26, // 6: DistributeClueShowResp.data:type_name -> DistributeClueShowss
+	0,  // 7: BiService.myDataAsset:input_type -> MyDataAssetReq
+	3,  // 8: BiService.addProject:input_type -> AddProjectReq
+	3,  // 9: BiService.getInfoId:input_type -> AddProjectReq
+	7,  // 10: BiService.drawClue:input_type -> DrawClueReq
+	8,  // 11: BiService.Call:input_type -> CallReq
+	11, // 12: BiService.distributeClue:input_type -> DistributeClueReq
+	13, // 13: BiService.clueImport:input_type -> ClueImportReq
+	16, // 14: BiService.clueAdd:input_type -> ClueAddReq
+	13, // 15: BiService.clueImportTt:input_type -> ClueImportReq
+	8,  // 16: BiService.autoFollow:input_type -> CallReq
+	17, // 17: BiService.sqlManage:input_type -> SqlManageReq
+	18, // 18: BiService.myInfo:input_type -> MyInfoReq
+	20, // 19: BiService.allInfoExport:input_type -> ExportReq
+	20, // 20: BiService.allProjectExport:input_type -> ExportReq
+	21, // 21: BiService.infoOperate:input_type -> OperateReq
+	22, // 22: BiService.getCompanyType:input_type -> CompanyReq
+	24, // 23: BiService.distributeClueShow:input_type -> DistributeClueShowReq
+	1,  // 24: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 25: BiService.addProject:output_type -> AddProjectResp
+	6,  // 26: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 27: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 28: BiService.Call:output_type -> BiResp
+	4,  // 29: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 30: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 31: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 32: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 33: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 34: BiService.sqlManage:output_type -> BiReply
+	10, // 35: BiService.myInfo:output_type -> BiReply
+	10, // 36: BiService.allInfoExport:output_type -> BiReply
+	10, // 37: BiService.allProjectExport:output_type -> BiReply
+	10, // 38: BiService.infoOperate:output_type -> BiReply
+	23, // 39: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 40: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	24, // [24:41] is the sub-list for method output_type
+	7,  // [7:24] is the sub-list for method input_type
+	7,  // [7:7] is the sub-list for extension type_name
+	7,  // [7:7] is the sub-list for extension extendee
+	0,  // [0:7] is the sub-list for field type_name
 }
 
 func init() { file_biService_proto_init() }
@@ -2223,6 +2550,54 @@ func file_biService_proto_init() {
 				return nil
 			}
 		}
+		file_biService_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DistributeClueShowReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DistributeClueShows); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DistributeClueShowss); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DistributeClueShowResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -2230,7 +2605,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   24,
+			NumMessages:   28,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 89 - 33
rpc/pb/biService_grpc.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.3.0
 // - protoc             v3.19.4
 // source: biService.proto
 
@@ -18,6 +18,26 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
+const (
+	BiService_MyDataAsset_FullMethodName        = "/BiService/myDataAsset"
+	BiService_AddProject_FullMethodName         = "/BiService/addProject"
+	BiService_GetInfoId_FullMethodName          = "/BiService/getInfoId"
+	BiService_DrawClue_FullMethodName           = "/BiService/drawClue"
+	BiService_Call_FullMethodName               = "/BiService/Call"
+	BiService_DistributeClue_FullMethodName     = "/BiService/distributeClue"
+	BiService_ClueImport_FullMethodName         = "/BiService/clueImport"
+	BiService_ClueAdd_FullMethodName            = "/BiService/clueAdd"
+	BiService_ClueImportTt_FullMethodName       = "/BiService/clueImportTt"
+	BiService_AutoFollow_FullMethodName         = "/BiService/autoFollow"
+	BiService_SqlManage_FullMethodName          = "/BiService/sqlManage"
+	BiService_MyInfo_FullMethodName             = "/BiService/myInfo"
+	BiService_AllInfoExport_FullMethodName      = "/BiService/allInfoExport"
+	BiService_AllProjectExport_FullMethodName   = "/BiService/allProjectExport"
+	BiService_InfoOperate_FullMethodName        = "/BiService/infoOperate"
+	BiService_GetCompanyType_FullMethodName     = "/BiService/getCompanyType"
+	BiService_DistributeClueShow_FullMethodName = "/BiService/distributeClueShow"
+)
+
 // BiServiceClient is the client API for BiService service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -38,6 +58,7 @@ type BiServiceClient interface {
 	AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*BiReply, error)
 	InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*BiReply, error)
 	GetCompanyType(ctx context.Context, in *CompanyReq, opts ...grpc.CallOption) (*CompanyResp, error)
+	DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 }
 
 type biServiceClient struct {
@@ -50,7 +71,7 @@ func NewBiServiceClient(cc grpc.ClientConnInterface) BiServiceClient {
 
 func (c *biServiceClient) MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error) {
 	out := new(MyDataAssetResp)
-	err := c.cc.Invoke(ctx, "/BiService/myDataAsset", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_MyDataAsset_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -59,7 +80,7 @@ func (c *biServiceClient) MyDataAsset(ctx context.Context, in *MyDataAssetReq, o
 
 func (c *biServiceClient) AddProject(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
 	out := new(AddProjectResp)
-	err := c.cc.Invoke(ctx, "/BiService/addProject", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_AddProject_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -68,7 +89,7 @@ func (c *biServiceClient) AddProject(ctx context.Context, in *AddProjectReq, opt
 
 func (c *biServiceClient) GetInfoId(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*GetInfoIdResp, error) {
 	out := new(GetInfoIdResp)
-	err := c.cc.Invoke(ctx, "/BiService/getInfoId", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_GetInfoId_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -77,7 +98,7 @@ func (c *biServiceClient) GetInfoId(ctx context.Context, in *AddProjectReq, opts
 
 func (c *biServiceClient) DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
 	out := new(AddProjectResp)
-	err := c.cc.Invoke(ctx, "/BiService/drawClue", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_DrawClue_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -86,7 +107,7 @@ func (c *biServiceClient) DrawClue(ctx context.Context, in *DrawClueReq, opts ..
 
 func (c *biServiceClient) Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*BiResp, error) {
 	out := new(BiResp)
-	err := c.cc.Invoke(ctx, "/BiService/Call", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_Call_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -95,7 +116,7 @@ func (c *biServiceClient) Call(ctx context.Context, in *CallReq, opts ...grpc.Ca
 
 func (c *biServiceClient) DistributeClue(ctx context.Context, in *DistributeClueReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
 	out := new(AddProjectResp)
-	err := c.cc.Invoke(ctx, "/BiService/distributeClue", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_DistributeClue_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -104,7 +125,7 @@ func (c *biServiceClient) DistributeClue(ctx context.Context, in *DistributeClue
 
 func (c *biServiceClient) ClueImport(ctx context.Context, in *ClueImportReq, opts ...grpc.CallOption) (*ClueImportResp, error) {
 	out := new(ClueImportResp)
-	err := c.cc.Invoke(ctx, "/BiService/clueImport", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_ClueImport_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -113,7 +134,7 @@ func (c *biServiceClient) ClueImport(ctx context.Context, in *ClueImportReq, opt
 
 func (c *biServiceClient) ClueAdd(ctx context.Context, in *ClueAddReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
 	out := new(AddProjectResp)
-	err := c.cc.Invoke(ctx, "/BiService/clueAdd", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_ClueAdd_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -122,7 +143,7 @@ func (c *biServiceClient) ClueAdd(ctx context.Context, in *ClueAddReq, opts ...g
 
 func (c *biServiceClient) ClueImportTt(ctx context.Context, in *ClueImportReq, opts ...grpc.CallOption) (*ClueImportResp, error) {
 	out := new(ClueImportResp)
-	err := c.cc.Invoke(ctx, "/BiService/clueImportTt", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_ClueImportTt_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -131,7 +152,7 @@ func (c *biServiceClient) ClueImportTt(ctx context.Context, in *ClueImportReq, o
 
 func (c *biServiceClient) AutoFollow(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*ClueImportResp, error) {
 	out := new(ClueImportResp)
-	err := c.cc.Invoke(ctx, "/BiService/autoFollow", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_AutoFollow_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -140,7 +161,7 @@ func (c *biServiceClient) AutoFollow(ctx context.Context, in *CallReq, opts ...g
 
 func (c *biServiceClient) SqlManage(ctx context.Context, in *SqlManageReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, "/BiService/sqlManage", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_SqlManage_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -149,7 +170,7 @@ func (c *biServiceClient) SqlManage(ctx context.Context, in *SqlManageReq, opts
 
 func (c *biServiceClient) MyInfo(ctx context.Context, in *MyInfoReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, "/BiService/myInfo", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_MyInfo_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -158,7 +179,7 @@ func (c *biServiceClient) MyInfo(ctx context.Context, in *MyInfoReq, opts ...grp
 
 func (c *biServiceClient) AllInfoExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, "/BiService/allInfoExport", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_AllInfoExport_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -167,7 +188,7 @@ func (c *biServiceClient) AllInfoExport(ctx context.Context, in *ExportReq, opts
 
 func (c *biServiceClient) AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, "/BiService/allProjectExport", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_AllProjectExport_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -176,7 +197,7 @@ func (c *biServiceClient) AllProjectExport(ctx context.Context, in *ExportReq, o
 
 func (c *biServiceClient) InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, "/BiService/infoOperate", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_InfoOperate_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -185,7 +206,16 @@ func (c *biServiceClient) InfoOperate(ctx context.Context, in *OperateReq, opts
 
 func (c *biServiceClient) GetCompanyType(ctx context.Context, in *CompanyReq, opts ...grpc.CallOption) (*CompanyResp, error) {
 	out := new(CompanyResp)
-	err := c.cc.Invoke(ctx, "/BiService/getCompanyType", in, out, opts...)
+	err := c.cc.Invoke(ctx, BiService_GetCompanyType_FullMethodName, in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *biServiceClient) DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error) {
+	out := new(DistributeClueShowResp)
+	err := c.cc.Invoke(ctx, BiService_DistributeClueShow_FullMethodName, in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -212,6 +242,7 @@ type BiServiceServer interface {
 	AllProjectExport(context.Context, *ExportReq) (*BiReply, error)
 	InfoOperate(context.Context, *OperateReq) (*BiReply, error)
 	GetCompanyType(context.Context, *CompanyReq) (*CompanyResp, error)
+	DistributeClueShow(context.Context, *DistributeClueShowReq) (*DistributeClueShowResp, error)
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -267,6 +298,9 @@ func (UnimplementedBiServiceServer) InfoOperate(context.Context, *OperateReq) (*
 func (UnimplementedBiServiceServer) GetCompanyType(context.Context, *CompanyReq) (*CompanyResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetCompanyType not implemented")
 }
+func (UnimplementedBiServiceServer) DistributeClueShow(context.Context, *DistributeClueShowReq) (*DistributeClueShowResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DistributeClueShow not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -290,7 +324,7 @@ func _BiService_MyDataAsset_Handler(srv interface{}, ctx context.Context, dec fu
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/myDataAsset",
+		FullMethod: BiService_MyDataAsset_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).MyDataAsset(ctx, req.(*MyDataAssetReq))
@@ -308,7 +342,7 @@ func _BiService_AddProject_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/addProject",
+		FullMethod: BiService_AddProject_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AddProject(ctx, req.(*AddProjectReq))
@@ -326,7 +360,7 @@ func _BiService_GetInfoId_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/getInfoId",
+		FullMethod: BiService_GetInfoId_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).GetInfoId(ctx, req.(*AddProjectReq))
@@ -344,7 +378,7 @@ func _BiService_DrawClue_Handler(srv interface{}, ctx context.Context, dec func(
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/drawClue",
+		FullMethod: BiService_DrawClue_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).DrawClue(ctx, req.(*DrawClueReq))
@@ -362,7 +396,7 @@ func _BiService_Call_Handler(srv interface{}, ctx context.Context, dec func(inte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/Call",
+		FullMethod: BiService_Call_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).Call(ctx, req.(*CallReq))
@@ -380,7 +414,7 @@ func _BiService_DistributeClue_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/distributeClue",
+		FullMethod: BiService_DistributeClue_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).DistributeClue(ctx, req.(*DistributeClueReq))
@@ -398,7 +432,7 @@ func _BiService_ClueImport_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/clueImport",
+		FullMethod: BiService_ClueImport_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueImport(ctx, req.(*ClueImportReq))
@@ -416,7 +450,7 @@ func _BiService_ClueAdd_Handler(srv interface{}, ctx context.Context, dec func(i
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/clueAdd",
+		FullMethod: BiService_ClueAdd_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueAdd(ctx, req.(*ClueAddReq))
@@ -434,7 +468,7 @@ func _BiService_ClueImportTt_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/clueImportTt",
+		FullMethod: BiService_ClueImportTt_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueImportTt(ctx, req.(*ClueImportReq))
@@ -452,7 +486,7 @@ func _BiService_AutoFollow_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/autoFollow",
+		FullMethod: BiService_AutoFollow_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AutoFollow(ctx, req.(*CallReq))
@@ -470,7 +504,7 @@ func _BiService_SqlManage_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/sqlManage",
+		FullMethod: BiService_SqlManage_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).SqlManage(ctx, req.(*SqlManageReq))
@@ -488,7 +522,7 @@ func _BiService_MyInfo_Handler(srv interface{}, ctx context.Context, dec func(in
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/myInfo",
+		FullMethod: BiService_MyInfo_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).MyInfo(ctx, req.(*MyInfoReq))
@@ -506,7 +540,7 @@ func _BiService_AllInfoExport_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/allInfoExport",
+		FullMethod: BiService_AllInfoExport_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AllInfoExport(ctx, req.(*ExportReq))
@@ -524,7 +558,7 @@ func _BiService_AllProjectExport_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/allProjectExport",
+		FullMethod: BiService_AllProjectExport_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AllProjectExport(ctx, req.(*ExportReq))
@@ -542,7 +576,7 @@ func _BiService_InfoOperate_Handler(srv interface{}, ctx context.Context, dec fu
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/infoOperate",
+		FullMethod: BiService_InfoOperate_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).InfoOperate(ctx, req.(*OperateReq))
@@ -560,7 +594,7 @@ func _BiService_GetCompanyType_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/BiService/getCompanyType",
+		FullMethod: BiService_GetCompanyType_FullMethodName,
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).GetCompanyType(ctx, req.(*CompanyReq))
@@ -568,6 +602,24 @@ func _BiService_GetCompanyType_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_DistributeClueShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DistributeClueShowReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).DistributeClueShow(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_DistributeClueShow_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).DistributeClueShow(ctx, req.(*DistributeClueShowReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // BiService_ServiceDesc is the grpc.ServiceDesc for BiService service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -639,6 +691,10 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "getCompanyType",
 			Handler:    _BiService_GetCompanyType_Handler,
 		},
+		{
+			MethodName: "distributeClueShow",
+			Handler:    _BiService_DistributeClueShow_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",

+ 87 - 60
service/clue.go

@@ -184,6 +184,7 @@ func ClueAdd(this *biservice.ClueAddReq, col string) *biservice.AddProjectResp {
 	if this.Company == "" {
 		this.Company = this.Phone
 	}
+	isGroup, isCommerce := CompanyType(this.Company)
 	saveMap := map[string]interface{}{
 		"unique_id":        this.Phone,
 		"phone":            this.Phone,
@@ -217,6 +218,8 @@ func ClueAdd(this *biservice.ClueAddReq, col string) *biservice.AddProjectResp {
 	} else {
 		resMap := common.StringToMap(string(bs))
 		if resMap["success"] != nil && resMap["success"].(bool) {
+			saveMap["company_nature"] = isGroup
+			saveMap["company_verification"] = isCommerce
 			CallTidb.Insert(col, saveMap)
 		} else {
 			status = -1
@@ -532,19 +535,47 @@ func DrawClueSync(this *biservice.DrawClueReq) (int, int) {
 func DrawClues(positionId, count1, count2, count3 int64) int {
 	data1, data2, data3, drawCount := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}, 0
 	if count1 > 0 {
-		// data1 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 1, "is_assign": 0}, "", "", 0, int(count1))
+		data1 = JyBiTidb.SelectBySql(`SELECT * from dwd_f_crm_clue_info where is_assign = 0 and level_open = ? and cluename in (SELECT cluename from dwd_f_crm_clue_info where position_id = ? GROUP BY cluename)`, 1, positionId)
+		if int64(len(*data1)) >= count1 {
+			data11 := (*data1)[0:count1]
+			data1 = &data11
+			count1 = 0
+		} else {
+			count1 = count1 - int64(len(*data1))
+		}
+	}
+	if count2 > 0 {
+		data2 = JyBiTidb.SelectBySql(`SELECT * from dwd_f_crm_clue_info where is_assign = 0 and level_open = ? and cluename in (SELECT cluename from dwd_f_crm_clue_info where position_id = ? GROUP BY cluename)`, 2, positionId)
+		if int64(len(*data2)) >= count2 {
+			data11 := (*data2)[0:count2]
+			data2 = &data11
+			count2 = 0
+		} else {
+			count2 = count2 - int64(len(*data2))
+		}
+	}
+	if count3 > 0 {
+		data3 = JyBiTidb.SelectBySql(`SELECT * from dwd_f_crm_clue_info where is_assign = 0 and level_open = ? and cluename in (SELECT cluename from dwd_f_crm_clue_info where position_id = ? GROUP BY cluename)`, 3, positionId)
+		if int64(len(*data3)) >= count3 {
+			data11 := (*data3)[0:count3]
+			data3 = &data11
+			count3 = 0
+		} else {
+			count3 = count3 - int64(len(*data3))
+		}
+	}
+	//
+	if count1 > 0 {
 		data1 = JyBiTidb.SelectBySql(`SELECT max(c.createTime) as ctime,a.id,a.trailstatus FROM dwd_f_crm_clue_info a 
 					LEFT JOIN Call_Accounting.voice_record c ON c.CalledNo = a.phone
 					WHERE a.level_open = ? AND a.is_assign = 0 AND a.uid !="" AND a.is_transfer != 1 GROUP BY a.id ORDER BY ctime asc limit ?`, 1, count1)
 	}
 	if count2 > 0 {
-		// data2 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 2, "is_assign": 0}, "", "", 0, int(count2))
 		data2 = JyBiTidb.SelectBySql(`SELECT max(c.createTime) as ctime,a.id,a.trailstatus FROM dwd_f_crm_clue_info a 
 					LEFT JOIN Call_Accounting.voice_record c ON c.CalledNo = a.phone
 					WHERE a.level_open = ? AND a.is_assign = 0 AND a.uid !="" AND a.is_transfer != 1 GROUP BY a.id ORDER BY ctime asc limit ?`, 2, count2)
 	}
 	if count3 > 0 {
-		// data3 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 3, "is_assign": 0}, "", "", 0, int(count3))
 		data3 = JyBiTidb.SelectBySql(`SELECT max(c.createTime) as ctime,a.id,a.trailstatus FROM dwd_f_crm_clue_info a 
 					LEFT JOIN Call_Accounting.voice_record c ON c.CalledNo = a.phone
 					WHERE a.level_open = ? AND a.is_assign = 0 AND a.uid !="" AND a.is_transfer != 1 GROUP BY a.id ORDER BY ctime asc limit ?`, 3, count3)
@@ -552,32 +583,55 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
 	seatNumber, name := getSeatNumber(positionId)
 	if data1 != nil && len(*data1) > 0 {
-		batchDraw(*data1, nowTime, seatNumber, name, positionId)
-		drawCount += len(*data1)
+		count := batchDraw(*data1, nowTime, seatNumber, name, positionId)
+		drawCount += count
 	}
 	if data2 != nil && len(*data2) > 0 {
-		batchDraw(*data2, nowTime, seatNumber, name, positionId)
-		drawCount += len(*data2)
+		count := batchDraw(*data2, nowTime, seatNumber, name, positionId)
+		drawCount += count
 	}
 	if data3 != nil && len(*data3) > 0 {
-		batchDraw(*data3, nowTime, seatNumber, name, positionId)
-		drawCount += len(*data3)
+		count := batchDraw(*data3, nowTime, seatNumber, name, positionId)
+		drawCount += count
 	}
 	return drawCount
 }
 
-func batchDraw(data []map[string]interface{}, nowTime, seatNumber, name string, positionId int64) {
+func batchDraw(data []map[string]interface{}, nowTime, seatNumber, name string, positionId int64) int {
 	wg := new(sync.WaitGroup)
 	ch := make(chan bool, 20)
+	count := 0
 	for _, v := range data {
 		wg.Add(1)
 		ch <- true
-		go func(v map[string]interface{}) {
+		go func(v map[string]interface{}, count int) {
 			defer func() {
 				wg.Done()
 				<-ch
 			}()
 			clueId := common.Int64All(v["id"])
+			cluename := common.ObjToString(v["cluename"])
+			cdata := JyBiMysql.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"cluename": cluename, "is_assign": 1}, "", "")
+			if cdata != nil && len(*cdata) > 0 {
+				salePositionId := common.Int64All((*cdata)["position_id"])
+				if pcount := JyBiMysql.Count("dwd_f_crm_personnel_management", map[string]interface{}{"resign": 0, "position_id": salePositionId}); pcount > 0 {
+					return
+				} else {
+					saledata := JyBiMysql.SelectBySql(`SELECT position_id from dwd_d_crm_department_level_succbi WHERE bi_pcode in (SELECT bi_pcode from dwd_d_crm_department_level_succbi WHERE position_id = ?) AND resign = 0`, salePositionId)
+					if saledata != nil && len(*saledata) > 0 {
+						isOk := false
+						for _, s := range *saledata {
+							sid := common.Int64All(s["position_id"])
+							if sid == positionId {
+								isOk = true
+							}
+						}
+						if !isOk {
+							return
+						}
+					}
+				}
+			}
 			trailstatus := common.ObjToString(v["trailstatus"])
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 				updateClue := map[string]interface{}{
@@ -594,25 +648,11 @@ func batchDraw(data []map[string]interface{}, nowTime, seatNumber, name string,
 					"tasksource":           "领取公海线索",
 					"level_open":           nil,
 					"clue_level":           nil,
-					// "comeinsource_open":    nil,
 				}
 				if trailstatus != "08" {
 					updateClue["trailstatus"] = "01"
 				}
 				ok1 := JyBiTidb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, updateClue)
-				// ok2 := JyBiTidb.DeleteByTx(tx, "dwd_f_crm_open_sea", map[string]interface{}{"clue_id": clueId})
-				// seaId := JyBiTidb.InsertByTx(tx, "dwd_f_crm_private_sea", map[string]interface{}{
-				// 	"clue_id":      clueId,
-				// 	"seatNumber":   seatNumber,
-				// 	"position_id":  positionId,
-				// 	"comeintime":   nowTime,
-				// 	"comeinsource": 3,
-				// 	"is_task":      1,
-				// 	"task_time":    nowTime,
-				// 	"tasktime":     nowTime,
-				// 	"taskstatus":   0,
-				// 	"tasksource":   "领取公海线索",
-				// })
 				recordId := JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
 					"clue_id":      clueId,
 					"position_id":  positionId,
@@ -669,33 +709,17 @@ func batchDraw(data []map[string]interface{}, nowTime, seatNumber, name string,
 				return ok1 && recordId > 0 && recordId1 > 0 && recordId2 > 0 && recordId3 > -1 && recordId4 > -1
 			}) {
 				log.Println("领取线索成功")
+				count++
 			} else {
 				log.Println("领取线索失败")
 			}
-		}(v)
+		}(v, count)
 	}
 	wg.Wait()
+	return count
 }
 
 func getSeatNumber(positionId int64) (seatNumber, name string) {
-	// positionData := JyTidb.FindOne("base_position", map[string]interface{}{"id": positionId}, "", "")
-	// if positionData != nil && len(*positionData) > 0 {
-	// 	userId := common.Int64All((*positionData)["user_id"])
-	// 	if userId > 0 {
-	// 		userData, ok := Mgo.FindOne("user", map[string]interface{}{"base_user_id": userId})
-	// 		if ok && userData != nil && len(*userData) > 0 {
-	// 			s_phone := common.ObjToString((*userData)["s_phone"])
-	// 			if s_phone == "" {
-	// 				s_phone = common.ObjToString((*userData)["s_m_phone"])
-	// 			}
-	// 			saleData := JyBiTidb.FindOne("jy_salesperson_info", map[string]interface{}{"phone": s_phone}, "", "")
-	// 			if saleData != nil && len(*saleData) > 0 {
-	// 				seatNumber = common.ObjToString((*saleData)["seatNumber"])
-	// 				name = common.ObjToString((*saleData)["name"])
-	// 			}
-	// 		}
-	// 	}
-	// }
 	saleData := JyBiTidb.FindOne("dwd_f_crm_personnel_management", map[string]interface{}{"position_id": positionId}, "", "")
 	if saleData != nil && len(*saleData) > 0 {
 		seatNumber = common.ObjToString((*saleData)["seat_number"])
@@ -836,6 +860,7 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
 					cluename := common.ObjToString(v["cluename"])
 					name := common.ObjToString(v["name"])
 					position := common.ObjToString(v["position"])
+					isGroup, isCommerce := CompanyType(cluename)
 					clueData := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"phone": phone}, "", "")
 					if clueData == nil || len(*clueData) == 0 {
 						countAdd++
@@ -854,22 +879,24 @@ func ClueImportSync(this *biservice.ClueImportReq) (string, int) {
 							})
 						}
 						clueId := JyBiTidb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
-							"userid":            v["userId"],
-							"uid":               v["uId"],
-							"is_assign":         0,
-							"comeintime":        nowTime,
-							"createtime":        nowTime,
-							"updatetime":        nowTime,
-							"cluename":          cluename,
-							"top_cluetype":      v["top_cluetype"],
-							"sub_cluetype":      v["sub_cluetype"],
-							"trailstatus":       "01",
-							"name":              name,
-							"phone":             phone,
-							"position":          position,
-							"batch_import":      this.Pcbh,
-							"comeintime_open":   nowTime,
-							"comeinsource_open": 1,
+							"userid":               v["userId"],
+							"uid":                  v["uId"],
+							"is_assign":            0,
+							"comeintime":           nowTime,
+							"createtime":           nowTime,
+							"updatetime":           nowTime,
+							"cluename":             cluename,
+							"top_cluetype":         v["top_cluetype"],
+							"sub_cluetype":         v["sub_cluetype"],
+							"trailstatus":          "01",
+							"name":                 name,
+							"phone":                phone,
+							"position":             position,
+							"batch_import":         this.Pcbh,
+							"comeintime_open":      nowTime,
+							"comeinsource_open":    1,
+							"company_nature":       isGroup,
+							"company_verification": isCommerce,
 						})
 						JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
 							"clue_id":     clueId,

+ 327 - 21
service/company.go

@@ -1,43 +1,349 @@
 package service
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"strconv"
+	"strings"
+
+	"log"
+	"sync"
+	"time"
+
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 )
 
-/*
-判断是不是集团公司
-判断在不在工商库
-return
-1集团公司 2工商库  3都是  -1都不是
-*/
+// 判断是不是集团公司 判断在不在工商库 return 1集团公司 2工商库  3都是  -1都不是
 func GetCompanyType(this *biservice.CompanyReq) int {
 	status := -1
-
 	if this.CompanyName == "" {
 		return status
 	}
+	isGroup, isCommerce := CompanyType(this.CompanyName)
+	//判断
+	if isGroup && isCommerce {
+		status = 3
+	} else if isGroup {
+		status = 1
+	} else if isCommerce {
+		status = 2
+	}
+	return status
+}
 
+func CompanyType(companyName string) (bool, bool) {
+	isGroup, isCommerce := false, false
 	//是否是集团
-	isGroup := false
-	if c := entity.JyBiTidb.CountBySql(`select count(1) from group_company_name where company_name=?`, this.CompanyName); c > 0 {
+	if c := JyBiTidb.CountBySql(`select count(1) from group_company_name where company_name=?`, companyName); c > 0 {
 		isGroup = true
 	}
-
 	//是否在工商库
-	isCommerce := false
-	if c := entity.MgoQyxy.Count("qyxy_std", map[string]interface{}{"company_name": this.CompanyName}); c > 0 {
+	if c := MgoQyxy.Count("qyxy_std", map[string]interface{}{"company_name": companyName}); c > 0 {
 		isCommerce = true
 	}
+	return isGroup, isCommerce
+}
+
+func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.DistributeClueShowResp {
+	rdata := []*biservice.DistributeClueShowss{}
+	pArr := []string{}
+	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
+		}
+		rdata = append(rdata, m)
+		pArr = append(pArr, strconv.FormatInt(c.PositionId, 10))
+	}
+	//
+	sdata := JyBiTidb.SelectBySql(`SELECT b.cluename,b.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE id in (` + this.ClueIdList + `) GROUP BY cluename`)
+	if sdata != nil && len(*sdata) > 0 {
+		for _, v := range *sdata {
+			sPositionId := common.Int64All(v["position_id"])
+			count := common.IntAll(v["count"])
+			for k, r := range rdata {
+				if r.PositionId == sPositionId {
+					if this.DataType == 1 {
+						rdata[k].CompanyCount++
+					} else {
+						rdata[k].CompanyCounts++
+						rdata[k].ClueCount += int64(count)
+					}
+				}
+			}
 
-	//判断
-	if isGroup && isCommerce {
-		status = 3
-	} else if isGroup {
-		status = 1
-	} else if isCommerce {
-		status = 2
+		}
+	}
+	//
+	clueArrs := []string{}
+	ldata := JyBiTidb.SelectBySql(`SELECT b.id,b.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT id,cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE a.id in (` + this.ClueIdList + `)`)
+	if ldata != nil && len(*ldata) > 0 {
+		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
+						if this.DataType == 3 {
+							//分线索
+							dclue(id, positionId, this.IsTask, this.PositionId)
+						}
+					}
+				}
+			}(isOk)
+			if isOk {
+				clueArrs = append(clueArrs, ids)
+			}
+		}
+		wg.Wait()
+	}
+	//
+	cdata := JyBiTidb.SelectBySql(`SELECT cluename,COUNT(*) AS count FROM dwd_f_crm_clue_info WHERE id in (` + strings.Join(clueArrs, ",") + `) GROUP BY cluename ORDER BY count desc`)
+	if cdata != nil && len(*cdata) > 0 {
+		for _, v := range *cdata {
+			count := common.IntAll(v["count"])
+			cluename := common.ObjToString(v["cluename"])
+			minCount, minIndex := int64(0), 0
+			for k, r := range rdata {
+				if k == 0 {
+					minCount = r.CompanyCounts
+				}
+				if r.CompanyCounts < minCount && r.CompanyCounts < r.CompanyCount {
+					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 {
+				rdata[minIndex].CompanyCount++
+			}
+			rdata[minIndex].CompanyCounts++
+			rdata[minIndex].ClueCount += int64(count)
+			if this.DataType == 3 {
+				//分线索
+				iddata := JyBiTidb.SelectBySql(`SELECT id FROM dwd_f_crm_clue_info WHERE cluename = "` + cluename + `" and id in (` + strings.Join(clueArrs, ",") + `)`)
+				if iddata != nil {
+					wg := new(sync.WaitGroup)
+					ch := make(chan bool, 10)
+					for _, i := range *iddata {
+						wg.Add(1)
+						ch <- true
+						go func(i map[string]interface{}) {
+							defer func() {
+								wg.Done()
+								<-ch
+							}()
+							id := common.Int64All(i["id"])
+							dclue(id, rdata[minIndex].PositionId, this.IsTask, this.PositionId)
+						}(i)
+					}
+					wg.Wait()
+				}
+			}
+		}
+	}
+	return &biservice.DistributeClueShowResp{
+		ErrorCode: 0,
+		Data:      rdata,
 	}
+}
 
-	return status
+func dclue(v, positionId, isTask, thispositionId int64) {
+	clueData := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, "", "")
+	nowTime := time.Now().Format(date.Date_Full_Layout)
+	if clueData != nil && len(*clueData) > 0 {
+		isAssign := common.IntAll((*clueData)["is_assign"])
+		clueSeatNumber := common.ObjToString((*clueData)["seatNumber"])
+		oldName, seatNumber, name := "", "", ""
+		trailstatus := common.ObjToString((*clueData)["trailstatus"])
+		saleData := JyBiTidb.SelectBySql("select * from dwd_f_crm_personnel_management where resign = 0")
+		if saleData != nil && len(*saleData) > 0 {
+			for _, v := range *saleData {
+				if common.ObjToString(v["seat_number"]) == clueSeatNumber {
+					oldName = common.ObjToString(v["name"])
+				}
+				if common.Int64All(v["postion_id"]) == positionId {
+					seatNumber = common.ObjToString(v["seat_number"])
+					name = common.ObjToString(v["name"])
+				}
+			}
+		}
+		if isAssign == 1 {
+			oldpositionId := common.Int64All((*clueData)["position_id"])
+			updateClue := map[string]interface{}{
+				"position_id":          positionId,
+				"seatNumber":           seatNumber,
+				"is_assign":            1,
+				"updatetime":           nowTime,
+				"comeintime":           nowTime,
+				"comeinsource_private": 4,
+				"level_open":           nil,
+				"clue_level":           nil,
+				"out_task_time":        nil,
+				"out_task_status":      nil,
+			}
+			if oldName != name {
+				updateClue["start_trail_time"] = nil
+				updateClue["next_trail_time"] = nil
+			}
+			if isTask == int64(1) {
+				updateClue["is_task"] = 1
+				updateClue["task_time"] = nowTime
+				updateClue["tasktime"] = nowTime
+				updateClue["taskstatus"] = 0
+				updateClue["tasksource"] = "主动分配客户"
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":     v,
+					"position_id": positionId,
+					"change_type": "加入任务车",
+					"new_value":   "主动分配客户",
+					"createtime":  nowTime,
+					"BCPCID":      common.GetRandom(32),
+					"operator_id": thispositionId,
+				})
+			}
+			ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
+			if ok {
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":      v,
+					"position_id":  positionId,
+					"change_field": "position_id",
+					"change_type":  "所属人变更",
+					"old_value":    oldName,
+					"new_value":    name,
+					"createtime":   nowTime,
+					"BCPCID":       common.GetRandom(32),
+					"operator_id":  thispositionId,
+				})
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":      v,
+					"position_id":  oldpositionId,
+					"change_field": "trailstatus",
+					"change_type":  "基本信息变更",
+					"old_value":    CodeTrail[trailstatus],
+					"new_value":    "流失",
+					"createtime":   nowTime,
+					"BCPCID":       common.GetRandom(32),
+					"operator_id":  thispositionId,
+				})
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":      v,
+					"position_id":  positionId,
+					"change_field": "trailstatus",
+					"change_type":  "基本信息变更",
+					"old_value":    CodeTrail[trailstatus],
+					"new_value":    "新增",
+					"createtime":   nowTime,
+					"BCPCID":       common.GetRandom(32),
+					"operator_id":  thispositionId,
+				})
+			} else {
+				log.Println("私海修改失败 ", v, positionId, seatNumber)
+			}
+		} else {
+			updateClue := map[string]interface{}{
+				"position_id":          positionId,
+				"seatNumber":           seatNumber,
+				"is_assign":            1,
+				"updatetime":           nowTime,
+				"comeintime":           nowTime,
+				"comeinsource_private": 4,
+				"is_task":              0,
+				"taskstatus":           0,
+				"level_open":           nil,
+				"clue_level":           nil,
+				"out_task_time":        nil,
+				"out_task_status":      nil,
+				"next_trail_time":      nil,
+				"start_trail_time":     nil,
+				// "comeinsource_open":    nil,
+			}
+			if trailstatus != "08" {
+				updateClue["trailstatus"] = "01"
+			}
+			if isTask == int64(1) {
+				updateClue["is_task"] = 1
+				updateClue["task_time"] = nowTime
+				updateClue["tasktime"] = nowTime
+				updateClue["taskstatus"] = 0
+				updateClue["tasksource"] = "主动分配客户"
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":     v,
+					"position_id": positionId,
+					"change_type": "加入任务车",
+					"new_value":   "主动分配客户",
+					"createtime":  nowTime,
+					"BCPCID":      common.GetRandom(32),
+					"operator_id": thispositionId,
+				})
+			}
+			ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
+			if ok {
+				JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":      v,
+					"position_id":  positionId,
+					"change_field": "position_id",
+					"change_type":  "所属人变更",
+					"old_value":    "/",
+					"new_value":    name,
+					"createtime":   nowTime,
+					"BCPCID":       common.GetRandom(32),
+					"operator_id":  thispositionId,
+				})
+				if trailstatus != "08" {
+					JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+						"clue_id":      v,
+						"position_id":  positionId,
+						"change_field": "trailstatus",
+						"change_type":  "基本信息变更",
+						"old_value":    "商机线索",
+						"new_value":    "新增",
+						"createtime":   nowTime,
+						"BCPCID":       common.GetRandom(32),
+						"operator_id":  thispositionId,
+					})
+					JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+						"clue_id":      v,
+						"position_id":  positionId,
+						"change_field": "trailstatus",
+						"change_type":  "基本信息变更",
+						"old_value":    CodeTrail[trailstatus],
+						"new_value":    "商机线索",
+						"createtime":   nowTime,
+						"BCPCID":       common.GetRandom(32),
+						"operator_id":  thispositionId,
+					})
+				}
+			} else {
+				log.Println("私海插入失败 ", v, positionId, seatNumber)
+			}
+		}
+	}
 }