From 7a2ae4c2cd807e935c08a5f26767e76a228dc8e3 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 20 Mar 2026 07:49:09 +0100 Subject: [PATCH 1/4] Bozza gestione ripresa stato prec in SPEC (da stop per fermo reparto) --- MP.Data/Controllers/MpTabController.cs | 33 ++++++- MP.Data/Services/TabDataService.cs | 32 ++++++- MP.SPEC/Pages/RepStop.razor | 2 + MP.SPEC/Pages/RepStop.razor.cs | 121 ++++++++++++++++--------- 4 files changed, 139 insertions(+), 49 deletions(-) diff --git a/MP.Data/Controllers/MpTabController.cs b/MP.Data/Controllers/MpTabController.cs index 6d76c64c..bba5c444 100644 --- a/MP.Data/Controllers/MpTabController.cs +++ b/MP.Data/Controllers/MpTabController.cs @@ -746,11 +746,11 @@ namespace MP.Data.Controllers using (var dbCtx = new MoonProContext(_configuration)) { var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina); - var DataElab = new SqlParameter("@DataElab", dtCurr); + var DataElab = new SqlParameter("@pDataOra", dtCurr); var dbResult = await dbCtx .Database - .ExecuteSqlRawAsync("EXEC stp_IM_ElaboraInsManuali @IdxMacchina, @DataElab", IdxMacc, DataElab); + .ExecuteSqlRawAsync("EXEC stp_IM_ElaboraInsManuali @IdxMacchina, @pDataOra", IdxMacc, DataElab); fatto = dbResult > 0; } @@ -2056,6 +2056,35 @@ namespace MP.Data.Controllers return answ; } + /// + /// Esegue il ripristino stato precedente x una macchina che abbia una dichiarazione manuale (es Pausa pranzo) da cui "uscire" + /// + /// + /// + /// + /// + /// + /// + public async Task RipristinaStatoPrec(string idxMacchina, DateTime dtCurr, string valore, int idxStato = 0, int matrOpr = 0) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var pIdxMacc = new SqlParameter("@IdxMacchina", idxMacchina); + var pDataOra = new SqlParameter("@DataOra", dtCurr); + var pIdxStato = new SqlParameter("@IdxStato", idxStato); + var pMatrOpr = new SqlParameter("@MatrOpr", matrOpr); + var pValueEv = new SqlParameter("@ValueEv", valore); + + var dbResult = await dbCtx + .Database + .ExecuteSqlRawAsync("EXEC stp_DDB_RipristinaStato @IdxMacchina, @DataOra, @IdxStato, @MatrOpr, @ValueEv", pIdxMacc, pDataOra, pIdxStato, pMatrOpr, pValueEv); + fatto = dbResult > 0; + } + + return fatto; + } + public bool SetDerogaSt(StCheckOverride deroga) { bool fatto = false; diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 8ff2ce72..82dbab87 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -9,7 +9,6 @@ using NLog; using StackExchange.Redis; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Data; using System.Diagnostics; using System.Globalization; @@ -3034,6 +3033,35 @@ namespace MP.Data.Services return answ; } + /// + /// Esegue il ripristino stato precedente x una macchina che abbia una dichiarazione manuale (es Pausa pranzo) da cui "uscire" + /// + /// + /// + /// + /// + /// + /// + public async Task RipristinaStatoPrec(string idxMacchina, DateTime dtCurr, string valore, int idxStato = 0, int matrOpr = 0) + { + bool inserito = false; + try + { + // inserisco evento + inserito = await dbTabController.RipristinaStatoPrec(idxMacchina, dtCurr, valore, idxStato, matrOpr); + // reset cache eventi/commenti + await FlushCache("EvList"); + await FlushCache("Commenti"); + } + catch (Exception exc) + { + string logMsg = $"Eccezione in fase di RipristinaStatoPrec | macchina: {idxMacchina} | dtCurr: {dtCurr} | valore: {valore} | idxStato {idxStato} | matrOpr {matrOpr}{Environment.NewLine}{exc}"; + Log.Error(logMsg); + } + + return inserito; + } + /// /// Processa registrazione di un counter x una data macchina IOB /// @@ -3989,7 +4017,7 @@ namespace MP.Data.Services } answ = true; } - } + } #endif // notifico update ai client in ascolto x reset cache NotifyReloadRequest($"FlushRedisCache | {pat2Flush}"); diff --git a/MP.SPEC/Pages/RepStop.razor b/MP.SPEC/Pages/RepStop.razor index 4b12028d..30f02427 100644 --- a/MP.SPEC/Pages/RepStop.razor +++ b/MP.SPEC/Pages/RepStop.razor @@ -29,6 +29,8 @@
@if (showFermate) { + +
} else diff --git a/MP.SPEC/Pages/RepStop.razor.cs b/MP.SPEC/Pages/RepStop.razor.cs index 89bfc906..00864769 100644 --- a/MP.SPEC/Pages/RepStop.razor.cs +++ b/MP.SPEC/Pages/RepStop.razor.cs @@ -4,17 +4,24 @@ using MP.Core.DTO; using MP.Data; using MP.Data.DbModels; using MP.Data.Services; -using MP.SPEC.Components.Reparti; using MP.SPEC.Data; using Newtonsoft.Json; -using NLog.LayoutRenderers; using static MP.Core.Objects.Enums; -using static MP.Data.Services.ExecStatsCollector; namespace MP.SPEC.Pages { - public partial class RepStop: IDisposable + public partial class RepStop : IDisposable { + #region Public Methods + + public void Dispose() + { + TDFeeder.pauseTimers(); + TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage; + } + + #endregion Public Methods + #region Protected Properties [Inject] @@ -23,12 +30,18 @@ namespace MP.SPEC.Pages [Inject] protected MpDataService MDService { get; set; } = null!; + [Inject] + protected MsgServiceSpec MService { get; set; } = null!; + [Inject] protected SharedMemService SMServ { get; set; } = null!; [Inject] protected TabDataService TabDServ { get; set; } = null!; + [Inject] + protected TabDataFeeder TDFeeder { get; set; } = null!; + #endregion Protected Properties #region Protected Methods @@ -40,43 +53,6 @@ namespace MP.SPEC.Pages TDFeeder.resumeTimers(); } - [Inject] - protected TabDataFeeder TDFeeder { get; set; } = null!; - - public void Dispose() - { - TDFeeder.pauseTimers(); - TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage; - } - - /// - /// Ricevuto nuovi dati da mostrare! - /// - /// - /// - private void DataPipe_EA_NewMessage(object? sender, EventArgs e) - { - PubSubEventArgs currArgs = (PubSubEventArgs)e; - // conversione on-the-fly List --> allarmi - if (!string.IsNullOrEmpty(currArgs.newMessage)) - { - try - { - List? dataList = JsonConvert.DeserializeObject>(currArgs.newMessage); - if (dataList != null) - { - InvokeAsync(() => SaveData(dataList)); - } - } - catch - { } - } - InvokeAsync(() => - { - StateHasChanged(); - }); - } - protected async Task SaveData(List newList) { // salvo valori ricevuti @@ -108,6 +84,34 @@ namespace MP.SPEC.Pages showFermate = listSelezione.Count > 0; } + /// + /// Ricevuto nuovi dati da mostrare! + /// + /// + /// + private void DataPipe_EA_NewMessage(object? sender, EventArgs e) + { + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly List --> allarmi + if (!string.IsNullOrEmpty(currArgs.newMessage)) + { + try + { + List? dataList = JsonConvert.DeserializeObject>(currArgs.newMessage); + if (dataList != null) + { + InvokeAsync(() => SaveData(dataList)); + } + } + catch + { } + } + InvokeAsync(() => + { + StateHasChanged(); + }); + } + private async Task DoReload(bool forceReload) { isLoading = true; @@ -116,9 +120,36 @@ namespace MP.SPEC.Pages isLoading = false; } + /// + /// Gestione ritorno a stato precedente, tramite stored + /// + /// + private async Task DoRestorePrevious() + { + if (!await JSRuntime.InvokeAsync("confirm", $"Hai {CurrMachSel.Count} impianti selezionati.{Environment.NewLine}Confermi di voler registrare il ritorno all'ultimo stato precedente le dichiarazioni manuali?{Environment.NewLine}La procedura verificherà l'applicabilità per ogni impianto selezionato.")) + return; - [Inject] - protected MsgServiceSpec MService { get; set; } = null!; + isLoading = true; + await InvokeAsync(StateHasChanged); + + // se conferma ciclo x ogni macchina e registro + foreach (var idxMacc in CurrMachSel) + { + DateTime adesso = DateTime.Now.Floor(TimeSpan.FromSeconds(1)); + var rigaStato = MDService.StatoMacchina(idxMacc); + string valData = $"SPEC | {MService.DomainName}\\{MService.UserName}"; + + // chiamo stored + await TabDServ.RipristinaStatoPrec(idxMacc, adesso, valData, rigaStato.IdxStato, 0); + // resetta il microstato in modo da ricevere successive info HW + await TabDServ.resetMicrostatoMacchina(idxMacc); + } + + var ListMSE = await MDService.MseGetAll(true); + await Task.Delay(250); + await ReloadData(); + isLoading = false; + } /// /// Gestione selezione evento da registrare x le macchine selezionate @@ -142,7 +173,7 @@ namespace MP.SPEC.Pages { var rigaStato = MDService.StatoMacchina(idxMacc); - // mpreparo info utente x Value... + // preparo info utente x Value... string valData = $"SPEC | {MService.DomainName}\\{MService.UserName}"; // processo evento... DateTime adesso = DateTime.Now.Floor(TimeSpan.FromSeconds(1)); @@ -153,7 +184,7 @@ namespace MP.SPEC.Pages IdxTipo = selEv.IdxEv, CodArticolo = rigaStato.CodArticolo, Value = valData, - MatrOpr = 0, + MatrOpr = 0, pallet = rigaStato.pallet }; // FORZO con metodo TAB From 0a0c8b557d45fbc8d9d096ea1c817f7f9cf0729e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 20 Mar 2026 07:50:01 +0100 Subject: [PATCH 2/4] Abbozata pagina ProdPlanner (SOLO BOZZA!!!) --- MP-SPEC.sln | 4 +- MP-TAB3/Components/OdlMan.razor.cs | 9 +- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- MP.Core/DTO/EventDto.cs | 125 +++++++++++++++++++ MP.Data/Controllers/MpSchedulerController.cs | 107 ++++++++++++++++ MP.Data/DbModels/Sched/PromesseInModel.cs | 78 ++++++++++++ MP.Data/DbModels/Sched/PromesseOutModel.cs | 78 ++++++++++++ MP.Data/MP_SchedContext.cs | 94 ++++++++++++++ MP.Data/Services/SchedulerDataService.cs | 90 +++++++++++++ MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/ProdPlanner.razor | 17 +++ MP.SPEC/Pages/ProdPlanner.razor.cs | 63 ++++++++++ MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- MP.SPEC/appsettings.json | 1 + 19 files changed, 669 insertions(+), 13 deletions(-) create mode 100644 MP.Core/DTO/EventDto.cs create mode 100644 MP.Data/Controllers/MpSchedulerController.cs create mode 100644 MP.Data/DbModels/Sched/PromesseInModel.cs create mode 100644 MP.Data/DbModels/Sched/PromesseOutModel.cs create mode 100644 MP.Data/MP_SchedContext.cs create mode 100644 MP.Data/Services/SchedulerDataService.cs create mode 100644 MP.SPEC/Pages/ProdPlanner.razor create mode 100644 MP.SPEC/Pages/ProdPlanner.razor.cs diff --git a/MP-SPEC.sln b/MP-SPEC.sln index 372702e5..8bf4af49 100644 --- a/MP-SPEC.sln +++ b/MP-SPEC.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32126.317 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11520.95 d18.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{10BA8450-301D-49C7-8E1E-21B7469C225C}" EndProject diff --git a/MP-TAB3/Components/OdlMan.razor.cs b/MP-TAB3/Components/OdlMan.razor.cs index 141f09a5..a5da8069 100644 --- a/MP-TAB3/Components/OdlMan.razor.cs +++ b/MP-TAB3/Components/OdlMan.razor.cs @@ -1,7 +1,7 @@ using global::Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -using MP.Data; using MP.Core.Objects; +using MP.Data; using MP.Data.DbModels; using MP.Data.Services; using NLog; @@ -589,7 +589,6 @@ namespace MP_TAB3.Components /*************************************************** * comprende gestione machineSlave x fix ODL master --> slave - * ***************************************************/ // preparo gestione progress display @@ -824,6 +823,10 @@ namespace MP_TAB3.Components await checkConfProd(); } + /// + /// Chiusura produzione ODL corrente + /// + /// protected async Task ProdEnd() { if (!await JSRuntime.InvokeAsync("confirm", $"Confermi fine produzione?")) @@ -1729,7 +1732,7 @@ namespace MP_TAB3.Components private async Task processaEvento(string idxMaccCurr, int idxEvento, string userMsg, int idxODL, DateTime adesso) { inputComandoMapo inCmd; - inputComandoMapo inCmd2; + inputComandoMapo inCmd2; var rigaStato = TabDServ.StatoMacchina(idxMaccCurr); // processo evento... EventListModel newRec = new EventListModel() diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 047f44d6..d7295d9b 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net8.0 enable - 6.16.2602.2607 + 6.16.2603.411 enable MP_TAB3 diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 1fcadc37..8e530edc 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2602.2607

+

Versione: 6.16.2603.411


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index bb5d4f9b..64c3763b 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2602.2607 +6.16.2603.411 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 13ca6795..8f4f8d7c 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2602.2607 + 6.16.2603.411 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/DTO/EventDto.cs b/MP.Core/DTO/EventDto.cs new file mode 100644 index 00000000..397728e0 --- /dev/null +++ b/MP.Core/DTO/EventDto.cs @@ -0,0 +1,125 @@ +namespace MP.Core.DTO +{ + public class EventDto + { + public string CodTipo { get; set; } = ""; + /// + /// Idx univoco evento + /// + public int IdxEv { get; set; } = 0; + +#if false + public int IdxDipendente { get; set; } = 0; + public string CognomeNome { get; set; } = ""; + public bool Conf { get; set; } = false; + public bool IsCompany { get; set; } = false; +#endif + public string Abbrev { get; set; } = ""; + public string Titolo { get; set; } = ""; + public string Descrizione { get; set; } = ""; + public string Tooltip { get; set; } = ""; + public DateTime DtStart { get; set; } = DateTime.Today.AddHours(9); + public DateTime DtEnd { get; set; } = DateTime.Today.AddHours(17); + public string Note { get; set; } = ""; + public bool IsDraggable { get; set; } = false; + public bool IsExpired { get; set; } = false; + public bool IsPlanned { get; set; } = true; + + public EventDto Clone() + { + return new EventDto() + { + CodTipo = this.CodTipo, + IdxEv = this.IdxEv, +#if false + IdxDipendente = this.IdxDipendente, + CognomeNome = this.CognomeNome, + Conf = this.Conf, + IsCompany = this.IsCompany, +#endif + Abbrev = this.Abbrev, + Titolo = this.Titolo, + Descrizione = this.Descrizione, + Tooltip = this.Tooltip, + DtStart = this.DtStart, + DtEnd = this.DtEnd, + Note = this.Note, + IsDraggable = this.IsDraggable, + IsPlanned = this.IsPlanned, + IsExpired = this.IsExpired + }; + } + + public string Durata + { + get + { + string answ = "-"; + var durata = DtEnd.Subtract(DtStart); + if (CodTipo == "FER") + { + answ = $"{durata.TotalDays + 1:N0}gg"; + } + else + { + answ = $"{durata.TotalHours:N1}h"; + } + return answ; + } + } + public static string DateForm(string Tipo, DateTime DtEvent) + { + return (Tipo == "PERM" || Tipo == "104") ? $"{DtEvent:HH:mm}" : $"{DtEvent:ddd yyyy-MM-dd}"; + } + + public string Color + { + get => calcColor(CodTipo, IsPlanned, IsExpired); + } + public string? ForeColor + { + get => calcText(CodTipo, IsPlanned, IsExpired); + } + + private string calcColor(string codTipo, bool isPlanned, bool isExpired) + { + string answ = "#EDEDED"; + switch (codTipo) + { + case "Saomad": + answ = isExpired ? "#CDE0CD" : isPlanned ? "#11DD44" : "#D0F5DD"; + break; + + case "Essetre": + answ = isExpired ? "#AB9898" : isPlanned ? "#AD1919" : "#CD6767"; + break; + + default: + answ = isExpired ? "#EEDD11" : isPlanned ? "#11CD44" : "#AAFFCD"; + break; + } + return answ; + } + + private string calcText(string codTipo, bool isPlanned, bool isExpired) + { + string answ = "#EDEDED"; + switch (codTipo) + { + case "Saomad": + answ = isExpired ? "#000000" : isPlanned ? "#000000" : "#555555"; + break; + + case "Essetre": + answ = isExpired ? "#000000" : isPlanned ? "#EEFF69" : "#D3E817"; + break; + + default: + answ = isExpired ? "#000000" : isPlanned ? "#FFFFFF" : "#000000"; + break; + } + return answ; + } + + } +} diff --git a/MP.Data/Controllers/MpSchedulerController.cs b/MP.Data/Controllers/MpSchedulerController.cs new file mode 100644 index 00000000..a3f41024 --- /dev/null +++ b/MP.Data/Controllers/MpSchedulerController.cs @@ -0,0 +1,107 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using MP.Core.DTO; +using MP.Data.DbModels.Sched; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace MP.Data.Controllers +{ + public class MpSchedulerController : IDisposable + { + #region Public Constructors + + public MpSchedulerController(IConfiguration configuration) + { + _configuration = configuration; + Log.Info("Avviata classe MpSchedulerController"); + } + + #endregion Public Constructors + + #region Public Methods + + public void Dispose() + { + } + + public async Task>> PlannerGetEvents() + { + Dictionary> result = new Dictionary>(); + using (var dbCtx = new MP_SchedContext(_configuration)) + { + var RawData = await dbCtx + .DbSetPromOut + //.AsNoTracking() + .OrderBy(x => x.IdxPromessa) + .ToListAsync(); + + DateTime oggi = DateTime.Today; + + result = RawData + .GroupBy(p => p.IdxMacchina) + .ToDictionary( + g => g.Key, + g => g.Select(p => new EventDto + { + IdxEv = p.IdxPromessa, + Abbrev = p.CodPODL, + Titolo = p.CodPODL, + DtEnd = p.DueDate ?? oggi.AddMonths(2), + DtStart = (p.DueDate ?? oggi.AddMonths(2)).AddDays(-3) + }).ToList() + ); + } + return result; + } + + /// + /// Elenco PromesseIN + /// + /// + public List PromInGetAll() + { + List dbResult = new List(); + using (var dbCtx = new MP_SchedContext(_configuration)) + { + dbResult = dbCtx + .DbSetPromIn + //.AsNoTracking() + .OrderBy(x => x.IdxPromessa) + .ToList(); + } + return dbResult; + } + + /// + /// Elenco PromesseIN + /// + /// + public List ProOutGetAll() + { + List dbResult = new List(); + using (var dbCtx = new MP_SchedContext(_configuration)) + { + dbResult = dbCtx + .DbSetPromOut + //.AsNoTracking() + .OrderBy(x => x.IdxPromessa) + .ToList(); + } + return dbResult; + } + + #endregion Public Methods + + #region Private Fields + + private static IConfiguration _configuration; + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Private Fields + } +} \ No newline at end of file diff --git a/MP.Data/DbModels/Sched/PromesseInModel.cs b/MP.Data/DbModels/Sched/PromesseInModel.cs new file mode 100644 index 00000000..6c23c274 --- /dev/null +++ b/MP.Data/DbModels/Sched/PromesseInModel.cs @@ -0,0 +1,78 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DbModels.Sched +{ + [Table("PromesseIN")] + public partial class PromesseInModel + { + #region Public Properties + + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int IdxPromessa { get; set; } + [MaxLength(50)] + public string KeyRichiesta { get; set; } + [MaxLength(50)] + public string KeyBCode { get; set; } + public bool Attivabile { get; set; } = false; + public int IdxOdl { get; set; } = 0; + [MaxLength(50)] + public string CodArticolo { get; set; } = ""; + [MaxLength(50)] + public string CodGruppo { get; set; } = ""; + [MaxLength(50)] + public string IdxMacchina { get; set; } + public int NumPezzi { get; set; } = 1; + public decimal Tcassegnato { get; set; } = 1; + public DateTime? DueDate { get; set; } + public int Priorita { get; set; } = 1; + public int PzPallet { get; set; } = 1; + [MaxLength(2500)] + public string Note { get; set; } = ""; + [MaxLength(50)] + public string CodCli { get; set; } = ""; + //public DateTime InsertDate { get; set; } = DateTime.Now; + //[MaxLength(500)] + //public string Recipe { get; set; } = ""; + + [MaxLength(250)] + public string NoteRichiesta { get; set; } = ""; + + public bool flgPromDirty { get; set; } = false; + public DateTime? DateAllOdlClose { get; set; } + + [NotMapped] + public string CodFase + { + get + { + string answ = "*"; + var allData = KeyRichiesta.Split('_'); + if (allData.Length > 0) + { + answ = allData[0]; + } + return answ; + } + } + + /// + /// Navigazione oggetto Machine + /// + [ForeignKey("IdxMacchina")] + public virtual MacchineModel MachineNav { get; set; } = null!; + /// + /// Navigazione oggetto Articolo + /// + [ForeignKey("CodArticolo")] + public virtual AnagArticoliModel ArticoloNav { get; set; } = null!; + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/MP.Data/DbModels/Sched/PromesseOutModel.cs b/MP.Data/DbModels/Sched/PromesseOutModel.cs new file mode 100644 index 00000000..d9e997c3 --- /dev/null +++ b/MP.Data/DbModels/Sched/PromesseOutModel.cs @@ -0,0 +1,78 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DbModels.Sched +{ + [Table("PromesseOUT")] + public partial class PromesseOutModel + { + #region Public Properties + + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int IdxPromessa { get; set; } + [MaxLength(50)] + public string KeyRichiesta { get; set; } + [MaxLength(50)] + public string KeyBCode { get; set; } + public bool Attivabile { get; set; } = false; + public int IdxOdl { get; set; } = 0; + [MaxLength(50)] + public string CodArticolo { get; set; } = ""; + [MaxLength(50)] + public string CodGruppo { get; set; } = ""; + [MaxLength(50)] + public string IdxMacchina { get; set; } + public int NumPezzi { get; set; } = 1; + public decimal Tcassegnato { get; set; } = 1; + public DateTime? DueDate { get; set; } + public int Priorita { get; set; } = 1; + public int PzPallet { get; set; } = 1; + [MaxLength(2500)] + public string Note { get; set; } = ""; + [MaxLength(50)] + public string CodCli { get; set; } = ""; + //public DateTime InsertDate { get; set; } = DateTime.Now; + //[MaxLength(500)] + //public string Recipe { get; set; } = ""; + + [NotMapped] + public string CodFase + { + get + { + string answ = "*"; + var allData = KeyRichiesta.Split('_'); + if (allData.Length > 0) + { + answ = allData[0]; + } + return answ; + } + } + + [NotMapped] + public string CodPODL + { + get => $"PODL{IdxPromessa:00000000}"; + } + + /// + /// Navigazione oggetto Machine + /// + [ForeignKey("IdxMacchina")] + public virtual MacchineModel MachineNav { get; set; } = null!; + /// + /// Navigazione oggetto Articolo + /// + [ForeignKey("CodArticolo")] + public virtual AnagArticoliModel ArticoloNav { get; set; } = null!; + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/MP.Data/MP_SchedContext.cs b/MP.Data/MP_SchedContext.cs new file mode 100644 index 00000000..24101fd2 --- /dev/null +++ b/MP.Data/MP_SchedContext.cs @@ -0,0 +1,94 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using MP.Data.DbModels.Sched; +using NLog; + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data +{ + public partial class MP_SchedContext : DbContext + { + #region Private Fields + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + private IConfiguration _configuration; + + #endregion Private Fields + + #region Public Constructors + + public MP_SchedContext(IConfiguration configuration) + { + _configuration = configuration; + } + + public MP_SchedContext(DbContextOptions options) : base(options) + { + } + + #endregion Public Constructors + + #region Public Properties + + public virtual DbSet DbSetPromIn { get; set; } + public virtual DbSet DbSetPromOut { get; set; } + + #endregion Public Properties + + #region Private Methods + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + + #endregion Private Methods + + #region Protected Methods + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + if (!optionsBuilder.IsConfigured) + { + string connString = _configuration.GetConnectionString("MP.Sched"); + + optionsBuilder.UseSqlServer(connString); + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS"); + + //modelBuilder.Entity(entity => + //{ + // entity.HasKey(e => e.Chiave); + + // entity.ToTable("Config"); + + // entity.Property(e => e.Chiave) + // .HasMaxLength(50) + // .HasColumnName("chiave"); + + // entity.Property(e => e.Note).HasColumnName("note"); + + // entity.Property(e => e.Valore).HasColumnName("valore"); + + // entity.Property(e => e.ValoreStd) + // .HasColumnName("valoreStd") + // .HasComment("Valore di default/riferimento per la variabile"); + //}); + + //modelBuilder.Entity(entity => + //{ + // entity.HasKey(e => new { e.Lingua, e.Lemma }); + + //}); + + OnModelCreatingPartial(modelBuilder); + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.Data/Services/SchedulerDataService.cs b/MP.Data/Services/SchedulerDataService.cs new file mode 100644 index 00000000..b13adf9f --- /dev/null +++ b/MP.Data/Services/SchedulerDataService.cs @@ -0,0 +1,90 @@ +using Microsoft.Extensions.Configuration; +using MP.Core.DTO; +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace MP.Data.Services +{ + public class SchedulerDataService : BaseServ + { + /// + /// Init servizio TAB + /// + /// + public SchedulerDataService(IConfiguration configuration, IConnectionMultiplexer redConn) : base(configuration, redConn) + { + _configuration = configuration; + + // // conf DB + // ConnStr = _configuration.GetConnectionString("MP.All"); + // if (string.IsNullOrEmpty(ConnStr)) + // { + // Log.Error("ConnString empty!"); + // } + // else + // { + // StringBuilder sb = new StringBuilder(); + // dbTabController = new Controllers.MpTabController(configuration); + // sb.AppendLine($"TabDataService | MpTabController OK"); + // dbIocController = new Controllers.MpIocController(configuration); + // sb.AppendLine($"TabDataService | MpIocController OK"); + // dbInveController = new Controllers.MpInveController(configuration); + // sb.AppendLine($"TabDataService | MpInveController OK"); + // Log.Info(sb.ToString()); + // // sistemo i parametri x redHas... + // CodModulo = _configuration.GetValue("SpecialConf:CodModulo"); + // CodModuloParam = _configuration.GetValue("SpecialConf:CodModuloParam"); + //#if false + // MpIoNS = _configuration.GetValue("ServerConf:MpIoNS"); + //#endif + // var cstringArray = ConnStr.Split(";"); + // foreach (var item in cstringArray) + // { + // var cData = item.Trim().Split("="); + // if (cData.Length == 2) + // { + // if (!connStrParams.ContainsKey(cData[0])) + // { + // connStrParams.Add(cData[0], cData[1]); + // } + // } + // } + // // sistemo + // DataSource = connStrParams["Server"]; + // DataBase = connStrParams["Database"]; + // } + } + + public async Task>?> PlannerGetEvents(DateTime dtInizio, DateTime dtFine) + { + Dictionary>? result = null; + await Task.Delay(200); + return result; + + //using var activity = StartActivity(); + //string source = "DB"; + //Dictionary>? result = null; + //// cerco in redis... + //string currKey = $"{redisBaseKey}:PlannerData:{dtStart:yyyyMMdd}:{dtEnd:yyyyMMdd}"; + //RedisValue rawData = await redisDb.StringGetAsync(currKey); + ////if (!string.IsNullOrEmpty($"{rawData}")) + //if (rawData.HasValue && rawData.Length() > 2) + //{ + // result = JsonConvert.DeserializeObject>>($"{rawData}"); + // source = "REDIS"; + //} + //else + //{ + // result = dataSimController.PlannerGetEvents(dtStart, dtEnd); + // // serializzo e salvo... + // rawData = JsonConvert.SerializeObject(result); + // await redisDb.StringSetAsync(currKey, rawData, LongCache); + //} + //activity?.SetTag("data.source", source); + //LogTrace($"{source} | trace: {activity?.TraceId} | {activity?.Duration.TotalMilliseconds}ms"); + //return result; + } + } +} diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index f8446314..5beba20f 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2602.2612 + 6.16.2603.2007 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/ProdPlanner.razor b/MP.SPEC/Pages/ProdPlanner.razor new file mode 100644 index 00000000..2142f878 --- /dev/null +++ b/MP.SPEC/Pages/ProdPlanner.razor @@ -0,0 +1,17 @@ +@page "/ProdPlanner" +
    +
    +
    +
    +

    Production Planner

    +
    +
    + +
    +
    +
    +
    + +
    +
    + diff --git a/MP.SPEC/Pages/ProdPlanner.razor.cs b/MP.SPEC/Pages/ProdPlanner.razor.cs new file mode 100644 index 00000000..bf30c492 --- /dev/null +++ b/MP.SPEC/Pages/ProdPlanner.razor.cs @@ -0,0 +1,63 @@ +using Microsoft.AspNetCore.Components; +using MP.Core.DTO; +using MP.Data.Services; + +namespace MP.SPEC.Pages +{ + public partial class ProdPlanner + { + #region Protected Properties + + [Inject] + protected SchedulerDataService SDService { get; set; } = null!; + + #endregion Protected Properties + + #region Private Fields + + /// + /// Periodo selezionato attuale + /// + private EgwCoreLib.Utils.DtUtils.Periodo PeriodoSel = new EgwCoreLib.Utils.DtUtils.Periodo(EgwCoreLib.Utils.DtUtils.PeriodSet.ThisYear); + + #endregion Private Fields + + #region Private Properties + + private List ListEventi { get; set; } = new(); + + #endregion Private Properties + + #region Private Methods + + /// + /// Legge i dati dei record completi + /// + private async Task ReloadData() + { + var rawData = await SDService.PlannerGetEvents(PeriodoSel.Inizio, PeriodoSel.Fine); + if (rawData != null && rawData.Count > 0) + { + ListEventi.Clear(); + // x ora copio i vari blocchi... + foreach (var item in rawData) + { + ListEventi.AddRange(item.Value); + } + } + } + + /// + /// Imposta periodo da filtro + /// + /// + /// + private async Task SetPeriodo(EgwCoreLib.Utils.DtUtils.Periodo newPeriod) + { + PeriodoSel = newPeriod; + await ReloadData(); + } + + #endregion Private Methods + } +} diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 60194377..794e67bb 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2602.2612

    +

    Versione: 6.16.2603.2007


    Note di rilascio:
    • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index c2e451ac..7ae90196 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2602.2612 +6.16.2603.2007 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 0aabfeb5..92802efe 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2602.2612 + 6.16.2603.2007 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.SPEC/appsettings.json b/MP.SPEC/appsettings.json index a2055c1b..a061328d 100644 --- a/MP.SPEC/appsettings.json +++ b/MP.SPEC/appsettings.json @@ -59,6 +59,7 @@ "MP.Inve": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;", "MP.Land": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;", "MP.Land.Auth": "Server=SQL2016DEV;Database=MoonPro_Anagrafica; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;", + "MP.Sched": "Server=SQL2016DEV;Database=MoonPro_ES3; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;", "Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true", "RedisAdmin": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true", "mdbConnString": "mongodb://W2019-MONGODB:27017" From 7cf9b7c3556c4072fb1ee32ecb745dbc44f294e4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 20 Mar 2026 12:09:17 +0100 Subject: [PATCH 3/4] Refresh pubblicazione per ritorno stato prec --- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 5beba20f..76b96b0e 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2603.2007 + 6.16.2603.2012 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 794e67bb..c728fbdd 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

      Versione: 6.16.2603.2007

      +

      Versione: 6.16.2603.2012


      Note di rilascio:
      • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 7ae90196..1fb0085a 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2603.2007 +6.16.2603.2012 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 92802efe..ef7976b8 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2603.2007 + 6.16.2603.2012 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 From 6e3a64049af5f4a4fca4660834049c9296f56c0f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 20 Mar 2026 15:28:05 +0100 Subject: [PATCH 4/4] Fix deselezione post update fermate reparto --- MP.SPEC/Components/Fermate/ListMacc.razor | 2 +- MP.SPEC/Components/Fermate/ListMacc.razor.cs | 220 ++++++++++--------- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/RepStop.razor | 2 +- MP.SPEC/Pages/RepStop.razor.cs | 11 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 8 files changed, 128 insertions(+), 115 deletions(-) diff --git a/MP.SPEC/Components/Fermate/ListMacc.razor b/MP.SPEC/Components/Fermate/ListMacc.razor index 006559fa..3c1e21f6 100644 --- a/MP.SPEC/Components/Fermate/ListMacc.razor +++ b/MP.SPEC/Components/Fermate/ListMacc.razor @@ -49,7 +49,7 @@ { - @if (CurrList.Contains(record.IdxMacchina)) + @if (currList.Contains(record.IdxMacchina)) { } diff --git a/MP.SPEC/Components/Fermate/ListMacc.razor.cs b/MP.SPEC/Components/Fermate/ListMacc.razor.cs index 01d7a5e8..a8f64b38 100644 --- a/MP.SPEC/Components/Fermate/ListMacc.razor.cs +++ b/MP.SPEC/Components/Fermate/ListMacc.razor.cs @@ -8,6 +8,9 @@ namespace MP.SPEC.Components.Fermate { #region Public Properties + [Parameter] + public bool ResetSelection { get; set; } + [Parameter] public EventCallback EC_ReqRefresh { get; set; } @@ -19,32 +22,70 @@ namespace MP.SPEC.Components.Fermate #endregion Public Properties - #region Protected Properties + #region Protected Methods - /// - /// Elenco selezione corrente - /// - protected List CurrList { get; set; } = new List(); + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await ReloadUserPref(); + } + + protected override async Task OnInitializedAsync() + { + await ReloadUserPref(); + } + + protected override void OnParametersSet() + { + if (ResetSelection) + { + currList = new(); + } + isLoading = true; + totalCount = ListMSE.Count(); + ReloadData(); + } + + #endregion Protected Methods + + #region Private Fields + + private bool AllSelected = false; + + private List currList = new List(); + + private int currPage = 1; + + private bool isLoading = false; + + private List ListRecords = new(); + + private int numRecord = 10; + + private int totalCount = 0; + + #endregion Private Fields + + #region Private Properties [Inject] - protected ILocalStorageService localStorage { get; set; } = null!; + private ILocalStorageService localStorage { get; set; } = null!; /// /// Conteggio elementi selezionati /// - protected int numSel + private int numSel { - get => CurrList.Count(); + get => currList.Count(); } - #endregion Protected Properties + #endregion Private Properties - #region Protected Methods + #region Private Methods - protected string CheckSelect(MappaStatoExplModel currRec) + private string CheckSelect(MappaStatoExplModel currRec) { string answ = ""; - if (CurrList.Contains(currRec.IdxMacchina)) + if (currList.Contains(currRec.IdxMacchina)) { answ = "table-info"; } @@ -54,7 +95,7 @@ namespace MP.SPEC.Components.Fermate /// /// CSS Class bordo da stato macchina /// - protected string cssClassBorder(string semaforo) + private string cssClassBorder(string semaforo) { string answ = ""; if (!string.IsNullOrEmpty(semaforo)) @@ -89,109 +130,15 @@ namespace MP.SPEC.Components.Fermate return answ; } - protected override async Task OnAfterRenderAsync(bool firstRender) - { - await ReloadUserPref(); - } - - protected override async Task OnInitializedAsync() - { - await ReloadUserPref(); - } - - protected override void OnParametersSet() - { - isLoading = true; - totalCount = ListMSE.Count(); - ReloadData(); - } - /// /// Richiesta update /// /// - protected async Task RaiseRefresh() + private async Task RaiseRefresh() { await EC_ReqRefresh.InvokeAsync(true); } - protected async Task SetNumRec(int newNum) - { - numRecord = newNum; - await localStorage.SetItemAsync(varName("numRec"), newNum); - currPage = 1; - ReloadData(); - } - - protected async Task SetPage(int newNum) - { - currPage = newNum; - ReloadData(); - } - - /// - /// Esegue toggle selezione fino a numMax in aggiunta e rimuovendo tutti se era true - /// - protected async Task ToggleAllSel() - { - AllSelected = !AllSelected; - if (AllSelected) - { - if (ListRecords != null) - { - foreach (var record in ListRecords) - { - if (!CurrList.Contains(record.IdxMacchina)) - { - CurrList.Add(record.IdxMacchina); - } - } - } - } - else - { - CurrList.Clear(); - } - await Task.Delay(1); - await EC_Selected.InvokeAsync(CurrList); - } - - protected async Task ToggleSel(string newVal) - { - if (!CurrList.Contains(newVal)) - { - CurrList.Add(newVal); - } - else - { - CurrList.Remove(newVal); - } - // riordino - CurrList = CurrList.OrderBy(x => x).ToList(); - // invio selezione! - await EC_Selected.InvokeAsync(CurrList); - } - - #endregion Protected Methods - - #region Private Fields - - private bool AllSelected = false; - - private int currPage = 1; - - private bool isLoading = false; - - private List ListRecords = new(); - - private int numRecord = 10; - - private int totalCount = 0; - - #endregion Private Fields - - #region Private Methods - private void ReloadData() { if (ListMSE != null) @@ -215,6 +162,63 @@ namespace MP.SPEC.Components.Fermate numRecord = await localStorage.GetItemAsync(varName("numRec"), 10); } + private async Task SetNumRec(int newNum) + { + numRecord = newNum; + await localStorage.SetItemAsync(varName("numRec"), newNum); + currPage = 1; + ReloadData(); + } + + private async Task SetPage(int newNum) + { + currPage = newNum; + ReloadData(); + } + + /// + /// Esegue toggle selezione fino a numMax in aggiunta e rimuovendo tutti se era true + /// + private async Task ToggleAllSel() + { + AllSelected = !AllSelected; + if (AllSelected) + { + if (ListRecords != null) + { + foreach (var record in ListRecords) + { + if (!currList.Contains(record.IdxMacchina)) + { + currList.Add(record.IdxMacchina); + } + } + } + } + else + { + currList.Clear(); + } + await Task.Delay(1); + await EC_Selected.InvokeAsync(currList); + } + + private async Task ToggleSel(string newVal) + { + if (!currList.Contains(newVal)) + { + currList.Add(newVal); + } + else + { + currList.Remove(newVal); + } + // riordino + currList = currList.OrderBy(x => x).ToList(); + // invio selezione! + await EC_Selected.InvokeAsync(currList); + } + private string varName(string key) { return $"ListMacc_{key}"; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 76b96b0e..c17da66e 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2603.2012 + 6.16.2603.2015 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/RepStop.razor b/MP.SPEC/Pages/RepStop.razor index 30f02427..a083dd16 100644 --- a/MP.SPEC/Pages/RepStop.razor +++ b/MP.SPEC/Pages/RepStop.razor @@ -24,7 +24,7 @@ {
        - +
        @if (showFermate) diff --git a/MP.SPEC/Pages/RepStop.razor.cs b/MP.SPEC/Pages/RepStop.razor.cs index 00864769..c504e35a 100644 --- a/MP.SPEC/Pages/RepStop.razor.cs +++ b/MP.SPEC/Pages/RepStop.razor.cs @@ -145,9 +145,13 @@ namespace MP.SPEC.Pages await TabDServ.resetMicrostatoMacchina(idxMacc); } + forceResetSel = true; var ListMSE = await MDService.MseGetAll(true); + CurrMachSel = new(); await Task.Delay(250); await ReloadData(); + forceResetSel = false; + CheckSelection(new()); isLoading = false; } @@ -192,14 +196,19 @@ namespace MP.SPEC.Pages // resetta il microstato in modo da ricevere successive info HW await TabDServ.resetMicrostatoMacchina(idxMacc); } - + forceResetSel = true; var ListMSE = await MDService.MseGetAll(true); + CurrMachSel = new(); await Task.Delay(250); await ReloadData(); + forceResetSel = false; + CheckSelection(new()); isLoading = false; } } + private bool forceResetSel = false; + private async Task ReloadData() { CurrMSE = await MDService.MseGetAll(false); diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index c728fbdd..155b3291 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

        Versione: 6.16.2603.2012

        +

        Versione: 6.16.2603.2015


        Note di rilascio:
        • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 1fb0085a..71328cf6 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2603.2012 +6.16.2603.2015 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index ef7976b8..00df1e6f 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2603.2012 + 6.16.2603.2015 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