wangchuanjin 7 месяцев назад
Родитель
Сommit
068c211a93

+ 9 - 2
entity/entity.go

@@ -1,14 +1,17 @@
 package entity
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/filecenter"
 	"log"
 	"strings"
 
+	"bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/filecenter"
+
 	"app.yhyue.com/moapp/jybase/mail"
 
 	"encoding/json"
 
+	"sync"
+
 	util "app.yhyue.com/moapp/jybase/common"
 	elastic "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/mongodb"
@@ -17,7 +20,6 @@ import (
 	"app.yhyue.com/moapp/jypkg/middleground"
 	"github.com/nsqio/go-nsq"
 	"github.com/zeromicro/go-zero/core/logx"
-	"sync"
 )
 
 var (
@@ -32,6 +34,7 @@ var (
 	Mgo              *mongodb.MongodbSim
 	Bidding          *mongodb.MongodbSim
 	MgoQyxy          *mongodb.MongodbSim
+	MgoPingAn        *mongodb.MongodbSim
 	Es               elastic.Es
 	EntEs            elastic.EsV7
 	AreaCode         = map[string]string{}
@@ -195,6 +198,10 @@ func InitQyxyMgo(addr, db, user, pwd string, size int) {
 	MgoQyxy = mongodb.NewMgoWithUser(addr, db, user, pwd, size)
 }
 
+func InitPingAnMgo(addr, db, user, pwd string, size int) {
+	MgoPingAn = mongodb.NewMgoWithUser(addr, db, user, pwd, size)
+}
+
 func InitEs(version, address, userName, password string, size int) {
 	Es = elastic.NewEs(version, address, size, userName, password)
 }

+ 7 - 0
rpc/biService.proto

@@ -257,6 +257,12 @@ message FindClueInfoReq {
 	int64 positionId = 1;
 	string phone=3;
 }
+message MakeEntRelationReq {
+	string entName = 1;
+}
+message MakeEntRelationResp {
+	int64 status = 1;
+}
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -282,4 +288,5 @@ service BiService {
 	rpc createClueByPhone(CreateCuleReq) returns(BiReply);
 	rpc transferClueByPhone(TransferClueReq) returns(BiReply);
 	rpc findClueInfo(FindClueInfoReq) returns(BiReply);
+	rpc makeEntRelation(MakeEntRelationReq) returns(MakeEntRelationResp);
 }

+ 4 - 2
rpc/biservice.go

@@ -4,14 +4,15 @@
 package main
 
 import (
+	"flag"
+	"fmt"
+
 	"bp.jydev.jianyu360.cn/BaseService/biService/entity"
 	IC "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/config"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/server"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
 	"bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/filecenter"
-	"flag"
-	"fmt"
 	"github.com/nsqio/go-nsq"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/core/logx"
@@ -34,6 +35,7 @@ func main() {
 	entity.InitMongo(IC.IC.Mongo.Qfw.MongodbAddr, IC.IC.Mongo.Qfw.DbName, IC.IC.Mongo.Qfw.Size)
 	entity.InitBiddingMgo(IC.IC.Mongo.Bidding.MongodbAddr, IC.IC.Mongo.Bidding.DbName, IC.IC.Mongo.Bidding.UserName, IC.IC.Mongo.Bidding.Password, IC.IC.Mongo.Bidding.Size)
 	entity.InitQyxyMgo(IC.IC.Mongo.Qyxy.MongodbAddr, IC.IC.Mongo.Qyxy.DbName, IC.IC.Mongo.Qyxy.UserName, IC.IC.Mongo.Qyxy.Password, IC.IC.Mongo.Qyxy.Size)
+	entity.InitPingAnMgo(IC.IC.Mongo.PingAn.MongodbAddr, IC.IC.Mongo.PingAn.DbName, IC.IC.Mongo.PingAn.UserName, IC.IC.Mongo.PingAn.Password, IC.IC.Mongo.PingAn.Size)
 	entity.InitEs(IC.IC.Es.Version, IC.IC.Es.Address, IC.IC.Es.UserName, IC.IC.Es.Password, IC.IC.Es.DbSize)
 	entity.InitEntEs(IC.IC.EntEs.Version, IC.IC.EntEs.Address, IC.IC.EntEs.UserName, IC.IC.EntEs.Password, IC.IC.EntEs.DbSize)
 	entity.InitArea()

+ 9 - 1
rpc/biservice/biservice.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: biService.proto
 
 package biservice
@@ -41,6 +41,8 @@ type (
 	FilesData              = pb.FilesData
 	FindClueInfoReq        = pb.FindClueInfoReq
 	GetInfoIdResp          = pb.GetInfoIdResp
+	MakeEntRelationReq     = pb.MakeEntRelationReq
+	MakeEntRelationResp    = pb.MakeEntRelationResp
 	MyDataAsset            = pb.MyDataAsset
 	MyDataAssetReq         = pb.MyDataAssetReq
 	MyDataAssetResp        = pb.MyDataAssetResp
@@ -77,6 +79,7 @@ type (
 		CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error)
 		TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error)
 		FindClueInfo(ctx context.Context, in *FindClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
+		MakeEntRelation(ctx context.Context, in *MakeEntRelationReq, opts ...grpc.CallOption) (*MakeEntRelationResp, error)
 	}
 
 	defaultBiService struct {
@@ -209,3 +212,8 @@ func (m *defaultBiService) FindClueInfo(ctx context.Context, in *FindClueInfoReq
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.FindClueInfo(ctx, in, opts...)
 }
+
+func (m *defaultBiService) MakeEntRelation(ctx context.Context, in *MakeEntRelationReq, opts ...grpc.CallOption) (*MakeEntRelationResp, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.MakeEntRelation(ctx, in, opts...)
+}

+ 4 - 0
rpc/etc/biservice.yaml

@@ -80,6 +80,10 @@ Mongo:
     UserName: jyDevGroup
     Password: jy@DevGroup
     Size: 10
+  PingAn:
+    MongodbAddr: 192.168.3.206:27002
+    DbName: mixdata
+    Size: 4
 Es:
   Address: http://192.168.3.241:9205,http://192.168.3.149:9200
   DbSize: 10

+ 7 - 0
rpc/internal/config/config.go

@@ -47,6 +47,13 @@ type Config struct {
 			UserName    string
 			Password    string
 		}
+		PingAn struct {
+			MongodbAddr string
+			Size        int
+			DbName      string
+			UserName    string
+			Password    string
+		}
 	}
 	Es struct {
 		Address  string

+ 28 - 0
rpc/internal/logic/makeentrelationlogic.go

@@ -0,0 +1,28 @@
+package logic
+
+import (
+	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+	"bp.jydev.jianyu360.cn/BaseService/biService/service"
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type MakeEntRelationLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewMakeEntRelationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MakeEntRelationLogic {
+	return &MakeEntRelationLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *MakeEntRelationLogic) MakeEntRelation(in *pb.MakeEntRelationReq) (*pb.MakeEntRelationResp, error) {
+	return &pb.MakeEntRelationResp{Status: service.MakeEntRelation(in.EntName)}, nil
+}

+ 6 - 1
rpc/internal/server/biserviceserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: biService.proto
 
 package server
@@ -141,3 +141,8 @@ func (s *BiServiceServer) FindClueInfo(ctx context.Context, in *pb.FindClueInfoR
 	l := logic.NewFindClueInfoLogic(ctx, s.svcCtx)
 	return l.FindClueInfo(in)
 }
+
+func (s *BiServiceServer) MakeEntRelation(ctx context.Context, in *pb.MakeEntRelationReq) (*pb.MakeEntRelationResp, error) {
+	l := logic.NewMakeEntRelationLogic(ctx, s.svcCtx)
+	return l.MakeEntRelation(in)
+}

+ 231 - 99
rpc/pb/biService.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.31.0
-// 	protoc        v3.15.1
+// 	protoc-gen-go v1.27.1
+// 	protoc        v3.20.0--rc2
 // source: biService.proto
 
 package pb
@@ -2678,6 +2678,100 @@ func (x *FindClueInfoReq) GetPhone() string {
 	return ""
 }
 
+type MakeEntRelationReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	EntName string `protobuf:"bytes,1,opt,name=entName,proto3" json:"entName,omitempty"`
+}
+
+func (x *MakeEntRelationReq) Reset() {
+	*x = MakeEntRelationReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[38]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MakeEntRelationReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MakeEntRelationReq) ProtoMessage() {}
+
+func (x *MakeEntRelationReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[38]
+	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 MakeEntRelationReq.ProtoReflect.Descriptor instead.
+func (*MakeEntRelationReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *MakeEntRelationReq) GetEntName() string {
+	if x != nil {
+		return x.EntName
+	}
+	return ""
+}
+
+type MakeEntRelationResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+}
+
+func (x *MakeEntRelationResp) Reset() {
+	*x = MakeEntRelationResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[39]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MakeEntRelationResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MakeEntRelationResp) ProtoMessage() {}
+
+func (x *MakeEntRelationResp) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[39]
+	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 MakeEntRelationResp.ProtoReflect.Descriptor instead.
+func (*MakeEntRelationResp) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *MakeEntRelationResp) GetStatus() int64 {
+	if x != nil {
+		return x.Status
+	}
+	return 0
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 
 var file_biService_proto_rawDesc = []byte{
@@ -2989,75 +3083,85 @@ var file_biService_proto_rawDesc = []byte{
 	0x72, 0x49, 0x64, 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, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0xa9, 0x08, 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, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69,
-	0x6c, 0x12, 0x0e, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x44, 0x62, 0x52, 0x65,
-	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x75,
-	0x70, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x0a, 0x2e, 0x55, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65,
-	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x0e, 0x73,
-	0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x2e,
-	0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x41, 0x63, 0x63, 0x65,
-	0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61,
-	0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61,
-	0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74,
-	0x65, 0x43, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x0e, 0x2e, 0x43,
-	0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42,
-	0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66,
-	0x65, 0x72, 0x43, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x2e,
-	0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a,
-	0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
-	0x64, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x6e, 0x64,
-	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x61, 0x6b,
+	0x65, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12,
+	0x18, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x4d, 0x61, 0x6b,
+	0x65, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x08, 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, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c,
+	0x12, 0x0e, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x44, 0x62, 0x52, 0x65, 0x71,
+	0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x75, 0x70,
+	0x46, 0x69, 0x6c, 0x65, 0x12, 0x0a, 0x2e, 0x55, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x0e, 0x73, 0x65,
+	0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x2e, 0x53,
+	0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x41, 0x63, 0x63, 0x65, 0x70,
+	0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
+	0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
+	0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x43, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x0e, 0x2e, 0x43, 0x72,
+	0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
+	0x72, 0x43, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x2e, 0x54,
+	0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08,
+	0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x64,
+	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43,
+	0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x0f, 0x6d, 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x74, 0x52,
+	0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x45, 0x6e,
+	0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x4d,
+	0x61, 0x6b, 0x65, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+	0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
@@ -3072,7 +3176,7 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 38)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
@@ -3112,6 +3216,8 @@ var file_biService_proto_goTypes = []interface{}{
 	(*CreateCuleReq)(nil),          // 35: CreateCuleReq
 	(*TransferClueReq)(nil),        // 36: TransferClueReq
 	(*FindClueInfoReq)(nil),        // 37: FindClueInfoReq
+	(*MakeEntRelationReq)(nil),     // 38: MakeEntRelationReq
+	(*MakeEntRelationResp)(nil),    // 39: MakeEntRelationResp
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -3147,32 +3253,34 @@ var file_biService_proto_depIdxs = []int32{
 	35, // 30: BiService.createClueByPhone:input_type -> CreateCuleReq
 	36, // 31: BiService.transferClueByPhone:input_type -> TransferClueReq
 	37, // 32: BiService.findClueInfo:input_type -> FindClueInfoReq
-	1,  // 33: BiService.myDataAsset:output_type -> MyDataAssetResp
-	4,  // 34: BiService.addProject:output_type -> AddProjectResp
-	6,  // 35: BiService.getInfoId:output_type -> GetInfoIdResp
-	4,  // 36: BiService.drawClue:output_type -> AddProjectResp
-	9,  // 37: BiService.Call:output_type -> BiResp
-	4,  // 38: BiService.distributeClue:output_type -> AddProjectResp
-	14, // 39: BiService.clueImport:output_type -> ClueImportResp
-	4,  // 40: BiService.clueAdd:output_type -> AddProjectResp
-	14, // 41: BiService.clueImportTt:output_type -> ClueImportResp
-	14, // 42: BiService.autoFollow:output_type -> ClueImportResp
-	10, // 43: BiService.sqlManage:output_type -> BiReply
-	10, // 44: BiService.myInfo:output_type -> BiReply
-	10, // 45: BiService.allInfoExport:output_type -> BiReply
-	10, // 46: BiService.allProjectExport:output_type -> BiReply
-	10, // 47: BiService.infoOperate:output_type -> BiReply
-	23, // 48: BiService.getCompanyType:output_type -> CompanyResp
-	27, // 49: BiService.distributeClueShow:output_type -> DistributeClueShowResp
-	10, // 50: BiService.sendMail:output_type -> BiReply
-	10, // 51: BiService.upFile:output_type -> BiReply
-	10, // 52: BiService.sendCommonMail:output_type -> BiReply
-	32, // 53: BiService.addAcceptance:output_type -> AcceptanceResp
-	10, // 54: BiService.createClueByPhone:output_type -> BiReply
-	10, // 55: BiService.transferClueByPhone:output_type -> BiReply
-	10, // 56: BiService.findClueInfo:output_type -> BiReply
-	33, // [33:57] is the sub-list for method output_type
-	9,  // [9:33] is the sub-list for method input_type
+	38, // 33: BiService.makeEntRelation:input_type -> MakeEntRelationReq
+	1,  // 34: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 35: BiService.addProject:output_type -> AddProjectResp
+	6,  // 36: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 37: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 38: BiService.Call:output_type -> BiResp
+	4,  // 39: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 40: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 41: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 42: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 43: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 44: BiService.sqlManage:output_type -> BiReply
+	10, // 45: BiService.myInfo:output_type -> BiReply
+	10, // 46: BiService.allInfoExport:output_type -> BiReply
+	10, // 47: BiService.allProjectExport:output_type -> BiReply
+	10, // 48: BiService.infoOperate:output_type -> BiReply
+	23, // 49: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 50: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	10, // 51: BiService.sendMail:output_type -> BiReply
+	10, // 52: BiService.upFile:output_type -> BiReply
+	10, // 53: BiService.sendCommonMail:output_type -> BiReply
+	32, // 54: BiService.addAcceptance:output_type -> AcceptanceResp
+	10, // 55: BiService.createClueByPhone:output_type -> BiReply
+	10, // 56: BiService.transferClueByPhone:output_type -> BiReply
+	10, // 57: BiService.findClueInfo:output_type -> BiReply
+	39, // 58: BiService.makeEntRelation:output_type -> MakeEntRelationResp
+	34, // [34:59] is the sub-list for method output_type
+	9,  // [9:34] is the sub-list for method input_type
 	9,  // [9:9] is the sub-list for extension type_name
 	9,  // [9:9] is the sub-list for extension extendee
 	0,  // [0:9] is the sub-list for field type_name
@@ -3640,6 +3748,30 @@ func file_biService_proto_init() {
 				return nil
 			}
 		}
+		file_biService_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MakeEntRelationReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MakeEntRelationResp); 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{
@@ -3647,7 +3779,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   38,
+			NumMessages:   40,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 86 - 77
rpc/pb/biService_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc             v3.15.1
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.20.0--rc2
 // source: biService.proto
 
 package pb
@@ -18,33 +18,6 @@ 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"
-	BiService_SendMail_FullMethodName            = "/BiService/sendMail"
-	BiService_UpFile_FullMethodName              = "/BiService/upFile"
-	BiService_SendCommonMail_FullMethodName      = "/BiService/sendCommonMail"
-	BiService_AddAcceptance_FullMethodName       = "/BiService/addAcceptance"
-	BiService_CreateClueByPhone_FullMethodName   = "/BiService/createClueByPhone"
-	BiService_TransferClueByPhone_FullMethodName = "/BiService/transferClueByPhone"
-	BiService_FindClueInfo_FullMethodName        = "/BiService/findClueInfo"
-)
-
 // 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.
@@ -73,6 +46,7 @@ type BiServiceClient interface {
 	CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error)
 	TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error)
 	FindClueInfo(ctx context.Context, in *FindClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
+	MakeEntRelation(ctx context.Context, in *MakeEntRelationReq, opts ...grpc.CallOption) (*MakeEntRelationResp, error)
 }
 
 type biServiceClient struct {
@@ -85,7 +59,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/myDataAsset", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -94,7 +68,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/addProject", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -103,7 +77,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/getInfoId", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -112,7 +86,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/drawClue", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -121,7 +95,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/Call", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -130,7 +104,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/distributeClue", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -139,7 +113,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/clueImport", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -148,7 +122,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/clueAdd", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -157,7 +131,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/clueImportTt", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -166,7 +140,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/autoFollow", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -175,7 +149,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/sqlManage", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -184,7 +158,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/myInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -193,7 +167,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/allInfoExport", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -202,7 +176,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/allProjectExport", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -211,7 +185,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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/infoOperate", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -220,7 +194,7 @@ 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_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/getCompanyType", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -229,7 +203,7 @@ func (c *biServiceClient) GetCompanyType(ctx context.Context, in *CompanyReq, op
 
 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...)
+	err := c.cc.Invoke(ctx, "/BiService/distributeClueShow", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -238,7 +212,7 @@ func (c *biServiceClient) DistributeClueShow(ctx context.Context, in *Distribute
 
 func (c *biServiceClient) SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_SendMail_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/sendMail", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -247,7 +221,7 @@ func (c *biServiceClient) SendMail(ctx context.Context, in *ExportByDbReq, opts
 
 func (c *biServiceClient) UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_UpFile_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/upFile", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -256,7 +230,7 @@ func (c *biServiceClient) UpFile(ctx context.Context, in *UpFileReq, opts ...grp
 
 func (c *biServiceClient) SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_SendCommonMail_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/sendCommonMail", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -265,7 +239,7 @@ func (c *biServiceClient) SendCommonMail(ctx context.Context, in *SendMailReq, o
 
 func (c *biServiceClient) AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error) {
 	out := new(AcceptanceResp)
-	err := c.cc.Invoke(ctx, BiService_AddAcceptance_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/addAcceptance", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -274,7 +248,7 @@ func (c *biServiceClient) AddAcceptance(ctx context.Context, in *AcceptanceReq,
 
 func (c *biServiceClient) CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_CreateClueByPhone_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/createClueByPhone", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -283,7 +257,7 @@ func (c *biServiceClient) CreateClueByPhone(ctx context.Context, in *CreateCuleR
 
 func (c *biServiceClient) TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_TransferClueByPhone_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/transferClueByPhone", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -292,7 +266,16 @@ func (c *biServiceClient) TransferClueByPhone(ctx context.Context, in *TransferC
 
 func (c *biServiceClient) FindClueInfo(ctx context.Context, in *FindClueInfoReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
-	err := c.cc.Invoke(ctx, BiService_FindClueInfo_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/BiService/findClueInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *biServiceClient) MakeEntRelation(ctx context.Context, in *MakeEntRelationReq, opts ...grpc.CallOption) (*MakeEntRelationResp, error) {
+	out := new(MakeEntRelationResp)
+	err := c.cc.Invoke(ctx, "/BiService/makeEntRelation", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -327,6 +310,7 @@ type BiServiceServer interface {
 	CreateClueByPhone(context.Context, *CreateCuleReq) (*BiReply, error)
 	TransferClueByPhone(context.Context, *TransferClueReq) (*BiReply, error)
 	FindClueInfo(context.Context, *FindClueInfoReq) (*BiReply, error)
+	MakeEntRelation(context.Context, *MakeEntRelationReq) (*MakeEntRelationResp, error)
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -406,6 +390,9 @@ func (UnimplementedBiServiceServer) TransferClueByPhone(context.Context, *Transf
 func (UnimplementedBiServiceServer) FindClueInfo(context.Context, *FindClueInfoReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindClueInfo not implemented")
 }
+func (UnimplementedBiServiceServer) MakeEntRelation(context.Context, *MakeEntRelationReq) (*MakeEntRelationResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method MakeEntRelation not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -429,7 +416,7 @@ func _BiService_MyDataAsset_Handler(srv interface{}, ctx context.Context, dec fu
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_MyDataAsset_FullMethodName,
+		FullMethod: "/BiService/myDataAsset",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).MyDataAsset(ctx, req.(*MyDataAssetReq))
@@ -447,7 +434,7 @@ func _BiService_AddProject_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_AddProject_FullMethodName,
+		FullMethod: "/BiService/addProject",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AddProject(ctx, req.(*AddProjectReq))
@@ -465,7 +452,7 @@ func _BiService_GetInfoId_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_GetInfoId_FullMethodName,
+		FullMethod: "/BiService/getInfoId",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).GetInfoId(ctx, req.(*AddProjectReq))
@@ -483,7 +470,7 @@ func _BiService_DrawClue_Handler(srv interface{}, ctx context.Context, dec func(
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_DrawClue_FullMethodName,
+		FullMethod: "/BiService/drawClue",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).DrawClue(ctx, req.(*DrawClueReq))
@@ -501,7 +488,7 @@ func _BiService_Call_Handler(srv interface{}, ctx context.Context, dec func(inte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_Call_FullMethodName,
+		FullMethod: "/BiService/Call",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).Call(ctx, req.(*CallReq))
@@ -519,7 +506,7 @@ func _BiService_DistributeClue_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_DistributeClue_FullMethodName,
+		FullMethod: "/BiService/distributeClue",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).DistributeClue(ctx, req.(*DistributeClueReq))
@@ -537,7 +524,7 @@ func _BiService_ClueImport_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_ClueImport_FullMethodName,
+		FullMethod: "/BiService/clueImport",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueImport(ctx, req.(*ClueImportReq))
@@ -555,7 +542,7 @@ func _BiService_ClueAdd_Handler(srv interface{}, ctx context.Context, dec func(i
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_ClueAdd_FullMethodName,
+		FullMethod: "/BiService/clueAdd",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueAdd(ctx, req.(*ClueAddReq))
@@ -573,7 +560,7 @@ func _BiService_ClueImportTt_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_ClueImportTt_FullMethodName,
+		FullMethod: "/BiService/clueImportTt",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).ClueImportTt(ctx, req.(*ClueImportReq))
@@ -591,7 +578,7 @@ func _BiService_AutoFollow_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_AutoFollow_FullMethodName,
+		FullMethod: "/BiService/autoFollow",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AutoFollow(ctx, req.(*CallReq))
@@ -609,7 +596,7 @@ func _BiService_SqlManage_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_SqlManage_FullMethodName,
+		FullMethod: "/BiService/sqlManage",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).SqlManage(ctx, req.(*SqlManageReq))
@@ -627,7 +614,7 @@ func _BiService_MyInfo_Handler(srv interface{}, ctx context.Context, dec func(in
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_MyInfo_FullMethodName,
+		FullMethod: "/BiService/myInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).MyInfo(ctx, req.(*MyInfoReq))
@@ -645,7 +632,7 @@ func _BiService_AllInfoExport_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_AllInfoExport_FullMethodName,
+		FullMethod: "/BiService/allInfoExport",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AllInfoExport(ctx, req.(*ExportReq))
@@ -663,7 +650,7 @@ func _BiService_AllProjectExport_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_AllProjectExport_FullMethodName,
+		FullMethod: "/BiService/allProjectExport",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AllProjectExport(ctx, req.(*ExportReq))
@@ -681,7 +668,7 @@ func _BiService_InfoOperate_Handler(srv interface{}, ctx context.Context, dec fu
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_InfoOperate_FullMethodName,
+		FullMethod: "/BiService/infoOperate",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).InfoOperate(ctx, req.(*OperateReq))
@@ -699,7 +686,7 @@ func _BiService_GetCompanyType_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_GetCompanyType_FullMethodName,
+		FullMethod: "/BiService/getCompanyType",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).GetCompanyType(ctx, req.(*CompanyReq))
@@ -717,7 +704,7 @@ func _BiService_DistributeClueShow_Handler(srv interface{}, ctx context.Context,
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_DistributeClueShow_FullMethodName,
+		FullMethod: "/BiService/distributeClueShow",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).DistributeClueShow(ctx, req.(*DistributeClueShowReq))
@@ -735,7 +722,7 @@ func _BiService_SendMail_Handler(srv interface{}, ctx context.Context, dec func(
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_SendMail_FullMethodName,
+		FullMethod: "/BiService/sendMail",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).SendMail(ctx, req.(*ExportByDbReq))
@@ -753,7 +740,7 @@ func _BiService_UpFile_Handler(srv interface{}, ctx context.Context, dec func(in
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_UpFile_FullMethodName,
+		FullMethod: "/BiService/upFile",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).UpFile(ctx, req.(*UpFileReq))
@@ -771,7 +758,7 @@ func _BiService_SendCommonMail_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_SendCommonMail_FullMethodName,
+		FullMethod: "/BiService/sendCommonMail",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).SendCommonMail(ctx, req.(*SendMailReq))
@@ -789,7 +776,7 @@ func _BiService_AddAcceptance_Handler(srv interface{}, ctx context.Context, dec
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_AddAcceptance_FullMethodName,
+		FullMethod: "/BiService/addAcceptance",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AddAcceptance(ctx, req.(*AcceptanceReq))
@@ -807,7 +794,7 @@ func _BiService_CreateClueByPhone_Handler(srv interface{}, ctx context.Context,
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_CreateClueByPhone_FullMethodName,
+		FullMethod: "/BiService/createClueByPhone",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).CreateClueByPhone(ctx, req.(*CreateCuleReq))
@@ -825,7 +812,7 @@ func _BiService_TransferClueByPhone_Handler(srv interface{}, ctx context.Context
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_TransferClueByPhone_FullMethodName,
+		FullMethod: "/BiService/transferClueByPhone",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).TransferClueByPhone(ctx, req.(*TransferClueReq))
@@ -843,7 +830,7 @@ func _BiService_FindClueInfo_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: BiService_FindClueInfo_FullMethodName,
+		FullMethod: "/BiService/findClueInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).FindClueInfo(ctx, req.(*FindClueInfoReq))
@@ -851,6 +838,24 @@ func _BiService_FindClueInfo_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_MakeEntRelation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(MakeEntRelationReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).MakeEntRelation(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/BiService/makeEntRelation",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).MakeEntRelation(ctx, req.(*MakeEntRelationReq))
+	}
+	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)
@@ -954,6 +959,10 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "findClueInfo",
 			Handler:    _BiService_FindClueInfo_Handler,
 		},
+		{
+			MethodName: "makeEntRelation",
+			Handler:    _BiService_MakeEntRelation_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",

+ 109 - 0
service/makeEntRelation.go

@@ -0,0 +1,109 @@
+package service
+
+import (
+	"log"
+	"math"
+	"regexp"
+
+	. "app.yhyue.com/moapp/jybase/common"
+	. "app.yhyue.com/moapp/jybase/date"
+	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+var fields = []string{"a_id", "a_name", "b_id", "b_name", "legal_person", "item", "create_time"}
+var regHan = regexp.MustCompile(`[\p{Han}]+`)
+
+func MakeEntRelation(entName string) int64 {
+	if len([]rune(entName)) < 2 || !regHan.MatchString(entName) {
+		return 1
+	} else if JyBiTidb.CountBySql(`select count(1) as count from ent_relation where a_name=?`, entName) != 0 {
+		logx.Info(entName, "已有企业关联关系")
+		return 1
+	} else if JyBiTidb.CountBySql(`select count(1) as count from group_company_name where company_name=?`, entName) != 0 {
+		logx.Info(entName, "是集团公司")
+		return 1
+	}
+	saveCount := 0
+	companyBase, ok := MgoPingAn.FindOneByField("company_base", map[string]interface{}{"company_name": entName}, `{"company_id":1,"legal_person":1,"company_status":1}`)
+	if !ok || companyBase == nil || len(*companyBase) == 0 {
+		return 1
+	}
+	company_status, _ := (*companyBase)["company_status"].(string)
+	if company_status != "在营(开业)企业" && company_status != "存续(在营、开业、在册)" {
+		return 1
+	}
+	company_id, _ := (*companyBase)["company_id"].(string)
+	legal_person, _ := (*companyBase)["legal_person"].(string)
+	repeat := map[string]int{}
+	ids := []string{}
+	array := []interface{}{}
+	//投资我的
+	if companyPartner, ok := MgoPingAn.Find("company_partner", map[string]interface{}{"company_id": company_id}, `{"_id":-1}`, `{"stock_name_id":1,"is_personal":1}`, false, -1, -1); ok && companyPartner != nil {
+		for _, v := range *companyPartner {
+			is_personal := Int64All(v["is_personal"])
+			stock_name_id, _ := v["stock_name_id"].(string)
+			if stock_name_id == "" || is_personal != 0 || repeat[stock_name_id] > 0 {
+				continue
+			}
+			ids = append(ids, stock_name_id)
+			repeat[stock_name_id] = 1
+		}
+	}
+	//我投资的
+	if companyPartner, ok := MgoPingAn.Find("company_partner", map[string]interface{}{"stock_name_id": company_id}, `{"_id":-1}`, `{"company_id":1,"is_personal":1}`, false, -1, -1); ok && companyPartner != nil {
+		for _, v := range *companyPartner {
+			cId, _ := v["company_id"].(string)
+			is_personal := Int64All(v["is_personal"])
+			if cId == "" || is_personal != 0 || repeat[cId] > 0 {
+				continue
+			}
+			ids = append(ids, cId)
+			repeat[cId] = 2
+		}
+	}
+	for k, v := range getCompanyBase(ids, legal_person) {
+		saveCount++
+		array = append(array, company_id, entName, k, v, legal_person, repeat[k], NowFormat(Date_Full_Layout))
+		if saveCount == 200 {
+			JyBiTidb.InsertBatch("ent_relation", fields, array)
+			array = []interface{}{}
+		}
+	}
+	if len(array) > 0 {
+		JyBiTidb.InsertBatch("ent_relation", fields, array)
+	}
+	log.Println(entName, "企业关联关系保存", saveCount, "条")
+	return 1
+}
+
+func getCompanyBase(ids []string, legalPerson string) map[string]string {
+	m := map[string]string{}
+	if len(ids) == 0 {
+		return m
+	}
+	for i := 0; i < int(math.Ceil(float64(len(ids))/50)); i++ {
+		start := i * 50
+		end := start + 50
+		if end > len(ids) {
+			end = len(ids)
+		}
+		newIds := ids[start:end]
+		if companyBase, ok := MgoPingAn.Find("company_base", map[string]interface{}{"company_id": map[string]interface{}{"$in": newIds}}, `{"_id":-1}`, `{"company_id":1,"company_name":1,"legal_person":1,"company_status":1}`, false, -1, -1); ok && companyBase != nil {
+			for _, v := range *companyBase {
+				if company_status, _ := v["company_status"].(string); company_status != "在营(开业)企业" && company_status != "存续(在营、开业、在册)" {
+					continue
+				} else if legal_person, _ := v["legal_person"].(string); legal_person != legalPerson {
+					continue
+				}
+				company_name, _ := v["company_name"].(string)
+				if company_name == "" {
+					continue
+				}
+				company_id, _ := v["company_id"].(string)
+				m[company_id] = company_name
+			}
+		}
+	}
+	return m
+}