| | |
| | | for _, amount := range amounts { |
| | | var resp response.LocationForms |
| | | resp.Amount = amount.Amount |
| | | resp.LocationId = amount.LocationId |
| | | resp.LocationName = amount.Location.Name |
| | | resp.ProduceId = amount.Product.ID |
| | | resp.ProductName = amount.Product.Name |
| | |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "locationId": { |
| | | "description": "位置id", |
| | | "type": "integer" |
| | | }, |
| | | "locationName": { |
| | | "description": "位置名称", |
| | | "type": "string" |
| | |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "locationId": { |
| | | "description": "位置id", |
| | | "type": "integer" |
| | | }, |
| | | "locationName": { |
| | | "description": "位置名称", |
| | | "type": "string" |
| | |
| | | amount: |
| | | description: 数量 |
| | | type: number |
| | | locationId: |
| | | description: 位置id |
| | | type: integer |
| | | locationName: |
| | | description: 位置名称 |
| | | type: string |
| | |
| | | rpc CreateNewOrder(CreateNewOrderRequest) returns(CreateNewOrderResponse) {} |
| | | rpc CreateOperationList(CreateOperationListRequest) returns(CreateOperationListResponse) {} |
| | | rpc UpdateMaterialApplyStatus(UpdateMaterialApplyStatusRequest) returns(UpdateMaterialApplyStatusResponse) {} |
| | | rpc GetWarehouseInfo(GetWarehouseInfoRequest) returns(GetWarehouseInfoResponse) {} |
| | | } |
| | | |
| | | message CreateNewOrderRequest{ |
| | |
| | | } |
| | | |
| | | message UpdateMaterialApplyStatusResponse{ |
| | | } |
| | | |
| | | //-------------------------------------------------GetWarehouseInfo----------------------------------------- |
| | | |
| | | message GetWarehouseInfoRequest{ |
| | | } |
| | | |
| | | message WarehouseInfo{ |
| | | string Id = 1;//仓库id |
| | | string Name = 2;//仓库名称 |
| | | } |
| | | |
| | | message GetWarehouseInfoResponse{ |
| | | repeated WarehouseInfo List = 1; |
| | | } |
| | |
| | | return file_inventory_order_proto_rawDescGZIP(), []int{8} |
| | | } |
| | | |
| | | type GetWarehouseInfoRequest struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | } |
| | | |
| | | func (x *GetWarehouseInfoRequest) Reset() { |
| | | *x = GetWarehouseInfoRequest{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_inventory_order_proto_msgTypes[9] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *GetWarehouseInfoRequest) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*GetWarehouseInfoRequest) ProtoMessage() {} |
| | | |
| | | func (x *GetWarehouseInfoRequest) ProtoReflect() protoreflect.Message { |
| | | mi := &file_inventory_order_proto_msgTypes[9] |
| | | 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 GetWarehouseInfoRequest.ProtoReflect.Descriptor instead. |
| | | func (*GetWarehouseInfoRequest) Descriptor() ([]byte, []int) { |
| | | return file_inventory_order_proto_rawDescGZIP(), []int{9} |
| | | } |
| | | |
| | | type WarehouseInfo struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` //仓库id |
| | | Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` //仓库名称 |
| | | } |
| | | |
| | | func (x *WarehouseInfo) Reset() { |
| | | *x = WarehouseInfo{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_inventory_order_proto_msgTypes[10] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *WarehouseInfo) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*WarehouseInfo) ProtoMessage() {} |
| | | |
| | | func (x *WarehouseInfo) ProtoReflect() protoreflect.Message { |
| | | mi := &file_inventory_order_proto_msgTypes[10] |
| | | 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 WarehouseInfo.ProtoReflect.Descriptor instead. |
| | | func (*WarehouseInfo) Descriptor() ([]byte, []int) { |
| | | return file_inventory_order_proto_rawDescGZIP(), []int{10} |
| | | } |
| | | |
| | | func (x *WarehouseInfo) GetId() string { |
| | | if x != nil { |
| | | return x.Id |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (x *WarehouseInfo) GetName() string { |
| | | if x != nil { |
| | | return x.Name |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | type GetWarehouseInfoResponse struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | List []*WarehouseInfo `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"` |
| | | } |
| | | |
| | | func (x *GetWarehouseInfoResponse) Reset() { |
| | | *x = GetWarehouseInfoResponse{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_inventory_order_proto_msgTypes[11] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *GetWarehouseInfoResponse) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*GetWarehouseInfoResponse) ProtoMessage() {} |
| | | |
| | | func (x *GetWarehouseInfoResponse) ProtoReflect() protoreflect.Message { |
| | | mi := &file_inventory_order_proto_msgTypes[11] |
| | | 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 GetWarehouseInfoResponse.ProtoReflect.Descriptor instead. |
| | | func (*GetWarehouseInfoResponse) Descriptor() ([]byte, []int) { |
| | | return file_inventory_order_proto_rawDescGZIP(), []int{11} |
| | | } |
| | | |
| | | func (x *GetWarehouseInfoResponse) GetList() []*WarehouseInfo { |
| | | if x != nil { |
| | | return x.List |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | var File_inventory_order_proto protoreflect.FileDescriptor |
| | | |
| | | var file_inventory_order_proto_rawDesc = []byte{ |
| | |
| | | 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x23, 0x0a, 0x21, 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, |
| | | 0x32, 0x96, 0x02, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, |
| | | 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, |
| | | 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x0d, 0x57, |
| | | 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, |
| | | 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, |
| | | 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, |
| | | 0x22, 0x3e, 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, |
| | |
| | | 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, 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, |
| | | 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, |
| | | } |
| | | |
| | | var ( |
| | |
| | | return file_inventory_order_proto_rawDescData |
| | | } |
| | | |
| | | var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 9) |
| | | var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 12) |
| | | var file_inventory_order_proto_goTypes = []interface{}{ |
| | | (*CreateNewOrderRequest)(nil), // 0: CreateNewOrderRequest |
| | | (*CreateNewOrderResponse)(nil), // 1: CreateNewOrderResponse |
| | |
| | | (*CreateOperationListResponse)(nil), // 6: CreateOperationListResponse |
| | | (*UpdateMaterialApplyStatusRequest)(nil), // 7: UpdateMaterialApplyStatusRequest |
| | | (*UpdateMaterialApplyStatusResponse)(nil), // 8: UpdateMaterialApplyStatusResponse |
| | | (*GetWarehouseInfoRequest)(nil), // 9: GetWarehouseInfoRequest |
| | | (*WarehouseInfo)(nil), // 10: WarehouseInfo |
| | | (*GetWarehouseInfoResponse)(nil), // 11: GetWarehouseInfoResponse |
| | | } |
| | | var file_inventory_order_proto_depIdxs = []int32{ |
| | | 2, // 0: OperationList.Products:type_name -> OperationProduct |
| | | 3, // 1: CreateOperationListRequest.List:type_name -> OperationList |
| | | 5, // 2: CreateOperationListResponse.List:type_name -> OperationResponse |
| | | 0, // 3: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest |
| | | 4, // 4: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest |
| | | 7, // 5: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest |
| | | 1, // 6: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse |
| | | 6, // 7: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse |
| | | 8, // 8: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse |
| | | 6, // [6:9] is the sub-list for method output_type |
| | | 3, // [3:6] is the sub-list for method input_type |
| | | 3, // [3:3] is the sub-list for extension type_name |
| | | 3, // [3:3] is the sub-list for extension extendee |
| | | 0, // [0:3] is the sub-list for field type_name |
| | | 2, // 0: OperationList.Products:type_name -> OperationProduct |
| | | 3, // 1: CreateOperationListRequest.List:type_name -> OperationList |
| | | 5, // 2: CreateOperationListResponse.List:type_name -> OperationResponse |
| | | 10, // 3: GetWarehouseInfoResponse.List:type_name -> WarehouseInfo |
| | | 0, // 4: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest |
| | | 4, // 5: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest |
| | | 7, // 6: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest |
| | | 9, // 7: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest |
| | | 1, // 8: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse |
| | | 6, // 9: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse |
| | | 8, // 10: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse |
| | | 11, // 11: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse |
| | | 8, // [8:12] is the sub-list for method output_type |
| | | 4, // [4:8] is the sub-list for method input_type |
| | | 4, // [4:4] is the sub-list for extension type_name |
| | | 4, // [4:4] is the sub-list for extension extendee |
| | | 0, // [0:4] is the sub-list for field type_name |
| | | } |
| | | |
| | | func init() { file_inventory_order_proto_init() } |
| | |
| | | return nil |
| | | } |
| | | } |
| | | file_inventory_order_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*GetWarehouseInfoRequest); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_inventory_order_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*WarehouseInfo); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_inventory_order_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*GetWarehouseInfoResponse); 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{ |
| | |
| | | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| | | RawDescriptor: file_inventory_order_proto_rawDesc, |
| | | NumEnums: 0, |
| | | NumMessages: 9, |
| | | NumMessages: 12, |
| | | NumExtensions: 0, |
| | | NumServices: 1, |
| | | }, |
| | |
| | | CreateNewOrder(ctx context.Context, in *CreateNewOrderRequest, opts ...grpc.CallOption) (*CreateNewOrderResponse, error) |
| | | 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) |
| | | } |
| | | |
| | | type inventoryOrderServiceClient struct { |
| | |
| | | return out, nil |
| | | } |
| | | |
| | | func (c *inventoryOrderServiceClient) GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error) { |
| | | out := new(GetWarehouseInfoResponse) |
| | | err := c.cc.Invoke(ctx, "/inventoryOrderService/GetWarehouseInfo", in, out, opts...) |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | return out, nil |
| | | } |
| | | |
| | | // InventoryOrderServiceServer is the server API for InventoryOrderService service. |
| | | // All implementations must embed UnimplementedInventoryOrderServiceServer |
| | | // for forward compatibility |
| | |
| | | CreateNewOrder(context.Context, *CreateNewOrderRequest) (*CreateNewOrderResponse, error) |
| | | CreateOperationList(context.Context, *CreateOperationListRequest) (*CreateOperationListResponse, error) |
| | | UpdateMaterialApplyStatus(context.Context, *UpdateMaterialApplyStatusRequest) (*UpdateMaterialApplyStatusResponse, error) |
| | | GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) |
| | | mustEmbedUnimplementedInventoryOrderServiceServer() |
| | | } |
| | | |
| | |
| | | } |
| | | func (UnimplementedInventoryOrderServiceServer) UpdateMaterialApplyStatus(context.Context, *UpdateMaterialApplyStatusRequest) (*UpdateMaterialApplyStatusResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method UpdateMaterialApplyStatus not implemented") |
| | | } |
| | | func (UnimplementedInventoryOrderServiceServer) GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method GetWarehouseInfo not implemented") |
| | | } |
| | | func (UnimplementedInventoryOrderServiceServer) mustEmbedUnimplementedInventoryOrderServiceServer() {} |
| | | |
| | |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | func _InventoryOrderService_GetWarehouseInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| | | in := new(GetWarehouseInfoRequest) |
| | | if err := dec(in); err != nil { |
| | | return nil, err |
| | | } |
| | | if interceptor == nil { |
| | | return srv.(InventoryOrderServiceServer).GetWarehouseInfo(ctx, in) |
| | | } |
| | | info := &grpc.UnaryServerInfo{ |
| | | Server: srv, |
| | | 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) |
| | | } |
| | | |
| | | // InventoryOrderService_ServiceDesc is the grpc.ServiceDesc for InventoryOrderService service. |
| | | // It's only intended for direct use with grpc.RegisterService, |
| | | // and not to be introspected or modified (even as a copy) |
| | |
| | | MethodName: "UpdateMaterialApplyStatus", |
| | | Handler: _InventoryOrderService_UpdateMaterialApplyStatus_Handler, |
| | | }, |
| | | { |
| | | MethodName: "GetWarehouseInfo", |
| | | Handler: _InventoryOrderService_GetWarehouseInfo_Handler, |
| | | }, |
| | | }, |
| | | Streams: []grpc.StreamDesc{}, |
| | | Metadata: "inventory_order.proto", |
| | |
| | | resp.List = operationResp |
| | | return resp, err |
| | | } |
| | | |
| | | func (s *Server) GetWarehouseInfo(ctx context.Context, req *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) { |
| | | warehouses, err := models.NewWarehouseSearch().FindNotTotal() |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | list := make([]*WarehouseInfo, 0) |
| | | for _, warehouse := range warehouses { |
| | | var wi WarehouseInfo |
| | | wi.Id = strconv.Itoa(warehouse.Id) |
| | | wi.Name = warehouse.Name |
| | | list = append(list, &wi) |
| | | } |
| | | resp := new(GetWarehouseInfoResponse) |
| | | resp.List = list |
| | | return resp, nil |
| | | } |
| | |
| | | detail.ProductId = product.Id |
| | | amount, _ := decimal.NewFromString(product.Amount) |
| | | detail.Amount = amount |
| | | details = append(details, &detail) |
| | | newOperation.Details = append(newOperation.Details, &detail) |
| | | operations = append(operations, &newOperation) |
| | | } |
| | |
| | | |
| | | type LocationForms struct { |
| | | ProduceId string `json:"produceId"` //产品id |
| | | LocationId int `json:"locationId"` //位置id |
| | | LocationName string `json:"locationName"` //位置名称 |
| | | ProductName string `json:"productName"` //产品名称 |
| | | ProductTypeName string `json:"productTypeName"` //产品类别 |