diff --git a/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs b/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs
index 9eb8adf..d8fe1ad 100644
--- a/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs
+++ b/BBWYB.Server.API/Controllers/AggregationPurchaserController.cs
@@ -31,5 +31,14 @@ namespace BBWYB.Server.API.Controllers
{
aggregionPurchaserBusiness.AggregionByPurchaserIdList(purchaserIdList);
}
+
+ ///
+ /// 聚合所有采购商
+ ///
+ [HttpPost]
+ public void AggregionAllPurchaser()
+ {
+ aggregionPurchaserBusiness.AggregionAllPurchaser();
+ }
}
}
diff --git a/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs b/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs
index 58f12c0..718b9ec 100644
--- a/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs
+++ b/BBWYB.Server.Business/Aggregion/AggregionPurchaserBusiness.cs
@@ -35,6 +35,11 @@ namespace BBWYB.Server.Business
Task.Factory.StartNew(() => AggregionByGroup(purchaserIdList), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.AggregationPurchaserTaskScheduler);
}
+ public void AggregionAllPurchaser()
+ {
+ var purchaserIdList = fsql.Select().ToList(p => p.Id);
+ Task.Factory.StartNew(() => AggregionByGroup(purchaserIdList), CancellationToken.None, TaskCreationOptions.LongRunning, taskSchedulerManager.AggregationPurchaserTaskScheduler);
+ }
private void AggregionByGroup(IList purchaserIdList)
{