| | |
| | | Procedures struct { |
| | | gorm.Model `json:"-"` |
| | | ID int `gorm:"primarykey"` |
| | | WorkOrderID string `gorm:"index;type:varchar(191);not null;comment:工单ID" json:"-"` |
| | | OrderID string `gorm:"index;type:varchar(191);not null;comment:订单ID" json:"-"` |
| | | Status ProcedureStatus `json:"-"` |
| | | ProcedureData string `json:"-"` //request.ProductProcedure json串 |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *ProceduresSearch) SetOrderId(orderId string) *ProceduresSearch { |
| | | slf.OrderID = orderId |
| | | func (slf *ProceduresSearch) SetWorkOrderId(orderId string) *ProceduresSearch { |
| | | slf.WorkOrderID = orderId |
| | | return slf |
| | | } |
| | | func (slf *ProceduresSearch) SetStartTimeMax(ts int64) *ProceduresSearch { |
| | |
| | | db = db.Order(slf.Order) |
| | | } |
| | | |
| | | if slf.OrderID != "" { |
| | | db = db.Where("order_id = ?", slf.OrderID) |
| | | if slf.WorkOrderID != "" { |
| | | db = db.Where("work_order_id = ?", slf.WorkOrderID) |
| | | } |
| | | |
| | | if slf.Preload { |