syntax = "proto3";
|
|
option go_package = "./crm_aps";
|
|
service CrmAndApsGrpcService {
|
rpc GetApsProjectList(GetApsProjectListRequest) returns(GetApsProjectListResponse) {}
|
rpc SendSalesDetailsToApsProject(SendSalesDetailsToApsProjectRequest) returns(SendSalesDetailsToApsProjectResponse) {}
|
rpc GetCrmSalesDetailsList(GetCrmSalesDetailsListRequest) returns(GetCrmSalesDetailsListResponse) {}
|
rpc SendSalesDetailsAndProjectToCrm(SendSalesDetailsAndProjectToCrmRequest) returns(SendSalesDetailsAndProjectToCrmResponse) {}
|
rpc GetClientList(GetClientListRequest) returns(GetClientListResponse) {}
|
rpc UpdateSalesDetail(UpdateSalesDetailRequest) returns(UpdateSalesDetailResponse) {}
|
rpc RemoveSalesDetail(RemoveSalesDetailRequest) returns(RemoveSalesDetailResponse) {}
|
rpc CrmGetMakeAndOutsourcingProductInfo(CrmGetMakeAndOutsourcingProductInfoRequest) returns(CrmGetMakeAndOutsourcingProductInfoResponse) {}
|
rpc GetCrmSalesDetailsProductInfo(GetCrmSalesDetailsProductInfoRequest) returns(GetCrmSalesDetailsProductInfoResponse) {}
|
}
|
|
//-----------------------------------------------------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;
|
int64 DeliverType = 10;//交付类型:1.一次发货,2.多次发货
|
}
|
|
message SendSalesDetailsToApsProjectResponse{
|
}
|
|
//-----------------------------------------------------GetCrmSalesDetailsList--------------------------------------------
|
|
message GetCrmSalesDetailsListRequest {
|
string TimeType = 1; //时间类型:签约日期,交付日期
|
string StartTime = 2;
|
string EndTime = 3;
|
string ClientName = 4;
|
int64 Page = 5;
|
int64 PageSize = 6;
|
}
|
|
message CrmSalesDetails {
|
string number = 1;//销售明细单号
|
string clientName = 2;
|
string memberName = 3;//销售负责人
|
string signTime = 4;//签单时间
|
string deliveryDate = 5;//交货日期
|
}
|
|
message GetCrmSalesDetailsListResponse {
|
repeated CrmSalesDetails SalesDetails = 1;
|
int64 Total = 2;
|
}
|
|
//------------------------------------------------------------SendSalesDetailsAndProjectToCrm-----------------------------------
|
|
message SendSalesDetailsAndProjectToCrmRequest{
|
repeated string SalesDetailsNumbers = 1;
|
string ProjectId = 2;
|
}
|
|
message SendSalesDetailsAndProjectToCrmResponse{
|
|
}
|
|
//------------------------------------------------------------GetClientList-----------------------------------
|
|
message GetClientListRequest{
|
int64 page = 1;
|
int64 page_size = 2;
|
string keyword = 3;
|
}
|
|
message GetClientListResponse{
|
int64 total = 1;
|
repeated Client list = 2;
|
}
|
|
message Client {
|
string number = 1;
|
string name = 2;
|
}
|
|
|
message UpdateSalesDetailRequest {
|
string number = 1;//销售明细单号
|
int32 status = 2;//状态
|
}
|
|
message UpdateSalesDetailResponse {}
|
|
message RemoveSalesDetailRequest {
|
string number = 1;//销售明细单号
|
}
|
|
message RemoveSalesDetailResponse {}
|
|
message CrmGetMakeAndOutsourcingProductInfoRequest{
|
string SalesDetailsNumber = 1;
|
}
|
|
message CrmGetMakeAndOutsourcingProductInfo {
|
int64 Amount = 1;
|
int64 FinishAmount = 2;
|
string ProductId = 3;
|
int64 Type = 4;
|
}
|
|
message CrmGetMakeAndOutsourcingProductInfoResponse{
|
repeated CrmGetMakeAndOutsourcingProductInfo Info = 1;
|
}
|
|
message GetCrmSalesDetailsProductInfoRequest{
|
string SalesDetailsNumber = 1;
|
}
|
|
message CrmSalesDetailsProductInfo{
|
string ProductId = 1;
|
string ProductName = 2;
|
string Specs = 3;
|
string Unit = 4;
|
int64 Amount = 5;
|
string Cost = 6; //产品成本
|
int64 Price = 7; //产品价格
|
int64 Total = 8;//产品总价
|
string Profit = 9;//毛利
|
string Margin = 10;//毛利率
|
}
|
|
message GetCrmSalesDetailsProductInfoResponse{
|
repeated CrmSalesDetailsProductInfo List = 1;
|
}
|