From 84346bdafad764c8964256829dc7dc564fe95769 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 01 七月 2024 22:30:50 +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