liujiandao
2023-11-16 727d16a6d0336daa6c2f9541564d1500444e44a2
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
syntax = "proto3";
 
option go_package = "./purchase_wms";
 
service PurchaseService {
  rpc PurchaseToWms(PurchaseToWmsRequest) returns (PurchaseToWmsResponse);
  rpc UpdatePurchaseStatus(UpdatePurchaseStatusRequest) returns (UpdatePurchaseStatusResponse) {}
  rpc GetSupplierListByProductId(GetSupplierListByProductIdRequest) returns (GetSupplierListByProductIdResponse) {}
  rpc CreatePurchaseByWms(CreatePurchaseByWmsRequest) returns (CreatePurchaseByWmsResponse) {}
}
 
//------------------------------------------PurchaseToWms--------------------------------
 
message PurchaseProduct{
  string Id = 1;
  int64 Amount = 2;
}
 
message PurchaseToWmsRequest {
  string Number = 1; //采购编号
  string SupplierName = 2; //供应商
  repeated PurchaseProduct Product = 3;
}
 
message PurchaseToWmsResponse {
  int32 code = 1;
  string message = 2;
}
 
//------------------------------------------------UpdatePurchaseStatus-------------------------------------
 
message UpdatePurchaseStatusRequest {
  string Number = 1;//采购编号
}
 
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;
}
 
message CreatePurchaseByWmsResponse {
  int32   Code = 1;
  string  Msg = 2;
  string PurchaseNumber = 3;
}