From 37a64e6972df2b705670774047c65f9a0ce60ac1 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 03 七月 2024 16:15:10 +0800
Subject: [PATCH] 月度统计定时任务按设定的时间查询相应数据&修复若干bug

---
 service/month_forms.go |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/service/month_forms.go b/service/month_forms.go
index aca3f1a..9f1aed5 100644
--- a/service/month_forms.go
+++ b/service/month_forms.go
@@ -11,7 +11,6 @@
 	"wms/models"
 	"wms/pkg/logx"
 	"wms/request"
-	"wms/utils"
 )
 
 type MonthFormsService struct{}
@@ -197,7 +196,12 @@
 	}
 	productMap := models.MaterialMap(products)
 
-	beginTime, endTime := utils.GetLastMonthPeriod()
+	//鎸夐厤缃彇寮�濮嬫椂闂村拰缁撴潫鏃堕棿
+	beginTime, endTime, err := NewSystemConfigService().GetInventoryCutOffTime()
+	if err != nil {
+		logx.Errorf("MonthStats GetCurrentStats get GetInventoryCutOffTime err:%v", err)
+		return
+	}
 	inputMap, err := GetStatsByOperationType(beginTime, endTime, constvar.BaseOperationTypeIncoming)
 	if err != nil {
 		logx.Errorf("MonthStats GetStatsByOperationType input err:%v", err)

--
Gitblit v1.8.0