Update codes in 13-AA
This commit is contained in:
@@ -73,7 +73,7 @@ namespace WebAPI.dataProcessors
|
||||
|
||||
foreach (Record source in sources!)
|
||||
{
|
||||
for (int month = 1; month <= (DateTime.UtcNow.Month - 1); month++)
|
||||
for (int month = 1; month <= DateTime.UtcNow.Month; month++)
|
||||
{
|
||||
Layer? dataSource = db.Layers.Where(x =>
|
||||
x.Type == LayerType.processed &&
|
||||
@@ -182,7 +182,7 @@ namespace WebAPI.dataProcessors
|
||||
int startRow = 16;
|
||||
|
||||
var codesRow = response.Values[0];
|
||||
for (int i = 1; i <= (DateTime.UtcNow.Month - 1); i++)
|
||||
for (int i = 1; i <= DateTime.UtcNow.Month; i++)
|
||||
{
|
||||
List<object> values = new List<object>();
|
||||
string month = i < 10 ? $"0{i}" : i.ToString();
|
||||
@@ -210,7 +210,7 @@ namespace WebAPI.dataProcessors
|
||||
|
||||
// sum
|
||||
List<object> valuesSum = new List<object>();
|
||||
string rowSum = (startRow + DateTime.UtcNow.Month + 1).ToString();
|
||||
string rowSum = (startRow + DateTime.UtcNow.Month + 2).ToString();
|
||||
foreach (string code in codesRow)
|
||||
{
|
||||
Record? record = R1!.Records?.SingleOrDefault(x => x.Code == $"{code}13");
|
||||
@@ -299,7 +299,7 @@ namespace WebAPI.dataProcessors
|
||||
}
|
||||
else
|
||||
{
|
||||
sumRecord = sumAA!.Records?.SingleOrDefault(x => x.Code == $"1{code}");
|
||||
sumRecord = sumAA!.Records?.SingleOrDefault(x => x.Code == code);
|
||||
if (sumRecord != null)
|
||||
{
|
||||
double? sumValue = ProcessHelper.getValue(sumRecord, 32);
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace WebAPI.dataProcessors
|
||||
Record processedRecord = new Record
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
Code = $"19{baseRecord.Code!.Remove(0,1)}",
|
||||
Code = $"9{baseRecord.Code!.Remove(0,1)}",
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
ModifiedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user