diff --git a/MP-TAB-SERV/Components/OdlMan.razor b/MP-TAB-SERV/Components/OdlMan.razor
index 7239010d..70bbdd0e 100644
--- a/MP-TAB-SERV/Components/OdlMan.razor
+++ b/MP-TAB-SERV/Components/OdlMan.razor
@@ -31,13 +31,109 @@
}
+ @if (showOdlDetail)
+ {
+
- @if (showOdlDetail)
- {
-
...dettaglio ODL...
- }
diff --git a/MP-TAB-SERV/Components/OdlMan.razor.cs b/MP-TAB-SERV/Components/OdlMan.razor.cs
index 5015fd15..564ddfab 100644
--- a/MP-TAB-SERV/Components/OdlMan.razor.cs
+++ b/MP-TAB-SERV/Components/OdlMan.razor.cs
@@ -30,6 +30,24 @@ namespace MP_TAB_SERV.Components
#region Protected Properties
+ protected int IdxOdlSel
+ {
+ get => idxOdlSel;
+ set
+ {
+ if (idxOdlSel != value)
+ {
+ idxOdlSel = value;
+ showOdlDetail = value > 0;
+ var pUpd = Task.Run(async () =>
+ {
+ await ReloadPOdlDetailData();
+ });
+ pUpd.Wait();
+ }
+ }
+ }
+
protected List
ListODL { get; set; } = new List();
[Inject]
@@ -175,34 +193,20 @@ namespace MP_TAB_SERV.Components
#region Private Properties
+ private PODLExpModel currPodl { get; set; } = new PODLExpModel();
+
///
/// Variabile idxMacc parent x selezione ODL
///
private string IdxMaccParent { get; set; } = "";
- protected int IdxOdlSel
- {
- get => idxOdlSel;
- set
- {
- if (idxOdlSel != value)
- {
- idxOdlSel = value;
- //var pUpd = Task.Run(async () =>
- //{
- // await ReloadData(true);
- //});
- //pUpd.Wait();
- }
- }
- }
-
- private int idxOdlSel { get; set; } = 0;
private int IdxOdl
{
get => RecMSE != null ? RecMSE.IdxOdl ?? 0 : 0;
}
+ private int idxOdlSel { get; set; } = 0;
+
private string lblWarnBody
{
get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody");
@@ -222,7 +226,6 @@ namespace MP_TAB_SERV.Components
{
answ = prodMacchina.pezziNonConfermati > 0 && !isSlave;
}
- //(RecMSE != null && RecMSE.PezziProd > RecMSE.PezziConf);
return answ;
}
}
@@ -317,6 +320,14 @@ namespace MP_TAB_SERV.Components
}
}
+ private async Task ReloadPOdlDetailData()
+ {
+ if (IdxOdlSel > 0)
+ {
+ currPodl = await TabDServ.PODLExp_getByKey(IdxOdlSel);
+ }
+ }
+
#endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index 896b981e..ba37252e 100644
--- a/MP-TAB-SERV/MP-TAB-SERV.csproj
+++ b/MP-TAB-SERV/MP-TAB-SERV.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2311.618
+ 6.16.2311.619
enable
MP_TAB_SERV
diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index d17bc84c..3f7b80bd 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2311.618
+ Versione: 6.16.2311.619
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index e3dc16f4..5d29b529 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2311.618
+6.16.2311.619
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index ce1b8c7c..8f254364 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2311.618
+ 6.16.2311.619
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Controllers/MpTabController.cs b/MP.Data/Controllers/MpTabController.cs
index f4207d3b..77965204 100644
--- a/MP.Data/Controllers/MpTabController.cs
+++ b/MP.Data/Controllers/MpTabController.cs
@@ -825,6 +825,36 @@ namespace MP.Data.Controllers
}
return fatto;
}
+ ///
+ /// Recupero PODL da chiave
+ ///
+ ///
+ ///
+ public PODLExpModel PODLExp_getByKey(int idxPODL)
+ {
+ PODLExpModel dbResult = new PODLExpModel();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ try
+ {
+ var IdxPromessa = new SqlParameter("@IdxPromessa", idxPODL);
+ var rawResult = dbCtx
+ .DbSetPODLExp
+ .FromSqlRaw("EXEC stp_PODL_getByIdx @IdxPromessa", IdxPromessa)
+ .AsNoTracking()
+ .ToList();
+ if (rawResult != null && rawResult.Count > 0)
+ {
+ dbResult = rawResult.FirstOrDefault();
+ }
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Eccezione durante PODL_getByKey{Environment.NewLine}{exc}");
+ }
+ }
+ return dbResult;
+ }
///
/// Stato prod macchina
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index d3b5101a..21232936 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -1156,6 +1156,41 @@ namespace MP.Data.Services
return result;
}
+ ///
+ /// Recupero PODL da chiave
+ ///
+ ///
+ ///
+ public async Task PODLExp_getByKey(int idxPODL)
+ {
+ string source = "DB";
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ PODLExpModel result = new PODLExpModel();
+ // cerco in redis...
+ string currKey = $"{redisBaseKey}:PODL:{idxPODL}";
+ RedisValue rawData = await redisDb.StringGetAsync(currKey);
+ if (rawData.HasValue)
+ {
+ result = JsonConvert.DeserializeObject($"{rawData}");
+ source = "REDIS";
+ }
+ else
+ {
+ result = await Task.FromResult(dbTabController.PODLExp_getByKey(idxPODL));
+ // serializzp e salvo...
+ rawData = JsonConvert.SerializeObject(result);
+ await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
+ }
+ if (result == null)
+ {
+ result = new PODLExpModel();
+ }
+ sw.Stop();
+ Log.Debug($"PODL_getByKey | {source} | {sw.Elapsed.TotalMilliseconds}ms");
+ return result;
+ }
+
///
/// Restituisce elenco RC filtrato
///