From c88f0b8221d61e61424cd6abc8cf03d4127a0359 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 04 七月 2024 23:19:18 +0800
Subject: [PATCH] fix

---
 controllers/report_forms_controller.go |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/controllers/report_forms_controller.go b/controllers/report_forms_controller.go
index c14fd94..334e1d7 100644
--- a/controllers/report_forms_controller.go
+++ b/controllers/report_forms_controller.go
@@ -475,6 +475,11 @@
 		return
 	}
 
+	if len(result) == 0 {
+		util.ResponseFormatList(c, code.Success, result, int(total))
+		return
+	}
+
 	nowMonth := time.Now().Local().Format("2006-01")
 	if nowMonth == params.Date {
 		productIds := make([]string, 0, len(result))
@@ -502,6 +507,7 @@
 	}
 
 	util.ResponseFormatList(c, code.Success, result, int(total))
+
 }
 
 // DoWareHouseMonthStats

--
Gitblit v1.8.0