R2 Processor

This commit is contained in:
Michał Zieliski
2024-06-17 22:28:40 +02:00
parent e0b6f798a1
commit f93bb9cd42
3 changed files with 280 additions and 5 deletions

View File

@@ -378,7 +378,8 @@ namespace WebAPI.Controllers
"T3-MultiSourceSummary", // AA
"T3-MultiSourceYearSummary", // AA/13
"T4-SingleSource",
"T3-R1"
"T1-R1",
"T4-R2"
};
foreach (string type in processTypes)
@@ -519,9 +520,9 @@ namespace WebAPI.Controllers
return;
}
if (processType == "T3-R1")
if (processType == "T1-R1")
{
T3R1Processor processor = new T3R1Processor(db, googleSheetValues, this, logsController);
T1R1Processor processor = new T1R1Processor(db, googleSheetValues, this, logsController);
processor.process(processWorker!);
logsController.AddEntry(new LogEntry
@@ -534,6 +535,22 @@ namespace WebAPI.Controllers
});
return;
}
if (processType == "T4-R2")
{
T4R2Processor processor = new T4R2Processor(db, googleSheetValues, this, logsController);
processor.process(processWorker!);
logsController.AddEntry(new LogEntry
{
Title = $"{processWorker!.Name}, {processWorker.Id}",
Type = LogEntryType.info,
LogType = LogType.process,
Message = "Success",
CreatedAt = DateTime.UtcNow
});
return;
}
string? month = processWorker?.Records?.SingleOrDefault(x => x.Code == "Month")?.Desc1;
if (month == null)