diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj
index 722b07cd..7af3a367 100644
--- a/MP-TAB3/MP-TAB3.csproj
+++ b/MP-TAB3/MP-TAB3.csproj
@@ -3,7 +3,7 @@
net8.0
enable
- 8.16.2605.2908
+ 8.16.2605.2909
enable
MP_TAB3
diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html
index 7f15ac9a..93e3aa9a 100644
--- a/MP-TAB3/Resources/ChangeLog.html
+++ b/MP-TAB3/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP-TAB3/Resources/VersNum.txt
+++ b/MP-TAB3/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml
index a3387c78..1c6cb3ca 100644
--- a/MP-TAB3/Resources/manifest.xml
+++ b/MP-TAB3/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html
false
diff --git a/MP.Core/Utils.cs b/MP.Core/Utils.cs
index 6d978777..5be06dbe 100644
--- a/MP.Core/Utils.cs
+++ b/MP.Core/Utils.cs
@@ -43,6 +43,7 @@ namespace MP.Core
public const string redisMacRecipePath = redisBaseAddr + "Cache:RecipePath";
public const string redisOdlByBatch = redisXdlData + "OdlByBatch";
+ public const string redisOdlByKey = redisXdlData + "OdlByKey";
public const string redisOdlCurrByMac = redisXdlData + "OdlByMac";
public const string redisOdlLastByMac = redisXdlData + "LastOdlByMac";
diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs
index 32575fc1..57bc1c7e 100644
--- a/MP.Data/Controllers/MpSpecController.cs
+++ b/MP.Data/Controllers/MpSpecController.cs
@@ -1875,22 +1875,23 @@ namespace MP.Data.Controllers
/// Elenco da tabella MappaStatoExplModel
///
///
- public List MseGetAll(int maxAge = 2000)
+ public async Task
> MseGetAllAsync(int maxAge = 2000)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(options))
- {
- var maxAgeSec = new SqlParameter("@maxAgeSec", maxAge);
+ using var dbCtx = new MoonProContext(options);
+
+ var maxAgeSec = new SqlParameter("@maxAgeSec", maxAge);
+
+ dbResult = await dbCtx
+ .DbSetMSE
+ .FromSqlRaw("EXEC stp_MSE_getData @maxAgeSec", maxAgeSec)
+ .AsNoTracking()
+ .ToListAsync();
- dbResult = dbCtx
- .DbSetMSE
- .FromSqlRaw("EXEC stp_MSE_getData @maxAgeSec", maxAgeSec)
- .AsNoTracking()
- .ToList();
- }
return dbResult;
}
+#if false
///
/// Elenco ODL dato batch selezionato
///
@@ -1916,31 +1917,36 @@ namespace MP.Data.Controllers
}
}
return dbResult;
+ }
+#endif
+
+ ///
+ /// Elenco ODL dato batch selezionato
+ ///
+ /// Batch richiesto
+ ///
+ public async Task> OdlByBatchAsync(string batchSel)
+ {
+ using var dbCtx = new MoonPro_InveContext(_configuration);
+ return await dbCtx
+ .DbGiacenzeData
+ .AsNoTracking()
+ .Where(x => x.IdentRG == batchSel)
+ .Select(x => x.IdxOdl)
+ .ToListAsync();
}
///
/// ODL da chiave
///
///
- public ODLExpModel OdlByKey(int IdxOdl)
+ public async Task OdlByKeyAsync(int IdxOdl)
{
- ODLExpModel dbResult = new ODLExpModel();
- using (var dbCtx = new MoonProContext(options))
- {
- try
- {
- dbResult = dbCtx
- .DbSetODLExp
- .AsNoTracking()
- .Where(x => x.IdxOdl == IdxOdl)
- .FirstOrDefault();
- }
- catch (Exception exc)
- {
- Log.Error($"Eccezione durante OdlByKey{Environment.NewLine}{exc}");
- }
- }
- return dbResult;
+ using var dbCtx = new MoonProContext(options);
+ return await dbCtx
+ .DbSetODLExp
+ .AsNoTracking()
+ .FirstOrDefaultAsync(x => x.IdxOdl == IdxOdl);
}
///
@@ -2025,6 +2031,7 @@ namespace MP.Data.Controllers
return fatto;
}
+#if false
///
/// Recupero odl data chiave
///
@@ -2041,7 +2048,8 @@ namespace MP.Data.Controllers
.FirstOrDefaultAsync(x => x.IdxOdl == idxOdl);
}
return dbResult;
- }
+ }
+#endif
///
/// Recupero Odl CORRENTI
diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj
index a797534f..35d1abc5 100644
--- a/MP.INVE/MP.INVE.csproj
+++ b/MP.INVE/MP.INVE.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.INVE
- 8.16.2605.2908
+ 8.16.2605.2909
diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html
index d596732c..4abbf633 100644
--- a/MP.INVE/Resources/ChangeLog.html
+++ b/MP.INVE/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOINVE
- Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.INVE/Resources/VersNum.txt
+++ b/MP.INVE/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml
index 501709a5..97ff5f96 100644
--- a/MP.INVE/Resources/manifest.xml
+++ b/MP.INVE/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html
false
diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj
index ee4df1a7..10ea946d 100644
--- a/MP.IOC/MP.IOC.csproj
+++ b/MP.IOC/MP.IOC.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 8.16.2605.2908
+ 8.16.2605.2909
diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html
index 3399fa4c..847874ba 100644
--- a/MP.IOC/Resources/ChangeLog.html
+++ b/MP.IOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-IOC
-
Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.IOC/Resources/VersNum.txt
+++ b/MP.IOC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml
index d583a70f..ce11ebb0 100644
--- a/MP.IOC/Resources/manifest.xml
+++ b/MP.IOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj
index c32f472d..cc0b62f4 100644
--- a/MP.Land/MP.Land.csproj
+++ b/MP.Land/MP.Land.csproj
@@ -3,7 +3,7 @@
net8.0
MP.Land
- 8.16.2605.2908
+ 8.16.2605.2909
Debug;Release;Debug_LiManDebug
en
True
diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html
index 14843a9f..4ebccb9d 100644
--- a/MP.Land/Resources/ChangeLog.html
+++ b/MP.Land/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo Tablet MAPO - DotNet6
-
Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.Land/Resources/VersNum.txt
+++ b/MP.Land/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml
index bd08e1a6..fe615da2 100644
--- a/MP.Land/Resources/manifest.xml
+++ b/MP.Land/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip
https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html
false
diff --git a/MP.MON/MP.MON.csproj b/MP.MON/MP.MON.csproj
index f653ad75..b2db2163 100644
--- a/MP.MON/MP.MON.csproj
+++ b/MP.MON/MP.MON.csproj
@@ -6,7 +6,7 @@
enable
MP.MON
$(AssemblyName.Replace(' ', '_'))
- 8.16.2605.2908
+ 8.16.2605.2909
diff --git a/MP.MON/Resources/ChangeLog.html b/MP.MON/Resources/ChangeLog.html
index 7f15ac9a..93e3aa9a 100644
--- a/MP.MON/Resources/ChangeLog.html
+++ b/MP.MON/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP.MON/Resources/VersNum.txt b/MP.MON/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.MON/Resources/VersNum.txt
+++ b/MP.MON/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.MON/Resources/manifest.xml b/MP.MON/Resources/manifest.xml
index 85890acd..8018e1f9 100644
--- a/MP.MON/Resources/manifest.xml
+++ b/MP.MON/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip
https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html
false
diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj
index d2a9c1c0..b11ce330 100644
--- a/MP.Prog/MP.Prog.csproj
+++ b/MP.Prog/MP.Prog.csproj
@@ -3,7 +3,7 @@
net8.0
MP.Prog
- 8.16.2605.2908
+ 8.16.2605.2909
True
diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html
index fa44d60e..fe7e5613 100644
--- a/MP.Prog/Resources/ChangeLog.html
+++ b/MP.Prog/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo gestione Programmi MAPO
-
Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.Prog/Resources/VersNum.txt
+++ b/MP.Prog/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml
index dd088ad3..5050f27c 100644
--- a/MP.Prog/Resources/manifest.xml
+++ b/MP.Prog/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html
false
diff --git a/MP.RIOC/MP.RIOC.csproj b/MP.RIOC/MP.RIOC.csproj
index 289a1164..8d6c2176 100644
--- a/MP.RIOC/MP.RIOC.csproj
+++ b/MP.RIOC/MP.RIOC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.RIOC
- 8.16.2605.2908
+ 8.16.2605.2909
diff --git a/MP.RIOC/Resources/ChangeLog.html b/MP.RIOC/Resources/ChangeLog.html
index 3c4a0ab3..3541dd03 100644
--- a/MP.RIOC/Resources/ChangeLog.html
+++ b/MP.RIOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-RIOC
-
Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP.RIOC/Resources/VersNum.txt b/MP.RIOC/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.RIOC/Resources/VersNum.txt
+++ b/MP.RIOC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.RIOC/Resources/manifest.xml b/MP.RIOC/Resources/manifest.xml
index ac7c96f4..b5daae2a 100644
--- a/MP.RIOC/Resources/manifest.xml
+++ b/MP.RIOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.SPEC/Components/ListOdlLotto.razor.cs b/MP.SPEC/Components/ListOdlLotto.razor.cs
index dac4f566..b71caa97 100644
--- a/MP.SPEC/Components/ListOdlLotto.razor.cs
+++ b/MP.SPEC/Components/ListOdlLotto.razor.cs
@@ -18,7 +18,7 @@ namespace MP.SPEC.Components
{
if (!string.IsNullOrEmpty(BatchSel))
{
- elencoODL = await MDService.OdlByBatch(BatchSel);
+ elencoODL = await MDService.OdlByBatchAsync(BatchSel);
}
else
{
diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs
index 582f189b..46cae42a 100644
--- a/MP.SPEC/Components/ListPODL.razor.cs
+++ b/MP.SPEC/Components/ListPODL.razor.cs
@@ -351,7 +351,8 @@ namespace MP.SPEC.Components
if (fatto)
{
var currPOdl = await MDService.POdlGetByKey(selRec.IdxPromessa);
- var newOdl = await MDService.OdlGetByKey(currPOdl.IdxOdl);
+ var newOdl = await MDService.OdlByKeyAsync(currPOdl.IdxOdl);
+ //var newOdl = await MDService.OdlGetByKey(currPOdl.IdxOdl);
// registro evento...
idxEvento = 2;
@@ -658,7 +659,8 @@ namespace MP.SPEC.Components
// se manca codart calcolo...
if (string.IsNullOrEmpty(codArticolo))
{
- var currOdl = await MDService.OdlGetByKey(idxODL);
+ var currOdl = await MDService.OdlByKeyAsync(idxODL);
+ //var currOdl = await MDService.OdlGetByKey(idxODL);
if (currOdl != null)
{
codArticolo = currOdl.CodArticolo;
diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs
index c79f76cf..fe712005 100644
--- a/MP.SPEC/Data/MpDataService.cs
+++ b/MP.SPEC/Data/MpDataService.cs
@@ -1431,7 +1431,6 @@ namespace MP.SPEC.Data
public async Task> MachIobConfAsync(string IdxMacchina)
{
string redisKey = Utils.redisIobConf;
-
return await GetOrFetchAsync(
operationName: "MachIobConfAsync",
cacheKey: redisKey,
@@ -1455,36 +1454,22 @@ namespace MP.SPEC.Data
///
/// Elenco MSE stato amcchine
///
- ///
+ /// Force refresh from DB
///
- public async Task
> MseGetAll(bool forceDb = false)
+ public async Task> MseGetAllAsync(bool forceDb = false)
{
using var activity = ActivitySource.StartActivity("MseGetAllAsync");
- string source = "DB";
- List? result = new List();
- // cerco in redisConn...
- RedisValue rawData = redisDb.StringGet(Constants.redisMseKey);
- if (rawData.HasValue && !forceDb)
+ if (forceDb)
{
- result = JsonConvert.DeserializeObject>($"{rawData}");
- source = "REDIS";
+ await _cache.RemoveAsync(Constants.redisMseKey);
}
- else
- {
- result = await Task.FromResult(dbController.MseGetAll(2000));
- // serializzp e salvo...
- rawData = JsonConvert.SerializeObject(result);
- await redisDb.StringSetAsync(Constants.redisMseKey, rawData, TimeSpan.FromSeconds(1));
- }
- if (result == null)
- {
- result = new List();
- }
- activity?.SetTag("data.source", source);
- activity?.SetTag("result.count", result.Count);
- activity?.Stop();
- LogTrace($"MseGetAllAsync | {source} | {activity?.Duration.TotalMilliseconds}ms");
- return result;
+ return await GetOrFetchAsync(
+ operationName: "MseGetAllAsync",
+ cacheKey: Constants.redisMseKey,
+ expiration: TimeSpan.FromSeconds(1),
+ fetchFunc: async () => await dbController.MseGetAllAsync(2000) ?? new(),
+ tagList: [Constants.redisMseKey]
+ );
}
///
@@ -1506,35 +1491,15 @@ namespace MP.SPEC.Data
///
/// Batch richiesto
///
- public async Task> OdlByBatch(string BatchSel)
+ public async Task> OdlByBatchAsync(string BatchSel)
{
- using var activity = ActivitySource.StartActivity("OdlByBatch");
- List? result = new List();
- string source = "DB";
- string currKey = Utils.redisOdlByBatch;
- // cerco in redis dato valore sel idxMaccSel...
- RedisValue rawData = redisDb.StringGet(currKey);
- if (rawData.HasValue)
- {
- result = JsonConvert.DeserializeObject>($"{rawData}");
- source = "REDIS";
- }
- else
- {
- result = await Task.FromResult(dbController.OdlByBatch(BatchSel));
- // serializzo e salvo...
- rawData = JsonConvert.SerializeObject(result);
- redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
- }
- if (result == null)
- {
- result = new List();
- }
- activity?.SetTag("data.source", source);
- activity?.SetTag("result.count", result.Count);
- activity?.Stop();
- LogTrace($"OdlByBatch | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
- return result;
+ return await GetOrFetchAsync(
+ operationName: "OdlByBatchAsync",
+ cacheKey: Utils.redisOdlByBatch,
+ expiration: getRandTOut(redisLongTimeCache),
+ fetchFunc: async () => await dbController.OdlByBatchAsync(BatchSel),
+ tagList: [Utils.redisOdlByBatch]
+ );
}
///
@@ -1542,16 +1507,16 @@ namespace MP.SPEC.Data
///
///
///
- public ODLExpModel OdlByKey(int IdxOdl)
+ public async Task OdlByKeyAsync(int IdxOdl)
{
- using var activity = ActivitySource.StartActivity("OdlByKey");
- ODLExpModel? result = new ODLExpModel();
- string source = "DB";
- result = dbController.OdlByKey(IdxOdl);
- activity?.SetTag("data.source", source);
- activity?.Stop();
- LogTrace($"OdlByKey | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
- return result;
+ string currKey = $"{Utils.redisOdlByKey}:{IdxOdl}";
+ return await GetOrFetchAsync(
+ operationName: "OdlByKeyAsync",
+ cacheKey: currKey,
+ expiration: getRandTOut(redisLongTimeCache),
+ fetchFunc: async () => await dbController.OdlByKeyAsync(IdxOdl),
+ tagList: [Utils.redisOdlByKey]
+ );
}
///
@@ -1589,6 +1554,7 @@ namespace MP.SPEC.Data
return fatto;
}
+#if false
///
/// Record ODL da chaive
///
@@ -1602,7 +1568,8 @@ namespace MP.SPEC.Data
activity?.Stop();
LogTrace($"OdlGetByKey | Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
return dbResult;
- }
+ }
+#endif
///
/// Elenco ODL filtrati x stato, articolo, KeyRich (che contiene stato)
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index 24597231..9467216a 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 8.16.2605.2908
+ 8.16.2605.2909
1800a78a-6ff1-40f9-b490-87fb8bfc1394
en
diff --git a/MP.SPEC/Pages/Giacenze.razor.cs b/MP.SPEC/Pages/Giacenze.razor.cs
index 479af5cd..06cf32da 100644
--- a/MP.SPEC/Pages/Giacenze.razor.cs
+++ b/MP.SPEC/Pages/Giacenze.razor.cs
@@ -38,7 +38,7 @@ namespace MP.SPEC.Pages
IdxOdl = int.Parse(_idxOdl.ToString());
}
}
- odlExp = MDService.OdlByKey(IdxOdl);
+ odlExp = await MDService.OdlByKeyAsync(IdxOdl);
}
#endregion Protected Methods
diff --git a/MP.SPEC/Pages/RepStop.razor.cs b/MP.SPEC/Pages/RepStop.razor.cs
index 846538ff..b49a4714 100644
--- a/MP.SPEC/Pages/RepStop.razor.cs
+++ b/MP.SPEC/Pages/RepStop.razor.cs
@@ -116,7 +116,7 @@ namespace MP.SPEC.Pages
{
isLoading = true;
await Task.Delay(100);
- CurrMSE = await MDService.MseGetAll(true);
+ CurrMSE = await MDService.MseGetAllAsync(true);
isLoading = false;
}
@@ -146,7 +146,7 @@ namespace MP.SPEC.Pages
}
forceResetSel = true;
- var ListMSE = await MDService.MseGetAll(true);
+ var ListMSE = await MDService.MseGetAllAsync(true);
CurrMachSel = new();
await Task.Delay(250);
await ReloadData();
@@ -197,7 +197,7 @@ namespace MP.SPEC.Pages
await TabDServ.resetMicrostatoMacchina(idxMacc);
}
forceResetSel = true;
- var ListMSE = await MDService.MseGetAll(true);
+ var ListMSE = await MDService.MseGetAllAsync(true);
CurrMachSel = new();
await Task.Delay(250);
await ReloadData();
@@ -211,7 +211,7 @@ namespace MP.SPEC.Pages
private async Task ReloadData()
{
- CurrMSE = await MDService.MseGetAll(false);
+ CurrMSE = await MDService.MseGetAllAsync(false);
SearchFermate = await MDService.AnagEventiGeneralAsync();
}
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 7f15ac9a..93e3aa9a 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 103d2e8c..424768b4 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
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/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj
index 697d86b5..5a54039d 100644
--- a/MP.Stats/MP.Stats.csproj
+++ b/MP.Stats/MP.Stats.csproj
@@ -4,7 +4,7 @@
net8.0
MP.Stats
826e877c-ba70-4253-84cb-d0b1cafd4440
- 8.16.2605.2908
+ 8.16.2605.2909
true
en
diff --git a/MP.Stats/Resources/ChangeLog.html b/MP.Stats/Resources/ChangeLog.html
index 7dac42c3..72786f6f 100644
--- a/MP.Stats/Resources/ChangeLog.html
+++ b/MP.Stats/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo statistiche MAPO
-
Versione: 8.16.2605.2908
+ Versione: 8.16.2605.2909
Note di rilascio:
diff --git a/MP.Stats/Resources/VersNum.txt b/MP.Stats/Resources/VersNum.txt
index 2fdfac52..b14ae2f3 100644
--- a/MP.Stats/Resources/VersNum.txt
+++ b/MP.Stats/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.2908
+8.16.2605.2909
diff --git a/MP.Stats/Resources/manifest.xml b/MP.Stats/Resources/manifest.xml
index d88310f1..fe4bccc0 100644
--- a/MP.Stats/Resources/manifest.xml
+++ b/MP.Stats/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.2908
+ 8.16.2605.2909
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html
false
diff --git a/Refactor_Plan.md b/Refactor_Plan.md
index 52293576..158af17b 100644
--- a/Refactor_Plan.md
+++ b/Refactor_Plan.md
@@ -17,44 +17,6 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa
- Analisi di `MpDataService.cs` effettuata.
- Identificati i metodi con caching manuale (Redis/DB) e quelli già migrati a `GetOrFetchAsync`.
-# Piano di Refactoring: Migrazione a FusionCache in `MpDataService.cs`
-
-Stiamo lavorando sul progetto MP-SPEC.sln, dentro la cartella MP-SPEC (ed i progetti da cui dipende).
-
-Voglio ottimizzare il file Data\MpDataService.cs
-
-## Obiettivo
-Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCache` per implementare un approccio multi-layer (Memory + Redis + DB), standardizzando l'accesso ai dati.
-
-## Strategia di Migrazione
-- **Metodo Standard**: `GetOrFetchAsync(string operationName, string cacheKey, Func> fetchFunc, TimeSpan expiration, params string[] tagList)`.
-- **Invalidazione**: Utilizzare i tag tramite `FlushCacheByTagsAsync`.
-
-## Stato Avanzamento
-
-### Fase 1: Analisi e Mapping (Completata)
-- Analisi di `MpDataService.cs` effettuata.
-- Identificati i metodi con caching manuale (Redis/DB) e quelli già migrati a `GetOrFetchAsync`.
-
-# Piano di Refactoring: Migrazione a FusionCache in `MpDataService.cs`
-
-Stiamo lavorando sul progetto MP-SPEC.sln, dentro la cartella MP-SPEC (ed i progetti da cui dipende).
-
-Voglio ottimizzare il file Data\MpDataService.cs
-
-## Obiettivo
-Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCache` per implementare un approccio multi-layer (Memory + Redis + DB), standardizzando l'accesso ai dati.
-
-## Strategia di Migrazione
-- **Metodo Standard**: `GetOrFetchAsync(string operationName, string cacheKey, Func> fetchFunc, TimeSpan expiration, params string[] tagList)`.
-- **Invalidazione**: Utilizzare i tag tramite `FlushCacheByTagsAsync`.
-
-## Stato Avanzamento
-
-### Fase 1: Analisi e Mapping (Completata)
-- Analisi di `MpDataService.cs` effettuata.
-- Identificati i metodi con caching manuale (Redis/DB) e quelli già migrati a `GetOrFetchAsync`.
-
### Fase 2: Refactoring Metodi di Lettura (Cache-aside) (In corso)
#### ✅ Metodi Migrati (Usano già `GetOrFetchAsync` o `FusionCache.GetOrSet`)
@@ -90,6 +52,7 @@ Migrare la logica di caching manuale (Redis + DB) verso l'utilizzo di `IFusionCa
- `TksScoreAsync`
- `WipKitFiltAsync`
- `Traduci` (Migrato con `GetOrSet` su dizionario lingua)
+- `MseGetAll` (Migrato con `GetOrFetchAsync`)
#### 🛠️ Metodi da Migrare (Usano ancora Redis/DB manuale)
- [ ] Migrazione di `ActionGetReq` (linea 110: usa `redisDb.StringGetAsync`).
@@ -100,7 +63,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 `MseGetAll` (linea 1460: usa `redisDb.StringGet` e `StringSetAsync`).
- [ ] 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`).
@@ -120,19 +82,3 @@ 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.
-
-### Fase 4: Verifica
-- [ ] Verificare la compilazione della soluzione tramite script PowerShell.
-- [ ] Controllare che i log (NLog) continuano a riflettere correttamente le operazioni.
-
-## Rischi e Mitigazioni
-- **Rischio**: Discrepanza nelle chiavi di cache tra vecchio e nuovo sistema.
- - *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.
-
-
-### Fase 4: Verifica
-- [ ] Verificare la compilazione della soluzione tramite script PowerShell.
-- [ ] Controllare che i log (NLog) continuano a riflettere correttamente le operazioni.
-