From 517824efcc6234df351d5be71127f438b6abf288 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期六, 30 三月 2024 15:53:13 +0800 Subject: [PATCH] wms修改委外完成数量 --- proto/inventory_order.proto | 12 + proto/inventory_order/inventory_order.pb.go | 229 ++++++++++++++++++++++++++++++------- controllers/operation.go | 23 +++ proto/inventory_order/inventory_order_grpc.pb.go | 63 +++++++--- 4 files changed, 261 insertions(+), 66 deletions(-) diff --git a/controllers/operation.go b/controllers/operation.go index 9ab5341..c585774 100644 --- a/controllers/operation.go +++ b/controllers/operation.go @@ -623,6 +623,7 @@ if operation.BaseOperationType == constvar.BaseOperationTypeIncoming { if operation.Source != "" { go UpdatePurchaseStatus(operation.Source, operation.SourceNumber) + go UpdateOutsourceOrder(operation.Source, operation.SourceNumber, operation.Id, listDetails) } } else if operation.BaseOperationType == constvar.BaseOperationTypeOutgoing { if operation.Source != "" { @@ -732,6 +733,28 @@ } } +func UpdateOutsourceOrder(source, number string, operationId int, details []*models.OperationDetails) { + if source == "APS_OUTSOURCING_RECEIVE" { + products := make([]*inventory_order.OperationProduct, 0) + for _, detail := range details { + if operationId == detail.OperationID { + var op inventory_order.OperationProduct + op.ProductNumber = detail.ProductId + op.Amount = detail.Amount.IntPart() + products = append(products, &op) + } + } + cl := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn) + _, err := cl.UpdateOutsourceOrder(context.Background(), &inventory_order.UpdateOutsourceOrderRequest{ + OutsourceNumber: number, + Products: products, + }) + if err != nil { + logx.Errorf("grpc dial UpdateOutsourceOrder service error: %v", err) + } + } +} + // ListTransfer // @Tags 鍏ュ簱/鍑哄簱 // @Summary 搴撳瓨璋冩嫧鍒楄〃 diff --git a/proto/inventory_order.proto b/proto/inventory_order.proto index 842d991..ea16e88 100644 --- a/proto/inventory_order.proto +++ b/proto/inventory_order.proto @@ -9,6 +9,7 @@ rpc CreateOperationList(CreateOperationListRequest) returns(CreateOperationListResponse) {} rpc UpdateMaterialApplyStatus(UpdateMaterialApplyStatusRequest) returns(UpdateMaterialApplyStatusResponse) {} rpc GetWarehouseInfo(GetWarehouseInfoRequest) returns(GetWarehouseInfoResponse) {} + rpc UpdateOutsourceOrder(UpdateOutsourceOrderRequest) returns(UpdateOutsourceOrderResponse) {} } message CreateNewOrderRequest{ @@ -76,4 +77,13 @@ message GetWarehouseInfoResponse{ repeated WarehouseInfo List = 1; -} \ No newline at end of file +} + +//-------------------------------------------------UpdateOutsourceOrder----------------------------------------- + +message UpdateOutsourceOrderRequest{ + string OutsourceNumber = 1; + repeated OperationProduct Products = 2; +} + +message UpdateOutsourceOrderResponse{} \ No newline at end of file diff --git a/proto/inventory_order/inventory_order.pb.go b/proto/inventory_order/inventory_order.pb.go index 75aedb4..05530ae 100644 --- a/proto/inventory_order/inventory_order.pb.go +++ b/proto/inventory_order/inventory_order.pb.go @@ -1,17 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v3.19.0 +// protoc-gen-go v1.26.0 +// protoc v4.24.0 // source: inventory_order.proto package inventory_order import ( + common "apsServer/proto/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - common "wms/proto/common" ) const ( @@ -349,7 +349,7 @@ if x != nil { return x.OperationSource } - return common.OperationSource(0) + return common.OperationSource_OperationSourceEmpty } type OperationResponse struct { @@ -687,6 +687,99 @@ return nil } +type UpdateOutsourceOrderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OutsourceNumber string `protobuf:"bytes,1,opt,name=OutsourceNumber,proto3" json:"OutsourceNumber,omitempty"` + Products []*OperationProduct `protobuf:"bytes,2,rep,name=Products,proto3" json:"Products,omitempty"` +} + +func (x *UpdateOutsourceOrderRequest) Reset() { + *x = UpdateOutsourceOrderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_order_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOutsourceOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOutsourceOrderRequest) ProtoMessage() {} + +func (x *UpdateOutsourceOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_order_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOutsourceOrderRequest.ProtoReflect.Descriptor instead. +func (*UpdateOutsourceOrderRequest) Descriptor() ([]byte, []int) { + return file_inventory_order_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateOutsourceOrderRequest) GetOutsourceNumber() string { + if x != nil { + return x.OutsourceNumber + } + return "" +} + +func (x *UpdateOutsourceOrderRequest) GetProducts() []*OperationProduct { + if x != nil { + return x.Products + } + return nil +} + +type UpdateOutsourceOrderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateOutsourceOrderResponse) Reset() { + *x = UpdateOutsourceOrderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_order_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOutsourceOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOutsourceOrderResponse) ProtoMessage() {} + +func (x *UpdateOutsourceOrderResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_order_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOutsourceOrderResponse.ProtoReflect.Descriptor instead. +func (*UpdateOutsourceOrderResponse) Descriptor() ([]byte, []int) { + return file_inventory_order_proto_rawDescGZIP(), []int{13} +} + var File_inventory_order_proto protoreflect.FileDescriptor var file_inventory_order_proto_rawDesc = []byte{ @@ -760,31 +853,46 @@ 0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, 0x61, 0x72, 0x65, 0x68, - 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xe1, - 0x02, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, - 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x64, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, - 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x61, - 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x47, 0x65, - 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, - 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x76, + 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, + 0x0f, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x08, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x03, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x19, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, + 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x14, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -799,7 +907,7 @@ return file_inventory_order_proto_rawDescData } -var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_inventory_order_proto_goTypes = []interface{}{ (*CreateNewOrderRequest)(nil), // 0: CreateNewOrderRequest (*CreateNewOrderResponse)(nil), // 1: CreateNewOrderResponse @@ -813,27 +921,32 @@ (*GetWarehouseInfoRequest)(nil), // 9: GetWarehouseInfoRequest (*WarehouseInfo)(nil), // 10: WarehouseInfo (*GetWarehouseInfoResponse)(nil), // 11: GetWarehouseInfoResponse - (common.OperationSource)(0), // 12: OperationSource + (*UpdateOutsourceOrderRequest)(nil), // 12: UpdateOutsourceOrderRequest + (*UpdateOutsourceOrderResponse)(nil), // 13: UpdateOutsourceOrderResponse + (common.OperationSource)(0), // 14: OperationSource } var file_inventory_order_proto_depIdxs = []int32{ 2, // 0: OperationList.Products:type_name -> OperationProduct 3, // 1: CreateOperationListRequest.List:type_name -> OperationList - 12, // 2: CreateOperationListRequest.OperationSource:type_name -> OperationSource + 14, // 2: CreateOperationListRequest.OperationSource:type_name -> OperationSource 5, // 3: CreateOperationListResponse.List:type_name -> OperationResponse 10, // 4: GetWarehouseInfoResponse.List:type_name -> WarehouseInfo - 0, // 5: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest - 4, // 6: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest - 7, // 7: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest - 9, // 8: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest - 1, // 9: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse - 6, // 10: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse - 8, // 11: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse - 11, // 12: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 2, // 5: UpdateOutsourceOrderRequest.Products:type_name -> OperationProduct + 0, // 6: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest + 4, // 7: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest + 7, // 8: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest + 9, // 9: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest + 12, // 10: inventoryOrderService.UpdateOutsourceOrder:input_type -> UpdateOutsourceOrderRequest + 1, // 11: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse + 6, // 12: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse + 8, // 13: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse + 11, // 14: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse + 13, // 15: inventoryOrderService.UpdateOutsourceOrder:output_type -> UpdateOutsourceOrderResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_inventory_order_proto_init() } @@ -986,6 +1099,30 @@ return nil } } + file_inventory_order_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOutsourceOrderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_order_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOutsourceOrderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -993,7 +1130,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_inventory_order_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/inventory_order/inventory_order_grpc.pb.go b/proto/inventory_order/inventory_order_grpc.pb.go index 5c15855..91d9dcd 100644 --- a/proto/inventory_order/inventory_order_grpc.pb.go +++ b/proto/inventory_order/inventory_order_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.19.0 -// source: inventory_order.proto package inventory_order @@ -18,13 +14,6 @@ // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - InventoryOrderService_CreateNewOrder_FullMethodName = "/inventoryOrderService/CreateNewOrder" - InventoryOrderService_CreateOperationList_FullMethodName = "/inventoryOrderService/CreateOperationList" - InventoryOrderService_UpdateMaterialApplyStatus_FullMethodName = "/inventoryOrderService/UpdateMaterialApplyStatus" - InventoryOrderService_GetWarehouseInfo_FullMethodName = "/inventoryOrderService/GetWarehouseInfo" -) - // InventoryOrderServiceClient is the client API for InventoryOrderService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -33,6 +22,7 @@ CreateOperationList(ctx context.Context, in *CreateOperationListRequest, opts ...grpc.CallOption) (*CreateOperationListResponse, error) UpdateMaterialApplyStatus(ctx context.Context, in *UpdateMaterialApplyStatusRequest, opts ...grpc.CallOption) (*UpdateMaterialApplyStatusResponse, error) GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error) + UpdateOutsourceOrder(ctx context.Context, in *UpdateOutsourceOrderRequest, opts ...grpc.CallOption) (*UpdateOutsourceOrderResponse, error) } type inventoryOrderServiceClient struct { @@ -45,7 +35,7 @@ func (c *inventoryOrderServiceClient) CreateNewOrder(ctx context.Context, in *CreateNewOrderRequest, opts ...grpc.CallOption) (*CreateNewOrderResponse, error) { out := new(CreateNewOrderResponse) - err := c.cc.Invoke(ctx, InventoryOrderService_CreateNewOrder_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/inventoryOrderService/CreateNewOrder", in, out, opts...) if err != nil { return nil, err } @@ -54,7 +44,7 @@ func (c *inventoryOrderServiceClient) CreateOperationList(ctx context.Context, in *CreateOperationListRequest, opts ...grpc.CallOption) (*CreateOperationListResponse, error) { out := new(CreateOperationListResponse) - err := c.cc.Invoke(ctx, InventoryOrderService_CreateOperationList_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/inventoryOrderService/CreateOperationList", in, out, opts...) if err != nil { return nil, err } @@ -63,7 +53,7 @@ func (c *inventoryOrderServiceClient) UpdateMaterialApplyStatus(ctx context.Context, in *UpdateMaterialApplyStatusRequest, opts ...grpc.CallOption) (*UpdateMaterialApplyStatusResponse, error) { out := new(UpdateMaterialApplyStatusResponse) - err := c.cc.Invoke(ctx, InventoryOrderService_UpdateMaterialApplyStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/inventoryOrderService/UpdateMaterialApplyStatus", in, out, opts...) if err != nil { return nil, err } @@ -72,7 +62,16 @@ func (c *inventoryOrderServiceClient) GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error) { out := new(GetWarehouseInfoResponse) - err := c.cc.Invoke(ctx, InventoryOrderService_GetWarehouseInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/inventoryOrderService/GetWarehouseInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inventoryOrderServiceClient) UpdateOutsourceOrder(ctx context.Context, in *UpdateOutsourceOrderRequest, opts ...grpc.CallOption) (*UpdateOutsourceOrderResponse, error) { + out := new(UpdateOutsourceOrderResponse) + err := c.cc.Invoke(ctx, "/inventoryOrderService/UpdateOutsourceOrder", in, out, opts...) if err != nil { return nil, err } @@ -87,6 +86,7 @@ CreateOperationList(context.Context, *CreateOperationListRequest) (*CreateOperationListResponse, error) UpdateMaterialApplyStatus(context.Context, *UpdateMaterialApplyStatusRequest) (*UpdateMaterialApplyStatusResponse, error) GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) + UpdateOutsourceOrder(context.Context, *UpdateOutsourceOrderRequest) (*UpdateOutsourceOrderResponse, error) mustEmbedUnimplementedInventoryOrderServiceServer() } @@ -105,6 +105,9 @@ } func (UnimplementedInventoryOrderServiceServer) GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetWarehouseInfo not implemented") +} +func (UnimplementedInventoryOrderServiceServer) UpdateOutsourceOrder(context.Context, *UpdateOutsourceOrderRequest) (*UpdateOutsourceOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOutsourceOrder not implemented") } func (UnimplementedInventoryOrderServiceServer) mustEmbedUnimplementedInventoryOrderServiceServer() {} @@ -129,7 +132,7 @@ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InventoryOrderService_CreateNewOrder_FullMethodName, + FullMethod: "/inventoryOrderService/CreateNewOrder", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InventoryOrderServiceServer).CreateNewOrder(ctx, req.(*CreateNewOrderRequest)) @@ -147,7 +150,7 @@ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InventoryOrderService_CreateOperationList_FullMethodName, + FullMethod: "/inventoryOrderService/CreateOperationList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InventoryOrderServiceServer).CreateOperationList(ctx, req.(*CreateOperationListRequest)) @@ -165,7 +168,7 @@ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InventoryOrderService_UpdateMaterialApplyStatus_FullMethodName, + FullMethod: "/inventoryOrderService/UpdateMaterialApplyStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InventoryOrderServiceServer).UpdateMaterialApplyStatus(ctx, req.(*UpdateMaterialApplyStatusRequest)) @@ -183,10 +186,28 @@ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InventoryOrderService_GetWarehouseInfo_FullMethodName, + FullMethod: "/inventoryOrderService/GetWarehouseInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(InventoryOrderServiceServer).GetWarehouseInfo(ctx, req.(*GetWarehouseInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InventoryOrderService_UpdateOutsourceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateOutsourceOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryOrderServiceServer).UpdateOutsourceOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/inventoryOrderService/UpdateOutsourceOrder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryOrderServiceServer).UpdateOutsourceOrder(ctx, req.(*UpdateOutsourceOrderRequest)) } return interceptor(ctx, in, info, handler) } @@ -214,6 +235,10 @@ MethodName: "GetWarehouseInfo", Handler: _InventoryOrderService_GetWarehouseInfo_Handler, }, + { + MethodName: "UpdateOutsourceOrder", + Handler: _InventoryOrderService_UpdateOutsourceOrder_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "inventory_order.proto", -- Gitblit v1.8.0