소스 검색

Merge branch 'dev_v1.0.24_wh' of BaseService/biService into feature/v1.0.24

王浩 1 년 전
부모
커밋
23e79a0393

+ 20 - 3
api/biService.api

@@ -3,7 +3,7 @@ syntax = "v1"
 type (
 	biResp {
 		Error_code int64       `json:"error_code"` //响应代码
-		Error_msg  string      `json:"error_msg"` //响应消息
+		Error_msg  string      `json:"error_msg"`  //响应消息
 		Data       interface{} `json:"data"`
 	}
 	myDataAssetReq {
@@ -120,7 +120,20 @@ type (
 	SendMailReq {
 		Title   string `json:"title"`
 		Content string `json:"content"`
-		mails   string `json:"mails"`
+		Mails   string `json:"mails"`
+	}
+	AcceptanceReq {
+		ProposeType     int64  `json:"proposeType,optional"`
+		Propose_time    string `json:"proposeTime,optional"`
+		Channel         string `json:"channel,optional"`
+		Acceptance_type int64  `json:"acceptanceType,optional"`
+		Status          int64  `json:"status,optional"`
+		Over_time       string `json:"overTime,optional"`
+		Remark          string `json:"remark,optional"`
+		PositionId      int64  `header:"positionId,optional"`
+		DeptId          string `header:"deptId,optional"` //部门id
+		EntUserName     string `header:"entUserName,optional"`
+		ParamData       string `json:"paramData,optional"`
 	}
 )
 
@@ -201,5 +214,9 @@ service biService-api {
 	@doc "发送邮件"
 	@handler sendComMail
 	post /biService/sendCommonndMail (SendMailReq) returns (biResp)
-}
 
+	@doc "新增受理单"
+	@handler addAcceptance
+	post /biService/addAcceptance (AcceptanceReq) returns (biResp)
+
+}

+ 28 - 0
api/internal/handler/addacceptancehandler.go

@@ -0,0 +1,28 @@
+package handler
+
+import (
+	"net/http"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/logic"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func addAcceptanceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.AcceptanceReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+			return
+		}
+
+		l := logic.NewAddAcceptanceLogic(r.Context(), svcCtx)
+		resp, err := l.AddAcceptance(&req)
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 42 - 37
api/internal/handler/routes.go

@@ -14,8 +14,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/ClueAdd",
-				Handler: ClueAddHandler(serverCtx),
+				Path:    "/biService/myDataAsset",
+				Handler: MyDataAssetHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -24,34 +24,19 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/allInfoExport",
-				Handler: allInfoExportHandler(serverCtx),
-			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/biService/allProjectExport",
-				Handler: allProjectExportHandler(serverCtx),
+				Path:    "/biService/getInfoId",
+				Handler: GetInfoIdHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/autoFollow",
-				Handler: AutoFollowHandler(serverCtx),
+				Path:    "/biService/drawClue",
+				Handler: DrawClueHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/biService/call",
 				Handler: CallHandler(serverCtx),
 			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/biService/clueImport",
-				Handler: ClueImportHandler(serverCtx),
-			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/biService/clueImportTt",
-				Handler: ClueImportTlHandler(serverCtx),
-			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/biService/distributeClue",
@@ -64,28 +49,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/drawClue",
-				Handler: DrawClueHandler(serverCtx),
+				Path:    "/biService/clueImport",
+				Handler: ClueImportHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/getCompanyType",
-				Handler: getCompanyTypeHandler(serverCtx),
+				Path:    "/biService/ClueAdd",
+				Handler: ClueAddHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/getInfoId",
-				Handler: GetInfoIdHandler(serverCtx),
+				Path:    "/biService/clueImportTt",
+				Handler: ClueImportTlHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/infoOperate",
-				Handler: infoOperateHandler(serverCtx),
+				Path:    "/biService/autoFollow",
+				Handler: AutoFollowHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/myDataAsset",
-				Handler: MyDataAssetHandler(serverCtx),
+				Path:    "/biService/sqlManage",
+				Handler: sqlManageHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -99,24 +84,44 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/sendCommonndMail",
-				Handler: sendComMailHandler(serverCtx),
+				Path:    "/biService/allProjectExport",
+				Handler: allProjectExportHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/sendMail",
-				Handler: sendMailHandler(serverCtx),
+				Path:    "/biService/allInfoExport",
+				Handler: allInfoExportHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/sqlManage",
-				Handler: sqlManageHandler(serverCtx),
+				Path:    "/biService/infoOperate",
+				Handler: infoOperateHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/getCompanyType",
+				Handler: getCompanyTypeHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/sendMail",
+				Handler: sendMailHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/biService/upFile",
 				Handler: upFileHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/sendCommonndMail",
+				Handler: sendComMailHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/addAcceptance",
+				Handler: addAcceptanceHandler(serverCtx),
+			},
 		},
 		rest.WithMaxBytes(104857600),
 	)

+ 43 - 0
api/internal/logic/addacceptancelogic.go

@@ -0,0 +1,43 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type AddAcceptanceLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewAddAcceptanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddAcceptanceLogic {
+	return &AddAcceptanceLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *AddAcceptanceLogic) AddAcceptance(req *types.AcceptanceReq) (resp *types.BiResp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.BiServiceRpc.AddAcceptance(l.ctx, &biservice.AcceptanceReq{
+		PositionId:     req.PositionId,
+		ProposeType:    req.ProposeType,
+		Channel:        req.Channel,
+		AcceptanceType: req.Acceptance_type,
+		Status:         req.Status,
+		OverTime:       req.Over_time,
+		Remark:         req.Remark,
+		ParamData:      req.ParamData,
+		EntUserName:    req.EntUserName,
+		DeptId:         req.DeptId,
+		ProposeTime:    req.Propose_time,
+	})
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+}

+ 6 - 6
api/internal/svc/servicecontext.go

@@ -22,16 +22,16 @@ func NewServiceContext(c config.Config) *ServiceContext {
 		BiServiceRpc: biservice.NewBiService(zrpc.MustNewClient(c.BiServiceRpc)),
 		ResourceCenterRpc: resource.NewResource(zrpc.MustNewClient(zrpc.RpcClientConf{
 			Etcd: discov.EtcdConf{
-				Hosts: c.BiServiceRpc.Etcd.Hosts,
-				//Hosts: []string{"192.168.3.206:2379"},
-				Key: c.ResourceCenterKey,
+				//Hosts: c.BiServiceRpc.Etcd.Hosts,
+				Hosts: []string{"192.168.3.206:2379"},
+				Key:   c.ResourceCenterKey,
 			},
 		})),
 		UserCenterRpc: usercenter.NewUserCenter(zrpc.MustNewClient(zrpc.RpcClientConf{
 			Etcd: discov.EtcdConf{
-				Hosts: c.BiServiceRpc.Etcd.Hosts,
-				//Hosts: []string{"192.168.3.206:2379"},
-				Key: c.UserCenterKey,
+				//Hosts: c.BiServiceRpc.Etcd.Hosts,
+				Hosts: []string{"192.168.3.206:2379"},
+				Key:   c.UserCenterKey,
 			},
 		})),
 	}

