From b327b91db1c7015845ad293e8ccc48c4611819c6 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 05 六月 2024 20:56:34 +0800
Subject: [PATCH] 位置报表下载接口

---
 service/inventory_report_forms.go |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/service/inventory_report_forms.go b/service/inventory_report_forms.go
index 82a5d2e..e83af14 100644
--- a/service/inventory_report_forms.go
+++ b/service/inventory_report_forms.go
@@ -174,7 +174,7 @@
 		return nil, err
 	}
 	list = make([]*response.InventoryForms, 0, total)
-	params.PageSize = 1000
+	params.PageSize = 500
 	page := 1
 	for {
 		params.Page = page
@@ -205,15 +205,16 @@
 	}
 
 	for i, v := range dataList {
-		f.SetCellValue("Sheet1", "A"+strconv.Itoa(i+2), v.ProductName)
-		f.SetCellValue("Sheet1", "B"+strconv.Itoa(i+2), v.ProductType)
-		f.SetCellValue("Sheet1", "C"+strconv.Itoa(i+2), v.Cost)
-		f.SetCellValue("Sheet1", "D"+strconv.Itoa(i+2), v.Value)
-		f.SetCellValue("Sheet1", "E"+strconv.Itoa(i+2), v.Amount)
-		f.SetCellValue("Sheet1", "F"+strconv.Itoa(i+2), v.AvailableNumber)
-		f.SetCellValue("Sheet1", "G"+strconv.Itoa(i+2), v.In)
-		f.SetCellValue("Sheet1", "H"+strconv.Itoa(i+2), v.Out)
-		f.SetCellValue("Sheet1", "I"+strconv.Itoa(i+2), v.Unit)
+		column := strconv.Itoa(i + 2)
+		f.SetCellValue("Sheet1", "A"+column, v.ProductName)
+		f.SetCellValue("Sheet1", "B"+column, v.ProductType)
+		f.SetCellValue("Sheet1", "C"+column, v.Cost)
+		f.SetCellValue("Sheet1", "D"+column, v.Value)
+		f.SetCellValue("Sheet1", "E"+column, v.Amount)
+		f.SetCellValue("Sheet1", "F"+column, v.AvailableNumber)
+		f.SetCellValue("Sheet1", "G"+column, v.In)
+		f.SetCellValue("Sheet1", "H"+column, v.Out)
+		f.SetCellValue("Sheet1", "I"+column, v.Unit)
 	}
 
 	fileName = fmt.Sprintf("搴撳瓨鎶ヨ〃%s.xlsx", time.Now().Format("2006-01-02-1504"))

--
Gitblit v1.8.0