Calculate all values (1..32) in aggregated processed layers

This commit is contained in:
Michał Zieliński
2023-11-08 17:49:13 +01:00
parent d333895c91
commit c1097a3e61
5 changed files with 218 additions and 118 deletions

View File

@@ -1,4 +1,5 @@
using Google.Apis.Sheets.v4;
using DiunaBIWebAPI.dataProcessors;
using Google.Apis.Sheets.v4;
using Microsoft.EntityFrameworkCore;
using WebAPI.Controllers;
using WebAPI.Models;
@@ -90,9 +91,13 @@ namespace WebAPI.dataProcessors
Id = Guid.NewGuid(),
Code = baseRecord.Code,
CreatedAt = DateTime.UtcNow,
ModifiedAt = DateTime.UtcNow,
Value1 = codeRecords.Sum(x => x.Value32)
ModifiedAt = DateTime.UtcNow
};
for (var i = 1; i < 33; i++)
{
ProcessHelper.setValue(processedRecord, i,
codeRecords.Sum(x => ProcessHelper.getValue(x, i)));
}
newRecords.Add(processedRecord);
}