selfcheer
2024-07-19 1572f45e72cc0fa15c029f9ee2a08474104435e6
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
syntax = "proto3";
 
option go_package = "./purchase_wms";
 
import "common.proto";
 
service PurchaseService {
  rpc PurchaseToWms(PurchaseToWmsRequest) returns (PurchaseToWmsResponse);
  rpc UpdatePurchaseStatus(UpdatePurchaseStatusRequest) returns (UpdatePurchaseStatusResponse) {}
  rpc GetSupplierListByProductId(GetSupplierListByProductIdRequest) returns (GetSupplierListByProductIdResponse) {}
  rpc CreatePurchaseByWms(CreatePurchaseByWmsRequest) returns (CreatePurchaseByWmsResponse) {}
  rpc GetPurchaseInfo(GetPurchaseInfoRequest) returns (GetPurchaseInfoResponse) {}
  rpc ExistSupplier(ExistSupplierRequest) returns (ExistSupplierResponse) {}
  rpc SrmGetWarehouseInfo(SrmGetWarehouseInfoRequest) returns (SrmGetWarehouseInfoResponse) {}
  rpc SrmGetOperationInfo(SrmGetOperationInfoRequest) returns (SrmGetOperationInfoResponse) {}
  rpc CreatePurchaseByAps(CreatePurchaseByApsRequest) returns (CreatePurchaseByWmsResponse) {}
}
 
//------------------------------------------PurchaseToWms--------------------------------
 
message PurchaseProduct{
  string Id = 1;
  int64 Amount = 2;
}
 
message PurchaseToWmsRequest {
  string Number = 1; //采购编号
  string SupplierName = 2; //供应商名称
  string Source = 3;//来源
  int64 SupplierId = 4;//供应商id
  string WarehouseName = 5;//仓库名称
  repeated PurchaseProduct Product = 6;
  OperationSource OperationSource = 7;
  string SalesDetailsNumber = 8;
}
 
message PurchaseToWmsResponse {
  int32 code = 1;
  string message = 2;
  string Warehouse = 3;
}
 
//------------------------------------------------UpdatePurchaseStatus-------------------------------------
 
message UpdatePurchaseStatusRequest {
  string Number = 1;//采购编号
  int64 Status = 2;//状态
}
 
message UpdatePurchaseStatusResponse {
  int32   Code = 1;
  string  Msg = 2;
}
 
//--------------------------------------------------GetSupplierListByProductId------------------------------
 
message GetSupplierListByProductIdRequest {
  string ProductId = 1;
}
 
message SupplierList {
  int64 supplierId = 1;
  string supplierName = 2;
  float purchasePrice = 3;//采购价格
}
 
message GetSupplierListByProductIdResponse {
  int32   Code = 1;
  string  Msg = 2;
  repeated SupplierList List = 3;
}
 
//-----------------------------------------------------CreatePurchaseByWms--------------------------------------
 
message CreatePurchaseByWmsRequest {
  int64 SupplierId = 1;
  string ProductId = 2;
  int64 Amount = 3;
  string Source = 4;
}
 
message CreatePurchaseByWmsResponse {
  int32   Code = 1;
  string  Msg = 2;
  string PurchaseNumber = 3;
}
 
//-------------------------------------------------------GetPurchaseInfo---------------------------------------
 
message GetPurchaseInfoRequest {
  repeated string PurchaseNumbers = 1;
}
 
message PurchaseInfo {
  string purchaseNumber = 1;
  string purchaseName = 2;
  string supplierName = 3;
  int64 amount = 4;
  int64 status = 5;
  string productName = 6;
  string productId = 7;
  string specs = 8;//物料规格
  string unit = 9;//单位
  int64 finishAmount = 10;//完成数量
}
 
message GetPurchaseInfoResponse {
  repeated PurchaseInfo Infos = 1;
}
 
//--------------------------------------------------ExistSupplier---------------------------------------
 
message ExistSupplierRequest {
  repeated string ProductId = 1;
}
 
message ExistSupplierResponse {
  bool Exist = 1;
}
 
//--------------------------------------------------SrmGetWarehouseInfo---------------------------------------
message SrmGetWarehouseInfoRequest{}
 
message SrmWarehouseInfo{
  string name = 1;//仓库名
  string address = 2;//仓库地址
  string principal = 3;//仓库负责人
}
 
message SrmGetWarehouseInfoResponse{
  repeated SrmWarehouseInfo info = 1;
}
 
//--------------------------------------------------SrmGetOperationInfo---------------------------------------
message SrmGetOperationInfoRequest{
  string number = 1;
  OperationSource OperationSource = 2;
  string SalesDetailsNumber = 3;
}
 
message SrmOperation{
  string number = 1;//入库单号
  string warehouseName = 2;//仓库名称
  string productName = 3;//产品名称
  string productId = 4;//产品编码
  int64 amount = 5;//数量
  string overTime = 6;//入库时间
  string consignee = 7;//收货人
  int64 status = 8;//状态
}
 
message SrmGetOperationInfoResponse{
  repeated SrmOperation operations = 1;
}
 
//--------------------------------------------------CreatePurchaseByAps---------------------------------------
 
message CreatePurchaseByApsRequest {
  string sourceOrder = 1;
  repeated CreatePurchaseByWmsRequest req = 2;
}