| | |
| | | Contacts string `json:"contacts" gorm:"type:varchar(255);comment:联系人"` //联系人 |
| | | FileTemplateCategoryIn constvar.FileTemplateCategory `json:"fileTemplateCategoryIn" gorm:"type:int(11);comment:入库模版种类"` |
| | | FileTemplateCategoryOut constvar.FileTemplateCategory `json:"fileTemplateCategoryOut" gorm:"type:int(11);comment:出库模版种类"` |
| | | OpenMonthStats constvar.BoolType `gorm:"type:int(11);default:2;comment:是否开启月度统计" json:"openMonthStats"` //是否开启月度统计 |
| | | } |
| | | |
| | | WarehouseSearch struct { |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *WarehouseSearch) SetOpenMonthStats(open constvar.BoolType) *WarehouseSearch { |
| | | slf.OpenMonthStats = open |
| | | return slf |
| | | } |
| | | |
| | | func (slf *WarehouseSearch) build() *gorm.DB { |
| | | var db = slf.Orm.Table(slf.TableName()) |
| | | |
| | |
| | | db = db.Where("code in ?", slf.Codes) |
| | | } |
| | | |
| | | if slf.OpenMonthStats != 0 { |
| | | db = db.Where("open_month_stats = ?", slf.OpenMonthStats) |
| | | } |
| | | |
| | | return db |
| | | } |
| | | |