PedrolloPL: P2 -> B3
All checks were successful
Build Docker Images / test (map[name:Morska plugin_project:DiunaBI.Plugins.Morska]) (push) Successful in 1m25s
Build Docker Images / test (map[name:PedrolloPL plugin_project:DiunaBI.Plugins.PedrolloPL]) (push) Successful in 1m24s
Build Docker Images / build-and-push (map[image_suffix:morska name:Morska plugin_project:DiunaBI.Plugins.Morska]) (push) Successful in 1m41s
Build Docker Images / build-and-push (map[image_suffix:pedrollopl name:PedrolloPL plugin_project:DiunaBI.Plugins.PedrolloPL]) (push) Successful in 1m41s
All checks were successful
Build Docker Images / test (map[name:Morska plugin_project:DiunaBI.Plugins.Morska]) (push) Successful in 1m25s
Build Docker Images / test (map[name:PedrolloPL plugin_project:DiunaBI.Plugins.PedrolloPL]) (push) Successful in 1m24s
Build Docker Images / build-and-push (map[image_suffix:morska name:Morska plugin_project:DiunaBI.Plugins.Morska]) (push) Successful in 1m41s
Build Docker Images / build-and-push (map[image_suffix:pedrollopl name:PedrolloPL plugin_project:DiunaBI.Plugins.PedrolloPL]) (push) Successful in 1m41s
This commit is contained in:
@@ -80,7 +80,7 @@ DiunaBI.Plugins.Morska (Feature Plugin)
|
|||||||
└── Exporters: Google Sheets export (1)
|
└── Exporters: Google Sheets export (1)
|
||||||
|
|
||||||
DiunaBI.Plugins.PedrolloPL (Feature Plugin - NEW)
|
DiunaBI.Plugins.PedrolloPL (Feature Plugin - NEW)
|
||||||
└── Importers: P2 (1 total)
|
└── Importers: B3 (1 total)
|
||||||
|
|
||||||
DiunaBI.Tests (Testing)
|
DiunaBI.Tests (Testing)
|
||||||
└── Unit and integration tests
|
└── Unit and integration tests
|
||||||
@@ -364,11 +364,11 @@ DiunaBI.Tests (Testing)
|
|||||||
### PedrolloPL Plugin (DiunaBI.Plugins.PedrolloPL) - NEW
|
### PedrolloPL Plugin (DiunaBI.Plugins.PedrolloPL) - NEW
|
||||||
|
|
||||||
**Importers (1):**
|
**Importers (1):**
|
||||||
- **PedrolloPLImportP2** (`DiunaBI.Plugins.PedrolloPL/Importers/PedrolloPLImportP2.cs`)
|
- **PedrolloPLImportB3** (`DiunaBI.Plugins.PedrolloPL/Importers/PedrolloPLImportB3.cs`)
|
||||||
- Imports P2 data from DataInbox
|
- Imports B3 data from DataInbox
|
||||||
- Uses L1-D-P2-CODES dictionary layer for region code mapping
|
- Uses L1-D-B3-CODES dictionary layer for region code mapping
|
||||||
- Creates 12 monthly records per region (Value1-Value12)
|
- Creates 12 monthly records per region (Value1-Value12)
|
||||||
- Generates Import layers: L{Number}-I-P2-{Year}-{Timestamp}
|
- Generates Import layers: L{Number}-I-B3-{Year}-{Timestamp}
|
||||||
- Handles base64 JSON data decoding
|
- Handles base64 JSON data decoding
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -506,8 +506,8 @@ Components/
|
|||||||
**Recent Commits (Dec 2-5, 2025):**
|
**Recent Commits (Dec 2-5, 2025):**
|
||||||
- **193127b:** SignalR for realtime entitychanges (Dec 4)
|
- **193127b:** SignalR for realtime entitychanges (Dec 4)
|
||||||
- **bf2beda, 942da18:** Build fixes (Dec 4)
|
- **bf2beda, 942da18:** Build fixes (Dec 4)
|
||||||
- **a3fa8f9:** P2 import is working (Dec 4)
|
- **a3fa8f9:** B3 import is working (Dec 4)
|
||||||
- **0e3b393:** WIP: p2 plugin (Dec 3)
|
- **0e3b393:** WIP: b3 plugin (Dec 3)
|
||||||
- **445c07a:** Morska plugins refactor (Dec 2)
|
- **445c07a:** Morska plugins refactor (Dec 2)
|
||||||
- **3f8e62f:** WIP: queue engine (Dec 2)
|
- **3f8e62f:** WIP: queue engine (Dec 2)
|
||||||
- **248106a:** Plugins little refactor (Dec 2)
|
- **248106a:** Plugins little refactor (Dec 2)
|
||||||
@@ -518,7 +518,7 @@ Components/
|
|||||||
**Development Focus (Last 30 Days):**
|
**Development Focus (Last 30 Days):**
|
||||||
1. ✅ Real-time updates (SignalR integration)
|
1. ✅ Real-time updates (SignalR integration)
|
||||||
2. ✅ Job queue system (background worker, retry logic)
|
2. ✅ Job queue system (background worker, retry logic)
|
||||||
3. ✅ PedrolloPL plugin (P2 importer)
|
3. ✅ PedrolloPL plugin (B3 importer)
|
||||||
4. ✅ Record history tracking (audit trail)
|
4. ✅ Record history tracking (audit trail)
|
||||||
5. ✅ UI reorganization (feature-based folders)
|
5. ✅ UI reorganization (feature-based folders)
|
||||||
6. ✅ Plugin refactoring (base classes in Infrastructure)
|
6. ✅ Plugin refactoring (base classes in Infrastructure)
|
||||||
@@ -528,7 +528,7 @@ Components/
|
|||||||
- SignalR real-time entity change notifications
|
- SignalR real-time entity change notifications
|
||||||
- Background job processing with retry logic
|
- Background job processing with retry logic
|
||||||
- Record history with field-level diffs
|
- Record history with field-level diffs
|
||||||
- PedrolloPL P2 data importer
|
- PedrolloPL B3 data importer
|
||||||
- UI reorganization (Pages/Layers, Pages/Jobs, Pages/DataInbox)
|
- UI reorganization (Pages/Layers, Pages/Jobs, Pages/DataInbox)
|
||||||
- Filter state persistence across sessions
|
- Filter state persistence across sessions
|
||||||
|
|
||||||
@@ -625,7 +625,7 @@ Components/
|
|||||||
|
|
||||||
**Plugins:**
|
**Plugins:**
|
||||||
- **Morska:** 4 importers, 12 processors, 1 exporter (~6,566 LOC)
|
- **Morska:** 4 importers, 12 processors, 1 exporter (~6,566 LOC)
|
||||||
- **PedrolloPL:** 1 importer (P2 data)
|
- **PedrolloPL:** 1 importer (B3 data)
|
||||||
- Base classes: BaseDataImporter, BaseDataProcessor, BaseDataExporter
|
- Base classes: BaseDataImporter, BaseDataProcessor, BaseDataExporter
|
||||||
- Dynamic loading from `bin/Plugins/` at startup
|
- Dynamic loading from `bin/Plugins/` at startup
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ DECLARE @JustForDebug TINYINT = 0;
|
|||||||
|
|
||||||
-- SETUP VARIABLES
|
-- SETUP VARIABLES
|
||||||
DECLARE @Year INT = 2024;
|
DECLARE @Year INT = 2024;
|
||||||
DECLARE @Type NVARCHAR(5) = 'P2';
|
DECLARE @Type NVARCHAR(5) = 'B3';
|
||||||
DECLARE @StartDate NVARCHAR(10) = '2025.01.02';
|
DECLARE @StartDate NVARCHAR(10) = '2025.01.02';
|
||||||
DECLARE @EndDate NVARCHAR(10) = '2026.12.31'
|
DECLARE @EndDate NVARCHAR(10) = '2026.12.31'
|
||||||
|
|
||||||
@@ -15,21 +15,21 @@ DECLARE @Name NVARCHAR(50) = CONCAT(
|
|||||||
DECLARE @Plugin NVARCHAR(100);
|
DECLARE @Plugin NVARCHAR(100);
|
||||||
SET @Plugin =
|
SET @Plugin =
|
||||||
CASE @Type
|
CASE @Type
|
||||||
WHEN 'P2' THEN 'PedrolloPL.Import.P2'
|
WHEN 'B3' THEN 'PedrolloPL.Import.B3'
|
||||||
ELSE NULL -- If @Type doesn't match, set it to NULL
|
ELSE NULL -- If @Type doesn't match, set it to NULL
|
||||||
END;
|
END;
|
||||||
|
|
||||||
DECLARE @DataInboxName NVARCHAR(100);
|
DECLARE @DataInboxName NVARCHAR(100);
|
||||||
SET @DataInboxName =
|
SET @DataInboxName =
|
||||||
CASE @Type
|
CASE @Type
|
||||||
WHEN 'P2' THEN 'P2_2024'
|
WHEN 'B3' THEN 'B3_2024'
|
||||||
ELSE NULL -- If @Type doesn't match, set it to NULL
|
ELSE NULL -- If @Type doesn't match, set it to NULL
|
||||||
END;
|
END;
|
||||||
|
|
||||||
DECLARE @DataInboxSource NVARCHAR(100);
|
DECLARE @DataInboxSource NVARCHAR(100);
|
||||||
SET @DataInboxSource =
|
SET @DataInboxSource =
|
||||||
CASE @Type
|
CASE @Type
|
||||||
WHEN 'P2' THEN 'Comarch'
|
WHEN 'B3' THEN 'Comarch'
|
||||||
ELSE NULL -- If @Type doesn't match, set it to NULL
|
ELSE NULL -- If @Type doesn't match, set it to NULL
|
||||||
END;
|
END;
|
||||||
|
|
||||||
@@ -7,12 +7,12 @@ using Microsoft.Extensions.Logging;
|
|||||||
|
|
||||||
namespace DiunaBI.Plugins.PedrolloPL.Importers;
|
namespace DiunaBI.Plugins.PedrolloPL.Importers;
|
||||||
|
|
||||||
public class PedrolloPLImportP2 : BaseDataImporter
|
public class PedrolloPLImportB3 : BaseDataImporter
|
||||||
{
|
{
|
||||||
public override string ImporterType => "PedrolloPL.Import.P2";
|
public override string ImporterType => "PedrolloPL.Import.B3";
|
||||||
|
|
||||||
private readonly AppDbContext _db;
|
private readonly AppDbContext _db;
|
||||||
private readonly ILogger<PedrolloPLImportP2> _logger;
|
private readonly ILogger<PedrolloPLImportB3> _logger;
|
||||||
|
|
||||||
// Configuration properties
|
// Configuration properties
|
||||||
private string? DataInboxName { get; set; }
|
private string? DataInboxName { get; set; }
|
||||||
@@ -27,9 +27,9 @@ public class PedrolloPLImportP2 : BaseDataImporter
|
|||||||
private DataInbox? _cachedDataInbox;
|
private DataInbox? _cachedDataInbox;
|
||||||
private Dictionary<string, string>? _regionCodeMap;
|
private Dictionary<string, string>? _regionCodeMap;
|
||||||
|
|
||||||
public PedrolloPLImportP2(
|
public PedrolloPLImportB3(
|
||||||
AppDbContext db,
|
AppDbContext db,
|
||||||
ILogger<PedrolloPLImportP2> logger)
|
ILogger<PedrolloPLImportB3> logger)
|
||||||
{
|
{
|
||||||
_db = db;
|
_db = db;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
@@ -342,8 +342,7 @@ public class PedrolloPLImportP2 : BaseDataImporter
|
|||||||
ModifiedById = importWorker.ModifiedById
|
ModifiedById = importWorker.ModifiedById
|
||||||
};
|
};
|
||||||
|
|
||||||
// Format: L{Number}-I-P2-{Year}-{Timestamp}
|
importLayer.Name = $"L{importLayer.Number}-I-B3-{ImportYear}-{now:yyyyMMddHHmm}";
|
||||||
importLayer.Name = $"L{importLayer.Number}-I-P2-{ImportYear}-{now:yyyyMMddHHmm}";
|
|
||||||
|
|
||||||
_logger.LogDebug("{ImporterType}: Creating import layer '{LayerName}' (Number: {Number})",
|
_logger.LogDebug("{ImporterType}: Creating import layer '{LayerName}' (Number: {Number})",
|
||||||
ImporterType, importLayer.Name, importLayer.Number);
|
ImporterType, importLayer.Name, importLayer.Number);
|
||||||
Reference in New Issue
Block a user