liujiandao
2024-03-30 de71e109b1959fe8ad86007c1c59658622933290
Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS
4个文件已修改
33 ■■■■■ 已修改文件
proto/product_inventory/server.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms.proto 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms/purchase_wms.pb.go 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/purchase_wms/server.go 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
proto/product_inventory/server.go
@@ -234,7 +234,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})
proto/purchase_wms.proto
@@ -31,6 +31,7 @@
  string WarehouseName = 5;//仓库名称
  repeated PurchaseProduct Product = 6;
  OperationSource OperationSource = 7;
  string SalesDetailsNumber = 8;
}
message PurchaseToWmsResponse {
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"`      //供应商id
    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"`      //供应商id
    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,
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