liujiandao
2023-11-18 115bd9b51f5d8eade4658f844de37516486c60e7
crm获取aps项目模块信息
4个文件已添加
11个文件已修改
1022 ■■■■■ 已修改文件
api/v1/code.go 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/product.go 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/salesDetails.go 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
conf/aps-crm.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/grpc_init/crm_aps_init.go 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/request/salesDetails.go 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/salesDetails.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/crm_aps.proto 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/crm_aps/crm_aps.pb.go 559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/crm_aps/crm_aps_grpc.pb.go 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/salesDetails.go 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/v1/code.go
@@ -1,9 +1,9 @@
package v1
import (
    "aps_crm/conf"
    "aps_crm/constvar"
    "aps_crm/model"
    "aps_crm/model/grpc_init"
    "aps_crm/model/request"
    "aps_crm/model/response"
    "aps_crm/pkg/contextx"
@@ -12,30 +12,28 @@
    "aps_crm/proto/code"
    "github.com/gin-gonic/gin"
    "github.com/spf13/cast"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
)
type CodeApi struct{}
var (
    codeServiceConn *grpc.ClientConn
)
func InitCodeServiceConn() {
    var err error
    codeServiceConn, err = grpc.Dial(conf.Conf.GrpcServiceAddr.Aps, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseCodeServiceConn() {
    if codeServiceConn != nil {
        codeServiceConn.Close()
    }
}
//var (
//    codeServiceConn *grpc.ClientConn
//)
//
//func InitCodeServiceConn() {
//    var err error
//    codeServiceConn, err = grpc.Dial(conf.Conf.GrpcServiceAddr.Aps, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseCodeServiceConn() {
//    if codeServiceConn != nil {
//        codeServiceConn.Close()
//    }
//}
// GetCodeList
//
@@ -55,7 +53,7 @@
    params.CodeStandID = c.Query("codeStandID")
    params.Name = c.Query("name")
    params.Type = c.Query("type")
    client := code.NewCodeServiceClient(codeServiceConn)
    client := code.NewCodeServiceClient(grpc_init.CrmApsGrpcServiceConn)
    list, err := client.GetCodeList(ctx.GetCtx(), &code.GetCodeListRequest{
        Page:        cast.ToInt32(params.Page),
        PageSize:    cast.ToInt32(params.PageSize),
api/v1/product.go
@@ -1,8 +1,8 @@
package v1
import (
    "aps_crm/conf"
    "aps_crm/model"
    "aps_crm/model/grpc_init"
    "aps_crm/model/request"
    "aps_crm/model/response"
    "aps_crm/pkg/contextx"
@@ -10,35 +10,31 @@
    "aps_crm/pkg/logx"
    "aps_crm/proto/product"
    "aps_crm/utils"
    "fmt"
    "github.com/gin-gonic/gin"
    "github.com/shopspring/decimal"
    "github.com/spf13/cast"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
)
type ProductApi struct{}
var (
    productServiceConn *grpc.ClientConn
)
func InitProductServiceConn() {
    fmt.Println(conf.Conf.GrpcServiceAddr.Aps)
    var err error
    productServiceConn, err = grpc.Dial(conf.Conf.GrpcServiceAddr.Aps, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial product service error: %v", err.Error())
        return
    }
}
func CloseProductServiceConn() {
    if productServiceConn != nil {
        productServiceConn.Close()
    }
}
//var (
//    productServiceConn *grpc.ClientConn
//)
//
//func InitProductServiceConn() {
//    var err error
//    productServiceConn, err = grpc.Dial(conf.Conf.GrpcServiceAddr.Aps, grpc.WithTransportCredentials(insecure.NewCredentials()))
//    if err != nil {
//        logx.Errorf("grpc dial product service error: %v", err.Error())
//        return
//    }
//}
//
//func CloseProductServiceConn() {
//    if productServiceConn != nil {
//        productServiceConn.Close()
//    }
//}
// List
//
@@ -60,7 +56,7 @@
        return
    }
    cli := product.NewProductServiceClient(productServiceConn)
    cli := product.NewProductServiceClient(grpc_init.CrmApsGrpcServiceConn)
    getProductListResponse, err := cli.GetProductList(ctx.GetCtx(), &product.GetProductListRequest{
        Page:          cast.ToInt32(params.Page),
        PageSize:      cast.ToInt32(params.PageSize),
@@ -110,7 +106,7 @@
    // 获取产品ID
    productId := c.Query("productNumber")
    cli := product.NewProductServiceClient(productServiceConn)
    cli := product.NewProductServiceClient(grpc_init.CrmApsGrpcServiceConn)
    getProductInfoResponse, err := cli.GetProductInfo(ctx.GetCtx(), &product.GetProductInfoRequest{ProductId: productId})
    if err != nil {
@@ -158,7 +154,7 @@
        pa.EndTime = first.DeliveryDate
        params = append(params, &pa)
    }
    client := product.NewProductServiceClient(productServiceConn)
    client := product.NewProductServiceClient(grpc_init.CrmApsGrpcServiceConn)
    info, err := client.GetProductOrder(ctx.GetCtx(), &product.GetProductOrderRequest{Params: params})
    if err != nil {
        logx.Errorf("GetProductOrder err: %v", err.Error())
api/v1/salesDetails.go
@@ -4,15 +4,18 @@
    "aps_crm/conf"
    "aps_crm/constvar"
    "aps_crm/model"
    "aps_crm/model/grpc_init"
    "aps_crm/model/request"
    "aps_crm/model/response"
    "aps_crm/pkg/contextx"
    "aps_crm/pkg/ecode"
    "aps_crm/pkg/logx"
    "aps_crm/pkg/structx"
    "aps_crm/proto/crm_aps"
    "aps_crm/proto/product_inventory"
    "aps_crm/utils"
    "github.com/gin-gonic/gin"
    "github.com/shopspring/decimal"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
    "strconv"
@@ -327,3 +330,77 @@
    }
    ctx.Ok()
}
// GetApsProjectList
//
// @Tags        SalesDetails
// @Summary        获取aps项目列表
// @Produce    application/json
// @Success    200    {object}    response.Response
//
//    @Router        /api/salesDetails/getApsProjectList [get]
func (s *SalesDetailsApi) GetApsProjectList(c *gin.Context) {
    ctx, ok := contextx.NewContext(c, nil)
    if !ok {
        return
    }
    client := crm_aps.NewCrmAndApsGrpcServiceClient(grpc_init.CrmApsGrpcServiceConn)
    projectList, err := client.GetApsProjectList(c, &crm_aps.GetApsProjectListRequest{})
    if err != nil {
        ctx.FailWithMsg(ecode.UnknownErr, "grpc调用错误: "+err.Error())
        return
    }
    ctx.OkWithDetailed(projectList.List)
}
// SendSalesDetailsToApsProject
//
// @Tags        SalesDetails
// @Summary      推送销售明细信息到aps项目模块
// @Produce    application/json
// @Param        object    body        request.SalesDetails    true    "查询参数"
// @Success    200    {object}    response.ListResponse
//
//    @Router        /api/salesDetails/sendSalesDetailsToApsProject [post]
func (s *SalesDetailsApi) SendSalesDetailsToApsProject(c *gin.Context) {
    var params request.SalesDetails
    ctx, ok := contextx.NewContext(c, &params)
    if !ok {
        return
    }
    m := make(map[string]interface{})
    m["status"] = params.Status
    err := model.NewSalesDetailsSearch().SetNumber(params.Number).UpdateByMap(m)
    if err != nil {
        ctx.FailWithMsg(ecode.UnknownErr, "状态更新失败")
        return
    }
    products := make([]*crm_aps.SalesDetailsProduct, 0)
    var total decimal.Decimal
    for _, product := range params.Products {
        var sp crm_aps.SalesDetailsProduct
        sp.ProductId = product.Number
        sp.Amount = product.Amount.IntPart()
        products = append(products, &sp)
        total = total.Add(product.Amount)
    }
    client := crm_aps.NewCrmAndApsGrpcServiceClient(grpc_init.CrmApsGrpcServiceConn)
    _, err = client.SendSalesDetailsToApsProject(c, &crm_aps.SendSalesDetailsToApsProjectRequest{
        Number:       params.Number,
        ClientName:   params.Client.Name,
        MemberName:   params.Member.Username,
        SignTime:     params.SignTime,
        DeliveryDate: params.DeliveryDate,
        Source:       params.Source,
        ProductTotal: total.IntPart(),
        ProjectId:    params.ProjectId,
        Products:     products,
    })
    if err != nil {
        ctx.FailWithMsg(ecode.UnknownErr, "grpc调用错误: "+err.Error())
        return
    }
    ctx.Ok()
}
conf/aps-crm.json
@@ -49,7 +49,7 @@
    "Issuer": "qmPlus"
  },
  "GrpcServiceAddr": {
    "Aps": "192.168.20.119:9091",
    "Aps": "192.168.20.118:9091",
    "Admin": "192.168.20.119:50051",
    "WMS": "192.168.20.118:8006"
  }
docs/docs.go
@@ -5556,6 +5556,15 @@
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "name": "principleIds",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "sourceId",
                        "in": "query"
@@ -11832,6 +11841,9 @@
                },
                "total": {
                    "type": "number"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
@@ -13362,6 +13374,10 @@
                    "type": "string"
                },
                "realName": {
                    "type": "string"
                },
                "subUserIds": {
                    "description": "下属员工用户id,用逗号分开",
                    "type": "string"
                },
                "userType": {
@@ -15648,6 +15664,12 @@
                    "description": "每页大小",
                    "type": "integer"
                },
                "principalIds": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "sourceId": {
                    "type": "integer"
                },
docs/swagger.json
@@ -5544,6 +5544,15 @@
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "name": "principleIds",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "sourceId",
                        "in": "query"
@@ -11820,6 +11829,9 @@
                },
                "total": {
                    "type": "number"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
@@ -13350,6 +13362,10 @@
                    "type": "string"
                },
                "realName": {
                    "type": "string"
                },
                "subUserIds": {
                    "description": "下属员工用户id,用逗号分开",
                    "type": "string"
                },
                "userType": {
@@ -15636,6 +15652,12 @@
                    "description": "每页大小",
                    "type": "integer"
                },
                "principalIds": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "sourceId": {
                    "type": "integer"
                },
docs/swagger.yaml
@@ -1130,6 +1130,8 @@
        type: number
      total:
        type: number
      unit:
        type: string
    type: object
  model.Province:
    properties:
@@ -2148,6 +2150,9 @@
      pos:
        type: string
      realName:
        type: string
      subUserIds:
        description: 下属员工用户id,用逗号分开
        type: string
      userType:
        $ref: '#/definitions/constvar.UserType'
@@ -3712,6 +3717,10 @@
      pageSize:
        description: 每页大小
        type: integer
      principalIds:
        items:
          type: integer
        type: array
      sourceId:
        type: integer
      sourceType:
@@ -9745,6 +9754,12 @@
        in: query
        name: pageSize
        type: integer
      - collectionFormat: csv
        in: query
        items:
          type: integer
        name: principleIds
        type: array
      - in: query
        name: sourceId
        type: integer
main.go
@@ -6,6 +6,7 @@
    "aps_crm/initialize"
    "aps_crm/middleware"
    "aps_crm/model"
    "aps_crm/model/grpc_init"
    "aps_crm/pkg/logx"
    "aps_crm/proto/product_inventory"
    "aps_crm/router"
@@ -49,10 +50,9 @@
        WriteTimeout: 5 * time.Second,
    }
    //启动grpc客户端
    go v1.InitProductServiceConn()
    go middleware.InitUserConn()
    go v1.InitCodeServiceConn()
    go v1.InitProductInventoryServiceConn()
    go grpc_init.InitCrmApsGrpcServiceConn()
    //启动grpc服务
    go func() {
        ln, err := net.Listen("tcp", ":"+conf.Conf.System.GrpcPort)
@@ -82,10 +82,9 @@
    <-quit
    middleware.StopRefreshUser()
    v1.CloseProductServiceConn()
    v1.CloseCodeServiceConn()
    v1.CloseProductInventoryServiceConn()
    middleware.CloseUserConn()
    grpc_init.CloseCrmApsGrpcServiceConn()
    logx.Infof("aps-crm exited...")
    os.Exit(0)
model/grpc_init/crm_aps_init.go
New file
@@ -0,0 +1,25 @@
package grpc_init
import (
    "aps_crm/conf"
    "aps_crm/pkg/logx"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials/insecure"
)
var CrmApsGrpcServiceConn *grpc.ClientConn
func InitCrmApsGrpcServiceConn() {
    var err error
    CrmApsGrpcServiceConn, err = grpc.Dial(conf.Conf.GrpcServiceAddr.Aps, grpc.WithTransportCredentials(insecure.NewCredentials()))
    if err != nil {
        logx.Errorf("grpc dial InitCrmApsGrpcServiceConn service error: %v", err.Error())
        return
    }
}
func CloseCrmApsGrpcServiceConn() {
    if CrmApsGrpcServiceConn != nil {
        CrmApsGrpcServiceConn.Close()
    }
}
model/request/salesDetails.go
@@ -11,11 +11,13 @@
type SalesDetails struct {
    ClientId            int                         `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"`
    Client              model.Client                `json:"client" gorm:"foreignKey:ClientId"`
    Number              string                      `json:"number" gorm:"column:number;type:varchar(255);comment:销售明细单号"`
    SaleChanceId        int                         `json:"saleChanceId" gorm:"column:sale_chance_id;type:int;comment:销售机会id"`
    SaleType            int                         `json:"saleType" gorm:"column:sale_type;type:int;comment:销售类型"`
    SignTime            string                      `json:"signTime" gorm:"column:sign_time;type:datetime;comment:签单时间"`
    MemberId            int                         `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
    Member              model.User                  `json:"Member"  gorm:"foreignKey:MemberId"`
    DeliveryDate        string                      `json:"deliveryDate" gorm:"column:delivery_date;type:datetime;comment:交货日期"`
    WechatOrderStatusId int                         `json:"wechatOrderStatusId" gorm:"column:wechat_order_status_id;type:int;comment:微信订单状态id"`
    Address             string                      `json:"address" gorm:"column:address;type:varchar(255);comment:地址"`
@@ -32,6 +34,7 @@
    QuotationId         int                         `json:"quotationId" gorm:"column:quotation_id;type:int;comment:报价单id"`
    Status              constvar.SalesDetailsStatus `json:"status" gorm:"column:status;type:int;comment:状态"`
    Source              string                      `json:"source" gorm:"column:source;type:varchar(255);comment:订单来源"`
    ProjectId           string                      `json:"projectId" gorm:"column:project_id;type:varchar(255);comment:aps项目id"`
}
type UpdateSalesDetails struct {
model/salesDetails.go
@@ -45,6 +45,7 @@
        Quotation           Quotation                   `json:"quotation" gorm:"foreignKey:QuotationId"`
        Status              constvar.SalesDetailsStatus `json:"status" gorm:"column:status;type:int;comment:状态"`
        Source              string                      `json:"source" gorm:"column:source;type:varchar(255);comment:订单来源"`
        ProjectId           string                      `json:"projectId" gorm:"column:project_id;type:varchar(255);comment:aps项目id"`
        CrmModel
    }
proto/crm_aps.proto
New file
@@ -0,0 +1,44 @@
syntax = "proto3";
option go_package = "./crm_aps";
service CrmAndApsGrpcService {
  rpc GetApsProjectList(GetApsProjectListRequest) returns(GetApsProjectListResponse) {}
  rpc SendSalesDetailsToApsProject(SendSalesDetailsToApsProjectRequest) returns(SendSalesDetailsToApsProjectResponse) {}
}
//-----------------------------------------------------GetApsProjectList--------------------------------------
message GetApsProjectListRequest{
}
message ApsProject{
  string projectId = 1;
  string projectName = 2;
}
message GetApsProjectListResponse{
  repeated ApsProject List = 1;
}
//-----------------------------------------------------SendSalesDetailsToApsProject---------------------------------------
message SalesDetailsProduct {
  string ProductId = 1;
  int64 Amount = 2;
}
message SendSalesDetailsToApsProjectRequest{
  string Number = 1;//销售明细单号
  string ClientName = 2;
  string MemberName = 3;//销售负责人
  string SignTime = 4;//签单时间
  string DeliveryDate = 5;//交货日期
  string Source = 6;//订单来源
  int64 ProductTotal = 7;//产品总数
  string ProjectId = 8;//项目id
  repeated SalesDetailsProduct Products = 9;
}
message SendSalesDetailsToApsProjectResponse{
}
proto/crm_aps/crm_aps.pb.go
New file
@@ -0,0 +1,559 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
//     protoc-gen-go v1.26.0
//     protoc        v4.24.0
// source: crm_aps.proto
package crm_aps
import (
    protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    reflect "reflect"
    sync "sync"
)
const (
    // Verify that this generated code is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    // Verify that runtime/protoimpl is sufficiently up-to-date.
    _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetApsProjectListRequest struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
}
func (x *GetApsProjectListRequest) Reset() {
    *x = GetApsProjectListRequest{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[0]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *GetApsProjectListRequest) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*GetApsProjectListRequest) ProtoMessage() {}
func (x *GetApsProjectListRequest) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[0]
    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 GetApsProjectListRequest.ProtoReflect.Descriptor instead.
func (*GetApsProjectListRequest) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{0}
}
type ApsProject struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    ProjectId   string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
    ProjectName string `protobuf:"bytes,2,opt,name=projectName,proto3" json:"projectName,omitempty"`
}
func (x *ApsProject) Reset() {
    *x = ApsProject{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[1]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *ApsProject) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*ApsProject) ProtoMessage() {}
func (x *ApsProject) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[1]
    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 ApsProject.ProtoReflect.Descriptor instead.
func (*ApsProject) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{1}
}
func (x *ApsProject) GetProjectId() string {
    if x != nil {
        return x.ProjectId
    }
    return ""
}
func (x *ApsProject) GetProjectName() string {
    if x != nil {
        return x.ProjectName
    }
    return ""
}
type GetApsProjectListResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    List []*ApsProject `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
}
func (x *GetApsProjectListResponse) Reset() {
    *x = GetApsProjectListResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[2]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *GetApsProjectListResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*GetApsProjectListResponse) ProtoMessage() {}
func (x *GetApsProjectListResponse) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[2]
    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 GetApsProjectListResponse.ProtoReflect.Descriptor instead.
func (*GetApsProjectListResponse) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{2}
}
func (x *GetApsProjectListResponse) GetList() []*ApsProject {
    if x != nil {
        return x.List
    }
    return nil
}
type SalesDetailsProduct struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    ProductId string `protobuf:"bytes,1,opt,name=ProductId,proto3" json:"ProductId,omitempty"`
    Amount    int64  `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
}
func (x *SalesDetailsProduct) Reset() {
    *x = SalesDetailsProduct{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[3]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *SalesDetailsProduct) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*SalesDetailsProduct) ProtoMessage() {}
func (x *SalesDetailsProduct) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[3]
    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 SalesDetailsProduct.ProtoReflect.Descriptor instead.
func (*SalesDetailsProduct) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{3}
}
func (x *SalesDetailsProduct) GetProductId() string {
    if x != nil {
        return x.ProductId
    }
    return ""
}
func (x *SalesDetailsProduct) GetAmount() int64 {
    if x != nil {
        return x.Amount
    }
    return 0
}
type SendSalesDetailsToApsProjectRequest struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
    Number       string                 `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //销售明细单号
    ClientName   string                 `protobuf:"bytes,2,opt,name=ClientName,proto3" json:"ClientName,omitempty"`
    MemberName   string                 `protobuf:"bytes,3,opt,name=MemberName,proto3" json:"MemberName,omitempty"`      //销售负责人
    SignTime     string                 `protobuf:"bytes,4,opt,name=SignTime,proto3" json:"SignTime,omitempty"`          //签单时间
    DeliveryDate string                 `protobuf:"bytes,5,opt,name=DeliveryDate,proto3" json:"DeliveryDate,omitempty"`  //交货日期
    Source       string                 `protobuf:"bytes,6,opt,name=Source,proto3" json:"Source,omitempty"`              //订单来源
    ProductTotal int64                  `protobuf:"varint,7,opt,name=ProductTotal,proto3" json:"ProductTotal,omitempty"` //产品总数
    ProjectId    string                 `protobuf:"bytes,8,opt,name=ProjectId,proto3" json:"ProjectId,omitempty"`        //项目id
    Products     []*SalesDetailsProduct `protobuf:"bytes,9,rep,name=Products,proto3" json:"Products,omitempty"`
}
func (x *SendSalesDetailsToApsProjectRequest) Reset() {
    *x = SendSalesDetailsToApsProjectRequest{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[4]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *SendSalesDetailsToApsProjectRequest) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*SendSalesDetailsToApsProjectRequest) ProtoMessage() {}
