From 1c8f39c41f903d3c07e8efc8dc49ef7014b45b8e Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 02 七月 2024 18:27:01 +0800
Subject: [PATCH] 未选出入库类型的业务操作在仓库月度报表里归为其他
---
models/warehouse.go | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/models/warehouse.go b/models/warehouse.go
index d6756af..e79397a 100644
--- a/models/warehouse.go
+++ b/models/warehouse.go
@@ -31,6 +31,7 @@
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 {
@@ -103,6 +104,11 @@
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())
@@ -134,6 +140,10 @@
db = db.Where("code in ?", slf.Codes)
}
+ if slf.OpenMonthStats != 0 {
+ db = db.Where("open_month_stats = ?", slf.OpenMonthStats)
+ }
+
return db
}
--
Gitblit v1.8.0