Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS
| | |
| | | "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}) |
| | |
| | | string WarehouseName = 5;//仓库名称 |
| | | repeated PurchaseProduct Product = 6; |
| | | OperationSource OperationSource = 7; |
| | | string SalesDetailsNumber = 8; |
| | | } |
| | | |
| | | message PurchaseToWmsResponse { |
| | |
| | | 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() { |
| | |
| | | return x.OperationSource |
| | | } |
| | | return common.OperationSource(0) |
| | | } |
| | | |
| | | func (x *PurchaseToWmsRequest) GetSalesDetailsNumber() string { |
| | | if x != nil { |
| | | return x.SalesDetailsNumber |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | type PurchaseToWmsResponse struct { |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | 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 |