Add department to R3 GSheet
This commit is contained in:
@@ -218,6 +218,9 @@ public class MorskaT1R3Processor : MorskaBaseProcessor
|
||||
{
|
||||
var newRecords = new List<Record>();
|
||||
|
||||
// L8542-D-DEPARTMENTS
|
||||
var dictionary = _db.Layers.Include(x => x.Records).FirstOrDefault(x => x.Number == 8542);
|
||||
|
||||
foreach (var record in dataSource.Records!)
|
||||
{
|
||||
if (record.Value1 == null)
|
||||
@@ -406,6 +409,7 @@ public class MorskaT1R3Processor : MorskaBaseProcessor
|
||||
var code = row[0].ToString();
|
||||
var updateRow = new List<object>();
|
||||
|
||||
var department = "";
|
||||
// Process columns C to Q (positions 1-15)
|
||||
for (var position = 1; position <= 15; position++)
|
||||
{
|
||||
@@ -422,13 +426,16 @@ public class MorskaT1R3Processor : MorskaBaseProcessor
|
||||
{
|
||||
updateRow.Add("");
|
||||
}
|
||||
department = codeRecord?.Desc1 ?? "";
|
||||
}
|
||||
|
||||
|
||||
updateRow.Add(department);
|
||||
|
||||
updateValueRange.Values.Add(updateRow);
|
||||
}
|
||||
|
||||
// Update sheet with new values
|
||||
var update = _googleSheetValues.Update(updateValueRange, sheetId, $"{sheetName}!C7:Q200");
|
||||
var update = _googleSheetValues.Update(updateValueRange, sheetId, $"{sheetName}!C7:R200");
|
||||
update.ValueInputOption = SpreadsheetsResource.ValuesResource.UpdateRequest.ValueInputOptionEnum.USERENTERED;
|
||||
update.Execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user