From 24789a42dd9eebeca16feb0c4e9a64ae691b776e Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期四, 07 三月 2024 14:51:42 +0800 Subject: [PATCH] srm获取仓库和操作记录信息 --- models/warehouse.go | 1 proto/purchase_wms/purchase_wms_grpc.pb.go | 108 ++++++ proto/purchase_wms/purchase_wms.pb.go | 698 ++++++++++++++++++++++++++++++++++++++++-- request/warehouse.go | 1 models/operation.go | 4 docs/swagger.yaml | 13 proto/purchase_wms.proto | 43 ++ docs/docs.go | 17 + proto/purchase_wms/server.go | 45 ++ docs/swagger.json | 17 + 10 files changed, 901 insertions(+), 46 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 5a2c468..422dacf 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3125,6 +3125,7 @@ "type": "number" }, "attachmentIDs": { + "description": "浠ヤ笅涓轰笉瀛樺簱鐨勫瓧娈�", "type": "array", "items": { "type": "integer" @@ -3228,6 +3229,14 @@ "isSale": { "description": "鏄惁閿�鍞�", "type": "boolean" + }, + "isStorage": { + "description": "鏃犲簱瀛樼殑鍦╳ms浠ュ強srm涓渶瑕佽繃婊ゆ帀", + "type": "integer" + }, + "isVirtual": { + "description": "铏氭嫙鐗╂枡鍦∕RP璁$畻鏃惰烦杩囪灞傜骇鐩存帴棰嗙敤涓嬬骇鐗╂枡锛岃櫄鎷熺墿鏂欎笉鐢熸垚宸ュ崟", + "type": "integer" }, "makeAdvanceTime": { "description": "鍒堕�犲墠缃椂闂�(澶�)", @@ -3690,6 +3699,10 @@ "companyId": { "type": "integer" }, + "contacts": { + "description": "鑱旂郴浜�", + "type": "string" + }, "createTime": { "type": "string" }, @@ -4017,6 +4030,10 @@ "maxLength": 5, "minLength": 1 }, + "contacts": { + "description": "鑱旂郴浜�", + "type": "string" + }, "inboundTransportation": { "description": "鍏ュ悜杩愯緭", "type": "integer" diff --git a/docs/swagger.json b/docs/swagger.json index fce1458..f858031 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3113,6 +3113,7 @@ "type": "number" }, "attachmentIDs": { + "description": "浠ヤ笅涓轰笉瀛樺簱鐨勫瓧娈�", "type": "array", "items": { "type": "integer" @@ -3216,6 +3217,14 @@ "isSale": { "description": "鏄惁閿�鍞�", "type": "boolean" + }, + "isStorage": { + "description": "鏃犲簱瀛樼殑鍦╳ms浠ュ強srm涓渶瑕佽繃婊ゆ帀", + "type": "integer" + }, + "isVirtual": { + "description": "铏氭嫙鐗╂枡鍦∕RP璁$畻鏃惰烦杩囪灞傜骇鐩存帴棰嗙敤涓嬬骇鐗╂枡锛岃櫄鎷熺墿鏂欎笉鐢熸垚宸ュ崟", + "type": "integer" }, "makeAdvanceTime": { "description": "鍒堕�犲墠缃椂闂�(澶�)", @@ -3678,6 +3687,10 @@ "companyId": { "type": "integer" }, + "contacts": { + "description": "鑱旂郴浜�", + "type": "string" + }, "createTime": { "type": "string" }, @@ -4005,6 +4018,10 @@ "maxLength": 5, "minLength": 1 }, + "contacts": { + "description": "鑱旂郴浜�", + "type": "string" + }, "inboundTransportation": { "description": "鍏ュ悜杩愯緭", "type": "integer" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 039abfe..ee77203 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -420,6 +420,7 @@ description: 鏁伴噺 type: number attachmentIDs: + description: 浠ヤ笅涓轰笉瀛樺簱鐨勫瓧娈� items: type: integer type: array @@ -496,6 +497,12 @@ isSale: description: 鏄惁閿�鍞� type: boolean + isStorage: + description: 鏃犲簱瀛樼殑鍦╳ms浠ュ強srm涓渶瑕佽繃婊ゆ帀 + type: integer + isVirtual: + description: 铏氭嫙鐗╂枡鍦∕RP璁$畻鏃惰烦杩囪灞傜骇鐩存帴棰嗙敤涓嬬骇鐗╂枡锛岃櫄鎷熺墿鏂欎笉鐢熸垚宸ュ崟 + type: integer makeAdvanceTime: description: 鍒堕�犲墠缃椂闂�(澶�) type: number @@ -812,6 +819,9 @@ $ref: '#/definitions/models.Company' companyId: type: integer + contacts: + description: 鑱旂郴浜� + type: string createTime: type: string id: @@ -1040,6 +1050,9 @@ maxLength: 5 minLength: 1 type: string + contacts: + description: 鑱旂郴浜� + type: string inboundTransportation: description: 鍏ュ悜杩愯緭 type: integer diff --git a/models/operation.go b/models/operation.go index a81b5ae..9d34771 100644 --- a/models/operation.go +++ b/models/operation.go @@ -151,7 +151,7 @@ } if slf.SourceNumber != "" { - db = db.Where("source_number like ?", fmt.Sprintf("%%%v%%", slf.SourceNumber)) + db = db.Where("source_number = ?", slf.SourceNumber) } if slf.Number != "" { @@ -298,7 +298,7 @@ if slf.PageNum*slf.PageSize > 0 { db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize) } - if err := db.Preload("FromLocation").Preload("ToLocation").Find(&records).Error; err != nil { + if err := db.Find(&records).Error; err != nil { return records, fmt.Errorf("find records err: %v", err) } diff --git a/models/warehouse.go b/models/warehouse.go index 8e8a779..ebdf7b3 100644 --- a/models/warehouse.go +++ b/models/warehouse.go @@ -27,6 +27,7 @@ OutboundTransportation int `json:"outboundTransportation" gorm:"type:int;comment:鍑哄簱杩愯緭"` //鍑哄簱杩愯緭 LocationId int `json:"locationId" gorm:"type:int;comment:浣嶇疆id"` //浣嶇疆id WarehouseLocation string `json:"warehouseLocation" gorm:"-"` //搴撳瓨浣嶇疆 + Contacts string `json:"contacts" gorm:"type:varchar(255);comment:鑱旂郴浜�"` //鑱旂郴浜� } WarehouseSearch struct { diff --git a/proto/purchase_wms.proto b/proto/purchase_wms.proto index c344dfd..be80ba4 100644 --- a/proto/purchase_wms.proto +++ b/proto/purchase_wms.proto @@ -8,6 +8,9 @@ rpc GetSupplierListByProductId(GetSupplierListByProductIdRequest) returns (GetSupplierListByProductIdResponse) {} rpc CreatePurchaseByWms(CreatePurchaseByWmsRequest) returns (CreatePurchaseByWmsResponse) {} rpc GetPurchaseInfo(GetPurchaseInfoRequest) returns (GetPurchaseInfoResponse) {} + rpc ExistSupplier(ExistSupplierRequest) returns (ExistSupplierResponse) {} + rpc SrmGetWarehouseInfo(SrmGetWarehouseInfoRequest) returns (SrmGetWarehouseInfoResponse) {} + rpc SrmGetOperationInfo(SrmGetOperationInfoRequest) returns (SrmGetOperationInfoResponse) {} } //------------------------------------------PurchaseToWms-------------------------------- @@ -92,5 +95,45 @@ repeated PurchaseInfo Infos = 1; } +//--------------------------------------------------ExistSupplier--------------------------------------- +message ExistSupplierRequest { + repeated string ProductId = 1; +} +message ExistSupplierResponse { + bool Exist = 1; +} + +//--------------------------------------------------SrmGetWarehouseInfo--------------------------------------- +message SrmGetWarehouseInfoRequest{} + +message SrmWarehouseInfo{ + string name = 1;//浠撳簱鍚� + string address = 2;//浠撳簱鍦板潃 + string principal = 3;//浠撳簱璐熻矗浜� +} + +message SrmGetWarehouseInfoResponse{ + repeated SrmWarehouseInfo info = 1; +} + +//--------------------------------------------------SrmGetOperationInfo--------------------------------------- +message SrmGetOperationInfoRequest{ + string number = 1; +} + +message SrmOperation{ + string number = 1;//鍏ュ簱鍗曞彿 + string warehouseName = 2;//浠撳簱鍚嶇О + string productName = 3;//浜у搧鍚嶇О + string productId = 4;//浜у搧缂栫爜 + int64 amount = 5;//鏁伴噺 + string overTime = 6;//鍏ュ簱鏃堕棿 + string consignee = 7;//鏀惰揣浜� + int64 status = 8;//鐘舵�� +} + +message SrmGetOperationInfoResponse{ + repeated SrmOperation operations = 1; +} diff --git a/proto/purchase_wms/purchase_wms.pb.go b/proto/purchase_wms/purchase_wms.pb.go index 5af5073..558b8ed 100644 --- a/proto/purchase_wms/purchase_wms.pb.go +++ b/proto/purchase_wms/purchase_wms.pb.go @@ -791,6 +791,447 @@ return nil } +type ExistSupplierRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProductId []string `protobuf:"bytes,1,rep,name=ProductId,proto3" json:"ProductId,omitempty"` +} + +func (x *ExistSupplierRequest) Reset() { + *x = ExistSupplierRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistSupplierRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistSupplierRequest) ProtoMessage() {} + +func (x *ExistSupplierRequest) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_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 ExistSupplierRequest.ProtoReflect.Descriptor instead. +func (*ExistSupplierRequest) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{13} +} + +func (x *ExistSupplierRequest) GetProductId() []string { + if x != nil { + return x.ProductId + } + return nil +} + +type ExistSupplierResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exist bool `protobuf:"varint,1,opt,name=Exist,proto3" json:"Exist,omitempty"` +} + +func (x *ExistSupplierResponse) Reset() { + *x = ExistSupplierResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistSupplierResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistSupplierResponse) ProtoMessage() {} + +func (x *ExistSupplierResponse) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[14] + 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 ExistSupplierResponse.ProtoReflect.Descriptor instead. +func (*ExistSupplierResponse) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{14} +} + +func (x *ExistSupplierResponse) GetExist() bool { + if x != nil { + return x.Exist + } + return false +} + +// --------------------------------------------------SrmGetWarehouseInfo--------------------------------------- +type SrmGetWarehouseInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SrmGetWarehouseInfoRequest) Reset() { + *x = SrmGetWarehouseInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetWarehouseInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetWarehouseInfoRequest) ProtoMessage() {} + +func (x *SrmGetWarehouseInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[15] + 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 SrmGetWarehouseInfoRequest.ProtoReflect.Descriptor instead. +func (*SrmGetWarehouseInfoRequest) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{15} +} + +type SrmWarehouseInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //浠撳簱鍚� + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` //浠撳簱鍦板潃 + Principal string `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal,omitempty"` //浠撳簱璐熻矗浜� +} + +func (x *SrmWarehouseInfo) Reset() { + *x = SrmWarehouseInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmWarehouseInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmWarehouseInfo) ProtoMessage() {} + +func (x *SrmWarehouseInfo) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[16] + 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 SrmWarehouseInfo.ProtoReflect.Descriptor instead. +func (*SrmWarehouseInfo) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{16} +} + +func (x *SrmWarehouseInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SrmWarehouseInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SrmWarehouseInfo) GetPrincipal() string { + if x != nil { + return x.Principal + } + return "" +} + +type SrmGetWarehouseInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info []*SrmWarehouseInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"` +} + +func (x *SrmGetWarehouseInfoResponse) Reset() { + *x = SrmGetWarehouseInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetWarehouseInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetWarehouseInfoResponse) ProtoMessage() {} + +func (x *SrmGetWarehouseInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[17] + 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 SrmGetWarehouseInfoResponse.ProtoReflect.Descriptor instead. +func (*SrmGetWarehouseInfoResponse) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{17} +} + +func (x *SrmGetWarehouseInfoResponse) GetInfo() []*SrmWarehouseInfo { + if x != nil { + return x.Info + } + return nil +} + +// --------------------------------------------------SrmGetOperationInfo--------------------------------------- +type SrmGetOperationInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *SrmGetOperationInfoRequest) Reset() { + *x = SrmGetOperationInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetOperationInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetOperationInfoRequest) ProtoMessage() {} + +func (x *SrmGetOperationInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[18] + 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 SrmGetOperationInfoRequest.ProtoReflect.Descriptor instead. +func (*SrmGetOperationInfoRequest) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{18} +} + +func (x *SrmGetOperationInfoRequest) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +type SrmOperation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` //鍏ュ簱鍗曞彿 + WarehouseName string `protobuf:"bytes,2,opt,name=warehouseName,proto3" json:"warehouseName,omitempty"` //浠撳簱鍚嶇О + ProductName string `protobuf:"bytes,3,opt,name=productName,proto3" json:"productName,omitempty"` //浜у搧鍚嶇О + ProductId string `protobuf:"bytes,4,opt,name=productId,proto3" json:"productId,omitempty"` //浜у搧缂栫爜 + Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` //鏁伴噺 + OverTime string `protobuf:"bytes,6,opt,name=overTime,proto3" json:"overTime,omitempty"` //鍏ュ簱鏃堕棿 + Consignee string `protobuf:"bytes,7,opt,name=consignee,proto3" json:"consignee,omitempty"` //鏀惰揣浜� + Status int64 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` //鐘舵�� +} + +func (x *SrmOperation) Reset() { + *x = SrmOperation{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmOperation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmOperation) ProtoMessage() {} + +func (x *SrmOperation) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[19] + 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 SrmOperation.ProtoReflect.Descriptor instead. +func (*SrmOperation) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{19} +} + +func (x *SrmOperation) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +func (x *SrmOperation) GetWarehouseName() string { + if x != nil { + return x.WarehouseName + } + return "" +} + +func (x *SrmOperation) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *SrmOperation) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *SrmOperation) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *SrmOperation) GetOverTime() string { + if x != nil { + return x.OverTime + } + return "" +} + +func (x *SrmOperation) GetConsignee() string { + if x != nil { + return x.Consignee + } + return "" +} + +func (x *SrmOperation) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +type SrmGetOperationInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operations []*SrmOperation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *SrmGetOperationInfoResponse) Reset() { + *x = SrmGetOperationInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetOperationInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetOperationInfoResponse) ProtoMessage() {} + +func (x *SrmGetOperationInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[20] + 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 SrmGetOperationInfoResponse.ProtoReflect.Descriptor instead. +func (*SrmGetOperationInfoResponse) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{20} +} + +func (x *SrmGetOperationInfoResponse) GetOperations() []*SrmOperation { + if x != nil { + return x.Operations + } + return nil +} + var File_purchase_wms_proto protoreflect.FileDescriptor var file_purchase_wms_proto_rawDesc = []byte{ @@ -876,33 +1317,90 @@ 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0xad, 0x03, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, - 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x50, 0x75, 0x72, - 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x50, 0x75, 0x72, - 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, - 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, - 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, - 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, - 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, - 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x34, 0x0a, 0x14, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x72, + 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x10, 0x53, 0x72, 0x6d, 0x57, + 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x44, 0x0a, 0x1b, 0x53, 0x72, 0x6d, 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, 0x25, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x72, 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, + 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x34, + 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0c, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x24, 0x0a, + 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, + 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, + 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, + 0x1b, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x97, 0x05, 0x0a, 0x0f, + 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x3e, 0x0a, 0x0d, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, + 0x12, 0x15, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, + 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, + 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, + 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, + 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, + 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, + 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 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, 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -919,7 +1417,7 @@ return file_purchase_wms_proto_rawDescData } -var file_purchase_wms_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_purchase_wms_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_purchase_wms_proto_goTypes = []interface{}{ (*PurchaseProduct)(nil), // 0: PurchaseProduct (*PurchaseToWmsRequest)(nil), // 1: PurchaseToWmsRequest @@ -934,26 +1432,42 @@ (*GetPurchaseInfoRequest)(nil), // 10: GetPurchaseInfoRequest (*PurchaseInfo)(nil), // 11: PurchaseInfo (*GetPurchaseInfoResponse)(nil), // 12: GetPurchaseInfoResponse + (*ExistSupplierRequest)(nil), // 13: ExistSupplierRequest + (*ExistSupplierResponse)(nil), // 14: ExistSupplierResponse + (*SrmGetWarehouseInfoRequest)(nil), // 15: SrmGetWarehouseInfoRequest + (*SrmWarehouseInfo)(nil), // 16: SrmWarehouseInfo + (*SrmGetWarehouseInfoResponse)(nil), // 17: SrmGetWarehouseInfoResponse + (*SrmGetOperationInfoRequest)(nil), // 18: SrmGetOperationInfoRequest + (*SrmOperation)(nil), // 19: SrmOperation + (*SrmGetOperationInfoResponse)(nil), // 20: SrmGetOperationInfoResponse } var file_purchase_wms_proto_depIdxs = []int32{ 0, // 0: PurchaseToWmsRequest.Product:type_name -> PurchaseProduct 6, // 1: GetSupplierListByProductIdResponse.List:type_name -> SupplierList 11, // 2: GetPurchaseInfoResponse.Infos:type_name -> PurchaseInfo - 1, // 3: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest - 3, // 4: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest - 5, // 5: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest - 8, // 6: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest - 10, // 7: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest - 2, // 8: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse - 4, // 9: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse - 7, // 10: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse - 9, // 11: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse - 12, // 12: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] 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 + 16, // 3: SrmGetWarehouseInfoResponse.info:type_name -> SrmWarehouseInfo + 19, // 4: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation + 1, // 5: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest + 3, // 6: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest + 5, // 7: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest + 8, // 8: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest + 10, // 9: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest + 13, // 10: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest + 15, // 11: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest + 18, // 12: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest + 2, // 13: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse + 4, // 14: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse + 7, // 15: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse + 9, // 16: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse + 12, // 17: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse + 14, // 18: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse + 17, // 19: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse + 20, // 20: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse + 13, // [13:21] is the sub-list for method output_type + 5, // [5:13] 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 } func init() { file_purchase_wms_proto_init() } @@ -1118,6 +1632,102 @@ return nil } } + file_purchase_wms_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExistSupplierRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExistSupplierResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetWarehouseInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmWarehouseInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetWarehouseInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetOperationInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmOperation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetOperationInfoResponse); 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{ @@ -1125,7 +1735,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_purchase_wms_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/purchase_wms/purchase_wms_grpc.pb.go b/proto/purchase_wms/purchase_wms_grpc.pb.go index dcc5c68..142e836 100644 --- a/proto/purchase_wms/purchase_wms_grpc.pb.go +++ b/proto/purchase_wms/purchase_wms_grpc.pb.go @@ -23,6 +23,9 @@ GetSupplierListByProductId(ctx context.Context, in *GetSupplierListByProductIdRequest, opts ...grpc.CallOption) (*GetSupplierListByProductIdResponse, error) CreatePurchaseByWms(ctx context.Context, in *CreatePurchaseByWmsRequest, opts ...grpc.CallOption) (*CreatePurchaseByWmsResponse, error) GetPurchaseInfo(ctx context.Context, in *GetPurchaseInfoRequest, opts ...grpc.CallOption) (*GetPurchaseInfoResponse, error) + ExistSupplier(ctx context.Context, in *ExistSupplierRequest, opts ...grpc.CallOption) (*ExistSupplierResponse, error) + SrmGetWarehouseInfo(ctx context.Context, in *SrmGetWarehouseInfoRequest, opts ...grpc.CallOption) (*SrmGetWarehouseInfoResponse, error) + SrmGetOperationInfo(ctx context.Context, in *SrmGetOperationInfoRequest, opts ...grpc.CallOption) (*SrmGetOperationInfoResponse, error) } type purchaseServiceClient struct { @@ -78,6 +81,33 @@ return out, nil } +func (c *purchaseServiceClient) ExistSupplier(ctx context.Context, in *ExistSupplierRequest, opts ...grpc.CallOption) (*ExistSupplierResponse, error) { + out := new(ExistSupplierResponse) + err := c.cc.Invoke(ctx, "/PurchaseService/ExistSupplier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *purchaseServiceClient) SrmGetWarehouseInfo(ctx context.Context, in *SrmGetWarehouseInfoRequest, opts ...grpc.CallOption) (*SrmGetWarehouseInfoResponse, error) { + out := new(SrmGetWarehouseInfoResponse) + err := c.cc.Invoke(ctx, "/PurchaseService/SrmGetWarehouseInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *purchaseServiceClient) SrmGetOperationInfo(ctx context.Context, in *SrmGetOperationInfoRequest, opts ...grpc.CallOption) (*SrmGetOperationInfoResponse, error) { + out := new(SrmGetOperationInfoResponse) + err := c.cc.Invoke(ctx, "/PurchaseService/SrmGetOperationInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PurchaseServiceServer is the server API for PurchaseService service. // All implementations must embed UnimplementedPurchaseServiceServer // for forward compatibility @@ -87,6 +117,9 @@ GetSupplierListByProductId(context.Context, *GetSupplierListByProductIdRequest) (*GetSupplierListByProductIdResponse, error) CreatePurchaseByWms(context.Context, *CreatePurchaseByWmsRequest) (*CreatePurchaseByWmsResponse, error) GetPurchaseInfo(context.Context, *GetPurchaseInfoRequest) (*GetPurchaseInfoResponse, error) + ExistSupplier(context.Context, *ExistSupplierRequest) (*ExistSupplierResponse, error) + SrmGetWarehouseInfo(context.Context, *SrmGetWarehouseInfoRequest) (*SrmGetWarehouseInfoResponse, error) + SrmGetOperationInfo(context.Context, *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) mustEmbedUnimplementedPurchaseServiceServer() } @@ -108,6 +141,15 @@ } func (UnimplementedPurchaseServiceServer) GetPurchaseInfo(context.Context, *GetPurchaseInfoRequest) (*GetPurchaseInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPurchaseInfo not implemented") +} +func (UnimplementedPurchaseServiceServer) ExistSupplier(context.Context, *ExistSupplierRequest) (*ExistSupplierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExistSupplier not implemented") +} +func (UnimplementedPurchaseServiceServer) SrmGetWarehouseInfo(context.Context, *SrmGetWarehouseInfoRequest) (*SrmGetWarehouseInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SrmGetWarehouseInfo not implemented") +} +func (UnimplementedPurchaseServiceServer) SrmGetOperationInfo(context.Context, *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SrmGetOperationInfo not implemented") } func (UnimplementedPurchaseServiceServer) mustEmbedUnimplementedPurchaseServiceServer() {} @@ -212,6 +254,60 @@ return interceptor(ctx, in, info, handler) } +func _PurchaseService_ExistSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExistSupplierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PurchaseServiceServer).ExistSupplier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/PurchaseService/ExistSupplier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PurchaseServiceServer).ExistSupplier(ctx, req.(*ExistSupplierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PurchaseService_SrmGetWarehouseInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SrmGetWarehouseInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PurchaseServiceServer).SrmGetWarehouseInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/PurchaseService/SrmGetWarehouseInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PurchaseServiceServer).SrmGetWarehouseInfo(ctx, req.(*SrmGetWarehouseInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PurchaseService_SrmGetOperationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SrmGetOperationInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PurchaseServiceServer).SrmGetOperationInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/PurchaseService/SrmGetOperationInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PurchaseServiceServer).SrmGetOperationInfo(ctx, req.(*SrmGetOperationInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PurchaseService_ServiceDesc is the grpc.ServiceDesc for PurchaseService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -239,6 +335,18 @@ MethodName: "GetPurchaseInfo", Handler: _PurchaseService_GetPurchaseInfo_Handler, }, + { + MethodName: "ExistSupplier", + Handler: _PurchaseService_ExistSupplier_Handler, + }, + { + MethodName: "SrmGetWarehouseInfo", + Handler: _PurchaseService_SrmGetWarehouseInfo_Handler, + }, + { + MethodName: "SrmGetOperationInfo", + Handler: _PurchaseService_SrmGetOperationInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "purchase_wms.proto", diff --git a/proto/purchase_wms/server.go b/proto/purchase_wms/server.go index 4416273..80f4c71 100644 --- a/proto/purchase_wms/server.go +++ b/proto/purchase_wms/server.go @@ -5,6 +5,7 @@ "github.com/shopspring/decimal" "gorm.io/gorm" "strconv" + "strings" "time" "wms/constvar" "wms/models" @@ -70,3 +71,47 @@ resp.Warehouse = warehouse.Name return resp, nil } + +func (s *Server) SrmGetWarehouseInfo(c context.Context, req *SrmGetWarehouseInfoRequest) (*SrmGetWarehouseInfoResponse, error) { + warehouses, err := models.NewWarehouseSearch().FindNotTotal() + resp := new(SrmGetWarehouseInfoResponse) + if err != nil { + return resp, err + } + for _, warehouse := range warehouses { + var info SrmWarehouseInfo + info.Name = warehouse.Name + info.Address = warehouse.Address + info.Principal = warehouse.Contacts + resp.Info = append(resp.Info, &info) + } + return resp, nil +} + +func (s *Server) SrmGetOperationInfo(c context.Context, req *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) { + operations, err := models.NewOperationSearch().SetSourceNumber(req.Number).SetPreload(true).FindNotTotal() + if err != nil { + return nil, err + } + srm := make([]*SrmOperation, 0) + for _, operation := range operations { + var so SrmOperation + so.Number = operation.Number + index := strings.LastIndex(operation.OperationTypeName, "-") + so.WarehouseName = operation.OperationTypeName[:index] + so.Status = int64(operation.Status) + if operation.Status == constvar.OperationStatus_Finish { + so.OverTime = operation.UpdateTime + } + for _, detail := range operation.Details { + s := so + s.ProductId = detail.ProductId + s.Amount = detail.Amount.IntPart() + s.ProductName = detail.Product.Name + srm = append(srm, &s) + } + } + var resp = new(SrmGetOperationInfoResponse) + resp.Operations = srm + return resp, nil +} diff --git a/request/warehouse.go b/request/warehouse.go index 74082ff..7f14cc1 100644 --- a/request/warehouse.go +++ b/request/warehouse.go @@ -16,6 +16,7 @@ InboundTransportation int `json:"inboundTransportation" gorm:"type:int;comment:鍏ュ悜杩愯緭"` //鍏ュ悜杩愯緭 OutboundTransportation int `json:"outboundTransportation" gorm:"type:int;comment:鍑哄簱杩愯緭"` //鍑哄簱杩愯緭 LocationId int `json:"locationId" gorm:"type:int;comment:浣嶇疆id"` //浣嶇疆id + Contacts string `json:"contacts" gorm:"type:varchar(255);comment:鑱旂郴浜�"` //鑱旂郴浜� } type UpdateWarehouse struct { -- Gitblit v1.8.0