From da2155c587cceb93342c0566a21b00d299c76f2e Mon Sep 17 00:00:00 2001 From: chenlin Date: Fri, 5 Jul 2024 09:29:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E9=87=87=E8=B4=AD=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E6=97=A0=E5=88=86=E9=A1=B5=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/models/purchase.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/models/purchase.go b/app/admin/models/purchase.go index 1f8fe2b..c9db570 100644 --- a/app/admin/models/purchase.go +++ b/app/admin/models/purchase.go @@ -2530,7 +2530,6 @@ func getErpPurchaseDemandAll(req *GetErpPurchaseDemandReq, c *gin.Context) (*Get // 并行查询需求数据 var wg sync.WaitGroup - demandDataList := make([]DemandData, len(commodities)) var tempCommodities []ErpCommodity if req.IsExport == 1 { @@ -2544,6 +2543,7 @@ func getErpPurchaseDemandAll(req *GetErpPurchaseDemandReq, c *gin.Context) (*Get } tempCommodities = commodities[startIndex:endIndex] } + demandDataList := make([]DemandData, len(tempCommodities)) for i, v := range tempCommodities { wg.Add(1) @@ -2752,7 +2752,6 @@ func getErpPurchaseDemandHide(req *GetErpPurchaseDemandReq, c *gin.Context) (*Ge // 并行查询需求数据 var wg sync.WaitGroup - demandDataList := make([]DemandData, len(matchedCommodities)) var tempCommodities []ErpCommodity if req.IsExport == 1 { tempCommodities = matchedCommodities @@ -2765,6 +2764,7 @@ func getErpPurchaseDemandHide(req *GetErpPurchaseDemandReq, c *gin.Context) (*Ge } tempCommodities = matchedCommodities[startIndex:endIndex] } + demandDataList := make([]DemandData, len(tempCommodities)) for i, v := range tempCommodities { wg.Add(1)