D1 Process worker fix
This commit is contained in:
@@ -261,6 +261,8 @@ public class MorskaT5LastValuesProcessor : MorskaBaseProcessor
|
||||
ProcessHelper.SetValue(processedRecord, i, value);
|
||||
}
|
||||
}
|
||||
|
||||
processedRecord.Desc1 = lastRecord.Desc1;
|
||||
|
||||
return processedRecord;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,6 @@ public class LayersController : Controller
|
||||
x.Name != null && x.Name.Contains(nameFilter) &&
|
||||
x.Records!.Any(y => y.Code == "Type" && y.Desc1 == "ImportWorker") &&
|
||||
x.Records!.Any(y => y.Code == "IsEnabled" && y.Desc1 == "True"
|
||||
&& x.Number == 5375
|
||||
)
|
||||
)
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
@@ -330,12 +329,12 @@ public class LayersController : Controller
|
||||
switch (type)
|
||||
{
|
||||
case "D1":
|
||||
var d1importer = _pluginManager.GetImporter(plugin);
|
||||
if (d1importer == null)
|
||||
var d1Importer = _pluginManager.GetImporter(plugin);
|
||||
if (d1Importer == null)
|
||||
{
|
||||
throw new Exception("MorskaD1 importer not found");
|
||||
}
|
||||
d1importer.Import(importWorker);
|
||||
d1Importer.Import(importWorker);
|
||||
Thread.Sleep(5000); // be aware of GSheet API quota
|
||||
|
||||
_logger.LogInformation("AutoImport: Successfully processed D1 import for {LayerName} ({LayerId})",
|
||||
@@ -343,12 +342,12 @@ public class LayersController : Controller
|
||||
break;
|
||||
|
||||
case "FK2":
|
||||
var fk2importer = _pluginManager.GetImporter(plugin);
|
||||
if (fk2importer == null)
|
||||
var fk2Importer = _pluginManager.GetImporter(plugin);
|
||||
if (fk2Importer == null)
|
||||
{
|
||||
throw new Exception("MorskaFK2 importer not found");
|
||||
}
|
||||
fk2importer.Import(importWorker);
|
||||
fk2Importer.Import(importWorker);
|
||||
Thread.Sleep(5000); // be aware of GSheet API quota
|
||||
|
||||
_logger.LogInformation("AutoImport: Successfully processed FK2 import for {LayerName} ({LayerId})",
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="plugins\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyPlugins" AfterTargets="Build">
|
||||
<MSBuild Projects="../DiunaBI.Plugins.Morska/DiunaBI.Plugins.Morska.csproj" Properties="Configuration=$(Configuration);TargetFramework=$(TargetFramework)" />
|
||||
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
-- T3-MultiSourceSummary
|
||||
-- Create Dictionary
|
||||
DECLARE @JustForDebug TINYINT = 0;
|
||||
|
||||
-- SETUP VARIABLES
|
||||
DECLARE @Number INT = (SELECT COUNT(id) + 1 FROM [diunabi-morska].[dbo].[Layers]);
|
||||
DECLARE @CurrentTimestamp NVARCHAR(14) = FORMAT(GETDATE(), 'yyyyMMddHHmm');
|
||||
DECLARE @Name NVARCHAR(50) = CONCAT(
|
||||
'L', @Number, '-D-D3_B2B-', @CurrentTimestamp
|
||||
'L', @Number, '-D-DEPARTMENTS'
|
||||
);
|
||||
DECLARE @LayerId UNIQUEIDENTIFIER = NEWID();
|
||||
|
||||
SELECT @Name AS Name, @Query AS Query;
|
||||
SELECT @Name AS Name;
|
||||
|
||||
IF @JustForDebug = 1
|
||||
BEGIN
|
||||
@@ -28,21 +27,10 @@ DECLARE @Array TABLE (
|
||||
|
||||
INSERT INTO @Array (Code, Desc1)
|
||||
VALUES
|
||||
('3089','402-2-001'),
|
||||
('3084','402-2-002'),
|
||||
('3045','402-2-003'),
|
||||
('????','402-2-004', 'GODLEWSKA JOANNA'),
|
||||
('????','402-2-005', 'HABOWSKA URSZULA'),
|
||||
('3010','JANCZEWSKA DOROTA'),
|
||||
('????','402-2-007', 'PROMEDA SP ZOO'),
|
||||
('3091','402-2-008'),
|
||||
('3090','402-2-009'),
|
||||
('3092','402-2-010'),
|
||||
('????','402-2-011'),
|
||||
('3093','402-2-012'),
|
||||
('????','402-2-013', 'ŚWINIARSKA BEATA'),
|
||||
('3094','402-2-014'),
|
||||
('????','402-2-015', 'WIERZBOWSKA');
|
||||
('0', 'OTHER'),
|
||||
('1','K5'),
|
||||
('2','AK'),
|
||||
('3','PU')
|
||||
|
||||
-- Loop through the array and insert into the target table
|
||||
DECLARE @Code NVARCHAR(50);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
DECLARE @LayerId UNIQUEIDENTIFIER = '41e7377c-aa8c-4528-843d-dcc3fe13b412';
|
||||
DECLARE @LayerId UNIQUEIDENTIFIER = '986e8a71-8cad-4e57-8fce-243a9270b9dc';
|
||||
DELETE FROM [diunabi-morska].[dbo].[Records] WHERE [LayerId] = @LayerId;
|
||||
DELETE FROM [diunabi-morska].[dbo].[Layers] WHERE [Id] = @LayerId;
|
||||
Reference in New Issue
Block a user