yinbentan
2024-09-26 2030ec81f18f4ec9ea1800f13046acafff6d50f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
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 GetClientMaxId(ClientMaxIdRequest) returns(ClientMaxIdResponse) {}
  rpc AddClient(AddClientRequest) returns(ClientMsgResponse) {}
  rpc EditClient(EditClientRequest) returns(ClientMsgResponse) {}
  rpc DelClient(DelClientRequest) returns(ClientMsgResponse) {}
  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;
  int64 id = 3;
}
 
message ClientMaxIdRequest{
 
}
message ClientMaxIdResponse{
  int64 id = 1;
}
 
message AddClientRequest{
  int64 id = 1 ;
  string number = 2; // 客户编号
  string name = 3; // 客户名称
  string detailAddress = 4; // 详细地址
  string remark = 5 ; // 备注
  int64 creatorId = 6; // 创建人id
}
 
message EditClientRequest{
  int64 id = 1 ;
  string number = 2; // 客户编号
  string name = 3; // 客户名称
  string detailAddress = 4; // 详细地址
  string remark = 5 ; // 备注
  int64 creatorId = 6; // 创建人id
}
 
message DelClientRequest{
  int64 id = 1;
  string number = 2;
}
 
message ClientMsgResponse{
  int64 code = 1;
  string msg = 2;
  string id = 3;
}
 
//----------------------------------------------------------------------
 
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;
}