MultiSourceYearSummary

This commit is contained in:
Michał Zieliński
2023-11-06 23:11:30 +01:00
parent 8c26698dc8
commit 1142177f15
3 changed files with 145 additions and 6 deletions

View File

@@ -193,7 +193,7 @@ namespace WebAPI.Controllers
.Where(x =>
x.Records!.Any(x => x.Code == "Type" && x.Desc1 == "ProcessWorker") &&
x.Records!.Any(x => x.Code == "IsEnabled" && x.Desc1 == "True")
//&& x.Number == 262
&& x.Number == 268
)
.OrderBy(x => x.CreatedAt)
.ToList();
@@ -253,7 +253,34 @@ namespace WebAPI.Controllers
});
continue;
}
T3SourceYearSummaryProcessor processor = new T3SourceYearSummaryProcessor(db, googleSheetValues, this, logsController);
T3SourceYearSummaryProcessor processor = new T3SourceYearSummaryProcessor(db, googleSheetValues, this);
processor.process(processWorker!);
logsController.AddEntry(new LogEntry
{
Title = $"{processWorker!.Name}, {processWorker.Id}",
Type = LogEntryType.info,
LogType = LogType.process,
Message = "Success",
CreatedAt = DateTime.UtcNow
});
continue;
}
if (processType == "T3-MultiSourceYearSummary")
{
if (int.Parse(year!) < DateTime.UtcNow.Year)
{
logsController.AddEntry(new LogEntry
{
Title = $"{processWorker!.Name}, {processWorker.Id}",
Type = LogEntryType.warning,
LogType = LogType.process,
Message = "processLayer is out of date. Should be disabled. Not processed",
CreatedAt = DateTime.UtcNow
});
continue;
}
T3MultiSourceYearSummaryProcessor processor = new T3MultiSourceYearSummaryProcessor(db, googleSheetValues, this);
processor.process(processWorker!);
logsController.AddEntry(new LogEntry