| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *ProcessModelSearch) SetProductNot(product string) *ProcessModelSearch { |
| | | slf.ProductNot = product |
| | | return slf |
| | | } |
| | | |
| | | func (slf *ProcessModelSearch) SetProcedureNot(procedure string) *ProcessModelSearch { |
| | | slf.ProcedureNot = procedure |
| | | func (slf *ProcessModelSearch) SetProductAndProcedureNot(product string, procedure string) *ProcessModelSearch { |
| | | slf.ProductNot, slf.ProcedureNot = product, procedure |
| | | return slf |
| | | } |
| | | |
| | |
| | | db = db.Where("`procedure` = ?", slf.Procedure) |
| | | } |
| | | |
| | | if len(slf.ProductNot) != 0 { |
| | | db = db.Where("product <> ?", slf.ProductNot) |
| | | } |
| | | |
| | | if len(slf.ProcedureNot) != 0 { |
| | | db = db.Where("`procedure` <> ?", slf.ProcedureNot) |
| | | if len(slf.ProductNot) != 0 && len(slf.ProcedureNot) != 0 { |
| | | db = db.Not("product = ? and procedure = ? ", slf.ProductNot, slf.ProcedureNot) |
| | | } |
| | | |
| | | if len(slf.Procedures) != 0 { |