diff --git a/MP-TAB3/Components/AlarmsMan.razor.cs b/MP-TAB3/Components/AlarmsMan.razor.cs index d40333a2..feeb8ddb 100644 --- a/MP-TAB3/Components/AlarmsMan.razor.cs +++ b/MP-TAB3/Components/AlarmsMan.razor.cs @@ -101,7 +101,6 @@ namespace MP_TAB3.Components DateTime fine = DateTime.Today.AddDays(1); DateTime inizio = fine.AddDays(-8); CurrPeriodo = new Periodo(inizio, fine); - await doUpdate(); } var rawDest = config.GetValue("AlarmDest"); if (!string.IsNullOrEmpty(rawDest)) @@ -114,6 +113,15 @@ namespace MP_TAB3.Components } } + protected override async Task OnParametersSetAsync() + { + if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE)) + { + lastRecMSE = RecMSE; + await doUpdate(); + } + } + protected void SaveNumRec(int newNum) { NumRecPage = newNum; @@ -208,6 +216,7 @@ namespace MP_TAB3.Components private Periodo CurrPeriodo { get; set; } = new Periodo(); private string IdxMaccSel { get; set; } = ""; + private MappaStatoExpl? lastRecMSE { get; set; } = null; #endregion Private Properties } diff --git a/MP-TAB3/Components/CmpTop.razor.cs b/MP-TAB3/Components/CmpTop.razor.cs index f5f6ae6a..fd000fd7 100644 --- a/MP-TAB3/Components/CmpTop.razor.cs +++ b/MP-TAB3/Components/CmpTop.razor.cs @@ -132,9 +132,8 @@ namespace MP_TAB3.Components await Task.Delay(1); if (!NavMan.Uri.Contains("reg-new-device")) { - await MsgServ.IdxMaccSet(""); - NavMan.NavigateTo("status-map"); + NavMan.NavigateTo("status-map", true); } } diff --git a/MP-TAB3/Components/MachineBlock.razor b/MP-TAB3/Components/MachineBlock.razor index 826fb913..d94728f9 100644 --- a/MP-TAB3/Components/MachineBlock.razor +++ b/MP-TAB3/Components/MachineBlock.razor @@ -4,15 +4,15 @@
- - - - + + + + - + - +
@@ -27,15 +27,15 @@ else
No data
- - - - + + + + - + - +
diff --git a/MP-TAB3/Components/OdlMan.razor b/MP-TAB3/Components/OdlMan.razor index b5d405de..142feac7 100644 --- a/MP-TAB3/Components/OdlMan.razor +++ b/MP-TAB3/Components/OdlMan.razor @@ -82,9 +82,9 @@ } -
+ @*
Check articolo in revisione -
+
*@ @if (cancelSetupEnabled && RecMSE != null && RecMSE.PezziConf == 0) {
@@ -307,7 +307,7 @@ Pz Pallet
- - - *@ -
+
+
@if (tcMode == "mc") {
@@ -16,13 +10,31 @@ } else { -
+
@labelTempoIN - + + + + @* *@
}
-
+
→ @lblTempo
diff --git a/MP-TAB3/Components/SelTempoMSMC.razor.cs b/MP-TAB3/Components/SelTempoMSMC.razor.cs index 7e527896..060c6baf 100644 --- a/MP-TAB3/Components/SelTempoMSMC.razor.cs +++ b/MP-TAB3/Components/SelTempoMSMC.razor.cs @@ -1,5 +1,7 @@ using global::Microsoft.AspNetCore.Components; using MP.Data.Services; +using System.Globalization; +using System.Text.RegularExpressions; namespace MP_TAB3.Components { @@ -83,11 +85,6 @@ namespace MP_TAB3.Components /// protected decimal _tempoMC { get; set; } = 0; - //protected timeMode modoTempo - //{ - // get => ShowMS ? timeMode.MS : timeMode.MC; - //} - [Inject] protected MessageService MsgServ { get; set; } = null!; @@ -104,6 +101,34 @@ namespace MP_TAB3.Components } } + protected int selOre + { + get => TempoMS.Hours; + set + { + TempoMS = new TimeSpan(value, selMin, selSec); + E_TCRich.InvokeAsync(TempoMC); + } + } + protected int selMin + { + get => TempoMS.Minutes; + set + { + TempoMS = new TimeSpan(selOre,value, selSec); + E_TCRich.InvokeAsync(TempoMC); + } + } + protected int selSec + { + get => TempoMS.Seconds; + set + { + TempoMS = new TimeSpan(selOre, selMin, value); + E_TCRich.InvokeAsync(TempoMC); + } + } + protected bool ShowMS { get; set; } = true; [Inject] @@ -146,7 +171,7 @@ namespace MP_TAB3.Components /// protected TimeSpan minCent2Sec(decimal valore) { - TimeSpan answ = TimeSpan.FromSeconds((double)valore * 60); + TimeSpan answ = TimeSpan.FromSeconds(Math.Round((double)(valore * 60))); return answ; } @@ -186,7 +211,7 @@ namespace MP_TAB3.Components /// /// tempo min:sec /// - private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(1); + private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(3599); private string baseLang { @@ -208,7 +233,7 @@ namespace MP_TAB3.Components } else { - answ = "ore:min:sec"; + answ = "h:m:s"; } return answ; } diff --git a/MP-TAB3/Components/TechSheetMan.razor.cs b/MP-TAB3/Components/TechSheetMan.razor.cs index 5aeee6ed..5082b9df 100644 --- a/MP-TAB3/Components/TechSheetMan.razor.cs +++ b/MP-TAB3/Components/TechSheetMan.razor.cs @@ -49,14 +49,15 @@ namespace MP_TAB3.Components protected override async Task OnParametersSetAsync() { - if (RecMSE != null) + if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE)) { CodArticolo = RecMSE.CodArticolo; IdxMaccSel = RecMSE.IdxMacchina; IdxOdl = RecMSE.IdxOdl ?? 0; + lastRecMSE = RecMSE; + await ReloadData(); + checkReset(); } - await ReloadData(); - checkReset(); } #endregion Protected Methods @@ -64,9 +65,7 @@ namespace MP_TAB3.Components #region Private Fields private string CodArticolo = ""; - private bool inAttr = false; - private bool isProcessing = false; #endregion Private Fields @@ -74,8 +73,8 @@ namespace MP_TAB3.Components #region Private Properties private string IdxMaccSel { get; set; } = ""; - private int IdxOdl { get; set; } = 0; + private MappaStatoExpl? lastRecMSE { get; set; } = null; #endregion Private Properties @@ -91,16 +90,13 @@ namespace MP_TAB3.Components // SOLO SE ho articolo senn� niente reset... if (!string.IsNullOrEmpty(CodArticolo)) { - // controllo se la macchina � in attrezzaggio... + // controllo se la macchina sia in attrezzaggio... var rigaStato = TabDServ.StatoMacchina(IdxMaccSel); if (rigaStato != null) { inAttr = (rigaStato.IdxStato == 2); } } -#if false - cmp_ST_objCheck.checkInputData(); -#endif } private async Task ReloadData() diff --git a/MP-TAB3/Components/TechSheet_ST_Detail.razor.cs b/MP-TAB3/Components/TechSheet_ST_Detail.razor.cs index ed4f55b1..672fa1f4 100644 --- a/MP-TAB3/Components/TechSheet_ST_Detail.razor.cs +++ b/MP-TAB3/Components/TechSheet_ST_Detail.razor.cs @@ -44,9 +44,18 @@ namespace MP_TAB3.Components { if (IdxOdl > 0 && !string.IsNullOrEmpty(CodGruppo)) { - await ReloadData(); + if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast || CodGruppo!=codGruppoLast) + { + codArticoloLast = CodArticolo; + idxOdlLast = IdxOdl; + codGruppoLast = CodGruppo; + await ReloadData(); + } } } + private int idxOdlLast = 0; + private string codArticoloLast = ""; + private string codGruppoLast = ""; [Inject] protected TabDataService TabServ { get; set; } = null!; diff --git a/MP-TAB3/Components/TechSheet_ST_ObjCheck.razor.cs b/MP-TAB3/Components/TechSheet_ST_ObjCheck.razor.cs index c7ff827a..927cea93 100644 --- a/MP-TAB3/Components/TechSheet_ST_ObjCheck.razor.cs +++ b/MP-TAB3/Components/TechSheet_ST_ObjCheck.razor.cs @@ -26,8 +26,8 @@ namespace MP_TAB3.Components { if (IdxOdl > 0) { - var rawData = TabDServ.STAR_pendByOdl(IdxOdl); - showChecks = rawData.Count > 0; + var rawData = TabDServ.STAR_pendByOdl(IdxOdl); + showChecks = rawData.Count > 0; } else { @@ -52,7 +52,6 @@ namespace MP_TAB3.Components var pUpd = Task.Run(async () => { await processInput(); - //await InvokeAsync(() => StateHasChanged()); }); pUpd.Wait(); } @@ -70,13 +69,20 @@ namespace MP_TAB3.Components protected override void OnParametersSet() { - checkInputData(); + if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast) + { + codArticoloLast = CodArticolo; + idxOdlLast = IdxOdl; + checkInputData(); + } } #endregion Protected Methods #region Private Fields + private string codArticoloLast = ""; + private int idxOdlLast = 0; private string lastBCodeVal = ""; private string MessageCss = ""; private string MessageText = ""; diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 29b8c461..a88f035a 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2402.2716 + 6.16.2403.109 enable MP_TAB3 diff --git a/MP-TAB3/Pages/BasePage.razor.cs b/MP-TAB3/Pages/BasePage.razor.cs index 2657a516..e031fb07 100644 --- a/MP-TAB3/Pages/BasePage.razor.cs +++ b/MP-TAB3/Pages/BasePage.razor.cs @@ -56,11 +56,15 @@ namespace MP_TAB3.Pages protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); - await ReloadData(); TDFeeder.dataPipe.EA_NewMessage += DataPipe_EA_NewMessage; TDFeeder.blinkPipe.EA_NewMessage += BlinkPipe_EA_NewMessage; } + protected override async Task OnParametersSetAsync() + { + await ReloadData(); + } + /// /// Metodo refresh con controllo salvataggio in LocalStorage ogni 5 sec /// diff --git a/MP-TAB3/Pages/ProdStop.razor b/MP-TAB3/Pages/ProdStop.razor index e7f1d040..ef7a49cb 100644 --- a/MP-TAB3/Pages/ProdStop.razor +++ b/MP-TAB3/Pages/ProdStop.razor @@ -16,13 +16,20 @@ else
@if (!string.IsNullOrEmpty(lblOut)) { -
- @lblOut +
+ @titleOut +
+ @lblOut +
+
} - @foreach (var item in events2show) + else { - + @foreach (var item in events2show) + { + + } }
} diff --git a/MP-TAB3/Pages/ProdStop.razor.cs b/MP-TAB3/Pages/ProdStop.razor.cs index bf96c3ab..82bf43aa 100644 --- a/MP-TAB3/Pages/ProdStop.razor.cs +++ b/MP-TAB3/Pages/ProdStop.razor.cs @@ -1,4 +1,5 @@ using global::Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Routing; using MP.Data; using MP.Data.DatabaseModels; using MP.Data.Services; @@ -9,16 +10,13 @@ namespace MP_TAB3.Pages { public partial class ProdStop { - #region Public Methods - - #endregion Public Methods - #region Protected Fields protected int dltMinRealtime = 1; protected bool isProcessing = false; + protected string lblOut = ""; protected int minAnticipoRicalcolo = 1; protected bool rdm_ChkOnly = false; @@ -33,12 +31,10 @@ namespace MP_TAB3.Pages protected string alertCss { get; set; } = "alert-danger"; - protected DateTime DtRif { get; set; } = DateTime.Now; protected List events2show { get; set; } = new List(); - /// /// Determina se insert sia Realtime o batch con DataOra (in base a diff tra DataOra /// selezionata e realtime, se superiore ad X minuti NON � realtime) @@ -56,8 +52,6 @@ namespace MP_TAB3.Pages } } - protected string lblOut { get; set; } = ""; - [Inject] protected StatusData MDataService { get; set; } = null!; @@ -186,12 +180,13 @@ namespace MP_TAB3.Pages TabDServ.MacchinaSetInsEnab(IdxMacc, true); } // mostro esito - alertCss = "alert-succes"; - lblOut = $"Registrata dichiarazione fermata [{rigaEvento.Nome}] alle {DateTime.Now:HH:mm:ss}"; + alertCss = "alert-primary"; + titleOut = rigaEvento.Nome; + lblOut = $"Registrata dichiarazione fermata alle {DateTime.Now:HH:mm:ss}"; } else { - alertCss = "alert-danger"; + alertCss = "alert-warning"; lblOut = $"Codice evento non valido! {IdxEv}"; } } @@ -215,6 +210,11 @@ namespace MP_TAB3.Pages } } + protected void ForceReloadPage() + { + NavMan.NavigateTo(NavMan.Uri, true); + } + protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); @@ -223,38 +223,13 @@ namespace MP_TAB3.Pages rdm_nEvStep = SMServ.GetConfInt("rdm_nEvStep"); rdm_nEvCheck = SMServ.GetConfInt("rdm_nEvCheck"); rdm_ChkOnly = SMServ.GetConfBool("rdm_ChkOnly"); + } + protected override async Task OnParametersSetAsync() + { // leggo gli altri dati await ReloadData(); } - - - protected void SetDate(DateTime newDate) - { - DtRif = newDate; - } - - #endregion Protected Methods - - #region Private Fields - - private static Logger Log = LogManager.GetCurrentClassLogger(); - - #endregion Private Fields - - #region Private Properties - - private int MatrOpr - { - get => MsgServ.MatrOpr; - } - - #endregion Private Properties - - #region Private Methods - - - protected override async Task ReloadData() { if (string.IsNullOrEmpty(IdxMacc)) @@ -277,6 +252,27 @@ namespace MP_TAB3.Pages } } - #endregion Private Methods + protected void SetDate(DateTime newDate) + { + DtRif = newDate; + } + + #endregion Protected Methods + + #region Private Fields + + private static Logger Log = LogManager.GetCurrentClassLogger(); + private string titleOut = ""; + + #endregion Private Fields + + #region Private Properties + + private int MatrOpr + { + get => MsgServ.MatrOpr; + } + + #endregion Private Properties } } \ No newline at end of file diff --git a/MP-TAB3/Pages/Scrap.razor.cs b/MP-TAB3/Pages/Scrap.razor.cs index 5937d133..8b72312b 100644 --- a/MP-TAB3/Pages/Scrap.razor.cs +++ b/MP-TAB3/Pages/Scrap.razor.cs @@ -10,6 +10,7 @@ namespace MP_TAB3.Pages await ReloadData(); } + protected void SetMacc(string selIdxMacc) { IdxMaccSubSel = selIdxMacc; diff --git a/MP-TAB3/Pages/_Layout.cshtml b/MP-TAB3/Pages/_Layout.cshtml index cf2ede0c..ed4bfb07 100644 --- a/MP-TAB3/Pages/_Layout.cshtml +++ b/MP-TAB3/Pages/_Layout.cshtml @@ -71,12 +71,20 @@ @*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@ - *@ + diff --git a/MP.Mon/Resources/ChangeLog.html b/MP.Mon/Resources/ChangeLog.html index 26ca28af..42521936 100644 --- a/MP.Mon/Resources/ChangeLog.html +++ b/MP.Mon/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MON MAPO -

Versione: 6.16.2402.2709

+

Versione: 6.16.2403.110


Note di rilascio:
  • diff --git a/MP.Mon/Resources/VersNum.txt b/MP.Mon/Resources/VersNum.txt index 7452e5f4..fdef649c 100644 --- a/MP.Mon/Resources/VersNum.txt +++ b/MP.Mon/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2402.2709 +6.16.2403.110 diff --git a/MP.Mon/Resources/manifest.xml b/MP.Mon/Resources/manifest.xml index 0edfaa21..b0aa03f4 100644 --- a/MP.Mon/Resources/manifest.xml +++ b/MP.Mon/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2402.2709 + 6.16.2403.110 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