| | |
| | | WmsModel |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | Number string `json:"number" gorm:"type:varchar(255)"` //单号 |
| | | SourceNumber string `json:"sourceNumber" gorm:"type:varchar(255)"` //源单号 |
| | | SourceNumber string `json:"sourceNumber" gorm:"index;type:varchar(255)"` //源单号 |
| | | OperationTypeId int `json:"operationTypeId" gorm:"type:int;not null;comment:作业类型id"` //作业类型id |
| | | OperationTypeName string `json:"operationTypeName" gorm:"type:varchar(127);comment:作业类型名称"` //作业类型名称 |
| | | Status constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:状态"` //状态 |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *OperationSearch) SetOperationSource(operationSource constvar.OperationSource) *OperationSearch { |
| | | slf.OperationSource = operationSource |
| | | return slf |
| | | } |
| | | |
| | | func (slf *OperationSearch) build() *gorm.DB { |
| | | var db = slf.Orm.Model(&Operation{}) |
| | | |
| | |
| | | db = db.Where("sales_details_number = ?", slf.SalesDetailsNumber) |
| | | } |
| | | |
| | | if slf.OperationSource != 0 { |
| | | db = db.Where("operation_source = ?", slf.OperationSource) |
| | | } |
| | | |
| | | return db |
| | | } |
| | | |
| | |
| | | //--------------------------------------------------SrmGetOperationInfo--------------------------------------- |
| | | message SrmGetOperationInfoRequest{ |
| | | string number = 1; |
| | | OperationSource OperationSource = 2; |
| | | string SalesDetailsNumber = 3; |
| | | } |
| | | |
| | | message SrmOperation{ |
| | |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` |
| | | Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` |
| | | OperationSource common.OperationSource `protobuf:"varint,2,opt,name=OperationSource,proto3,enum=OperationSource" json:"OperationSource,omitempty"` |
| | | SalesDetailsNumber string `protobuf:"bytes,3,opt,name=SalesDetailsNumber,proto3" json:"SalesDetailsNumber,omitempty"` |
| | | } |
| | | |
| | | func (x *SrmGetOperationInfoRequest) Reset() { |
| | |
| | | func (x *SrmGetOperationInfoRequest) GetNumber() string { |
| | | if x != nil { |
| | | return x.Number |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (x *SrmGetOperationInfoRequest) GetOperationSource() common.OperationSource { |
| | | if x != nil { |
| | | return x.OperationSource |
| | | } |
| | | return common.OperationSource(0) |
| | | } |
| | | |
| | | func (x *SrmGetOperationInfoRequest) GetSalesDetailsNumber() string { |
| | | if x != nil { |
| | | return x.SalesDetailsNumber |
| | | } |
| | | return "" |
| | | } |
| | |
| | | 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, 0x22, 0x6d, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, |
| | | 0x61, 0x73, 0x65, 0x42, 0x79, 0x41, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, |
| | | 0x20, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, |
| | | 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, |
| | | 0x72, 0x12, 0x2d, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x52, 0x03, 0x72, 0x65, 0x71, |
| | | 0x32, 0xeb, 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, |
| | | 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xa0, 0x01, 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, 0x12, 0x3a, 0x0a, 0x0f, 0x4f, |
| | | 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, |
| | | 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, |
| | | 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, |
| | | 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, |
| | | 0x01, 0x28, 0x09, 0x52, 0x12, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, |
| | | 0x73, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 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, 0x22, 0x6d, |
| | | 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, |
| | | 0x42, 0x79, 0x41, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, |
| | | 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, |
| | | 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2d, |
| | | 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, |
| | | 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x03, 0x72, 0x65, 0x71, 0x32, 0xeb, 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, |
| | | 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, |
| | | 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, 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, 0x41, 0x70, |
| | | 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, |
| | | 0x73, 0x65, 0x42, 0x79, 0x41, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, |
| | | 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, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, |
| | | 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x41, 0x70, 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, 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, |
| | | 0x79, 0x41, 0x70, 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, 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, |
| | | } |
| | | |
| | | var ( |
| | |
| | | 6, // 2: GetSupplierListByProductIdResponse.List:type_name -> SupplierList |
| | | 11, // 3: GetPurchaseInfoResponse.Infos:type_name -> PurchaseInfo |
| | | 16, // 4: SrmGetWarehouseInfoResponse.info:type_name -> SrmWarehouseInfo |
| | | 19, // 5: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation |
| | | 8, // 6: CreatePurchaseByApsRequest.req:type_name -> CreatePurchaseByWmsRequest |
| | | 1, // 7: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest |
| | | 3, // 8: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest |
| | | 5, // 9: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest |
| | | 8, // 10: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest |
| | | 10, // 11: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest |
| | | 13, // 12: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest |
| | | 15, // 13: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest |
| | | 18, // 14: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest |
| | | 21, // 15: PurchaseService.CreatePurchaseByAps:input_type -> CreatePurchaseByApsRequest |
| | | 2, // 16: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse |
| | | 4, // 17: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse |
| | | 7, // 18: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse |
| | | 9, // 19: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse |
| | | 12, // 20: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse |
| | | 14, // 21: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse |
| | | 17, // 22: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse |
| | | 20, // 23: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse |
| | | 9, // 24: PurchaseService.CreatePurchaseByAps:output_type -> CreatePurchaseByWmsResponse |
| | | 16, // [16:25] is the sub-list for method output_type |
| | | 7, // [7:16] is the sub-list for method input_type |
| | | 7, // [7:7] is the sub-list for extension type_name |
| | | 7, // [7:7] is the sub-list for extension extendee |
| | | 0, // [0:7] is the sub-list for field type_name |
| | | 22, // 5: SrmGetOperationInfoRequest.OperationSource:type_name -> OperationSource |
| | | 19, // 6: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation |
| | | 8, // 7: CreatePurchaseByApsRequest.req:type_name -> CreatePurchaseByWmsRequest |
| | | 1, // 8: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest |
| | | 3, // 9: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest |
| | | 5, // 10: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest |
| | | 8, // 11: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest |
| | | 10, // 12: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest |
| | | 13, // 13: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest |
| | | 15, // 14: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest |
| | | 18, // 15: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest |
| | | 21, // 16: PurchaseService.CreatePurchaseByAps:input_type -> CreatePurchaseByApsRequest |
| | | 2, // 17: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse |
| | | 4, // 18: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse |
| | | 7, // 19: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse |
| | | 9, // 20: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse |
| | | 12, // 21: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse |
| | | 14, // 22: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse |
| | | 17, // 23: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse |
| | | 20, // 24: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse |
| | | 9, // 25: PurchaseService.CreatePurchaseByAps:output_type -> CreatePurchaseByWmsResponse |
| | | 17, // [17:26] is the sub-list for method output_type |
| | | 8, // [8:17] is the sub-list for method input_type |
| | | 8, // [8:8] is the sub-list for extension type_name |
| | | 8, // [8:8] is the sub-list for extension extendee |
| | | 0, // [0:8] is the sub-list for field type_name |
| | | } |
| | | |
| | | func init() { file_purchase_wms_proto_init() } |
| | |
| | | |
| | | import ( |
| | | "context" |
| | | "errors" |
| | | "github.com/shopspring/decimal" |
| | | "gorm.io/gorm" |
| | | "strconv" |
| | |
| | | } |
| | | |
| | | func (s *Server) SrmGetOperationInfo(c context.Context, req *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) { |
| | | operations, err := models.NewOperationSearch().SetSourceNumber(req.Number).SetPreload(true).FindNotTotal() |
| | | if req.Number == "" && req.SalesDetailsNumber == "" && req.OperationSource == 0 { |
| | | return nil, errors.New("参数缺失") |
| | | } |
| | | operations, err := models.NewOperationSearch().SetSourceNumber(req.Number). |
| | | SetOperationSource(constvar.OperationSource(req.OperationSource)). |
| | | SetSalesDetailsNumber(req.SalesDetailsNumber). |
| | | SetPreload(true).FindNotTotal() |
| | | if err != nil { |
| | | return nil, err |
| | | } |