func (x *SendSalesDetailsToApsProjectRequest) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[4]
    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 SendSalesDetailsToApsProjectRequest.ProtoReflect.Descriptor instead.
func (*SendSalesDetailsToApsProjectRequest) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{4}
}
func (x *SendSalesDetailsToApsProjectRequest) GetNumber() string {
    if x != nil {
        return x.Number
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetClientName() string {
    if x != nil {
        return x.ClientName
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetMemberName() string {
    if x != nil {
        return x.MemberName
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetSignTime() string {
    if x != nil {
        return x.SignTime
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetDeliveryDate() string {
    if x != nil {
        return x.DeliveryDate
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetSource() string {
    if x != nil {
        return x.Source
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetProductTotal() int64 {
    if x != nil {
        return x.ProductTotal
    }
    return 0
}
func (x *SendSalesDetailsToApsProjectRequest) GetProjectId() string {
    if x != nil {
        return x.ProjectId
    }
    return ""
}
func (x *SendSalesDetailsToApsProjectRequest) GetProducts() []*SalesDetailsProduct {
    if x != nil {
        return x.Products
    }
    return nil
}
type SendSalesDetailsToApsProjectResponse struct {
    state         protoimpl.MessageState
    sizeCache     protoimpl.SizeCache
    unknownFields protoimpl.UnknownFields
}
func (x *SendSalesDetailsToApsProjectResponse) Reset() {
    *x = SendSalesDetailsToApsProjectResponse{}
    if protoimpl.UnsafeEnabled {
        mi := &file_crm_aps_proto_msgTypes[5]
        ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
        ms.StoreMessageInfo(mi)
    }
}
func (x *SendSalesDetailsToApsProjectResponse) String() string {
    return protoimpl.X.MessageStringOf(x)
}
func (*SendSalesDetailsToApsProjectResponse) ProtoMessage() {}
func (x *SendSalesDetailsToApsProjectResponse) ProtoReflect() protoreflect.Message {
    mi := &file_crm_aps_proto_msgTypes[5]
    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 SendSalesDetailsToApsProjectResponse.ProtoReflect.Descriptor instead.
func (*SendSalesDetailsToApsProjectResponse) Descriptor() ([]byte, []int) {
    return file_crm_aps_proto_rawDescGZIP(), []int{5}
}
var File_crm_aps_proto protoreflect.FileDescriptor
var file_crm_aps_proto_rawDesc = []byte{
    0x0a, 0x0d, 0x63, 0x72, 0x6d, 0x5f, 0x61, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
    0x1a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
    0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x0a, 0x41,
    0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f,
    0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72,
    0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
    0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72,
    0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3c, 0x0a, 0x19, 0x47, 0x65, 0x74,
    0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
    0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01,
    0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
    0x74, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x53, 0x61, 0x6c, 0x65, 0x73,
    0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1c,
    0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
    0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06,
    0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d,
    0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc9, 0x02, 0x0a, 0x23, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c,
    0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72,
    0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
    0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75,
    0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61,
    0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
    0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61,
    0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
    0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65,
    0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x6d, 0x65,
    0x12, 0x22, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65,
    0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
    0x44, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06,
    0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c,
    0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01,
    0x28, 0x03, 0x52, 0x0c, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c,
    0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20,
    0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x30,
    0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
    0x32, 0x14, 0x2e, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x50,
    0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73,
    0x22, 0x26, 0x0a, 0x24, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74,
    0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
    0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x6d,
    0x41, 0x6e, 0x64, 0x41, 0x70, 0x73, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
    0x65, 0x12, 0x4c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65,
    0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50,
    0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
    0x74, 0x1a, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
    0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
    0x6d, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61,
    0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12,
    0x24, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69,
    0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
    0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65,
    0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f,
    0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b,
    0x5a, 0x09, 0x2e, 0x2f, 0x63, 0x72, 0x6d, 0x5f, 0x61, 0x70, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
    0x74, 0x6f, 0x33,
}
var (
    file_crm_aps_proto_rawDescOnce sync.Once
    file_crm_aps_proto_rawDescData = file_crm_aps_proto_rawDesc
)
func file_crm_aps_proto_rawDescGZIP() []byte {
    file_crm_aps_proto_rawDescOnce.Do(func() {
        file_crm_aps_proto_rawDescData = protoimpl.X.CompressGZIP(file_crm_aps_proto_rawDescData)
    })
    return file_crm_aps_proto_rawDescData
}
var file_crm_aps_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_crm_aps_proto_goTypes = []interface{}{
    (*GetApsProjectListRequest)(nil),             // 0: GetApsProjectListRequest
    (*ApsProject)(nil),                           // 1: ApsProject
    (*GetApsProjectListResponse)(nil),            // 2: GetApsProjectListResponse
    (*SalesDetailsProduct)(nil),                  // 3: SalesDetailsProduct
    (*SendSalesDetailsToApsProjectRequest)(nil),  // 4: SendSalesDetailsToApsProjectRequest
    (*SendSalesDetailsToApsProjectResponse)(nil), // 5: SendSalesDetailsToApsProjectResponse
}
var file_crm_aps_proto_depIdxs = []int32{
    1, // 0: GetApsProjectListResponse.List:type_name -> ApsProject
    3, // 1: SendSalesDetailsToApsProjectRequest.Products:type_name -> SalesDetailsProduct
    0, // 2: CrmAndApsGrpcService.GetApsProjectList:input_type -> GetApsProjectListRequest
    4, // 3: CrmAndApsGrpcService.SendSalesDetailsToApsProject:input_type -> SendSalesDetailsToApsProjectRequest
    2, // 4: CrmAndApsGrpcService.GetApsProjectList:output_type -> GetApsProjectListResponse
    5, // 5: CrmAndApsGrpcService.SendSalesDetailsToApsProject:output_type -> SendSalesDetailsToApsProjectResponse
    4, // [4:6] is the sub-list for method output_type
    2, // [2:4] is the sub-list for method input_type
    2, // [2:2] is the sub-list for extension type_name
    2, // [2:2] is the sub-list for extension extendee
    0, // [0:2] is the sub-list for field type_name
}
func init() { file_crm_aps_proto_init() }
func file_crm_aps_proto_init() {
    if File_crm_aps_proto != nil {
        return
    }
    if !protoimpl.UnsafeEnabled {
        file_crm_aps_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*GetApsProjectListRequest); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_aps_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*ApsProject); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_aps_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*GetApsProjectListResponse); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_aps_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*SalesDetailsProduct); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_aps_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*SendSalesDetailsToApsProjectRequest); i {
            case 0:
                return &v.state
            case 1:
                return &v.sizeCache
            case 2:
                return &v.unknownFields
            default:
                return nil
            }
        }
        file_crm_aps_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
            switch v := v.(*SendSalesDetailsToApsProjectResponse); 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{
        File: protoimpl.DescBuilder{
            GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
            RawDescriptor: file_crm_aps_proto_rawDesc,
            NumEnums:      0,
            NumMessages:   6,
            NumExtensions: 0,
            NumServices:   1,
        },
        GoTypes:           file_crm_aps_proto_goTypes,
        DependencyIndexes: file_crm_aps_proto_depIdxs,
        MessageInfos:      file_crm_aps_proto_msgTypes,
    }.Build()
    File_crm_aps_proto = out.File
    file_crm_aps_proto_rawDesc = nil
    file_crm_aps_proto_goTypes = nil
    file_crm_aps_proto_depIdxs = nil
}
proto/crm_aps/crm_aps_grpc.pb.go
New file
@@ -0,0 +1,137 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package crm_aps
import (
    context "context"
    grpc "google.golang.org/grpc"
    codes "google.golang.org/grpc/codes"
    status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// CrmAndApsGrpcServiceClient is the client API for CrmAndApsGrpcService 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.
type CrmAndApsGrpcServiceClient interface {
    GetApsProjectList(ctx context.Context, in *GetApsProjectListRequest, opts ...grpc.CallOption) (*GetApsProjectListResponse, error)
    SendSalesDetailsToApsProject(ctx context.Context, in *SendSalesDetailsToApsProjectRequest, opts ...grpc.CallOption) (*SendSalesDetailsToApsProjectResponse, error)
}
type crmAndApsGrpcServiceClient struct {
    cc grpc.ClientConnInterface
}
func NewCrmAndApsGrpcServiceClient(cc grpc.ClientConnInterface) CrmAndApsGrpcServiceClient {
    return &crmAndApsGrpcServiceClient{cc}
}
func (c *crmAndApsGrpcServiceClient) GetApsProjectList(ctx context.Context, in *GetApsProjectListRequest, opts ...grpc.CallOption) (*GetApsProjectListResponse, error) {
    out := new(GetApsProjectListResponse)
    err := c.cc.Invoke(ctx, "/CrmAndApsGrpcService/GetApsProjectList", in, out, opts...)
    if err != nil {
        return nil, err
    }
    return out, nil
}
func (c *crmAndApsGrpcServiceClient) SendSalesDetailsToApsProject(ctx context.Context, in *SendSalesDetailsToApsProjectRequest, opts ...grpc.CallOption) (*SendSalesDetailsToApsProjectResponse, error) {
    out := new(SendSalesDetailsToApsProjectResponse)
    err := c.cc.Invoke(ctx, "/CrmAndApsGrpcService/SendSalesDetailsToApsProject", in, out, opts...)
    if err != nil {
        return nil, err
    }
    return out, nil
}
// CrmAndApsGrpcServiceServer is the server API for CrmAndApsGrpcService service.
// All implementations must embed UnimplementedCrmAndApsGrpcServiceServer
// for forward compatibility
type CrmAndApsGrpcServiceServer interface {
    GetApsProjectList(context.Context, *GetApsProjectListRequest) (*GetApsProjectListResponse, error)
    SendSalesDetailsToApsProject(context.Context, *SendSalesDetailsToApsProjectRequest) (*SendSalesDetailsToApsProjectResponse, error)
    mustEmbedUnimplementedCrmAndApsGrpcServiceServer()
}
// UnimplementedCrmAndApsGrpcServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCrmAndApsGrpcServiceServer struct {
}
func (UnimplementedCrmAndApsGrpcServiceServer) GetApsProjectList(context.Context, *GetApsProjectListRequest) (*GetApsProjectListResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method GetApsProjectList not implemented")
}
func (UnimplementedCrmAndApsGrpcServiceServer) SendSalesDetailsToApsProject(context.Context, *SendSalesDetailsToApsProjectRequest) (*SendSalesDetailsToApsProjectResponse, error) {
    return nil, status.Errorf(codes.Unimplemented, "method SendSalesDetailsToApsProject not implemented")
}
func (UnimplementedCrmAndApsGrpcServiceServer) mustEmbedUnimplementedCrmAndApsGrpcServiceServer() {}
// UnsafeCrmAndApsGrpcServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CrmAndApsGrpcServiceServer will
// result in compilation errors.
type UnsafeCrmAndApsGrpcServiceServer interface {
    mustEmbedUnimplementedCrmAndApsGrpcServiceServer()
}
func RegisterCrmAndApsGrpcServiceServer(s grpc.ServiceRegistrar, srv CrmAndApsGrpcServiceServer) {
    s.RegisterService(&CrmAndApsGrpcService_ServiceDesc, srv)
}
func _CrmAndApsGrpcService_GetApsProjectList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(GetApsProjectListRequest)
    if err := dec(in); err != nil {
        return nil, err
    }
    if interceptor == nil {
        return srv.(CrmAndApsGrpcServiceServer).GetApsProjectList(ctx, in)
    }
    info := &grpc.UnaryServerInfo{
        Server:     srv,
        FullMethod: "/CrmAndApsGrpcService/GetApsProjectList",
    }
    handler := func(ctx context.Context, req interface{}) (interface{}, error) {
        return srv.(CrmAndApsGrpcServiceServer).GetApsProjectList(ctx, req.(*GetApsProjectListRequest))
    }
    return interceptor(ctx, in, info, handler)
}
func _CrmAndApsGrpcService_SendSalesDetailsToApsProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    in := new(SendSalesDetailsToApsProjectRequest)
    if err := dec(in); err != nil {
        return nil, err
    }
    if interceptor == nil {
        return srv.(CrmAndApsGrpcServiceServer).SendSalesDetailsToApsProject(ctx, in)
    }
    info := &grpc.UnaryServerInfo{
        Server:     srv,
        FullMethod: "/CrmAndApsGrpcService/SendSalesDetailsToApsProject",
    }
    handler := func(ctx context.Context, req interface{}) (interface{}, error) {
        return srv.(CrmAndApsGrpcServiceServer).SendSalesDetailsToApsProject(ctx, req.(*SendSalesDetailsToApsProjectRequest))
    }
    return interceptor(ctx, in, info, handler)
}
// CrmAndApsGrpcService_ServiceDesc is the grpc.ServiceDesc for CrmAndApsGrpcService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CrmAndApsGrpcService_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "CrmAndApsGrpcService",
    HandlerType: (*CrmAndApsGrpcServiceServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "GetApsProjectList",
            Handler:    _CrmAndApsGrpcService_GetApsProjectList_Handler,
        },
        {
            MethodName: "SendSalesDetailsToApsProject",
            Handler:    _CrmAndApsGrpcService_SendSalesDetailsToApsProject_Handler,
        },
    },
    Streams:  []grpc.StreamDesc{},
    Metadata: "crm_aps.proto",
}
router/salesDetails.go
@@ -11,13 +11,15 @@
    salesDetailsRouter := router.Group("salesDetails")
    salesDetailsApi := v1.ApiGroup.SalesDetailsApi
    {
        salesDetailsRouter.POST("add", salesDetailsApi.Add)                                                // 添加销售明细
        salesDetailsRouter.DELETE("delete/:id", salesDetailsApi.Delete)                                    // 删除销售明细
        salesDetailsRouter.DELETE("delete", salesDetailsApi.BatchDelete)                                   // 批量删除销售明细
        salesDetailsRouter.PUT("update", salesDetailsApi.Update)                                           // 更新销售明细
        salesDetailsRouter.POST("updateStatus", salesDetailsApi.UpdateStatus)                              // 更新销售明细状态
        salesDetailsRouter.POST("list", salesDetailsApi.List)                                              // 获取销售明细单列表
        salesDetailsRouter.GET("getProductInventoryInfo/:number", salesDetailsApi.GetProductInventoryInfo) // 获取产品库存信息
        salesDetailsRouter.POST("createOperation", salesDetailsApi.CreateOperation)                        // 创建产品出库信息
        salesDetailsRouter.POST("add", salesDetailsApi.Add)                                                   // 添加销售明细
        salesDetailsRouter.DELETE("delete/:id", salesDetailsApi.Delete)                                       // 删除销售明细
        salesDetailsRouter.DELETE("delete", salesDetailsApi.BatchDelete)                                      // 批量删除销售明细
        salesDetailsRouter.PUT("update", salesDetailsApi.Update)                                              // 更新销售明细
        salesDetailsRouter.POST("updateStatus", salesDetailsApi.UpdateStatus)                                 // 更新销售明细状态
        salesDetailsRouter.POST("list", salesDetailsApi.List)                                                 // 获取销售明细单列表
        salesDetailsRouter.GET("getProductInventoryInfo/:number", salesDetailsApi.GetProductInventoryInfo)    // 获取产品库存信息
        salesDetailsRouter.POST("createOperation", salesDetailsApi.CreateOperation)                           // 创建产品出库信息
        salesDetailsRouter.GET("getApsProjectList", salesDetailsApi.GetApsProjectList)                        // 获取aps项目列表
        salesDetailsRouter.POST("sendSalesDetailsToApsProject", salesDetailsApi.SendSalesDetailsToApsProject) // 推送销售明细信息到aps项目模块                    // 创建产品出库信息
    }
}