From 0b3822a40206daf0605d05726d7a017d9f35bd6f Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 6 Oct 2023 08:17:55 +0200 Subject: [PATCH 1/3] modificato numero di fermate per riga --- MP-TAB-SERV/Components/ProdStopMan.razor | 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 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MP-TAB-SERV/Components/ProdStopMan.razor b/MP-TAB-SERV/Components/ProdStopMan.razor index 5ab071fd..5ec229f9 100644 --- a/MP-TAB-SERV/Components/ProdStopMan.razor +++ b/MP-TAB-SERV/Components/ProdStopMan.razor @@ -1,4 +1,4 @@ -
+
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 1c95f69b..6aaef35d 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.517 + 6.16.2310.608 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 7c4adefc..fab5472c 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.517

+

Versione: 6.16.2310.608


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 4dcc099c..bf165561 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.517 +6.16.2310.608 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 2cb14e29..514f9dc9 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.517 + 6.16.2310.608 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 From b7585ee10b4f2365e8ccbd87d039a6a40a6b1fb8 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 6 Oct 2023 09:37:03 +0200 Subject: [PATCH 2/3] ok anagrafica eventi da stored --- MP-TAB-SERV/Components/ProdStopMan.razor | 2 +- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Pages/ProdStop.razor | 2 +- MP-TAB-SERV/Pages/ProdStop.razor.cs | 10 +++++----- 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 | 13 +++++++++---- MP.Data/DatabaseModels/AnagEventiModel.cs | 6 +----- MP.Data/Services/TabDataService.cs | 6 +++--- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/MP-TAB-SERV/Components/ProdStopMan.razor b/MP-TAB-SERV/Components/ProdStopMan.razor index 5ec229f9..f9cfd433 100644 --- a/MP-TAB-SERV/Components/ProdStopMan.razor +++ b/MP-TAB-SERV/Components/ProdStopMan.razor @@ -3,7 +3,7 @@
    - diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 6aaef35d..1589510b 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.608 + 6.16.2310.609 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Pages/ProdStop.razor b/MP-TAB-SERV/Pages/ProdStop.razor index c91e88af..db29a88a 100644 --- a/MP-TAB-SERV/Pages/ProdStop.razor +++ b/MP-TAB-SERV/Pages/ProdStop.razor @@ -20,7 +20,7 @@ else
    @foreach(var item in events2show) { - + }
    } diff --git a/MP-TAB-SERV/Pages/ProdStop.razor.cs b/MP-TAB-SERV/Pages/ProdStop.razor.cs index c8695340..51dbcf8c 100644 --- a/MP-TAB-SERV/Pages/ProdStop.razor.cs +++ b/MP-TAB-SERV/Pages/ProdStop.razor.cs @@ -40,13 +40,13 @@ namespace MP_TAB_SERV.Pages { CurrMSE = await MsgServ.GetMachineMse(IdxMacc); } + var eventsAll = await TabSrv.AnagEventiGetAll(IdxMacc); + if (eventsAll != null) + { + events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.Label).ToList(); + } } - var eventsAll = await TabSrv.AnagEventiGetAll(); - if(eventsAll != null) - { - events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x=>x.Nome).ToList(); - } } #endregion Private Methods diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index fab5472c..0e9adc94 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.608

    +

    Versione: 6.16.2310.609


    Note di rilascio:
    • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index bf165561..191a6abe 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.608 +6.16.2310.609 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 514f9dc9..eb46eef9 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.608 + 6.16.2310.609 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 94cf865e..a0add837 100644 --- a/MP.Data/Controllers/MpTabController.cs +++ b/MP.Data/Controllers/MpTabController.cs @@ -6,6 +6,7 @@ using NLog; using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; namespace MP.Data.Controllers { @@ -27,15 +28,19 @@ namespace MP.Data.Controllers /// Restituisce l'anagrafica eventi per intero /// /// - public List AnagEventiGetAll() + public List AnagEventiGetAll(string IdxMac) { List dbResult = new List(); using (var dbCtx = new MoonProContext(_configuration)) { + var IdxMacch = new SqlParameter("@idxMacchina", IdxMac); + dbResult = dbCtx - .DbSetAnagEventi - .AsNoTracking() - .ToList(); + .DbSetAnagEventi + .FromSqlRaw("exec dbo.stp_vseb_getByIdxMacchinaFull @idxMacchina", IdxMacch) + .AsNoTracking() + .AsEnumerable() + .ToList(); } return dbResult; } diff --git a/MP.Data/DatabaseModels/AnagEventiModel.cs b/MP.Data/DatabaseModels/AnagEventiModel.cs index 99c04d3e..b197394a 100644 --- a/MP.Data/DatabaseModels/AnagEventiModel.cs +++ b/MP.Data/DatabaseModels/AnagEventiModel.cs @@ -13,12 +13,8 @@ namespace MP.Data.DatabaseModels { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int IdxTipo { get; set; } = 0; - public string Nome { get; set; } = ""; - public string TabAzione { get; set; } = ""; - public string Azione { get; set; } = ""; - public string KeyEvento { get; set; } = ""; + public string Label { get; set; } = ""; public bool EventoTablet { get; set; } = true; - public string NoteEvento { get; set; } = ""; public string CssClass { get; set; } = ""; public string Icon { get; set; } = ""; } diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 2e0a3dc4..b7ed1ff4 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -52,7 +52,7 @@ namespace MP.Data.Services #region Public Methods - public async Task> AnagEventiGetAll() + public async Task> AnagEventiGetAll(string IdxMacch) { // setup parametri costanti DateTime startDate = new DateTime(2000, 1, 1); @@ -62,7 +62,7 @@ namespace MP.Data.Services sw.Start(); List? result = new List(); // cerco in redis... - string currKey = $"{redisBaseKey}:AnagEventi"; + string currKey = $"{redisBaseKey}:AnagEventi:{IdxMacch}"; RedisValue rawData = await redisDb.StringGetAsync(currKey); if (!string.IsNullOrEmpty($"{rawData}")) { @@ -71,7 +71,7 @@ namespace MP.Data.Services } else { - result = dbTabController.AnagEventiGetAll(); + result = dbTabController.AnagEventiGetAll(IdxMacch); // serializzp e salvo... rawData = JsonConvert.SerializeObject(result); await redisDb.StringSetAsync(currKey, rawData, LongCache); From b62c8cab23eb29cc75a67755e9fadb842f4331c9 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 6 Oct 2023 10:01:29 +0200 Subject: [PATCH 3/3] fix grafico --- MP-TAB-SERV/Components/ProdStopMan.razor | 8 ++++---- MP-TAB-SERV/Pages/ProdStop.razor | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MP-TAB-SERV/Components/ProdStopMan.razor b/MP-TAB-SERV/Components/ProdStopMan.razor index f9cfd433..4ebf641d 100644 --- a/MP-TAB-SERV/Components/ProdStopMan.razor +++ b/MP-TAB-SERV/Components/ProdStopMan.razor @@ -1,10 +1,10 @@ -
      -
      +
      +
      -
      diff --git a/MP-TAB-SERV/Pages/ProdStop.razor b/MP-TAB-SERV/Pages/ProdStop.razor index db29a88a..b6be1b82 100644 --- a/MP-TAB-SERV/Pages/ProdStop.razor +++ b/MP-TAB-SERV/Pages/ProdStop.razor @@ -17,7 +17,7 @@ else Dich Retroattiva
      -
      +
      @foreach(var item in events2show) {