R1_V2 calculate all year

This commit is contained in:
Michał Zieliski
2024-08-14 00:30:52 +02:00
parent 0e78f456fb
commit 0a5a2a3f36

View File

@@ -60,8 +60,13 @@ public class T1R1V2Processor(
var newRecords = new List<Record>();
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<Record>();
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<object>();
var month = i < 10 ? $"0{i}" : i.ToString();
@@ -226,8 +231,8 @@ public class T1R1V2Processor(
// sum
var valuesSum = new List<object>();
var emptyRow = new List<object>();
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");