From 0a5a2a3f360db33fbbee3d1215a3e4a58cdbbdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieliski?= Date: Wed, 14 Aug 2024 00:30:52 +0200 Subject: [PATCH] R1_V2 calculate all year --- WebAPI/dataProcessors/t1.r1_v2.processor.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/WebAPI/dataProcessors/t1.r1_v2.processor.cs b/WebAPI/dataProcessors/t1.r1_v2.processor.cs index d13727e..48ffab9 100644 --- a/WebAPI/dataProcessors/t1.r1_v2.processor.cs +++ b/WebAPI/dataProcessors/t1.r1_v2.processor.cs @@ -60,8 +60,13 @@ public class T1R1V2Processor( var newRecords = new List(); - for (var month = 1; month <= DateTime.UtcNow.Month; month++) + for (var month = 1; month <= 14; month++) { + if (month > DateTime.UtcNow.Month && month != 13) + { + continue; + } + var records = new List(); foreach (var source in sources) { @@ -195,7 +200,7 @@ public class T1R1V2Processor( const int startRow = 6; var codesRow = response.Values[0]; - for (var i = 1; i <= DateTime.UtcNow.Month; i++) + for (var i = 1; i <= 12; i++) { var values = new List(); var month = i < 10 ? $"0{i}" : i.ToString(); @@ -226,8 +231,8 @@ public class T1R1V2Processor( // sum var valuesSum = new List(); var emptyRow = new List(); - var rowEmpty = (startRow + DateTime.UtcNow.Month + 1).ToString(); - var rowSum = (startRow + DateTime.UtcNow.Month + 2).ToString(); + var rowEmpty = (startRow + 13).ToString(); + var rowSum = (startRow + 14).ToString(); foreach (string code in codesRow) { var record = r1!.Records?.SingleOrDefault(x => x.Code == $"{code}13");