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
syntax = "proto3";
 
option go_package = "./product";
 
service productService {
  rpc GetProductInfo(GetProductInfoRequest) returns(GetProductInfoResponse) {}
  rpc GetProductList(GetProductListRequest) returns(GetProductListResponse) {}
  rpc GetProductOrder(GetProductOrderRequest) returns (GetProductOrderResponse) {}
}
 
message GetProductInfoRequest{
  string ProductId = 1; //产品id
}
 
message GetProductInfoResponse{
  int32   Code = 1;
  string  Msg = 2;
  Product Data = 3;
}
message Product {
  string Number = 1;
  string Name = 2;
  string  Unit = 3;
  bool IsSale = 4; //是否销售
  double SalePrice = 5; //销售价格
  float Amount = 6;//库存剩余量
  int32 MinInventory = 7;//安全库存
  int32 MaxInventory = 8; // 最大库存
  string MaterialMode = 9; //物料类型
  string PurchaseType = 10;//采购类型
  string Node = 11; // 备注
  string Type = 12; // 型号
  string Specs = 13; // 规格
}
 
message GetProductListRequest{
  int32 page = 1;
  int32 pageSize = 2;
  string ProductNumber = 3;
  string ProductName = 4;
}
 
message GetProductListResponse{
  int32   Code = 1;
  string  Msg = 2;
  repeated Product List = 3;
  int64 Total = 4;
}
 
//-------------------------------------------------------------
 
message GetProductOrderRequest {
  string SalesDetailsNumber= 1;
}
 
message WorkOrderInfo{
  string OrderId = 1;
  string ProductName = 2;
  string OrderStatus = 3;
  string WorkOrderId = 4;
  string WorkOrderStatus = 5;
  string StartTime = 6;
  string EndTime = 7;
  string ProductId = 8;
  string Specs = 9;//物料规格
  string Unit = 10;//单位
  int64 Amount = 11;//订单数量
  int64 FinishAmount = 12;//完成数量
}
 
message CrmGetPurchaseInfo {
  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 OutsourcingInfo {
  string OutsourcingId = 1;
  string ProductName = 2;
  string OutsourcingStatus = 3;
  string SupplierName = 4;
  string StartTime = 5;
  string EndTime = 6;
  string ProductId = 7;
  string Specs = 8;//物料规格
  string Unit = 9;//单位
  int64 Amount = 10;//订单数量
  int64 FinishAmount = 11;//完成数量
}
 
message GetProductOrderResponse{
  repeated WorkOrderInfo List = 1;//制造信息
  repeated CrmGetPurchaseInfo PurchaseList = 2;//采购信息
  repeated OutsourcingInfo OutsourcingList = 3;//委外信息
}