+ 96 - 82
api/internal/types/types.go

@@ -1,26 +1,43 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type ClueAddReq struct {
-	Phone            string `json:"phone"`
-	Username         string `json:"username,optional"`
-	Source           string `json:"source"`
-	Status999        string `json:"status999"`
-	Owner            string `json:"owner"`
-	EmpNo            string `json:"empNo"`
-	Company          string `json:"company,optional"`
-	IsPolicymaker    string `json:"isPolicymaker,optional"`
-	BelongToIndustry string `json:"belongToIndustry,optional"`
-	Job              string `json:"job,optional"`
-	CustomerNeeds    string `json:"customerNeeds,optional"`
-	BelongTo         string `json:"belongTo,optional"`
-	WantGoods        string `json:"wantGoods,optional"`
-	CustomerBudget   string `json:"customerBudget,optional"`
+type BiResp struct {
+	Error_code int64       `json:"error_code"` //响应代码
+	Error_msg  string      `json:"error_msg"`  //响应消息
+	Data       interface{} `json:"data"`
 }
 
-type ClueImportReq struct {
+type MyDataAssetReq struct {
+	UserId    string `header:"userId,optional"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
+}
+
+type AddProjectReq struct {
+	PositionId   int64  `header:"positionId,optional"`
+	Source       int64  `json:"source,optional"`
+	InfoId       string `json:"info_id,optional"`
+	PositionType int64  `header:"positionType,optional"`
+	AccountId    int64  `header:"accountId,optional"`
+	CompanyName  string `header:"entName,optional"`
+	UserName     string `header:"userName,optional"`
+	UserId       int64  `header:"newUserId,optional"`
+	EntId        int64  `header:"entId,optional"`
+	EntUserName  string `header:"entUserName,optional"`
+}
+
+type GetInfoIdReq struct {
+	PositionId int64 `header:"positionId,optional"`
+}
+
+type DrawClueReq struct {
+	PositionId int64 `header:"positionId,optional"`
+	Count      int64 `json:"count,optional"`
+}
+
+type CallReq struct {
 	PositionId int64  `header:"positionId,optional"`
-	Pcbh       string `json:"pcbh"`
+	Phone      string `json:"phone"`
 }
 
 type DistributeClueReq struct {
@@ -40,29 +57,31 @@ type DistributeClueShowReq struct {
 	UpdatePositionID int64                    `json:"updatePositionID"`
 }
 
-type ExportByDbReq struct {
-	Token    string                   `json:"token"`
-	Title    string                   `json:"title"`
-	Content  string                   `json:"content"`
-	Mails    string                   `json:"mails"`
-	FileName string                   `json:"filename"`
-	Datas    []map[string]interface{} `json:"datas"`
-}
-
-type ExportReq struct {
-	Mail       string   `json:"mail"`
-	Mapping    []string `json:"mapping"`
-	PositionId int64    `header:"positionId,optional"`
+type ClueImportReq struct {
+	PositionId int64  `header:"positionId,optional"`
+	Pcbh       string `json:"pcbh"`
 }
 
-type MyInfoReq struct {
-	Bid string `json:"bid,optional"`
-	Sid string `json:"sid"`
+type ClueAddReq struct {
+	Phone            string `json:"phone"`
+	Username         string `json:"username,optional"`
+	Source           string `json:"source"`
+	Status999        string `json:"status999"`
+	Owner            string `json:"owner"`
+	EmpNo            string `json:"empNo"`
+	Company          string `json:"company,optional"`
+	IsPolicymaker    string `json:"isPolicymaker,optional"`
+	BelongToIndustry string `json:"belongToIndustry,optional"`
+	Job              string `json:"job,optional"`
+	CustomerNeeds    string `json:"customerNeeds,optional"`
+	BelongTo         string `json:"belongTo,optional"`
+	WantGoods        string `json:"wantGoods,optional"`
+	CustomerBudget   string `json:"customerBudget,optional"`
 }
 
-type OperateReq struct {
-	NewId string `json:"newId"`
-	Type  int64  `json:"type"`
+type SqlManageReq struct {
+	Id     float64 `json:"id"`
+	Params []Param `json:"params"`
 }
 
 type Param struct {
@@ -70,6 +89,11 @@ type Param struct {
 	Type  string `json:"type"`
 }
 
+type MyInfoReq struct {
+	Bid string `json:"bid,optional"`
+	Sid string `json:"sid"`
+}
+
 type ResEmpowerReq struct {
 	EntId        int64  `header:"entId"`
 	ReqType      int64  `json:"reqType"`
@@ -78,15 +102,28 @@ type ResEmpowerReq struct {
 	PositionId   string `json:"positionId"`
 }
 
-type SendMailReq struct {
-	Title   string `json:"title"`
-	Content string `json:"content"`
-	Mails   string `json:"mails"`
+type ExportReq struct {
+	Mail       string   `json:"mail"`
+	Mapping    []string `json:"mapping"`
+	PositionId int64    `header:"positionId,optional"`
 }
 
-type SqlManageReq struct {
-	Id     float64 `json:"id"`
-	Params []Param `json:"params"`
+type OperateReq struct {
+	NewId string `json:"newId"`
+	Type  int64  `json:"type"`
+}
+
+type GetCompanyTypeReq struct {
+	CompanyName string `json:"companyName"`
+}
+
+type ExportByDbReq struct {
+	Token    string                   `json:"token"`
+	Title    string                   `json:"title"`
+	Content  string                   `json:"content"`
+	Mails    string                   `json:"mails"`
+	FileName string                   `json:"filename"`
+	Datas    []map[string]interface{} `json:"datas"`
 }
 
 type UpFileReq struct {
@@ -99,45 +136,22 @@ type UpFileReq struct {
 	FileName   string `form:"fileName"`
 }
 
-type AddProjectReq struct {
-	PositionId   int64  `header:"positionId,optional"`
-	Source       int64  `json:"source,optional"`
-	InfoId       string `json:"info_id,optional"`
-	PositionType int64  `header:"positionType,optional"`
-	AccountId    int64  `header:"accountId,optional"`
-	CompanyName  string `header:"entName,optional"`
-	UserName     string `header:"userName,optional"`
-	UserId       int64  `header:"newUserId,optional"`
-	EntId        int64  `header:"entId,optional"`
-	EntUserName  string `header:"entUserName,optional"`
-}
-
-type BiResp struct {
-	Error_code int64       `json:"error_code"` //响应代码
-	Error_msg  string      `json:"error_msg"`  //响应消息
-	Data       interface{} `json:"data"`
-}
-
-type CallReq struct {
-	PositionId int64  `header:"positionId,optional"`
-	Phone      string `json:"phone"`
-}
-
-type DrawClueReq struct {
-	PositionId int64 `header:"positionId,optional"`
-	Count      int64 `json:"count,optional"`
-}
-
-type GetCompanyTypeReq struct {
-	CompanyName string `json:"companyName"`
-}
-
-type GetInfoIdReq struct {
-	PositionId int64 `header:"positionId,optional"`
+type SendMailReq struct {
+	Title   string `json:"title"`
+	Content string `json:"content"`
+	Mails   string `json:"mails"`
 }
 
-type MyDataAssetReq struct {
-	UserId    string `header:"userId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	EntUserId int64  `header:"entUserId,optional"`
+type AcceptanceReq struct {
+	ProposeType     int64  `json:"proposeType,optional"`
+	Propose_time    string `json:"proposeTime,optional"`
+	Channel         string `json:"channel,optional"`
+	Acceptance_type int64  `json:"acceptanceType,optional"`
+	Status          int64  `json:"status,optional"`
+	Over_time       string `json:"overTime,optional"`
+	Remark          string `json:"remark,optional"`
+	PositionId      int64  `header:"positionId,optional"`
+	DeptId          string `header:"deptId,optional"` //部门id
+	EntUserName     string `header:"entUserName,optional"`
+	ParamData       string `json:"paramData,optional"`
 }

+ 18 - 1
entity/entity.go

@@ -28,6 +28,7 @@ var (
 	JyBiTidb         *mysql.Mysql
 	CallTidb         *mysql.Mysql
 	BiService        *mysql.Mysql
+	WorkOrder        *mysql.Mysql
 	Mgo              *mongodb.MongodbSim
 	Bidding          *mongodb.MongodbSim
 	MgoQyxy          *mongodb.MongodbSim
@@ -62,6 +63,7 @@ var (
 	OssBucketName    string
 	OssUrl           string
 	FileCenterRpc    filecenter.FileCenter
+	ProductMap       map[string]bool
 )
 
 type HlyjS struct {
@@ -93,7 +95,7 @@ func InitMail(GmailAuthArr []struct {
 		GmailAuth = append(GmailAuth, mail1)
 	}
 }
-func InitMysql(n, x, y, z, s, m, a *mysql.Mysql) {
+func InitMysql(n, x, y, z, s, m, a, w *mysql.Mysql) {
 	JyMysql = &mysql.Mysql{
 		Address:      n.Address,
 		UserName:     n.UserName,
@@ -157,6 +159,15 @@ func InitMysql(n, x, y, z, s, m, a *mysql.Mysql) {
 		MaxIdleConns: a.MaxIdleConns,
 	}
 	BiService.Init()
+	WorkOrder = &mysql.Mysql{
+		Address:      w.Address,
+		UserName:     w.UserName,
+		PassWord:     w.PassWord,
+		DBName:       w.DBName,
+		MaxOpenConns: w.MaxOpenConns,
+		MaxIdleConns: w.MaxIdleConns,
+	}
+	WorkOrder.Init()
 	logx.Info("初始化mysql")
 }
 
@@ -266,3 +277,9 @@ func InitMiddleground(host []string, resourceCenterKey string) {
 		RegResourceCenter(resourceCenterKey)
 
 }
+
+func ProductInit(productArr []string) {
+	for _, v := range productArr {
+		ProductMap[v] = true
+	}
+}

+ 22 - 0
rpc/biService.proto

@@ -211,6 +211,27 @@ message UpFileReq {
 	string fileName = 8;
 	string fileSize = 9;
 }
+message AcceptanceReq{
+	int64 	ProposeType=1;
+	string Propose_time  =2;
+	string Channel   =3;
+	int64 Acceptance_type =4;
+	int64 Status       =5;
+	string Over_time   =6;
+	string Remark      =7;
+	int64 PositionId   =8;
+	string DeptId      =9;
+	string EntUserName    =10;
+	string paramData=11;
+}
+	message 	AcceptanceResp{
+		int64 error_code = 1;
+		string error_msg = 2;
+		Acceptance data = 3;
+	}
+	message  Acceptance{
+	 int64  id=1;
+	}
 
 message SendMailReq {
 	string title = 1;
@@ -239,4 +260,5 @@ service BiService {
 	rpc sendMail (ExportByDbReq) returns (BiReply); //数据导出(通用)
 	rpc upFile (UpFileReq) returns(BiReply);
 	rpc sendCommonMail (SendMailReq) returns(BiReply);
+	rpc addAcceptance (AcceptanceReq) returns(AcceptanceResp);
 }

+ 2 - 1
rpc/biservice.go

@@ -29,7 +29,7 @@ func main() {
 	srv := server.NewBiServiceServer(ctx)
 	logx.MustSetup(IC.IC.Logx)
 	entity.PublicKey = IC.IC.PublicKey
-	entity.InitMysql(IC.IC.Mysql.JianYu, IC.IC.Mysql.JyDoc, IC.IC.Mysql.Bi, IC.IC.Mysql.Tidb, IC.IC.Mysql.BiTidb, IC.IC.Mysql.CallTidb, IC.IC.Mysql.BiService)
+	entity.InitMysql(IC.IC.Mysql.JianYu, IC.IC.Mysql.JyDoc, IC.IC.Mysql.Bi, IC.IC.Mysql.Tidb, IC.IC.Mysql.BiTidb, IC.IC.Mysql.CallTidb, IC.IC.Mysql.BiService, IC.IC.Mysql.WorkOrder)
 	entity.InitMail(IC.IC.Mail)
 	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)
@@ -63,4 +63,5 @@ func main() {
 	defer s.Stop()
 	fmt.Printf("Starting rpc server at %s...\n", IC.IC.ListenOn)
 	s.Start()
+
 }

+ 9 - 0
rpc/biservice/biservice.go

@@ -13,6 +13,9 @@ import (
 )
 
 type (
+	Acceptance             = pb.Acceptance
+	AcceptanceReq          = pb.AcceptanceReq
+	AcceptanceResp         = pb.AcceptanceResp
 	AddProject             = pb.AddProject
 	AddProjectReq          = pb.AddProjectReq
 	AddProjectResp         = pb.AddProjectResp
@@ -67,6 +70,7 @@ type (
 		SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 		UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
 		SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
+		AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error)
 	}
 
 	defaultBiService struct {
@@ -179,3 +183,8 @@ func (m *defaultBiService) SendCommonMail(ctx context.Context, in *SendMailReq,
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.SendCommonMail(ctx, in, opts...)
 }
+
+func (m *defaultBiService) AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.AddAcceptance(ctx, in, opts...)
+}

+ 48 - 15
rpc/etc/biservice.yaml

@@ -2,41 +2,41 @@ Name: biservice.rpc
 ListenOn: 0.0.0.0:9996
 Etcd:
   Hosts:
-    - 192.168.3.206:2379
+    - 127.0.0.1:2379
   Key: biservice.rpc
 Timeout: 300000
 Mode: test
 Mysql:
   JianYu:
     DBName: jianyu
-    Address: jymysql.jydev.jy360.cn:33066
-    UserName: jianyu
-    PassWord: Topnet123
+    Address:  192.168.3.14:4000
+    UserName: root
+    PassWord: =PDT49#80Z!RVv52_z
     MaxOpenConns: 5
     MaxIdleConns: 5
   JyDoc:
     DBName: jydocs
-    Address: jymysql.jydev.jy360.cn:33066
-    UserName: jianyu
-    PassWord: Topnet123
+    Address:  192.168.3.14:4000
+    UserName: root
+    PassWord: =PDT49#80Z!RVv52_z
     MaxOpenConns: 5
     MaxIdleConns: 5
   Bi:
-    DBName: jianyu_subjectdb_test
+    DBName: jianyu_subjectdb
     Address: 192.168.3.149:4000
     UserName: xuzhiheng
-    PassWord: "Xzh#20221122K"
+    PassWord: Xzh#20221122K
     MaxOpenConns: 30
     MaxIdleConns: 30
   Tidb:
     DBName: base_service
     Address: 192.168.3.217:4000
     UserName: root
-    PassWord: "=PDT49#80Z!RVv52_z"
+    PassWord: =PDT49#80Z!RVv52_z
     MaxOpenConns: 5
     MaxIdleConns: 5
   BiTidb:
-    DBName: jianyu_subjectdb_test
+    DBName: jianyu_subjectdb
     Address: 192.168.3.149:4000
     UserName: root
     PassWord: "Tibi#20211222"
@@ -46,14 +46,21 @@ Mysql:
     DBName: Call_Accounting
     Address: 192.168.3.149:4000
     UserName: root
-    PassWord: "Tibi#20211222"
+    PassWord: Tibi#20211222
     MaxOpenConns: 5
     MaxIdleConns: 5
   BiService:
     DBName: bi_service
     Address: 192.168.3.217:4000
     UserName: root
-    PassWord: "=PDT49#80Z!RVv52_z"
+    PassWord: =PDT49#80Z!RVv52_z
+    MaxOpenConns: 5
+    MaxIdleConns: 5
+  WorkOrder:
+    DBName: work_order
+    Address: 192.168.3.14:4000
+    UserName: root
+    PassWord: =PDT49#80Z!RVv52_z
     MaxOpenConns: 5
     MaxIdleConns: 5
 Mongo:
@@ -119,7 +126,7 @@ Mail:
   - Addr: smtp.exmail.qq.com
     Port: 465
     Pwd: "ue9Rg9Sf4CVtdm5a"
-    User: "public03@topnet.net.cn"
+    User: "public03@topnet.net"
 UpdateProjectUrl: "http://192.168.3.206:7778/updateProject"
 ExportDirectory: "/home/tietaRes"
 ExportUrl: "https://jybx-webtest.jydev.jianyu360.com/tietaRes"
@@ -127,4 +134,30 @@ ExportCount: 15000
 #新增
 ComFileDir: "/home/biComFileRes"
 ComFileUrl: "https://jybx2-webtest.jydev.jianyu360.com/biComFileRes"
-ResourceCenterKey: resource.rpc
+ResourceCenterKey: resource.rpc
+FileCenterRpc:
+  Etcd:
+    Hosts:
+      - 192.168.3.206:2379
+    Key: filecenter.rpc
+ossBucketName: jytest2022
+ossUrl: https://jytest2022.oss-cn-beijing.aliyuncs.com
+allocationCap: 400
+productArr :
+  - 数据流量包
+  - 结构化数据
+  - API接口
+  - 广告服务
+entId: 1949
+dkPersonMap:
+  - personName: 孙振杰
+    phone: 18103853130
+  - personName: 朱凤超
+    phone: 13027770072
+  - personName: 张文福
+    phone: 15615600992
+  - personName: 王普
+    phone: 13683808356
+
+
+

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

@@ -21,6 +21,7 @@ type Config struct {
 		BiTidb    *mysql.Mysql
 		CallTidb  *mysql.Mysql
 		BiService *mysql.Mysql
+		WorkOrder *mysql.Mysql
 	}
 	Mongo struct {
 		Qfw struct {
@@ -91,4 +92,7 @@ type Config struct {
 	OssBucketName     string
 	OssUrl            string
 	AllocationCap     int64
+	DkPersonMap       []map[string]interface{}
+	ProductArr        []string
+	EntId             int64
 }

+ 40 - 0
rpc/internal/logic/addacceptancelogic.go

@@ -0,0 +1,40 @@
+package logic
+
+import (
+	IC "bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/config"
+	"bp.jydev.jianyu360.cn/BaseService/biService/service"
+	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type AddAcceptanceLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewAddAcceptanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddAcceptanceLogic {
+	return &AddAcceptanceLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *AddAcceptanceLogic) AddAcceptance(in *pb.AcceptanceReq) (*pb.AcceptanceResp, error) {
+	// todo: add your logic here and delete this line
+	productMap := map[string]string{}
+	for _, v := range IC.IC.ProductArr {
+		productMap[v] = "dk"
+	}
+	return &pb.AcceptanceResp{
+		ErrorCode: 0,
+		Data: &pb.Acceptance{
+			Id: service.AddAcceptance(in, IC.IC.DkPersonMap, IC.IC.EntId, productMap),
+		},
+	}, nil
+}

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

@@ -121,3 +121,8 @@ func (s *BiServiceServer) SendCommonMail(ctx context.Context, in *pb.SendMailReq
 	l := logic.NewSendCommonMailLogic(ctx, s.svcCtx)
 	return l.SendCommonMail(in)
 }
+
+func (s *BiServiceServer) AddAcceptance(ctx context.Context, in *pb.AcceptanceReq) (*pb.AcceptanceResp, error) {
+	l := logic.NewAddAcceptanceLogic(ctx, s.svcCtx)
+	return l.AddAcceptance(in)
+}

+ 428 - 115
rpc/pb/biService.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.32.0
-// 	protoc        v4.25.2
+// 	protoc-gen-go v1.31.0
+// 	protoc        v3.15.1
 // source: biService.proto
 
 package pb
@@ -2173,6 +2173,243 @@ func (x *UpFileReq) GetFileSize() string {
 	return ""
 }
 
+type AcceptanceReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ProposeType    int64  `protobuf:"varint,1,opt,name=ProposeType,proto3" json:"ProposeType,omitempty"`
+	ProposeTime    string `protobuf:"bytes,2,opt,name=Propose_time,json=ProposeTime,proto3" json:"Propose_time,omitempty"`
+	Channel        string `protobuf:"bytes,3,opt,name=Channel,proto3" json:"Channel,omitempty"`
+	AcceptanceType int64  `protobuf:"varint,4,opt,name=Acceptance_type,json=AcceptanceType,proto3" json:"Acceptance_type,omitempty"`
+	Status         int64  `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"`
+	OverTime       string `protobuf:"bytes,6,opt,name=Over_time,json=OverTime,proto3" json:"Over_time,omitempty"`
+	Remark         string `protobuf:"bytes,7,opt,name=Remark,proto3" json:"Remark,omitempty"`
+	PositionId     int64  `protobuf:"varint,8,opt,name=PositionId,proto3" json:"PositionId,omitempty"`
+	DeptId         string `protobuf:"bytes,9,opt,name=DeptId,proto3" json:"DeptId,omitempty"`
+	EntUserName    string `protobuf:"bytes,10,opt,name=EntUserName,proto3" json:"EntUserName,omitempty"`
+	ParamData      string `protobuf:"bytes,11,opt,name=paramData,proto3" json:"paramData,omitempty"`
+}
+
+func (x *AcceptanceReq) Reset() {
+	*x = AcceptanceReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[31]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AcceptanceReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AcceptanceReq) ProtoMessage() {}
+
+func (x *AcceptanceReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[31]
+	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 AcceptanceReq.ProtoReflect.Descriptor instead.
+func (*AcceptanceReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *AcceptanceReq) GetProposeType() int64 {
+	if x != nil {
+		return x.ProposeType
+	}
+	return 0
+}
+
+func (x *AcceptanceReq) GetProposeTime() string {
+	if x != nil {
+		return x.ProposeTime
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetChannel() string {
+	if x != nil {
+		return x.Channel
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetAcceptanceType() int64 {
+	if x != nil {
+		return x.AcceptanceType
+	}
+	return 0
+}
+
+func (x *AcceptanceReq) GetStatus() int64 {
+	if x != nil {
+		return x.Status
+	}
+	return 0
+}
+
+func (x *AcceptanceReq) GetOverTime() string {
+	if x != nil {
+		return x.OverTime
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetRemark() string {
+	if x != nil {
+		return x.Remark
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+func (x *AcceptanceReq) GetDeptId() string {
+	if x != nil {
+		return x.DeptId
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetEntUserName() string {
+	if x != nil {
+		return x.EntUserName
+	}
+	return ""
+}
+
+func (x *AcceptanceReq) GetParamData() string {
+	if x != nil {
+		return x.ParamData
+	}
+	return ""
+}
+
+type AcceptanceResp 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      *Acceptance `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *AcceptanceResp) Reset() {
+	*x = AcceptanceResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[32]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AcceptanceResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AcceptanceResp) ProtoMessage() {}
+
+func (x *AcceptanceResp) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[32]
+	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 AcceptanceResp.ProtoReflect.Descriptor instead.
+func (*AcceptanceResp) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *AcceptanceResp) GetErrorCode() int64 {
+	if x != nil {
+		return x.ErrorCode
+	}
+	return 0
+}
+
+func (x *AcceptanceResp) GetErrorMsg() string {
+	if x != nil {
+		return x.ErrorMsg
+	}
+	return ""
+}
+
+func (x *AcceptanceResp) GetData() *Acceptance {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type Acceptance struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *Acceptance) Reset() {
+	*x = Acceptance{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[33]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Acceptance) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Acceptance) ProtoMessage() {}
+
+func (x *Acceptance) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[33]
+	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 Acceptance.ProtoReflect.Descriptor instead.
+func (*Acceptance) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *Acceptance) GetId() int64 {
+	if x != nil {
+		return x.Id
+	}
+	return 0
+}
+
 type SendMailReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -2186,7 +2423,7 @@ type SendMailReq struct {
 func (x *SendMailReq) Reset() {
 	*x = SendMailReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_biService_proto_msgTypes[31]
+		mi := &file_biService_proto_msgTypes[34]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -2199,7 +2436,7 @@ func (x *SendMailReq) String() string {
 func (*SendMailReq) ProtoMessage() {}
 
 func (x *SendMailReq) ProtoReflect() protoreflect.Message {
-	mi := &file_biService_proto_msgTypes[31]
+	mi := &file_biService_proto_msgTypes[34]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -2212,7 +2449,7 @@ func (x *SendMailReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use SendMailReq.ProtoReflect.Descriptor instead.
 func (*SendMailReq) Descriptor() ([]byte, []int) {
-	return file_biService_proto_rawDescGZIP(), []int{31}
+	return file_biService_proto_rawDescGZIP(), []int{34}
 }
 
 func (x *SendMailReq) GetTitle() string {
@@ -2489,68 +2726,102 @@ var file_biService_proto_rawDesc = []byte{
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
 	0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
-	0x69, 0x7a, 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52,
-	0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
-	0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
-	0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x32, 0xe9, 0x06, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
+	0x69, 0x7a, 0x65, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
+	0x63, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x70,
+	0x6f, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f,
+	0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50,
+	0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68,
+	0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x61,
+	0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
+	0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x41,
+	0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
+	0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53,
+	0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x4f, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69,
+	0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x54, 0x69,
+	0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+	0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x44, 0x65,
+	0x70, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x44, 0x65, 0x70, 0x74,
+	0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+	0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+	0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x44, 0x61, 0x74,
+	0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x44, 0x61,
+	0x74, 0x61, 0x22, 0x6d, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65,
+	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, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
+	0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x22, 0x1c, 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
+	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22,
+	0x53, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x14,
+	0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
+	0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14,
+	0x0a, 0x05, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d,
+	0x61, 0x69, 0x6c, 0x73, 0x32, 0x9b, 0x07, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
@@ -2565,7 +2836,7 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
@@ -2598,7 +2869,10 @@ var file_biService_proto_goTypes = []interface{}{
 	(*ExportByDbReq)(nil),          // 28: ExportByDbReq
 	(*FilesData)(nil),              // 29: FilesData
 	(*UpFileReq)(nil),              // 30: UpFileReq
-	(*SendMailReq)(nil),            // 31: SendMailReq
+	(*AcceptanceReq)(nil),          // 31: AcceptanceReq
+	(*AcceptanceResp)(nil),         // 32: AcceptanceResp
+	(*Acceptance)(nil),             // 33: Acceptance
+	(*SendMailReq)(nil),            // 34: SendMailReq
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -2609,51 +2883,54 @@ var file_biService_proto_depIdxs = []int32{
 	25, // 5: DistributeClueShowReq.datas:type_name -> DistributeClueShows
 	26, // 6: DistributeClueShowResp.data:type_name -> DistributeClueShowss
 	29, // 7: ExportByDbReq.datas:type_name -> FilesData
-	0,  // 8: BiService.myDataAsset:input_type -> MyDataAssetReq
-	3,  // 9: BiService.addProject:input_type -> AddProjectReq
-	3,  // 10: BiService.getInfoId:input_type -> AddProjectReq
-	7,  // 11: BiService.drawClue:input_type -> DrawClueReq
-	8,  // 12: BiService.Call:input_type -> CallReq
-	11, // 13: BiService.distributeClue:input_type -> DistributeClueReq
-	13, // 14: BiService.clueImport:input_type -> ClueImportReq
-	16, // 15: BiService.clueAdd:input_type -> ClueAddReq
-	13, // 16: BiService.clueImportTt:input_type -> ClueImportReq
-	8,  // 17: BiService.autoFollow:input_type -> CallReq
-	17, // 18: BiService.sqlManage:input_type -> SqlManageReq
-	18, // 19: BiService.myInfo:input_type -> MyInfoReq
-	20, // 20: BiService.allInfoExport:input_type -> ExportReq
-	20, // 21: BiService.allProjectExport:input_type -> ExportReq
-	21, // 22: BiService.infoOperate:input_type -> OperateReq
-	22, // 23: BiService.getCompanyType:input_type -> CompanyReq
-	24, // 24: BiService.distributeClueShow:input_type -> DistributeClueShowReq
-	28, // 25: BiService.sendMail:input_type -> ExportByDbReq
-	30, // 26: BiService.upFile:input_type -> UpFileReq
-	31, // 27: BiService.sendCommonMail:input_type -> SendMailReq
-	1,  // 28: BiService.myDataAsset:output_type -> MyDataAssetResp
-	4,  // 29: BiService.addProject:output_type -> AddProjectResp
-	6,  // 30: BiService.getInfoId:output_type -> GetInfoIdResp
-	4,  // 31: BiService.drawClue:output_type -> AddProjectResp
-	9,  // 32: BiService.Call:output_type -> BiResp
-	4,  // 33: BiService.distributeClue:output_type -> AddProjectResp
-	14, // 34: BiService.clueImport:output_type -> ClueImportResp
-	4,  // 35: BiService.clueAdd:output_type -> AddProjectResp
-	14, // 36: BiService.clueImportTt:output_type -> ClueImportResp
-	14, // 37: BiService.autoFollow:output_type -> ClueImportResp
-	10, // 38: BiService.sqlManage:output_type -> BiReply
-	10, // 39: BiService.myInfo:output_type -> BiReply
-	10, // 40: BiService.allInfoExport:output_type -> BiReply
-	10, // 41: BiService.allProjectExport:output_type -> BiReply
-	10, // 42: BiService.infoOperate:output_type -> BiReply
-	23, // 43: BiService.getCompanyType:output_type -> CompanyResp
-	27, // 44: BiService.distributeClueShow:output_type -> DistributeClueShowResp
-	10, // 45: BiService.sendMail:output_type -> BiReply
-	10, // 46: BiService.upFile:output_type -> BiReply
-	10, // 47: BiService.sendCommonMail:output_type -> BiReply
-	28, // [28:48] is the sub-list for method output_type
-	8,  // [8:28] is the sub-list for method input_type
-	8,  // [8:8] is the sub-list for extension type_name
-	8,  // [8:8] is the sub-list for extension extendee
-	0,  // [0:8] is the sub-list for field type_name
+	33, // 8: AcceptanceResp.data:type_name -> Acceptance
+	0,  // 9: BiService.myDataAsset:input_type -> MyDataAssetReq
+	3,  // 10: BiService.addProject:input_type -> AddProjectReq
+	3,  // 11: BiService.getInfoId:input_type -> AddProjectReq
+	7,  // 12: BiService.drawClue:input_type -> DrawClueReq
+	8,  // 13: BiService.Call:input_type -> CallReq
+	11, // 14: BiService.distributeClue:input_type -> DistributeClueReq
+	13, // 15: BiService.clueImport:input_type -> ClueImportReq
+	16, // 16: BiService.clueAdd:input_type -> ClueAddReq
+	13, // 17: BiService.clueImportTt:input_type -> ClueImportReq
+	8,  // 18: BiService.autoFollow:input_type -> CallReq
+	17, // 19: BiService.sqlManage:input_type -> SqlManageReq
+	18, // 20: BiService.myInfo:input_type -> MyInfoReq
+	20, // 21: BiService.allInfoExport:input_type -> ExportReq
+	20, // 22: BiService.allProjectExport:input_type -> ExportReq
+	21, // 23: BiService.infoOperate:input_type -> OperateReq
+	22, // 24: BiService.getCompanyType:input_type -> CompanyReq
+	24, // 25: BiService.distributeClueShow:input_type -> DistributeClueShowReq
+	28, // 26: BiService.sendMail:input_type -> ExportByDbReq
+	30, // 27: BiService.upFile:input_type -> UpFileReq
+	34, // 28: BiService.sendCommonMail:input_type -> SendMailReq
+	31, // 29: BiService.addAcceptance:input_type -> AcceptanceReq
+	1,  // 30: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 31: BiService.addProject:output_type -> AddProjectResp
+	6,  // 32: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 33: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 34: BiService.Call:output_type -> BiResp
+	4,  // 35: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 36: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 37: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 38: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 39: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 40: BiService.sqlManage:output_type -> BiReply
+	10, // 41: BiService.myInfo:output_type -> BiReply
+	10, // 42: BiService.allInfoExport:output_type -> BiReply
+	10, // 43: BiService.allProjectExport:output_type -> BiReply
+	10, // 44: BiService.infoOperate:output_type -> BiReply
+	23, // 45: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 46: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	10, // 47: BiService.sendMail:output_type -> BiReply
+	10, // 48: BiService.upFile:output_type -> BiReply
+	10, // 49: BiService.sendCommonMail:output_type -> BiReply
+	32, // 50: BiService.addAcceptance:output_type -> AcceptanceResp
+	30, // [30:51] is the sub-list for method output_type
+	9,  // [9:30] 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
 }
 
 func init() { file_biService_proto_init() }
@@ -3035,6 +3312,42 @@ func file_biService_proto_init() {
 			}
 		}
 		file_biService_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AcceptanceReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AcceptanceResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Acceptance); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*SendMailReq); i {
 			case 0:
 				return &v.state
@@ -3053,7 +3366,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   32,
+			NumMessages:   35,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 1
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             v4.25.2
+// - protoc             v3.15.1
 // source: biService.proto
 
 package pb
@@ -39,6 +39,7 @@ const (
 	BiService_SendMail_FullMethodName           = "/BiService/sendMail"
 	BiService_UpFile_FullMethodName             = "/BiService/upFile"
 	BiService_SendCommonMail_FullMethodName     = "/BiService/sendCommonMail"
+	BiService_AddAcceptance_FullMethodName      = "/BiService/addAcceptance"
 )
 
 // BiServiceClient is the client API for BiService service.
@@ -65,6 +66,7 @@ type BiServiceClient interface {
 	SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 	UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
 	SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
+	AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error)
 }
 
 type biServiceClient struct {
@@ -255,6 +257,15 @@ func (c *biServiceClient) SendCommonMail(ctx context.Context, in *SendMailReq, o
 	return out, nil
 }
 
+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...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BiServiceServer is the server API for BiService service.
 // All implementations must embed UnimplementedBiServiceServer
 // for forward compatibility
@@ -279,6 +290,7 @@ type BiServiceServer interface {
 	SendMail(context.Context, *ExportByDbReq) (*BiReply, error)
 	UpFile(context.Context, *UpFileReq) (*BiReply, error)
 	SendCommonMail(context.Context, *SendMailReq) (*BiReply, error)
+	AddAcceptance(context.Context, *AcceptanceReq) (*AcceptanceResp, error)
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -346,6 +358,9 @@ func (UnimplementedBiServiceServer) UpFile(context.Context, *UpFileReq) (*BiRepl
 func (UnimplementedBiServiceServer) SendCommonMail(context.Context, *SendMailReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SendCommonMail not implemented")
 }
+func (UnimplementedBiServiceServer) AddAcceptance(context.Context, *AcceptanceReq) (*AcceptanceResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AddAcceptance not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -719,6 +734,24 @@ func _BiService_SendCommonMail_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_AddAcceptance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AcceptanceReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).AddAcceptance(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_AddAcceptance_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).AddAcceptance(ctx, req.(*AcceptanceReq))
+	}
+	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)
@@ -806,6 +839,10 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "sendCommonMail",
 			Handler:    _BiService_SendCommonMail_Handler,
 		},
+		{
+			MethodName: "addAcceptance",
+			Handler:    _BiService_AddAcceptance_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",

+ 236 - 0
service/acceptance.go

@@ -0,0 +1,236 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/redis"
+	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"database/sql"
+	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
+	"github.com/zeromicro/go-zero/core/logx"
+	"log"
+	"strings"
+	"time"
+)
+
+func AddAcceptance(in *biservice.AcceptanceReq, DkPersonMap []map[string]interface{}, entId int64, productMap map[string]string) int64 {
+	nowTime := time.Now().Format(date.Date_Full_Layout)
+	//编号处理
+	is_clue := 1
+	acceptance_no := fmt.Sprintf("SLD%s%s", time.Now().Format(date.Date_Short_Layout), FindNumber("sld"))
+	acceptanceMap := map[string]interface{}{
+		"acceptance_no": acceptance_no,
+		"propose_type":  in.ProposeType,
+		//"propose_time":          in.ProposeTime,
+		"channel":               in.Channel,
+		"acceptance_type":       in.AcceptanceType,
+		"status":                in.Status,
+		"initiator_name":        in.EntUserName,
+		"initiator_position_id": in.PositionId,
+		"department_no":         in.DeptId,
+		"remark":                in.Remark,
+		"is_delete":             1,
+		"creator_name":          in.EntUserName,
+		"creator_position_id":   in.PositionId,
+		"creator_time":          nowTime,
+	}
+	ok := int64(0)
+	WorkOrder.ExecTx("受理单处理", func(tx *sql.Tx) bool {
+		//新增受理单子单
+		childMap := gconv.Map(in.ParamData)
+		if childMap != nil && len(childMap) > 0 {
+			innerArr := []interface{}{}
+			innerStr := []string{"acceptance_no", "field_name", "field_value", "creator_name", "creator_position_id", "creator_time"}
+			for k, v := range childMap {
+				innerArr = append(innerArr, acceptance_no)
+				innerArr = append(innerArr, k)
+				innerArr = append(innerArr, v)
+				innerArr = append(innerArr, in.EntUserName)
+				innerArr = append(innerArr, in.PositionId)
+				innerArr = append(innerArr, nowTime)
+			}
+			if len(innerArr) > 0 {
+				ok2, ok3 := WorkOrder.InsertBatchByTx(tx, "order_acceptance_children", innerStr, innerArr)
+				if ok2 <= 0 && ok3 <= 0 {
+					return false
+				}
+			}
+			//判断是否创建工单
+			dkPerson := ""
+			dkProduct := []string{}
+			dkPositionId := int64(0)
+			personMap := map[string]interface{}{}
+			if _, isOk := childMap["product"]; isOk {
+				for _, v := range strings.Split(gconv.String(childMap["product"]), ",") {
+					switch productMap[v] {
+					case "dk":
+						dkProduct = append(dkProduct, v)
+						if dkPositionId == 0 {
+							personMap = Findcandidate(DkPersonMap, entId)
+							dkPositionId = gconv.Int64(personMap["positionId"])
+						}
+						continue
+					default:
+						is_clue = 2
+					}
+
+				}
+			}
+			if dkPositionId != 0 {
+				work_order_no := fmt.Sprintf("SLD%s%s", time.Now().Format(date.Date_Short_Layout), FindNumber("gd"))
+				orderWorkMap := map[string]interface{}{
+					"work_order_no":         work_order_no,
+					"acceptance_no":         acceptance_no,
+					"type":                  strings.Join(dkProduct, ","),
+					"status":                1,
+					"initiator_name":        in.EntUserName,
+					"initiator_position_id": in.PositionId,
+					"current_name":          dkPerson,
+					"current_position_id":   dkPositionId,
+					"is_delete":             1,
+					"creator_name":          in.EntUserName,
+					"creator_position_id":   in.PositionId,
+					"creator_time":          nowTime,
+					"two_type":              "dk",
+					"department_no":         in.DeptId,
+				}
+				ok3 := WorkOrder.InsertByTx(tx, "order_work", orderWorkMap)
+				if ok3 <= 0 {
+					return false
+				}
+				//发送邮件
+				log.Println(personMap)
+
+			}
+		}
+		//先新增受理单主单
+		acceptanceMap["is_clue"] = is_clue
+		ok = WorkOrder.InsertByTx(tx, "order_acceptance", acceptanceMap)
+		if ok <= 0 {
+			logx.Info("受理单创建失败")
+			return false
+		}
+		//工单处理
+		return true
+	})
+	return ok
+
+}
+
+// 大客人员选择
+func Findcandidate(DkPersonMap []map[string]interface{}, entId int64) map[string]interface{} {
+	person := map[string]interface{}{}
+	positionArr := []string{}
+	personMap := map[string]map[string]interface{}{}
+	positionId := int64(0)
+	phoneArr := []string{}
+	for _, v := range DkPersonMap {
+		phoneArr = append(phoneArr, fmt.Sprintf(`"%s"`, gconv.String(v["phone"])))
+		personMap[gconv.String(v["phone"])] = map[string]interface{}{
+			"name": gconv.String(v["name"]),
+		}
+	}
+	//个人邮箱,部门信息获取
+	entUserArr := JyMysql.SelectBySql(fmt.Sprintf(`SELECT
+	a.name as  name,a.mail as mail,b.dept_id as  deptId,a.phone
+FROM
+	entniche_user a
+	INNER JOIN entniche_department_user b ON a.ent_id =%d
+	AND a.phone IN %s
+	and  a.id=b.user_id`, entId, fmt.Sprintf("(%s)", strings.Join(phoneArr, ","))))
+	if entUserArr != nil && len(*entUserArr) > 0 {
+		for _, v := range *entUserArr {
+			phone := gconv.String(v["phone"])
+			personMap[phone]["mail"] = gconv.String(v["mail"])
+			personMap[phone]["deptId"] = gconv.String(v["deptId"])
+		}
+	}
+	//
+	positionArrMap := JyTidb.SelectBySql(fmt.Sprintf(`select  a.phone,b.id from  
+                         base_user  a  
+                             INNER JOIN   base_position  b     
+                                 on     b.ent_id=%d  and a.phone in %s and  b.user_id=a.id and   b.type=1`,
+		entId, fmt.Sprintf("(%s)", strings.Join(phoneArr, ","))))
+	if positionArrMap != nil && len(*positionArrMap) > 0 {
+		for _, v := range *positionArrMap {
+			phone := gconv.String(v["phone"])
+			positionid := gconv.Int64(v["id"])
+			for k := range personMap {
+				if k == phone {
+					personMap[phone]["positionId"] = positionid
+					positionArr = append(positionArr, gconv.String(positionid))
+				}
+			}
+		}
+	}
+	//查询工单数量
+	positionNumberMap := WorkOrder.SelectBySql(`SELECT
+			current_position_id,
+			COUNT( 1 ) AS count 
+		FROM
+			order_work 
+		WHERE
+			current_position_id IN (?) 
+		ORDER BY
+			count`, strings.Join(positionArr, ","))
+	if positionNumberMap != nil && len(*positionNumberMap) > 0 {
+		positionId = gconv.Int64((*positionNumberMap)[0]["current_position_id"])
+	} else {
+		positionId = gconv.Int64(positionArr[0])
+	}
+	if positionId == 0 {
+		positionId = gconv.Int64(positionArr[0])
+	}
+	//商机管理员
+	deptId := int64(0)
+	for _, v := range personMap {
+		positionid := gconv.Int64(v["positionId"])
+		if positionId == positionid {
+			person = v
+			deptId = gconv.Int64(v["deptId"])
+		}
+	}
+	//本部门管理员查询
+	depthMap := JyMysql.SelectBySql(`SELECT
+		c.name as name,c.mail as  mail
+		FROM
+			entniche_department_user a
+			INNER JOIN entniche_user_role b ON a.dept_id = ? 
+			AND a.user_id = b.user_id 
+			AND b.role_id =2
+			INNER JOIN entniche_user c ON a.user_id = c.id`, deptId)
+	if depthMap != nil && len(*depthMap) > 0 {
+		person["deptPersonName"] = gconv.String((*depthMap)[0]["name"])
+		person["deptPersonMail"] = gconv.String((*depthMap)[0]["mail"])
+	}
+	//商机管理员查询
+	superiorDepthMap := JyMysql.SelectBySql(`SELECT
+	c.* 
+FROM
+	entniche_department d
+	INNER JOIN entniche_department_user a ON d.id = ? 
+	AND d.pid = a.dept_id
+	INNER JOIN entniche_user_role b ON a.user_id = b.user_id 
+	AND b.role_id = 1
+	INNER JOIN entniche_user c ON a.user_id = c.id`, deptId)
+	if superiorDepthMap != nil && len(*superiorDepthMap) > 0 {
+		person["superiorDepthPersonName"] = gconv.String((*superiorDepthMap)[0]["name"])
+		person["superiorDepthPersonMail"] = gconv.String((*superiorDepthMap)[0]["mail"])
+	}
+	return person
+}
+
+// 编号查询
+func FindNumber(moudle string) string {
+	today := time.Now().Format("2006-01-02")
+	yesterday := time.Now().AddDate(0, 0, -1).Format("2006-01-02")
+	key := fmt.Sprintf("%s_%s", today, moudle)
+	yesterdayKey := fmt.Sprintf("%s_%s", yesterday, moudle)
+	if ok, _ := redis.Exists("newother", yesterdayKey); ok {
+		//删除之前数据
+		redis.Del("newother", yesterdayKey)
+	}
+	count := redis.Incr("newother", key)
+	return fmt.Sprintf("%04d", count)
+}