From bd2bd32d30d4aa58774557c4a8284204283d36f1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 29 May 2026 11:17:13 +0200 Subject: [PATCH] Update pagina KIT template --- MP.Data/Controllers/MpSpecController.cs | 20 -------------------- MP.SPEC/Data/MpDataService.cs | 12 ++++-------- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/KIT.razor | 2 +- MP.SPEC/Pages/KIT.razor.cs | 10 ++++++---- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- Refactor_Plan.md | 10 +++++----- 9 files changed, 20 insertions(+), 42 deletions(-) diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 57bc1c7e..64b2974d 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -2031,26 +2031,6 @@ namespace MP.Data.Controllers return fatto; } -#if false - /// - /// Recupero odl data chiave - /// - /// - /// - /// - public async Task OdlGetByKey(int idxOdl) - { - ODLModel dbResult = new ODLModel(); - using (var dbCtx = new MoonProContext(options)) - { - dbResult = await dbCtx - .DbSetODL - .FirstOrDefaultAsync(x => x.IdxOdl == idxOdl); - } - return dbResult; - } -#endif - /// /// Recupero Odl CORRENTI /// diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index fe712005..b82f95db 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -2134,13 +2134,11 @@ namespace MP.SPEC.Data public async Task TemplateKitDelete(TemplateKitModel currRecord) { using var activity = ActivitySource.StartActivity("TemplateKitDelete"); - string source = "DB+REDIS"; + string source = "DB"; bool fatto = false; // salvo fatto = dbController.TemplateKitDelete(currRecord); - // svuoto cache - RedisValue pattern = $"{Utils.redisKitTempl}:*"; - await ExecFlushRedisPatternAsync(pattern); + await FlushCacheByTagAsync(Utils.redisKitTempl); activity?.SetTag("data.source", source); activity?.Stop(); LogTrace($"TemplateKitDelete | {source} | {activity?.Duration.TotalMilliseconds}ms"); @@ -2174,13 +2172,11 @@ namespace MP.SPEC.Data public async Task TemplateKitUpsert(TemplateKitModel currRecord, string codAzienda) { using var activity = ActivitySource.StartActivity("TemplateKitUpsert"); - string source = "DB+REDIS"; + string source = "DB"; bool fatto = false; // salvo fatto = dbController.TemplateKitUpsert(currRecord, codAzienda); - // svuoto cache - RedisValue pattern = $"{Utils.redisKitTempl}:*"; - await ExecFlushRedisPatternAsync(pattern); + await FlushCacheByTagAsync(Utils.redisKitTempl); activity?.SetTag("data.source", source); activity?.Stop(); LogTrace($"TemplateKitUpsert | {source} | {activity?.Duration.TotalMilliseconds}ms"); diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 9467216a..e2f08baa 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 8.16.2605.2909 + 8.16.2605.2911 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/KIT.razor b/MP.SPEC/Pages/KIT.razor index 8b46229c..2dfeacc9 100644 --- a/MP.SPEC/Pages/KIT.razor +++ b/MP.SPEC/Pages/KIT.razor @@ -34,7 +34,7 @@
- +
diff --git a/MP.SPEC/Pages/KIT.razor.cs b/MP.SPEC/Pages/KIT.razor.cs index afc11b64..340b5632 100644 --- a/MP.SPEC/Pages/KIT.razor.cs +++ b/MP.SPEC/Pages/KIT.razor.cs @@ -144,12 +144,12 @@ namespace MP.SPEC.Pages TemplateKitModel newRec = new TemplateKitModel() { CodArtParent = selRec.CodArtParent, - CodArtChild = "",//selRec.CodArtParent, + CodArtChild = "", Qty = selRec.Qty }; EditRecord = newRec; SearchParent = selRec.CodArtParent; - await Task.Delay(1); + await ReloadDataAsync(); } /// @@ -171,18 +171,20 @@ namespace MP.SPEC.Pages /// Imposta filtro CodArtChild da record /// /// - protected void DoFiltChild(TemplateKitModel selRec) + protected async Task DoFiltChild(TemplateKitModel selRec) { SearchChild = selRec.CodArtChild; + await ResetDataAsync(); } /// /// Imposta filtro CodArtParent da record /// /// - protected void DoFiltParent(TemplateKitModel selRec) + protected async Task DoFiltParent(TemplateKitModel selRec) { SearchParent = selRec.CodArtParent; + await ResetDataAsync(); } protected async Task DoUpdate(TemplateKitModel selRec) diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 93e3aa9a..343ce97c 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 8.16.2605.2909

+

Versione: 8.16.2605.2911


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index b14ae2f3..5bba24a5 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2909 +8.16.2605.2911 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 424768b4..099b2cd1 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2909 + 8.16.2605.2911 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false diff --git a/Refactor_Plan.md b/Refactor_Plan.md index 158af17b..64db86af 100644 --- a/Refactor_Plan.md +++ b/Refactor_Plan.md @@ -42,6 +42,7 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa - `MacchineWithFluxAsync` - `MachineWithOdlAsync` - `MachIobConfAsync` +- `OdlByBatchAsync` (Migrato e rinominato) - `OdlListGetFiltAsync` - `OperatoriGetFiltAsync` - `ParametriGetFiltAsync` @@ -50,9 +51,10 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa - `POdlToKitListGetFiltAsync` - `StatoMacchinaAsync` - `TksScoreAsync` -- `WipKitFiltAsync` - `Traduci` (Migrato con `GetOrSet` su dizionario lingua) -- `MseGetAll` (Migrato con `GetOrFetchAsync`) +- `WipKitFiltAsync` +- `MseGetAllAsync` (Migrato e rinominato) +- `OdlByKeyAsync` (Migrato e rinominato) #### 🛠️ Metodi da Migrare (Usano ancora Redis/DB manuale) - [ ] Migrazione di `ActionGetReq` (linea 110: usa `redisDb.StringGetAsync`). @@ -63,9 +65,6 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa - [ ] Migrazione di `DossiersDeleteRecord` (linea 554: usa `ExecFlushRedisPatternAsync`). - [ ] Migrazione di `DossiersTakeParamsSnapshotLast` (linea 613: usa `ExecFlushRedisPatternAsync`). - [ ] Migrazione di `ElencoRepartiDTO` (linea 697: usa `redisDb.StringGet` e `StringSet`). -- [ ] Migrazione di `OdlByBatch` (linea 1512: usa `redisDb.StringGet` e `StringSet`). -- [ ] Migrazione di `OdlByKey` (linea 1546: usa `redisDb.StringGet` e `StringSet`). -- [ ] Migrazione di `PODL_getByKey` (linea 1779: usa `redisDb.StringGet` e `StringSet`). - [ ] Migrazione di `PodlIstKitDelete` (linea 1842: usa `ExecFlushRedisPattern`). - [ ] Migrazione di `POdlListByKitParent` (linea 1863: usa `redisDb.StringGet` e `StringSet`). - [ ] Migrazione di `ProcFLStats` (linea 1992: usa `redisDb.StringSet`). @@ -82,3 +81,4 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa - *Mitigazione*: Utilizzare rigorosamente le costanti in `Utils.redis...` per garantire che le chiavi siano identiche o gestite dal nuovo sistema. - **Rischio**: Errori di serializzazione. - *Mitigazione*: `FusionCache` gestisce la serializzazione, ma è necessario assicurarsi che i tipi di ritorno siano compatibili con le aspettative dei chiamanti. +