From 3212a3eacbe67e853b0c36aa77d2ea6152e2c47f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 16 Oct 2023 16:49:55 +0200 Subject: [PATCH 001/113] Completata pag scarti --- MP-TAB-SERV/Components/ControlsMan.razor | 2 +- MP-TAB-SERV/Components/ScrapEditor.razor | 38 ++-- MP-TAB-SERV/Components/ScrapEditor.razor.cs | 162 ++++++------------ MP-TAB-SERV/Components/ScrapMan.razor | 57 +----- MP-TAB-SERV/Components/ScrapMan.razor.cs | 49 +----- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP.Data/Controllers/MpTabController.cs | 72 ++++++++ MP.Data/DatabaseModels/RegistroScartiModel.cs | 31 ++++ MP.Data/DatabaseModels/vSelCauScartoModel.cs | 20 +++ MP.Data/MoonProContext.cs | 15 +- MP.Data/Services/TabDataService.cs | 99 ++++++++++- 14 files changed, 330 insertions(+), 223 deletions(-) create mode 100644 MP.Data/DatabaseModels/RegistroScartiModel.cs create mode 100644 MP.Data/DatabaseModels/vSelCauScartoModel.cs diff --git a/MP-TAB-SERV/Components/ControlsMan.razor b/MP-TAB-SERV/Components/ControlsMan.razor index 0243545f..87a6f55b 100644 --- a/MP-TAB-SERV/Components/ControlsMan.razor +++ b/MP-TAB-SERV/Components/ControlsMan.razor @@ -65,7 +65,7 @@ else - Elenco Controlli + Registro Controlli diff --git a/MP-TAB-SERV/Components/ScrapEditor.razor b/MP-TAB-SERV/Components/ScrapEditor.razor index b064ca35..12e7b232 100644 --- a/MP-TAB-SERV/Components/ScrapEditor.razor +++ b/MP-TAB-SERV/Components/ScrapEditor.razor @@ -12,28 +12,42 @@ @if (ShowDetail) { -
+
-
+
- Data Ora - + Num Pz + +
-
- +
+
+ Data Ora + + +
- - + +
- @if (CanSave) - { - - } +
+ @foreach (var item in ListComplete) + { +
+ + + + +
+ } +
diff --git a/MP-TAB-SERV/Components/ScrapEditor.razor.cs b/MP-TAB-SERV/Components/ScrapEditor.razor.cs index bf5f0bb8..87339eb4 100644 --- a/MP-TAB-SERV/Components/ScrapEditor.razor.cs +++ b/MP-TAB-SERV/Components/ScrapEditor.razor.cs @@ -1,25 +1,7 @@ -using global::System; -using global::System.Collections.Generic; -using global::System.Linq; -using global::System.Threading.Tasks; -using global::Microsoft.AspNetCore.Components; -using System.Net.Http; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Forms; -using Microsoft.AspNetCore.Components.Routing; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.Web.Virtualization; -using Microsoft.JSInterop; -using MP_TAB_SERV; -using MP_TAB_SERV.Shared; -using MP_TAB_SERV.Components; +using global::Microsoft.AspNetCore.Components; using MP.Data; using MP.Data.DatabaseModels; -using MP.Data.DTO; using MP.Data.Services; -using Newtonsoft.Json; -using NLog; namespace MP_TAB_SERV.Components { @@ -27,41 +9,20 @@ namespace MP_TAB_SERV.Components { #region Public Properties - [Parameter] - public bool CanSave { get; set; } = false; - - [Parameter] - public EventCallback E_CommRec { get; set; } - - [Parameter] - public EventCallback E_DateSel { get; set; } - [Parameter] public EventCallback E_Updated { get; set; } [Parameter] public MappaStatoExpl? RecMSE { get; set; } = null; - protected string Title - { - get => ShowDetail? "Nascondi Registrazione Scarti": "Mostra Registrazione Scarti"; - } - [Parameter] - public EventListModel? CurrRecord - { - set - { - if (value != null) - { - DateSel = value.InizioStato ?? DateTime.Now; - UserComment = value.Value; - ShowDetail = false; - } - } - } - #endregion Public Properties + #region Protected Fields + + protected int dltMinRealtime = 1; + + #endregion Protected Fields + #region Protected Properties protected DateTime DateSel @@ -72,20 +33,38 @@ namespace MP_TAB_SERV.Components if (dateSel != value) { dateSel = value; - E_DateSel.InvokeAsync(value).ConfigureAwait(false); } } } + protected List ListComplete { get; set; } = new List(); + [Inject] protected MessageService MServ { get; set; } = null!; + protected int NumPz + { + get => numPz; + set + { + if (numPz != value) + { + numPz = value; + } + } + } + [Inject] protected SharedMemService SMServ { get; set; } = null!; [Inject] protected TabDataService TabServ { get; set; } = null!; + protected string Title + { + get => ShowDetail ? "Nascondi Registrazione Scarti" : "Mostra Registrazione Scarti"; + } + #endregion Protected Properties #region Protected Methods @@ -95,83 +74,46 @@ namespace MP_TAB_SERV.Components DoReset(); } - /// - /// Forza salvataggio impostando data-ora - /// - /// - /// - public async Task ForceSave(DateTime dtRif) + protected async Task doSave(vSelCauScartoModel currCau) { - DateSel = dtRif; - // ora salvo - await doSave(); - } - - protected async Task doSave() - { - // registro evento - EventListModel newRec = new EventListModel() + // registro scarto + RegistroScartiModel newRec = new RegistroScartiModel() { IdxMacchina = IdxMacc, - InizioStato = DateSel, - IdxTipo = idxTipoCommento, - CodArticolo = CodArt, - Value = UserComment, + DataOra = DateSel, + Causale = currCau.value, + Qta = NumPz, MatrOpr = MatrOpr, - pallet = "-" + Note=UserComment + }; - // elimino vecchio se c'è... - await TabServ.EvListDelete(IdxMacc, DateSel, idxTipoCommento); // inserisco - await TabServ.EvListInsert(newRec, MP.Data.Objects.Enums.tipoInputEvento.commento); + await TabServ.RegScartiInsert(newRec); + // reset DoReset(); //ToggleCtrl(); await E_Updated.InvokeAsync(true); } - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { - idxTipoCommento = SMServ.GetConfInt("idxTipoCommento"); - dltMinRealtime = SMServ.GetConfInt("dltMinRealtime"); + await ReloadData(); } - protected override async Task OnAfterRenderAsync(bool firstRender) + protected async Task ReloadData() { - // verifico SE ci sia una data da usare... - bool hasDtRif = await MServ.SessHasVal(MessageService.KeyCommDtRif); - if (hasDtRif) - { - await Task.Delay(1); - ShowDetail = false; - UserComment = await MServ.CommentoValGet(true); - DateSel = await MServ.CommentoDtRifGet(true); - await InvokeAsync(StateHasChanged); - } + ListComplete = await TabServ.VSCS_getAll(); } - - protected int dltMinRealtime = 1; - /// - /// 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) - /// - protected bool insRealtime + protected void resetDate() { - get - { - bool answ = true; - try - { - if (Math.Abs(DateSel.Subtract(DateTime.Now).TotalMinutes) > dltMinRealtime) - { - answ = false; - } - } - catch - { } - return answ; - } + DateSel = DateTime.Now; + } + + protected void resetNumPz() + { + NumPz = 1; } protected void ToggleCtrl() @@ -185,12 +127,6 @@ namespace MP_TAB_SERV.Components #endregion Protected Methods - #region Private Fields - - private int idxTipoCommento = 0; - - #endregion Private Fields - #region Private Properties private string CodArt @@ -210,7 +146,10 @@ namespace MP_TAB_SERV.Components get => MServ.MatrOpr; } + private int numPz { get; set; } = 1; + private bool ShowDetail { get; set; } = true; + private string userComment { get; set; } = ""; private string UserComment @@ -221,7 +160,6 @@ namespace MP_TAB_SERV.Components if (userComment != value) { userComment = value; - E_CommRec.InvokeAsync(value).ConfigureAwait(false); } } } diff --git a/MP-TAB-SERV/Components/ScrapMan.razor b/MP-TAB-SERV/Components/ScrapMan.razor index 08297ecd..13a9346d 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor +++ b/MP-TAB-SERV/Components/ScrapMan.razor @@ -1,5 +1,4 @@  -
@@ -25,39 +24,7 @@ else
- - @if (showInsert) - { - @if (showNote) - { -
-
-
- @*
-
*@ - - -
-
-
- -
-
- } - else - { -
-
- -
-
- -
-
- } - } +
@@ -67,7 +34,7 @@ else - Elenco Controlli + Registro Scarti @@ -81,33 +48,27 @@ else
Art: @item.CodArticolo
-
- ODL: @($"ODL{item.IdxOdl:000000000}") +
+ @item.Descrizione
- @if (item.EsitoOk) - { - - } - else - { - - } + @item.Qta pz
- @($"{item.DataOra:ddd dd.MM.yy HH:mm:ss}") + @($"{item.DataOra:ddd dd.MM.yy HH:mm:ss}") +
@item.Operatore
-
+
@if (!string.IsNullOrEmpty(item.Note)) { -
@item.Note
+ Nota: @item.Note }
diff --git a/MP-TAB-SERV/Components/ScrapMan.razor.cs b/MP-TAB-SERV/Components/ScrapMan.razor.cs index 84c0e14c..a9c8c9f6 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor.cs +++ b/MP-TAB-SERV/Components/ScrapMan.razor.cs @@ -27,7 +27,7 @@ namespace MP_TAB_SERV.Components await Task.Delay(1); if (!string.IsNullOrEmpty(IdxMaccSel)) { - ListComplete = await TabDServ.RegControlliFilt(IdxMaccSel, IdxOdl, CurrPeriodo.Inizio, CurrPeriodo.Fine, false); + ListComplete = await TabDServ.RegScartiGetFilt(IdxMaccSel, IdxOdl, CurrPeriodo.Inizio, CurrPeriodo.Fine, false); TotalCount = ListComplete.Count; // esegue paginazione UpdateTable(); @@ -40,13 +40,10 @@ namespace MP_TAB_SERV.Components #region Protected Properties - protected string ConfTitle - { - get => showInsert ? "Nascondi Controllo" : "Registra Controllo"; - } + - protected List ListComplete { get; set; } = new List(); - protected List ListPaged { get; set; } = new List(); + protected List ListComplete { get; set; } = new List(); + protected List ListPaged { get; set; } = new List(); [Inject] protected MessageService MServ { get; set; } = null!; @@ -69,15 +66,7 @@ namespace MP_TAB_SERV.Components } } - protected async Task SaveKo() - { - isProcessing = true; - await TabDServ.RegControlliInsert(IdxMaccSel, MServ.MatrOpr, false, noteKo, DateTime.Now); - showInsert = false; - showNote = false; - await doUpdate(); - isProcessing = false; - } + protected void SaveNumRec(int newNum) { @@ -85,15 +74,7 @@ namespace MP_TAB_SERV.Components UpdateTable(); } - protected async Task SaveOk() - { - isProcessing = true; - await TabDServ.RegControlliInsert(IdxMaccSel, MServ.MatrOpr, true, noteKo, DateTime.Now); - showInsert = false; - showNote = false; - await doUpdate(); - isProcessing = false; - } + protected void SavePage(int newNum) { @@ -127,20 +108,7 @@ namespace MP_TAB_SERV.Components await doUpdate(); } - protected void ShowKo() - { - showNote = true; - } - - protected void ToggleBtn() - { - showInsert = !showInsert; - if (showInsert) - { - noteKo = ""; - showNote = false; - } - } + protected void UpdateTable() { @@ -161,11 +129,8 @@ namespace MP_TAB_SERV.Components private static Logger Log = LogManager.GetCurrentClassLogger(); private bool isProcessing = false; - private string noteKo = ""; private int NumRecPage = 10; private int PageNum = 1; - private bool showInsert = false; - private bool showNote = false; private int TotalCount = 0; private bool useOdl = false; diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index f1c4f6a3..b5d122d0 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.2310.1614 + 6.16.2310.1616 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index f6f6de29..8dbeecb3 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2310.1614

+

Versione: 6.16.2310.1616


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 8bf83e7e..82d7e6ce 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.1614 +6.16.2310.1616 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 8437644c..87dba021 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.1614 + 6.16.2310.1616 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 4a9ab556..c5ac908c 100644 --- a/MP.Data/Controllers/MpTabController.cs +++ b/MP.Data/Controllers/MpTabController.cs @@ -5,6 +5,7 @@ using MP.Data.DatabaseModels; using NLog; using System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Threading.Tasks; using static MP.Data.Objects.Enums; @@ -754,6 +755,60 @@ namespace MP.Data.Controllers return fatto; } + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + public async Task RegScartiInsert(RegistroScartiModel newRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var IdxMacchina = new SqlParameter("@idxMacchina", newRec.IdxMacchina); + var DataOra = new SqlParameter("@DataOra", newRec.DataOra); + var Causale = new SqlParameter("@Causale", newRec.Causale); + var Qta = new SqlParameter("@Qta", newRec.Qta); + var Note = new SqlParameter("@Note", newRec.Note); + var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); + + var result = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_RS_insert @idxMacchina, @DataOra, @Causale, @Qta, @Note, @MatrOpr", IdxMacchina, DataOra, Causale, Qta, Note, MatrOpr); + // indico eseguito! + fatto = result > 0; + } + return fatto; + } + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + /// + /// + /// + /// + public List RegScartiGetFilt(string idxMacchina, int idxODL, DateTime dataFrom, DateTime dataTo, bool showMulti) + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina); + var IdxODL = new SqlParameter("@IdxODL", idxODL); + var DataFrom = new SqlParameter("@DataFrom", dataFrom); + var DataTo = new SqlParameter("@DataTo", dataTo); + var ShowMulti = new SqlParameter("@showMulti", showMulti); + + dbResult = dbCtx + .DbSetRegScarti + .FromSqlRaw("EXEC .stp_RS_getByFilt @IdxMacchina, @IdxODL, @DataFrom, @DataTo, @ShowMulti", IdxMacc, IdxODL, DataFrom, DataTo, ShowMulti) + .AsNoTracking() + .ToList(); + } + return dbResult; + } + /// /// Effettua ricalcolo MSE x macchina indicata /// @@ -1042,6 +1097,23 @@ namespace MP.Data.Controllers return answ; } + /// + /// Elenco causali scarto + /// + /// + public List VSCS_getAll() + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + dbResult = dbCtx + .DbSetVSCS + .AsNoTracking() + .ToList(); + } + return dbResult; + } + /// /// Elenco ultimi ODL x macchina /// diff --git a/MP.Data/DatabaseModels/RegistroScartiModel.cs b/MP.Data/DatabaseModels/RegistroScartiModel.cs new file mode 100644 index 00000000..2082712d --- /dev/null +++ b/MP.Data/DatabaseModels/RegistroScartiModel.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DatabaseModels +{ + public partial class RegistroScartiModel + { + #region Public Properties + + public string IdxMacchina { get; set; } = ""; + public DateTime DataOra { get; set; } = DateTime.Now; + public string Causale { get; set; } = ""; + public string Operatore { get; set; } = ""; + + public int Qta { get; set; } = 0; + public string Note { get; set; } = ""; + public string CodArticolo { get; set; } = ""; + public int MatrOpr { get; set; } = 0; + public DateTime? DataOraProdRec { get; set; } = null; + public string Descrizione { get; set; } = ""; + public string cssClass { get; set; } = ""; + public string icona { get; set; } = ""; + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/MP.Data/DatabaseModels/vSelCauScartoModel.cs b/MP.Data/DatabaseModels/vSelCauScartoModel.cs new file mode 100644 index 00000000..05b41c1a --- /dev/null +++ b/MP.Data/DatabaseModels/vSelCauScartoModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DatabaseModels +{ + public partial class vSelCauScartoModel + { + [Key] + public string value { get; set; } = ""; + public string label { get; set; } = ""; + public string cssClass { get; set; } = ""; + public string icona { get; set; } = ""; + } +} diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs index 4368603a..d3fccf85 100644 --- a/MP.Data/MoonProContext.cs +++ b/MP.Data/MoonProContext.cs @@ -37,7 +37,7 @@ namespace MP.Data #region Public Properties - + public virtual DbSet DbSetAlarmLog { get; set; } public virtual DbSet DbSetStatArticoli { get; set; } public virtual DbSet DbSetArticoli { get; set; } @@ -58,7 +58,7 @@ namespace MP.Data public virtual DbSet DbSetStatOdl { get; set; } public virtual DbSet DbSetPzProd { get; set; } public virtual DbSet DbSetEvList { get; set; } - public virtual DbSet DbSetDDB { get; set; } + public virtual DbSet DbSetDDB { get; set; } public virtual DbSet DbSetVocabolario { get; set; } public virtual DbSet DbOperatori { get; set; } public virtual DbSet DbSetGrp2Oper { get; set; } @@ -74,6 +74,7 @@ namespace MP.Data public virtual DbSet DbSetStatoProd { get; set; } public virtual DbSet DbSetTurniMacc { get; set; } public virtual DbSet DbSetRegControlli { get; set; } + public virtual DbSet DbSetRegScarti { get; set; } public virtual DbSet DbSetStAct { get; set; } @@ -90,6 +91,7 @@ namespace MP.Data public virtual DbSet DbSetVSEB { get; set; } public virtual DbSet DbSetVSODL { get; set; } + public virtual DbSet DbSetVSCS { get; set; } #endregion Public Properties @@ -541,6 +543,10 @@ namespace MP.Data { entity.HasKey(e => new { e.IdxMacchina, e.InizioStato }); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxMacchina, e.DataOra, e.Causale}); + }); modelBuilder.Entity(entity => { @@ -548,9 +554,12 @@ namespace MP.Data }); modelBuilder.Entity(entity => { - //entity.HasKey(e => e.value); entity.ToView("v_selODL"); }); + modelBuilder.Entity(entity => + { + entity.ToView("v_selCauScarto"); + }); OnModelCreatingPartial(modelBuilder); diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 2949513d..556db2a9 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -486,7 +486,7 @@ namespace MP.Data.Services } catch (Exception exc) { - string logMsg = $"Eccezione in checkCambiaStatoBatch(6) | tipoInputEvento: {tipoEv} |macchina: {newRec.IdxMacchina} | IdxTipo: {newRec.IdxTipo} | CodArticolo: {newRec.CodArticolo} | Value {newRec.Value} | MatrOpr {newRec.MatrOpr} | Pallet {newRec.pallet}{Environment.NewLine}{exc}"; + string logMsg = $"Eccezione in checkCambiaStatoBatch(6) | tipoInputEvento: {tipoEv} |macchina: {newRec.IdxMacchina} | IdxTipo: {newRec.IdxTipo} | CodArticolo: {newRec.CodArticolo} | Value: {newRec.Value} | MatrOpr: {newRec.MatrOpr} | Pallet: {newRec.pallet}{Environment.NewLine}{exc}"; Log.Error(logMsg); } } @@ -670,6 +670,46 @@ namespace MP.Data.Services return result; } + /// + /// Restituisce elenco RS filtrato + /// + /// + /// + /// + /// + /// + /// + public async Task> RegScartiGetFilt(string idxMacchina, int idxODL, DateTime dataFrom, DateTime dataTo, bool showMulti) + { + // setup parametri costanti + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:RegScarti:{idxMacchina}:{idxODL}:{dataFrom:yyyyyMMdd-HHmm}:{dataFrom:yyyyyMMdd-HHmm}:{showMulti}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = dbTabController.RegScartiGetFilt(idxMacchina, idxODL, dataFrom, dataTo, showMulti); + // serializzp e salvo... + rawData = JsonConvert.SerializeObject(result); + await redisDb.StringSetAsync(currKey, rawData, FastCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"RegScartiGetFilt | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Registra controllo /// @@ -686,6 +726,29 @@ namespace MP.Data.Services return answ; } + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + public async Task RegScartiInsert(RegistroScartiModel newRec) + { + bool answ = false; + try + { + // inserisco evento + answ = await dbTabController.RegScartiInsert(newRec); + // reset cache eventi/commenti + await FlushCache("RegScarti"); + } + catch (Exception exc) + { + string logMsg = $"Eccezione in RegScartiInsert | macchina: {newRec.IdxMacchina} | DataOra: {newRec.DataOra} | Causale: {newRec.Causale} | MatrOpr: {newRec.MatrOpr} | Qta {newRec.Qta} | Note: {newRec.Note}{Environment.NewLine}{exc}"; + Log.Error(logMsg); + } + return answ; + } + /// /// Resetta (rileggendo) i dati della macchina /// @@ -1163,6 +1226,40 @@ namespace MP.Data.Services return result; } + /// + /// Elenco causali scarto + /// + /// + public async Task> VSCS_getAll() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:VSCS"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await Task.FromResult(dbTabController.VSCS_getAll()); + // serializzp e salvo... + rawData = JsonConvert.SerializeObject(result); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"VSCS_getAll | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Elenco ultimi ODL x macchina /// From cd21f92538075ef99e6ee93d2afa1e84527d51d4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 16 Oct 2023 18:43:17 +0200 Subject: [PATCH 002/113] Dichiarazioni: ok inserimento + display (manca edit) --- MP-TAB-SERV/Components/ControlsMan.razor.cs | 4 +- MP-TAB-SERV/Components/DeclarEditor.razor | 47 +++++ MP-TAB-SERV/Components/DeclarEditor.razor.cs | 173 ++++++++++++++++++ MP-TAB-SERV/Components/DeclarMan.razor | 76 +++++++- MP-TAB-SERV/Components/DeclarMan.razor.cs | 148 +++++++++++++++ MP-TAB-SERV/Components/ScrapEditor.razor.cs | 9 +- MP-TAB-SERV/Components/ScrapMan.razor.cs | 4 +- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Pages/Declarations.razor | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP.Data/Controllers/MpTabController.cs | 124 ++++++++++--- MP.Data/DatabaseModels/AnagTagsModel.cs | 29 +++ .../RegistroDichiarazioniModel.cs | 31 ++++ MP.Data/MoonProContext.cs | 6 + MP.Data/Services/TabDataService.cs | 142 ++++++++++++-- 17 files changed, 743 insertions(+), 60 deletions(-) create mode 100644 MP-TAB-SERV/Components/DeclarEditor.razor create mode 100644 MP-TAB-SERV/Components/DeclarEditor.razor.cs create mode 100644 MP-TAB-SERV/Components/DeclarMan.razor.cs create mode 100644 MP.Data/DatabaseModels/AnagTagsModel.cs create mode 100644 MP.Data/DatabaseModels/RegistroDichiarazioniModel.cs diff --git a/MP-TAB-SERV/Components/ControlsMan.razor.cs b/MP-TAB-SERV/Components/ControlsMan.razor.cs index 26c38499..027553c8 100644 --- a/MP-TAB-SERV/Components/ControlsMan.razor.cs +++ b/MP-TAB-SERV/Components/ControlsMan.razor.cs @@ -64,7 +64,9 @@ namespace MP_TAB_SERV.Components if (RecMSE != null) { IdxMaccSel = RecMSE.IdxMacchina; - CurrPeriodo = new Periodo(PeriodSet.ThisWeek); + DateTime fine = DateTime.Today.AddDays(1); + DateTime inizio = fine.AddDays(-8); + CurrPeriodo = new Periodo(inizio, fine); await doUpdate(); } } diff --git a/MP-TAB-SERV/Components/DeclarEditor.razor b/MP-TAB-SERV/Components/DeclarEditor.razor new file mode 100644 index 00000000..3f814bf9 --- /dev/null +++ b/MP-TAB-SERV/Components/DeclarEditor.razor @@ -0,0 +1,47 @@ +
    +
    +
    +
    + +
    +
    +
    + @if (ShowDetail) + { +
    +
    +
    +
    + Tipologia + +
    +
    +
    +
    + Data Ora + + +
    +
    +
    +
    + + +
    +
    +
    + +
    +
    +
    + } +
    \ No newline at end of file diff --git a/MP-TAB-SERV/Components/DeclarEditor.razor.cs b/MP-TAB-SERV/Components/DeclarEditor.razor.cs new file mode 100644 index 00000000..f82e9834 --- /dev/null +++ b/MP-TAB-SERV/Components/DeclarEditor.razor.cs @@ -0,0 +1,173 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data; +using MP.Data.DatabaseModels; +using MP.Data.Services; + +namespace MP_TAB_SERV.Components +{ + public partial class DeclarEditor + { + #region Public Properties + + [Parameter] + public EventCallback E_Updated { get; set; } + + [Parameter] + public MappaStatoExpl? RecMSE { get; set; } = null; + + #endregion Public Properties + + #region Protected Properties + + protected DateTime DateSel + { + get => dateSel.Round(TimeSpan.FromSeconds(1)); + set + { + if (dateSel != value) + { + dateSel = value; + } + } + } + + protected List ListComplete { get; set; } = new List(); + + [Inject] + protected MessageService MServ { get; set; } = null!; + + [Inject] + protected SharedMemService SMServ { get; set; } = null!; + + [Inject] + protected TabDataService TabServ { get; set; } = null!; + + protected string TagCodeSel + { + get => tagCode; + set + { + if (tagCode != value) + { + tagCode = value; + } + } + } + + protected string Title + { + get => ShowDetail ? "Nascondi Inserimento Dichiarazione" : "Mostra Inserimento Dichiarazione"; + } + + #endregion Protected Properties + + #region Protected Methods + + protected void doCancel() + { + DoReset(); + } + + protected async Task DoSave() + { + // registro scarto + RegistroDichiarazioniModel newRec = new RegistroDichiarazioniModel() + { + IdxMacchina = IdxMacc, + DtRec = DateSel, + TagCode = TagCodeSel, + MatrOpr = MatrOpr, + ValString = UserComment + }; + // inserisco + await TabServ.RegDichiarInsert(newRec); + + // reset + DoReset(); + //ToggleCtrl(); + await E_Updated.InvokeAsync(true); + } + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + } + + protected async Task ReloadData() + { + ListComplete = await TabServ.AnagTagsOrd(); + } + + protected void resetDate() + { + DateSel = DateTime.Now; + } + + protected void ToggleCtrl() + { + ShowDetail = !ShowDetail; + if (ShowDetail) + { + DateSel = DateTime.Now; + } + } + + #endregion Protected Methods + + #region Private Properties + + private string CodArt + { + get => RecMSE != null ? RecMSE.CodArticolo : ""; + } + + private DateTime dateSel { get; set; } = DateTime.Now; + + private string IdxMacc + { + get => RecMSE != null ? RecMSE.IdxMacchina : ""; + } + + private int idxOdl { get; set; } = 0; + + private int IdxOdl + { + get => idxOdl; + set => idxOdl = value; + } + + private int MatrOpr + { + get => MServ.MatrOpr; + } + + private bool ShowDetail { get; set; } = true; + private string tagCode { get; set; } = ""; + private string userComment { get; set; } = ""; + + private string UserComment + { + get => userComment.Trim(); + set + { + if (userComment != value) + { + userComment = value; + } + } + } + + #endregion Private Properties + + #region Private Methods + + private void DoReset() + { + UserComment = ""; + DateSel = DateTime.Now; + ShowDetail = true; + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Components/DeclarMan.razor b/MP-TAB-SERV/Components/DeclarMan.razor index d4d18b69..5cad99e6 100644 --- a/MP-TAB-SERV/Components/DeclarMan.razor +++ b/MP-TAB-SERV/Components/DeclarMan.razor @@ -1,6 +1,76 @@ -

    DeclarList

    + + +
    +
    +

    Tipo Selezione

    +
    +
    +
    + + +
    +
    +
    -@code { - +@if (useOdl) +{ + } +else +{ + +} + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + @foreach (var item in ListPaged) + { + + + + + + + + + } + +
    TagDataOperMacchinaDichiarazione
    + + + + + @item.DtRec + + @item.CognNome + + @item.IdxMacchina + + @item.ValString +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/MP-TAB-SERV/Components/DeclarMan.razor.cs b/MP-TAB-SERV/Components/DeclarMan.razor.cs new file mode 100644 index 00000000..1d71c8d7 --- /dev/null +++ b/MP-TAB-SERV/Components/DeclarMan.razor.cs @@ -0,0 +1,148 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; +using MP.Data.Services; +using NLog; +using static EgwCoreLib.Utils.DtUtils; + +namespace MP_TAB_SERV.Components +{ + public partial class DeclarMan + { + #region Public Properties + + [Parameter] + public MappaStatoExpl? RecMSE { get; set; } = null; + + #endregion Public Properties + + #region Public Methods + + /// + /// Aggiorno valori produzione alla data richiesta... + /// + /// + public async Task doUpdate() + { + isProcessing = true; + await Task.Delay(1); + if (!string.IsNullOrEmpty(IdxMaccSel)) + { + ListComplete = await TabDServ.RegDichiarGetFilt(IdxMaccSel, "", 0, IdxOdl, CurrPeriodo.Inizio, CurrPeriodo.Fine); + TotalCount = ListComplete.Count; + // esegue paginazione + UpdateTable(); + } + isProcessing = false; + await Task.Delay(1); + } + + #endregion Public Methods + + #region Protected Properties + + protected List ListComplete { get; set; } = new List(); + protected List ListPaged { get; set; } = new List(); + + [Inject] + protected MessageService MServ { get; set; } = null!; + + [Inject] + protected TabDataService TabDServ { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await Task.Delay(1); + if (RecMSE != null) + { + IdxMaccSel = RecMSE.IdxMacchina; + DateTime fine = DateTime.Today.AddDays(1); + DateTime inizio = fine.AddDays(-8); + CurrPeriodo = new Periodo(inizio, fine); + await doUpdate(); + } + } + + protected void SaveNumRec(int newNum) + { + NumRecPage = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + PageNum = newNum; + UpdateTable(); + } + + protected async Task SetMacc(string selIdxMacc) + { + isProcessing = true; + await Task.Delay(1); + IdxMaccSel = selIdxMacc; + await doUpdate(); + isProcessing = false; + await Task.Delay(1); + } + + protected async Task SetOdl(int selIdxOdl) + { + isProcessing = true; + await Task.Delay(1); + IdxOdl = selIdxOdl; + await doUpdate(); + isProcessing = false; + await Task.Delay(1); + } + + protected async Task SetPeriodo(Periodo newPeriodo) + { + CurrPeriodo = newPeriodo; + await doUpdate(); + } + + protected void UpdateTable() + { + // esegue paginazione + if (TotalCount > NumRecPage) + { + ListPaged = ListComplete.Skip((PageNum - 1) * NumRecPage).Take(NumRecPage).ToList(); + } + else + { + ListPaged = ListComplete; + } + } + + #endregion Protected Methods + + #region Private Fields + + private static Logger Log = LogManager.GetCurrentClassLogger(); + private bool isProcessing = false; + private int NumRecPage = 10; + private int PageNum = 1; + private int TotalCount = 0; + private bool useOdl = false; + + #endregion Private Fields + + #region Private Properties + + private Periodo CurrPeriodo { get; set; } = new Periodo(); + + private string IdxMaccSel { get; set; } = ""; + + private int IdxOdl { get; set; } = 0; + + private string selMessage + { + get => useOdl ? "Periodo da ODL" : "Periodo Libero"; + } + + #endregion Private Properties + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Components/ScrapEditor.razor.cs b/MP-TAB-SERV/Components/ScrapEditor.razor.cs index 87339eb4..14d2d7e7 100644 --- a/MP-TAB-SERV/Components/ScrapEditor.razor.cs +++ b/MP-TAB-SERV/Components/ScrapEditor.razor.cs @@ -17,12 +17,6 @@ namespace MP_TAB_SERV.Components #endregion Public Properties - #region Protected Fields - - protected int dltMinRealtime = 1; - - #endregion Protected Fields - #region Protected Properties protected DateTime DateSel @@ -84,8 +78,7 @@ namespace MP_TAB_SERV.Components Causale = currCau.value, Qta = NumPz, MatrOpr = MatrOpr, - Note=UserComment - + Note = UserComment }; // inserisco await TabServ.RegScartiInsert(newRec); diff --git a/MP-TAB-SERV/Components/ScrapMan.razor.cs b/MP-TAB-SERV/Components/ScrapMan.razor.cs index a9c8c9f6..dc8c5248 100644 --- a/MP-TAB-SERV/Components/ScrapMan.razor.cs +++ b/MP-TAB-SERV/Components/ScrapMan.razor.cs @@ -61,7 +61,9 @@ namespace MP_TAB_SERV.Components if (RecMSE != null) { IdxMaccSel = RecMSE.IdxMacchina; - CurrPeriodo = new Periodo(PeriodSet.ThisWeek); + DateTime fine = DateTime.Today.AddDays(1); + DateTime inizio = fine.AddDays(-8); + CurrPeriodo = new Periodo(inizio, fine); await doUpdate(); } } diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index b5d122d0..ab309546 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.2310.1616 + 6.16.2310.1618 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Pages/Declarations.razor b/MP-TAB-SERV/Pages/Declarations.razor index bf2b95b7..c9fb0ddd 100644 --- a/MP-TAB-SERV/Pages/Declarations.razor +++ b/MP-TAB-SERV/Pages/Declarations.razor @@ -7,5 +7,5 @@ else { - + } diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 8dbeecb3..dcd6c500 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2310.1616

    +

    Versione: 6.16.2310.1618


    Note di rilascio:
    • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 82d7e6ce..c876022e 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.1616 +6.16.2310.1618 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 87dba021..4ebe2f54 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.1616 + 6.16.2310.1618 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 c5ac908c..5d7f5d5a 100644 --- a/MP.Data/Controllers/MpTabController.cs +++ b/MP.Data/Controllers/MpTabController.cs @@ -154,6 +154,25 @@ namespace MP.Data.Controllers return dbResult; } + /// + /// Restituisce l'anagrafica EVENTI per intero + /// + /// + public List AnagTagsOrd() + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + dbResult = dbCtx + .DbSetAnagTags + .FromSqlRaw("exec dbo.stp_AT_getOrd") + .AsNoTracking() + .AsEnumerable() + .ToList(); + } + return dbResult; + } + /// /// Verifica se sia necessario inserire un cambio di stato impianto in modalità batch /// @@ -755,31 +774,6 @@ namespace MP.Data.Controllers return fatto; } - /// - /// Aggiunta record RegistroScarti - /// - /// - /// - public async Task RegScartiInsert(RegistroScartiModel newRec) - { - bool fatto = false; - using (var dbCtx = new MoonProContext(_configuration)) - { - var IdxMacchina = new SqlParameter("@idxMacchina", newRec.IdxMacchina); - var DataOra = new SqlParameter("@DataOra", newRec.DataOra); - var Causale = new SqlParameter("@Causale", newRec.Causale); - var Qta = new SqlParameter("@Qta", newRec.Qta); - var Note = new SqlParameter("@Note", newRec.Note); - var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); - - var result = await dbCtx - .Database - .ExecuteSqlRawAsync("exec dbo.stp_RS_insert @idxMacchina, @DataOra, @Causale, @Qta, @Note, @MatrOpr", IdxMacchina, DataOra, Causale, Qta, Note, MatrOpr); - // indico eseguito! - fatto = result > 0; - } - return fatto; - } /// /// Aggiunta record RegistroScarti /// @@ -809,6 +803,86 @@ namespace MP.Data.Controllers return dbResult; } + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + public async Task RegScartiInsert(RegistroScartiModel newRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var IdxMacchina = new SqlParameter("@idxMacchina", newRec.IdxMacchina); + var DataOra = new SqlParameter("@DataOra", newRec.DataOra); + var Causale = new SqlParameter("@Causale", newRec.Causale); + var Qta = new SqlParameter("@Qta", newRec.Qta); + var Note = new SqlParameter("@Note", newRec.Note); + var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); + + var result = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_RS_insert @idxMacchina, @DataOra, @Causale, @Qta, @Note, @MatrOpr", IdxMacchina, DataOra, Causale, Qta, Note, MatrOpr); + // indico eseguito! + fatto = result > 0; + } + return fatto; + } + + /// + /// Aggiunta record Registro Dichiarazioni + /// + /// + /// + public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var TagCode = new SqlParameter("@TagCode", newRec.TagCode); + var IdxMacchina = new SqlParameter("@IdxMacchina", newRec.IdxMacchina); + var DtRec = new SqlParameter("@DtRec", newRec.DtRec); + var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); + var ValString = new SqlParameter("@ValString", newRec.ValString); + + var result = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_DD_insertQuery @TagCode, @IdxMacchina, @DtRec, @MatrOpr, @ValString", TagCode, IdxMacchina, DtRec, MatrOpr, ValString); + // indico eseguito! + fatto = result > 0; + } + return fatto; + } + + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + /// + /// + /// + /// + public List RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo) + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + var TagCode = new SqlParameter("@TagCode", tagCode); + var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina); + var MatrOpr = new SqlParameter("@MatrOpr", matrOpr); + var IdxODL = new SqlParameter("@IdxODL", idxODL); + var DtFrom = new SqlParameter("@DataFrom", dataFrom); + var DtTo = new SqlParameter("@DataTo", dataTo); + + dbResult = dbCtx + .DbSetRegDich + .FromSqlRaw("EXEC stp_DD_getFilt @TagCode, @IdxMacchina, @MatrOpr, @IdxODL, @DataFrom, @DataTo", TagCode, IdxMacchina, MatrOpr, IdxODL, DtFrom, DtTo) + .AsNoTracking() + .ToList(); + } + return dbResult; + } /// /// Effettua ricalcolo MSE x macchina indicata /// diff --git a/MP.Data/DatabaseModels/AnagTagsModel.cs b/MP.Data/DatabaseModels/AnagTagsModel.cs new file mode 100644 index 00000000..46acfdc5 --- /dev/null +++ b/MP.Data/DatabaseModels/AnagTagsModel.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DatabaseModels +{ + [Table("AnagTags")] + public partial class AnagTagsModel + { + #region Public Properties + + [Key, DatabaseGenerated(DatabaseGeneratedOption.None), MaxLength(50)] + public string TagCode { get; set; } = ""; + + public string TagDescr { get; set; } = ""; + + public int DisplOrd { get; set; } = 0; + + public string CssClass { get; set; } = ""; + + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/MP.Data/DatabaseModels/RegistroDichiarazioniModel.cs b/MP.Data/DatabaseModels/RegistroDichiarazioniModel.cs new file mode 100644 index 00000000..3d3e800c --- /dev/null +++ b/MP.Data/DatabaseModels/RegistroDichiarazioniModel.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace MP.Data.DatabaseModels +{ + //[Table("DiarioDichiarazioni")] + public partial class RegistroDichiarazioniModel + { + #region Public Properties + + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int IdxDich { get; set; } + + public DateTime DtRec { get; set; } = DateTime.Now; + public string IdxMacchina { get; set; } = ""; + public string TagCode { get; set; } = ""; + public int MatrOpr { get; set; } + public string ValString { get; set; } = ""; + public string CognNome { get; set; } = ""; + public string CssClass { get; set; } = ""; + + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs index d3fccf85..403a09ab 100644 --- a/MP.Data/MoonProContext.cs +++ b/MP.Data/MoonProContext.cs @@ -43,6 +43,7 @@ namespace MP.Data public virtual DbSet DbSetArticoli { get; set; } public virtual DbSet DbSetAnagEventi { get; set; } public virtual DbSet DbSetAnagStati { get; set; } + public virtual DbSet DbSetAnagTags { get; set; } public virtual DbSet DbSetMacchine { get; set; } public virtual DbSet DbSetMSE { get; set; } public virtual DbSet DbSetConfig { get; set; } @@ -75,6 +76,7 @@ namespace MP.Data public virtual DbSet DbSetTurniMacc { get; set; } public virtual DbSet DbSetRegControlli { get; set; } public virtual DbSet DbSetRegScarti { get; set; } + public virtual DbSet DbSetRegDich { get; set; } public virtual DbSet DbSetStAct { get; set; } @@ -560,6 +562,10 @@ namespace MP.Data { entity.ToView("v_selCauScarto"); }); + modelBuilder.Entity(entity => + { + entity.ToView("v_DD_exp"); + }); OnModelCreatingPartial(modelBuilder); diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 556db2a9..202f3243 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -204,6 +204,41 @@ namespace MP.Data.Services return result; } + /// + /// Restituisce l'anagrafica EVENTI per intero + /// + /// + public async Task> AnagTagsOrd() + { + // setup parametri costanti + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:AnagTags"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = dbTabController.AnagTagsOrd(); + // serializzp e salvo... + rawData = JsonConvert.SerializeObject(result); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"AnagTagsOrd | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Elenco completo STATI /// @@ -670,6 +705,95 @@ namespace MP.Data.Services return result; } + /// + /// Registra controllo + /// + /// + /// + /// + /// + /// + /// + public async Task RegControlliInsert(string idxMacchina, int matrOpr, bool esitoOk, string note, DateTime dataOra) + { + bool answ = false; + try + { + // inserisco evento + answ = dbTabController.RegControlliInsert(idxMacchina, matrOpr, esitoOk, note, dataOra); + await FlushCache("RecContr"); + } + catch (Exception exc) + { + string logMsg = $"Eccezione in RegControlliInsert | macchina: {idxMacchina} | DataOra: {dataOra} | MatrOpr: {matrOpr} | Qta {esitoOk} | Note: {note}{Environment.NewLine}{exc}"; + Log.Error(logMsg); + } + return answ; + } + + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + /// + /// + /// + /// + public async Task> RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo) + { + // setup parametri costanti + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:RegDichiar:{idxMacchina}:{tagCode}:{matrOpr}:{idxODL}:{dataFrom:yyyyyMMdd-HHmm}:{dataTo:yyyyyMMdd-HHmm}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = dbTabController.RegDichiarGetFilt(idxMacchina, tagCode, matrOpr, idxODL, dataFrom, dataTo); + // serializzp e salvo... + rawData = JsonConvert.SerializeObject(result); + await redisDb.StringSetAsync(currKey, rawData, FastCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"RegDichiarGetFilt | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + + /// + /// Aggiunta record Registro Dichiarazioni + /// + /// + /// + public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec) + { + bool answ = false; + try + { + // inserisco evento + answ = await dbTabController.RegDichiarInsert(newRec); + // reset cache eventi/commenti + await FlushCache("RegDichiar"); + } + catch (Exception exc) + { + string logMsg = $"Eccezione in RegDichiarInsert | macchina: {newRec.IdxMacchina} | DtRec: {newRec.DtRec} | TagCode: {newRec.TagCode} | MatrOpr: {newRec.MatrOpr} | ValString {newRec.ValString}{Environment.NewLine}{exc}"; + Log.Error(logMsg); + } + return answ; + } + /// /// Restituisce elenco RS filtrato /// @@ -687,7 +811,7 @@ namespace MP.Data.Services sw.Start(); List? result = new List(); // cerco in redis... - string currKey = $"{redisBaseKey}:RegScarti:{idxMacchina}:{idxODL}:{dataFrom:yyyyyMMdd-HHmm}:{dataFrom:yyyyyMMdd-HHmm}:{showMulti}"; + string currKey = $"{redisBaseKey}:RegScarti:{idxMacchina}:{idxODL}:{dataFrom:yyyyyMMdd-HHmm}:{dataTo:yyyyyMMdd-HHmm}:{showMulti}"; RedisValue rawData = await redisDb.StringGetAsync(currKey); if (rawData.HasValue) { @@ -710,22 +834,6 @@ namespace MP.Data.Services return result; } - /// - /// Registra controllo - /// - /// - /// - /// - /// - /// - /// - public async Task RegControlliInsert(string idxMacchina, int matrOpr, bool esitoOk, string note, DateTime dataOra) - { - bool answ = dbTabController.RegControlliInsert(idxMacchina, matrOpr, esitoOk, note, dataOra); - await FlushCache("RecContr"); - return answ; - } - /// /// Aggiunta record RegistroScarti /// From 66bad58f8f332034d59762705aa3aec4aa955dcf Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 16 Oct 2023 19:03:58 +0200 Subject: [PATCH 003/113] Completato editing dichiarazioni --- MP-TAB-SERV/Components/DeclarEditor.razor | 2 +- MP-TAB-SERV/Components/DeclarEditor.razor.cs | 91 +++++++++---- MP-TAB-SERV/Components/DeclarMan.razor | 8 +- MP-TAB-SERV/Components/DeclarMan.razor.cs | 8 ++ MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP.Data/Controllers/MpTabController.cs | 134 +++++++++++-------- MP.Data/Services/TabDataService.cs | 23 ++++ 10 files changed, 184 insertions(+), 90 deletions(-) diff --git a/MP-TAB-SERV/Components/DeclarEditor.razor b/MP-TAB-SERV/Components/DeclarEditor.razor index 3f814bf9..b4827658 100644 --- a/MP-TAB-SERV/Components/DeclarEditor.razor +++ b/MP-TAB-SERV/Components/DeclarEditor.razor @@ -39,7 +39,7 @@
- +
diff --git a/MP-TAB-SERV/Components/DeclarEditor.razor.cs b/MP-TAB-SERV/Components/DeclarEditor.razor.cs index f82e9834..e29d78a3 100644 --- a/MP-TAB-SERV/Components/DeclarEditor.razor.cs +++ b/MP-TAB-SERV/Components/DeclarEditor.razor.cs @@ -12,6 +12,21 @@ namespace MP_TAB_SERV.Components [Parameter] public EventCallback E_Updated { get; set; } + [Parameter] + public RegistroDichiarazioniModel? EditRec + { + get => currRec; + set + { + if (currRec != value && value != null) + { + IsNewRec = false; + ShowDetail = true; + currRec = value; + } + } + } + [Parameter] public MappaStatoExpl? RecMSE { get; set; } = null; @@ -19,14 +34,24 @@ namespace MP_TAB_SERV.Components #region Protected Properties + protected string BtnCss + { + get => IsNewRec ? "btn btn-success" : "btn btn-primary"; + } + + protected string BtnText + { + get => IsNewRec ? "Salva Nuova Dichiarazione" : "Aggiorna Dichiarazione"; + } + protected DateTime DateSel { - get => dateSel.Round(TimeSpan.FromSeconds(1)); + get => currRec.DtRec.Round(TimeSpan.FromSeconds(1)); set { - if (dateSel != value) + if (currRec.DtRec != value) { - dateSel = value; + currRec.DtRec = value; } } } @@ -44,12 +69,12 @@ namespace MP_TAB_SERV.Components protected string TagCodeSel { - get => tagCode; + get => currRec.TagCode; set { - if (tagCode != value) + if (currRec.TagCode != value) { - tagCode = value; + currRec.TagCode = value; } } } @@ -70,26 +95,33 @@ namespace MP_TAB_SERV.Components protected async Task DoSave() { - // registro scarto - RegistroDichiarazioniModel newRec = new RegistroDichiarazioniModel() + if (IsNewRec) { - IdxMacchina = IdxMacc, - DtRec = DateSel, - TagCode = TagCodeSel, - MatrOpr = MatrOpr, - ValString = UserComment - }; - // inserisco - await TabServ.RegDichiarInsert(newRec); + // inserisco + await TabServ.RegDichiarInsert(currRec); + } + else + { + // altrimetni update... + await TabServ.RegDichiarUpdate(currRec); + } // reset DoReset(); - //ToggleCtrl(); + ToggleCtrl(); await E_Updated.InvokeAsync(true); } protected override async Task OnInitializedAsync() { + currRec = new RegistroDichiarazioniModel() + { + DtRec = DateTime.Now, + IdxMacchina = IdxMacc, + TagCode = TagCodeSel, + MatrOpr = MatrOpr, + ValString = UserComment + }; await ReloadData(); } @@ -106,14 +138,22 @@ namespace MP_TAB_SERV.Components protected void ToggleCtrl() { ShowDetail = !ShowDetail; - if (ShowDetail) + DateSel = DateTime.Now; + if (!ShowDetail) { - DateSel = DateTime.Now; + IsNewRec = true; + UserComment = ""; } } #endregion Protected Methods + #region Private Fields + + private bool IsNewRec = true; + + #endregion Private Fields + #region Private Properties private string CodArt @@ -121,7 +161,7 @@ namespace MP_TAB_SERV.Components get => RecMSE != null ? RecMSE.CodArticolo : ""; } - private DateTime dateSel { get; set; } = DateTime.Now; + private RegistroDichiarazioniModel currRec { get; set; } = new RegistroDichiarazioniModel(); private string IdxMacc { @@ -141,18 +181,16 @@ namespace MP_TAB_SERV.Components get => MServ.MatrOpr; } - private bool ShowDetail { get; set; } = true; - private string tagCode { get; set; } = ""; - private string userComment { get; set; } = ""; + private bool ShowDetail { get; set; } = false; private string UserComment { - get => userComment.Trim(); + get => currRec.ValString.Trim(); set { - if (userComment != value) + if (currRec.ValString != value) { - userComment = value; + currRec.ValString = value; } } } @@ -166,6 +204,7 @@ namespace MP_TAB_SERV.Components UserComment = ""; DateSel = DateTime.Now; ShowDetail = true; + IsNewRec = true; } #endregion Private Methods diff --git a/MP-TAB-SERV/Components/DeclarMan.razor b/MP-TAB-SERV/Components/DeclarMan.razor index 5cad99e6..982f4cd2 100644 --- a/MP-TAB-SERV/Components/DeclarMan.razor +++ b/MP-TAB-SERV/Components/DeclarMan.razor @@ -1,6 +1,4 @@ - - - +

Tipo Selezione

@@ -24,7 +22,7 @@ else
- +
@@ -46,7 +44,7 @@ else { - + diff --git a/MP-TAB-SERV/Components/DeclarMan.razor.cs b/MP-TAB-SERV/Components/DeclarMan.razor.cs index 1d71c8d7..8e927b92 100644 --- a/MP-TAB-SERV/Components/DeclarMan.razor.cs +++ b/MP-TAB-SERV/Components/DeclarMan.razor.cs @@ -2,6 +2,7 @@ using global::Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; using MP.Data.Services; using NLog; +using Org.BouncyCastle.Asn1.IsisMtt.X509; using static EgwCoreLib.Utils.DtUtils; namespace MP_TAB_SERV.Components @@ -43,6 +44,11 @@ namespace MP_TAB_SERV.Components protected List ListComplete { get; set; } = new List(); protected List ListPaged { get; set; } = new List(); + protected void SetEdit(RegistroDichiarazioniModel selRec) + { + CurrRec = selRec; + } + [Inject] protected MessageService MServ { get; set; } = null!; @@ -121,6 +127,8 @@ namespace MP_TAB_SERV.Components #region Private Fields + private RegistroDichiarazioniModel? CurrRec { get; set; } = null; + private static Logger Log = LogManager.GetCurrentClassLogger(); private bool isProcessing = false; private int NumRecPage = 10; diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index ab309546..591dfdee 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.2310.1618 + 6.16.2310.1619 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index dcd6c500..26516930 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2310.1618

+

Versione: 6.16.2310.1619


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index c876022e..fc590c92 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.1618 +6.16.2310.1619 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 4ebe2f54..838932b5 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.1618 + 6.16.2310.1619 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 5d7f5d5a..4a4ebfe1 100644 --- a/MP.Data/Controllers/MpTabController.cs +++ b/MP.Data/Controllers/MpTabController.cs @@ -774,6 +774,86 @@ namespace MP.Data.Controllers return fatto; } + /// + /// Aggiunta record RegistroScarti + /// + /// + /// + /// + /// + /// + /// + public List RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo) + { + List dbResult = new List(); + using (var dbCtx = new MoonProContext(_configuration)) + { + var TagCode = new SqlParameter("@TagCode", tagCode); + var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina); + var MatrOpr = new SqlParameter("@MatrOpr", matrOpr); + var IdxODL = new SqlParameter("@IdxODL", idxODL); + var DtFrom = new SqlParameter("@DataFrom", dataFrom); + var DtTo = new SqlParameter("@DataTo", dataTo); + + dbResult = dbCtx + .DbSetRegDich + .FromSqlRaw("EXEC stp_DD_getFilt @TagCode, @IdxMacchina, @MatrOpr, @IdxODL, @DataFrom, @DataTo", TagCode, IdxMacchina, MatrOpr, IdxODL, DtFrom, DtTo) + .AsNoTracking() + .ToList(); + } + return dbResult; + } + + /// + /// Aggiunta record Registro Dichiarazioni + /// + /// + /// + public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var TagCode = new SqlParameter("@TagCode", newRec.TagCode); + var IdxMacchina = new SqlParameter("@IdxMacchina", newRec.IdxMacchina); + var DtRec = new SqlParameter("@DtRec", newRec.DtRec); + var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); + var ValString = new SqlParameter("@ValString", newRec.ValString); + + var result = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_DD_insertQuery @TagCode, @IdxMacchina, @DtRec, @MatrOpr, @ValString", TagCode, IdxMacchina, DtRec, MatrOpr, ValString); + // indico eseguito! + fatto = result > 0; + } + return fatto; + } + + /// + /// Update record Registro Dichiarazioni + /// + /// + /// + public async Task RegDichiarUpdate(RegistroDichiarazioniModel newRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + var Original_IdxDich = new SqlParameter("@Original_IdxDich", newRec.IdxDich); + var DtRec = new SqlParameter("@DtRec", newRec.DtRec); + var TagCode = new SqlParameter("@TagCode", newRec.TagCode); + var ValString = new SqlParameter("@ValString", newRec.ValString); + var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); + + var result = await dbCtx + .Database + .ExecuteSqlRawAsync("exec dbo.stp_DD_updateQuery @Original_IdxDich, @DtRec, @TagCode, @ValString, @MatrOpr", Original_IdxDich, DtRec, TagCode, ValString, MatrOpr); + // indico eseguito! + fatto = result > 0; + } + return fatto; + } + /// /// Aggiunta record RegistroScarti /// @@ -829,60 +909,6 @@ namespace MP.Data.Controllers return fatto; } - /// - /// Aggiunta record Registro Dichiarazioni - /// - /// - /// - public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec) - { - bool fatto = false; - using (var dbCtx = new MoonProContext(_configuration)) - { - var TagCode = new SqlParameter("@TagCode", newRec.TagCode); - var IdxMacchina = new SqlParameter("@IdxMacchina", newRec.IdxMacchina); - var DtRec = new SqlParameter("@DtRec", newRec.DtRec); - var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr); - var ValString = new SqlParameter("@ValString", newRec.ValString); - - var result = await dbCtx - .Database - .ExecuteSqlRawAsync("exec dbo.stp_DD_insertQuery @TagCode, @IdxMacchina, @DtRec, @MatrOpr, @ValString", TagCode, IdxMacchina, DtRec, MatrOpr, ValString); - // indico eseguito! - fatto = result > 0; - } - return fatto; - } - - /// - /// Aggiunta record RegistroScarti - /// - /// - /// - /// - /// - /// - /// - public List RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo) - { - List dbResult = new List(); - using (var dbCtx = new MoonProContext(_configuration)) - { - var TagCode = new SqlParameter("@TagCode", tagCode); - var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina); - var MatrOpr = new SqlParameter("@MatrOpr", matrOpr); - var IdxODL = new SqlParameter("@IdxODL", idxODL); - var DtFrom = new SqlParameter("@DataFrom", dataFrom); - var DtTo = new SqlParameter("@DataTo", dataTo); - - dbResult = dbCtx - .DbSetRegDich - .FromSqlRaw("EXEC stp_DD_getFilt @TagCode, @IdxMacchina, @MatrOpr, @IdxODL, @DataFrom, @DataTo", TagCode, IdxMacchina, MatrOpr, IdxODL, DtFrom, DtTo) - .AsNoTracking() - .ToList(); - } - return dbResult; - } /// /// Effettua ricalcolo MSE x macchina indicata /// diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 202f3243..07b6dedc 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -794,6 +794,29 @@ namespace MP.Data.Services return answ; } + /// + /// Aggiunta record Registro Dichiarazioni + /// + /// + /// + public async Task RegDichiarUpdate(RegistroDichiarazioniModel newRec) + { + bool answ = false; + try + { + // inserisco evento + answ = await dbTabController.RegDichiarUpdate(newRec); + // reset cache eventi/commenti + await FlushCache("RegDichiar"); + } + catch (Exception exc) + { + string logMsg = $"Eccezione in RegDichiarUpdate | macchina: {newRec.IdxMacchina} | DtRec: {newRec.DtRec} | TagCode: {newRec.TagCode} | MatrOpr: {newRec.MatrOpr} | ValString {newRec.ValString}{Environment.NewLine}{exc}"; + Log.Error(logMsg); + } + return answ; + } + /// /// Restituisce elenco RS filtrato /// From adf48ce6fe3f6e41ff2e22715d43ee3a9240a7aa Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 19 Oct 2023 16:00:31 +0200 Subject: [PATCH 004/113] fix grafici machine block --- MP-TAB-SERV/Components/MachineBlock.razor | 6 +++--- MP-TAB-SERV/Components/MachineBlock.razor.cs | 4 ++-- MP-TAB-SERV/Components/MachineBlock.razor.css | 3 +-- MP-TAB-SERV/Components/MachineBlock.razor.less | 3 +-- MP-TAB-SERV/Components/MachineBlock.razor.min.css | 2 +- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- 9 files changed, 12 insertions(+), 14 deletions(-) diff --git a/MP-TAB-SERV/Components/MachineBlock.razor b/MP-TAB-SERV/Components/MachineBlock.razor index 7a76a500..697db176 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor +++ b/MP-TAB-SERV/Components/MachineBlock.razor @@ -106,7 +106,7 @@ else
*@ if (Width > 640) { -
+
@*@RecMSE.CodMacchina*@ @RecMSE.CodMacchina
@@ -118,8 +118,8 @@ else
-
-
+
+
@RecMSE.DescrizioneStato:   @(formatDurata(RecMSE.Durata))
diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.cs b/MP-TAB-SERV/Components/MachineBlock.razor.cs index 8506709b..1ca77a1a 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.cs +++ b/MP-TAB-SERV/Components/MachineBlock.razor.cs @@ -60,11 +60,11 @@ namespace MP_TAB_SERV.Components innerCircleVals.Clear(); outerCircleVals.Clear(); currMaxVal = int.Parse(RecMSE.NumPezzi.ToString()!); - innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = RecMSE.PezziProd }); + innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#FFC107", Value = RecMSE.PezziProd }); if (RecMSE.PezziConf > 0) { - innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = RecMSE.PezziConf }); + innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#198754", Value = RecMSE.PezziConf }); } if (RecMSE.extraVal > 0) diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.css b/MP-TAB-SERV/Components/MachineBlock.razor.css index b19ec40a..63ec5c8b 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.css +++ b/MP-TAB-SERV/Components/MachineBlock.razor.css @@ -39,7 +39,6 @@ /* area semafori*/ .sVe { text-align: left; - background: #009036; background: #198754; /*background: rgba(0,255,80,.6);*/ /*padding: 0px 4px 0px 4px;*/ @@ -48,7 +47,7 @@ } .sGi { text-align: left; - background: #ffec00; + background: #ffc107; background: rgba(255, 220, 0, 0.6); color: #fff; /*padding: 0px 4px 0px 4px;*/ diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.less b/MP-TAB-SERV/Components/MachineBlock.razor.less index f79ce3ec..fd29b6ab 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.less +++ b/MP-TAB-SERV/Components/MachineBlock.razor.less @@ -42,7 +42,6 @@ /* area semafori*/ .sVe { text-align: left; - background: #009036; background: #198754; /*background: rgba(0,255,80,.6);*/ /*padding: 0px 4px 0px 4px;*/ @@ -52,7 +51,7 @@ .sGi { text-align: left; - background: #ffec00; + background: #ffc107; background: rgba(255,220,0,.6); color: #fff; /*padding: 0px 4px 0px 4px;*/ diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.min.css b/MP-TAB-SERV/Components/MachineBlock.razor.min.css index 7492cf8d..448d6dea 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.min.css +++ b/MP-TAB-SERV/Components/MachineBlock.razor.min.css @@ -1 +1 @@ -.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTopDx{padding:.1em .4em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.7);border-radius:15px 15px 0 0;}.sVe{text-align:left;background:#009036;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffec00;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.imgFitToSize{height:7.5rem;object-fit:cover;border-radius:15px 15px 0 0;}@media(max-width:640.98px){.imgFitToSize{height:5rem;}} \ No newline at end of file +.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTopDx{padding:.1em .4em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.7);border-radius:15px 15px 0 0;}.sVe{text-align:left;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffc107;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.imgFitToSize{height:7.5rem;object-fit:cover;border-radius:15px 15px 0 0;}@media(max-width:640.98px){.imgFitToSize{height:5rem;}} \ 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 591dfdee..3c34cd23 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.2310.1619 + 6.16.2310.1915 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 26516930..8e5a4d07 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2310.1619

+

Versione: 6.16.2310.1915


Note di rilascio: