CopyProcessor: update existing layer
This commit is contained in:
@@ -252,18 +252,14 @@ namespace WebAPI.Controllers
|
||||
switch (processType)
|
||||
{
|
||||
case "Copy":
|
||||
CopyProcessor cp = new CopyProcessor(db, googleSheetValues);
|
||||
processedLayer = cp.process(sourceLayer, processWorker?.Id);
|
||||
CopyProcessor cp = new CopyProcessor(db, googleSheetValues, this);
|
||||
cp.process(sourceLayer, processWorker?.Id);
|
||||
break;
|
||||
case "Deaggregation":
|
||||
DeaggregationProcessor dp = new DeaggregationProcessor(db, googleSheetValues);
|
||||
processedLayer = dp.process(sourceLayer, processWorker?.Id);
|
||||
break;
|
||||
}
|
||||
if (processedLayer != null)
|
||||
{
|
||||
AddLayer(processedLayer, Guid.Parse("F392209E-123E-4651-A5A4-0B1D6CF9FF9D"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +390,7 @@ namespace WebAPI.Controllers
|
||||
});
|
||||
|
||||
}
|
||||
private Layer AddLayer(Layer input, Guid currentUserId)
|
||||
public Layer AddLayer(Layer input, Guid currentUserId)
|
||||
{
|
||||
input.CreatedById = currentUserId;
|
||||
input.ModifiedById = currentUserId;
|
||||
@@ -406,7 +402,7 @@ namespace WebAPI.Controllers
|
||||
return input;
|
||||
}
|
||||
|
||||
private void SaveRecords(Guid id, ICollection<Record> records, Guid currentUserId)
|
||||
public void SaveRecords(Guid id, ICollection<Record> records, Guid currentUserId)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -432,7 +428,7 @@ namespace WebAPI.Controllers
|
||||
foreach (ProcessSource processSource in sources)
|
||||
{
|
||||
Console.WriteLine($"{processSource.LayerId} {processSource.SourceId}");
|
||||
// db.ProcessSources.Add(processSource);
|
||||
db.ProcessSources.Add(processSource);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
Reference in New Issue
Block a user