Before refactor

This commit is contained in:
Michał Zieliński
2024-03-08 15:56:35 +01:00
parent 7dbc81a3df
commit f9c1a8a8ad
8 changed files with 95 additions and 40 deletions

View File

@@ -152,6 +152,7 @@ namespace WebAPI.Controllers
.Where(x =>
x.Records!.Any(x => x.Code == "Type" && x.Desc1 == "ImportWorker") &&
x.Records!.Any(x => x.Code == "IsEnabled" && x.Desc1 == "True")
&& x.Number == 539
)
.OrderBy(x => x.CreatedAt)
.ToList();
@@ -184,7 +185,7 @@ namespace WebAPI.Controllers
}
var startDateParsed = DateTime.ParseExact(startDate!, "yyyy.MM.dd", null);
var endDateParsed = DateTime.ParseExact(endDate!, "yyyy.MM.dd", null);
if (startDateParsed.Date <= DateTime.UtcNow.Date && endDateParsed.Date >= DateTime.UtcNow.Date)
if (startDateParsed.Date <= DateTime.UtcNow.Date && endDateParsed.Date >= DateTime.UtcNow.Date || true)
{
MorskaImporter importer = new MorskaImporter(db, googleSheetValues, this);
importer.import(importWorker);
@@ -259,6 +260,7 @@ namespace WebAPI.Controllers
x.Records!.Any(x => x.Code == "Type" && x.Desc1 == "ProcessWorker") &&
x.Records!.Any(x => x.Code == "IsEnabled" && x.Desc1 == "True") &&
x.Records!.Any(x => x.Code == "ProcessType" && x.Desc1 == type)
&& x.Number == 800
)
.OrderBy(x => x.CreatedAt)
.ToList();
@@ -279,7 +281,7 @@ namespace WebAPI.Controllers
{
try
{
ProcessLayer(processWorker);
ProcessLayer(processWorker, true);
}
catch (Exception e)
{