| | |
| | | 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:状态"` //状态 |
| | | //FromLocationID int `json:"fromLocationId" gorm:"type:int;not null;comment:源位置id"` //源位置id |
| | | //FromLocation Location `json:"fromLocation" gorm:"foreignKey:FromLocationID;references:Id"` //源位置 |
| | | //ToLocationID int `json:"toLocationId" gorm:"type:int;not null;comment:目标位置id"` //目标位置id |
| | | //ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationID;references:Id"` //目标位置 |
| | | OperationDate string `json:"operationDate" gorm:"type:varchar(31);comment:安排日期"` |
| | | ContacterID int `json:"contacterID" gorm:"type:int;comment:联系人ID"` |
| | | ContacterName string `json:"contacterName" gorm:"type:varchar(63);comment:联系人姓名"` |
| | |
| | | WarehouseId int `json:"warehouseId" gorm:"type:int;not null;default:0;comment:仓库id"` |
| | | Warehouse Warehouse `json:"warehouse" gorm:"foreignKey:WarehouseId"` |
| | | IsInternalOutput bool `json:"isInternalOutput"` //是否调拨产生的出库 |
| | | InventoryDealerType int `json:"inventoryDealerType" gorm:"type:varchar(255);comment:调拨出入库分类(对应dict字典表的ID)"` |
| | | InventoryDealer MiniDict `json:"inventoryDealer" gorm:"foreignKey:InventoryDealerType;"` |
| | | DealerType string `json:"dealerType" gorm:"type:varchar(255);comment:调拨出入库类型"` |
| | | } |
| | | |
| | | OperationSearch struct { |
| | |
| | | func (slf *OperationSearch) BeforeCreate(tx *gorm.DB) { |
| | | for k := range slf.Details { |
| | | slf.Details[k].BaseOperationType = slf.BaseOperationType |
| | | slf.Details[k].DealerType = slf.DealerType |
| | | } |
| | | } |
| | | |
| | |
| | | Preload("Location"). |
| | | Preload("ToLocation"). |
| | | Preload("Details.FromLocation"). |
| | | Preload("Details.ToLocation"). |
| | | Preload("InventoryDealer").Preload("Warehouse") |
| | | Preload("Details.ToLocation").Preload("Warehouse") |
| | | } |
| | | |
| | | if slf.Disuse { |