From 5630683fdf3a6fd6c2dbcd9b4854731d0e8c79cd Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 30 三月 2024 16:24:08 +0800
Subject: [PATCH] 补充销售明细编码
---
proto/purchase_wms/purchase_wms.pb.go | 29 ++++++++++++++++++++---------
proto/purchase_wms.proto | 1 +
proto/purchase_wms/server.go | 1 +
proto/product_inventory/server.go | 2 +-
4 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/proto/product_inventory/server.go b/proto/product_inventory/server.go
index 8bd4069..26bd44b 100644
--- a/proto/product_inventory/server.go
+++ b/proto/product_inventory/server.go
@@ -233,7 +233,7 @@
"wms_operation.number,wms_operation.waybill_number, logistic_company.name, wms_operation.base_operation_type, wms_operation.status, wms_operation.created_at").
Joins("left join wms_operation on wms_operation.id = wms_operation_details.operation_id").
Joins("left join logistic_company on logistic_company.id = wms_operation.logistic_company_id").
- Where("wms_operation.source_number = ?", req.Number).
+ Where("wms_operation.sales_details_number = ?", req.Number).
Where("wms_operation.base_operation_type in ?", []constvar.BaseOperationType{
constvar.BaseOperationTypeIncoming, constvar.BaseOperationTypeOutgoing}).
Where("wms_operation.status in ?", []constvar.OperationStatus{constvar.OperationStatus_Ready, constvar.OperationStatus_Finish})
diff --git a/proto/purchase_wms.proto b/proto/purchase_wms.proto
index df8a95f..41044ef 100644
--- a/proto/purchase_wms.proto
+++ b/proto/purchase_wms.proto
@@ -31,6 +31,7 @@
string WarehouseName = 5;//浠撳簱鍚嶇О
repeated PurchaseProduct Product = 6;
OperationSource OperationSource = 7;
+ string SalesDetailsNumber = 8;
}
message PurchaseToWmsResponse {
diff --git a/proto/purchase_wms/purchase_wms.pb.go b/proto/purchase_wms/purchase_wms.pb.go
index 779e860..ea567c6 100644
--- a/proto/purchase_wms/purchase_wms.pb.go
+++ b/proto/purchase_wms/purchase_wms.pb.go
@@ -81,13 +81,14 @@
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //閲囪喘缂栧彿
- SupplierName string `protobuf:"bytes,2,opt,name=SupplierName,proto3" json:"SupplierName,omitempty"` //渚涘簲鍟嗗悕绉�
- Source string `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` //鏉ユ簮
- SupplierId int64 `protobuf:"varint,4,opt,name=SupplierId,proto3" json:"SupplierId,omitempty"` //渚涘簲鍟唅d
- WarehouseName string `protobuf:"bytes,5,opt,name=WarehouseName,proto3" json:"WarehouseName,omitempty"` //浠撳簱鍚嶇О
- Product []*PurchaseProduct `protobuf:"bytes,6,rep,name=Product,proto3" json:"Product,omitempty"`
- OperationSource common.OperationSource `protobuf:"varint,7,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
+ Number string `protobuf:"bytes,1,opt,name=Number,proto3" json:"Number,omitempty"` //閲囪喘缂栧彿
+ SupplierName string `protobuf:"bytes,2,opt,name=SupplierName,proto3" json:"SupplierName,omitempty"` //渚涘簲鍟嗗悕绉�
+ Source string `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` //鏉ユ簮
+ SupplierId int64 `protobuf:"varint,4,opt,name=SupplierId,proto3" json:"SupplierId,omitempty"` //渚涘簲鍟唅d
+ WarehouseName string `protobuf:"bytes,5,opt,name=WarehouseName,proto3" json:"WarehouseName,omitempty"` //浠撳簱鍚嶇О
+ Product []*PurchaseProduct `protobuf:"bytes,6,rep,name=Product,proto3" json:"Product,omitempty"`
+ OperationSource common.OperationSource `protobuf:"varint,7,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"`
+ SalesDetailsNumber string `protobuf:"bytes,8,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"`
}
func (x *PurchaseToWmsRequest) Reset() {
@@ -169,6 +170,13 @@
return x.OperationSource
}
return common.OperationSource(0)
+}
+
+func (x *PurchaseToWmsRequest) GetSalesDetailsNumber() string {
+ if x != nil {
+ return x.SalesDetailsNumber
+ }
+ return ""
}
type PurchaseToWmsResponse struct {
@@ -1384,7 +1392,7 @@
0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x50, 0x72,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x02,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc8, 0x02,
0x0a, 0x14, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22,
@@ -1402,7 +1410,10 @@
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x63, 0x0a, 0x15, 0x50, 0x75, 0x72, 0x63,
+ 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65,
+ 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x63, 0x0a, 0x15, 0x50, 0x75, 0x72, 0x63,
0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
diff --git a/proto/purchase_wms/server.go b/proto/purchase_wms/server.go
index daf6372..ede24f6 100644
--- a/proto/purchase_wms/server.go
+++ b/proto/purchase_wms/server.go
@@ -28,6 +28,7 @@
operation.CompanyID = int(req.SupplierId)
operation.Source = req.Source
operation.OperationSource = constvar.OperationSource(req.OperationSource)
+ operation.SalesDetailsNumber = req.SalesDetailsNumber
warehouse, err := models.NewWarehouseSearch().SetName(req.WarehouseName).First()
if err != nil {
return nil, err
--
Gitblit v1.8.0