Add audit CSV central source option

This commit is contained in:
2026-06-11 08:57:18 +02:00
parent f23fa1662e
commit dcd845d337
22 changed files with 822 additions and 89 deletions
@@ -7,25 +7,25 @@ namespace TrafagSalesExporter.Services;
public class ConsolidatedExportService : IConsolidatedExportService
{
private readonly IDbContextFactory<AppDbContext> _dbFactory;
private readonly ICentralSalesRecordService _centralSalesRecordService;
private readonly ICentralSalesDataProvider _centralSalesDataProvider;
private readonly IExcelExportService _excelService;
private readonly ISharePointUploadService _sharePointService;
public ConsolidatedExportService(
IDbContextFactory<AppDbContext> dbFactory,
ICentralSalesRecordService centralSalesRecordService,
ICentralSalesDataProvider centralSalesDataProvider,
IExcelExportService excelService,
ISharePointUploadService sharePointService)
{
_dbFactory = dbFactory;
_centralSalesRecordService = centralSalesRecordService;
_centralSalesDataProvider = centralSalesDataProvider;
_excelService = excelService;
_sharePointService = sharePointService;
}
public async Task<string?> ExportAsync()
{
var consolidatedRecords = await _centralSalesRecordService.GetAllAsync();
var consolidatedRecords = await _centralSalesDataProvider.GetRecordsAsync();
if (consolidatedRecords.Count == 0)
return null;