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) {}
|
rpc GetPurchaseInfo(GetPurchaseInfoRequest) returns (GetPurchaseInfoResponse) {}
|
rpc ExistSupplier(ExistSupplierRequest) returns (ExistSupplierResponse) {}
|
}
|
|
//------------------------------------------PurchaseToWms--------------------------------
|
|
message PurchaseProduct{
|
string Id = 1;
|
int64 Amount = 2;
|
}
|
|
message PurchaseToWmsRequest {
|
string Number = 1; //采购编号
|
string SupplierName = 2; //供应商
|
string Source = 3;//来源
|
repeated PurchaseProduct Product = 4;
|
}
|
|
message PurchaseToWmsResponse {
|
int32 code = 1;
|
string message = 2;
|
string Warehouse = 3;
|
}
|
|
//------------------------------------------------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;
|
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;
|
}
|
|
message GetPurchaseInfoResponse {
|
repeated PurchaseInfo Infos = 1;
|
}
|
|
//--------------------------------------------------ExistSupplier---------------------------------------
|
|
message ExistSupplierRequest {
|
repeated string ProductId = 1;
|
}
|
|
message ExistSupplierResponse {
|
bool Exist = 1;
|
}
|