-
|
@if (isCurrOdl)
{
@@ -59,6 +59,10 @@ else
}
|
+
+ ODL @($"{record.IdxOdl:000000}")
+ PODL @($"{getPodl(record.IdxOdl):000000}")
+ |
@record.CodArticolo
@record.ArticoloNav.DescArticolo
diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs
index f93b41fc..6f11213c 100644
--- a/MP.SPEC/Components/ListODL.razor.cs
+++ b/MP.SPEC/Components/ListODL.razor.cs
@@ -253,6 +253,17 @@ namespace MP.SPEC.Components
}
}
+ protected int getPodl(int idxOdl)
+ {
+ int answ = 0;
+ var pOdlData = MDService.PODL_getByOdl(idxOdl);
+ if (pOdlData != null)
+ {
+ answ = pOdlData.IdxPromessa;
+ }
+ return answ;
+ }
+
private bool hideSpenta { get; set; } = false;
///
diff --git a/MP.SPEC/Components/ListPODL.razor b/MP.SPEC/Components/ListPODL.razor
index 6b87bbb8..b4f7bbc5 100644
--- a/MP.SPEC/Components/ListPODL.razor
+++ b/MP.SPEC/Components/ListPODL.razor
@@ -22,6 +22,7 @@ else
}
+ Cod |
Articolo |
Fase |
Macchina |
@@ -51,6 +52,9 @@ else
}
|
+
+ PODL @($"{record.IdxPromessa:000000}")
+ |
@record.CodArticolo
@record.ArticoloNav.DescArticolo
diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs
index f421d23a..25041a13 100644
--- a/MP.SPEC/Data/MpDataService.cs
+++ b/MP.SPEC/Data/MpDataService.cs
@@ -845,7 +845,83 @@ namespace MP.SPEC.Data
///
public async Task PODL_getByKey(int idxPODL)
{
- return await dbController.PODL_getByKey(idxPODL);
+ PODLModel result = new PODLModel();
+ if (idxPODL != 0)
+ {
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ string readType = "DB";
+ string currKey = $"{redisPOdlByPOdl}:{idxPODL}";
+ // cerco in redis dato valore sel macchina...
+ RedisValue rawData = redisDb.StringGet(currKey);
+ if (rawData.HasValue)
+ {
+ result = JsonConvert.DeserializeObject($"{rawData}");
+ readType = "REDIS";
+ }
+ else
+ {
+ result = await dbController.PODL_getByKey(idxPODL);
+ // serializzo e salvo...
+ rawData = JsonConvert.SerializeObject(result);
+ redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
+ }
+ if (result == null)
+ {
+ result = new PODLModel();
+ }
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+ Log.Debug($"PODL_getByKey | Read from {readType}: {ts.TotalMilliseconds}ms");
+ }
+ else
+ {
+ Log.Debug("Errore IdxPODL = 0");
+ }
+ return result;
+ }
+
+ ///
+ /// Recupero PODL da IdxODL
+ ///
+ ///
+ ///
+ public PODLModel PODL_getByOdl(int idxODL)
+ {
+ PODLModel result = new PODLModel();
+ if (idxODL != 0)
+ {
+ Stopwatch stopWatch = new Stopwatch();
+ stopWatch.Start();
+ string readType = "DB";
+ string currKey = $"{redisPOdlByOdl}:{idxODL}";
+ // cerco in redis dato valore sel macchina...
+ RedisValue rawData = redisDb.StringGet(currKey);
+ if (rawData.HasValue)
+ {
+ result = JsonConvert.DeserializeObject($"{rawData}");
+ readType = "REDIS";
+ }
+ else
+ {
+ result = dbController.PODL_getByOdl(idxODL);
+ // serializzo e salvo...
+ rawData = JsonConvert.SerializeObject(result);
+ redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache));
+ }
+ if (result == null)
+ {
+ result = new PODLModel();
+ }
+ stopWatch.Stop();
+ TimeSpan ts = stopWatch.Elapsed;
+ Log.Debug($"PODL_getByOdl | Read from {readType}: {ts.TotalMilliseconds}ms");
+ }
+ else
+ {
+ Log.Debug("Errore IdxODL = 0");
+ }
+ return result;
}
///
@@ -1036,6 +1112,10 @@ namespace MP.SPEC.Data
private const string redisPOdlList = redisBaseAddr + "SPEC:Cache:POdlList";
+ private const string redisPOdlByPOdl = redisBaseAddr + "SPEC:Cache:POdlByPOdl";
+
+ private const string redisPOdlByOdl = redisBaseAddr + "SPEC:Cache:POdlByOdl";
+
private const string redisStatoCom = redisBaseAddr + "SPEC:Cache:StatoCom";
private const string redisTipoArt = redisBaseAddr + "SPEC:Cache:TipoArt";
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index 223c84e8..f403ad81 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 6.16.2211.709
+ 6.16.2211.914
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index bf5ac8e9..cbfc18d7 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2211.709
+ Versione: 6.16.2211.914
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 400b37d7..c36d170c 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2211.709
+6.16.2211.914
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index f185a31b..568eb950 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2211.709
+ 6.16.2211.914
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
|