1.优化采购需求无分页的问题;

This commit is contained in:
chenlin 2024-07-05 09:29:42 +08:00
parent ad62b27152
commit da2155c587

View File

@ -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)