From 97141d1e4c5458c1996cd8d9f495dec16d9825a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Tue, 31 Dec 2024 17:25:02 +0100 Subject: [PATCH] R1/R2 fix --- WebAPI/Controllers/LayersController.cs | 17 +++++++++-------- WebAPI/dataProcessors/t1.r1.processor.cs | 2 +- WebAPI/dataProcessors/t4.r2.processor.cs | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/LayersController.cs b/WebAPI/Controllers/LayersController.cs index 9f39654..0a3fcbc 100644 --- a/WebAPI/Controllers/LayersController.cs +++ b/WebAPI/Controllers/LayersController.cs @@ -451,15 +451,15 @@ public class LayersController : Controller string[] processTypes = [ - "T3-SingleSource", - "T3-SourceYearSummary", - "T3-MultiSourceSummary", // AA - "T3-MultiSourceYearSummary", // AA/13 - "T4-SingleSource", - "T5-LastValues", + //"T3-SingleSource", + //"T3-SourceYearSummary", + //"T3-MultiSourceSummary", // AA + //"T3-MultiSourceYearSummary", // AA/13 + //"T4-SingleSource", + //"T5-LastValues", //"T1-R1_OLD", - "T1-R1", - "T4-R2", + //"T1-R1", + //"T4-R2", "T1-R3" ]; @@ -481,6 +481,7 @@ public class LayersController : Controller x.Records!.Any(y => y.Code == "Type" && y.Desc1 == "ProcessWorker") && x.Records!.Any(y => y.Code == "IsEnabled" && y.Desc1 == "True") && x.Records!.Any(y => y.Code == "ProcessType" && y.Desc1 == type) + && x.Number == 4175 ) .OrderBy(x => x.CreatedAt) .ToList(); diff --git a/WebAPI/dataProcessors/t1.r1.processor.cs b/WebAPI/dataProcessors/t1.r1.processor.cs index 71e1338..2175c0b 100644 --- a/WebAPI/dataProcessors/t1.r1.processor.cs +++ b/WebAPI/dataProcessors/t1.r1.processor.cs @@ -59,7 +59,7 @@ public class T1R1Processor( for (var month = 1; month <= 14; month++) { - if (month > DateTime.UtcNow.Month && month != 13) + if (year != DateTime.UtcNow.Year || (month > DateTime.UtcNow.Month && month != 13)) { continue; } diff --git a/WebAPI/dataProcessors/t4.r2.processor.cs b/WebAPI/dataProcessors/t4.r2.processor.cs index 650a45b..4f43d52 100644 --- a/WebAPI/dataProcessors/t4.r2.processor.cs +++ b/WebAPI/dataProcessors/t4.r2.processor.cs @@ -75,7 +75,7 @@ public class T4R2Processor( for (var month = 1; month <= 12; month++) { - if (month <= DateTime.UtcNow.Month) + if (year == DateTime.UtcNow.Year && month <= DateTime.UtcNow.Month) { var monthCopy = month; var dataSource = db.Layers.Where(x =>