1.优化采购需求无分页的问题;
This commit is contained in:
parent
ad62b27152
commit
da2155c587
|
@ -2530,7 +2530,6 @@ func getErpPurchaseDemandAll(req *GetErpPurchaseDemandReq, c *gin.Context) (*Get
|
||||||
|
|
||||||
// 并行查询需求数据
|
// 并行查询需求数据
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
demandDataList := make([]DemandData, len(commodities))
|
|
||||||
|
|
||||||
var tempCommodities []ErpCommodity
|
var tempCommodities []ErpCommodity
|
||||||
if req.IsExport == 1 {
|
if req.IsExport == 1 {
|
||||||
|
@ -2544,6 +2543,7 @@ func getErpPurchaseDemandAll(req *GetErpPurchaseDemandReq, c *gin.Context) (*Get
|
||||||
}
|
}
|
||||||
tempCommodities = commodities[startIndex:endIndex]
|
tempCommodities = commodities[startIndex:endIndex]
|
||||||
}
|
}
|
||||||
|
demandDataList := make([]DemandData, len(tempCommodities))
|
||||||
|
|
||||||
for i, v := range tempCommodities {
|
for i, v := range tempCommodities {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
@ -2752,7 +2752,6 @@ func getErpPurchaseDemandHide(req *GetErpPurchaseDemandReq, c *gin.Context) (*Ge
|
||||||
|
|
||||||
// 并行查询需求数据
|
// 并行查询需求数据
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
demandDataList := make([]DemandData, len(matchedCommodities))
|
|
||||||
var tempCommodities []ErpCommodity
|
var tempCommodities []ErpCommodity
|
||||||
if req.IsExport == 1 {
|
if req.IsExport == 1 {
|
||||||
tempCommodities = matchedCommodities
|
tempCommodities = matchedCommodities
|
||||||
|
@ -2765,6 +2764,7 @@ func getErpPurchaseDemandHide(req *GetErpPurchaseDemandReq, c *gin.Context) (*Ge
|
||||||
}
|
}
|
||||||
tempCommodities = matchedCommodities[startIndex:endIndex]
|
tempCommodities = matchedCommodities[startIndex:endIndex]
|
||||||
}
|
}
|
||||||
|
demandDataList := make([]DemandData, len(tempCommodities))
|
||||||
|
|
||||||
for i, v := range tempCommodities {
|
for i, v := range tempCommodities {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user