From 728feeab665fd66cb6167644bcba56b75b16db2c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 20 May 2021 19:22:05 +0200 Subject: [PATCH 01/13] Aggiunta apgiona diario a cache --- MP.Data/Controllers/MpStatsController.cs | 20 ++++++-- MP.Stats/Data/MpStatsService.cs | 21 +++++++- MP.Stats/Pages/Diario.razor | 65 +++++++++++------------- MP.Stats/Pages/Diario.razor.cs | 29 ++++++++--- 4 files changed, 88 insertions(+), 47 deletions(-) diff --git a/MP.Data/Controllers/MpStatsController.cs b/MP.Data/Controllers/MpStatsController.cs index 90de21ef..1fdb1f9b 100644 --- a/MP.Data/Controllers/MpStatsController.cs +++ b/MP.Data/Controllers/MpStatsController.cs @@ -135,15 +135,27 @@ namespace MP.Data.Controllers /// /// /// - public List StatDdbGetAll(int numRecord, string searchVal = "") + public List StatDdbGetAll(DateTime DataStart, DateTime DataEnd, string IdxMacchina, int IdxODL, string KeyRichiesta, string CodArticolo) { List dbResult = new List(); + //dbResult = dbCtx + // . + // .Where(x => x.Descrizione.Contains(searchVal) || x.IdxMacchina.Contains(searchVal) || x.CodArticolo.Contains(searchVal) || x.KeyRichiesta.Contains(searchVal) || string.IsNullOrEmpty(searchVal)) + // .OrderByDescending(x => x.InizioStato) + // .Take(numRecord) + // .ToList(); + + var dataFrom = new SqlParameter("@dataFrom", DataStart); + var dataTo = new SqlParameter("@dataTo", DataEnd); + var idxMacchina = new SqlParameter("@idxMacchina", IdxMacchina); + var idxODL = new SqlParameter("@IdxODL", IdxODL); + var keyRichiesta = new SqlParameter("@KeyRichiesta", KeyRichiesta); + var codArticolo = new SqlParameter("@CodArticolo", CodArticolo); + dbResult = dbCtx .DbSetDdbTurni - .Where(x => x.Descrizione.Contains(searchVal) || x.IdxMacchina.Contains(searchVal) || x.CodArticolo.Contains(searchVal) || x.KeyRichiesta.Contains(searchVal) || string.IsNullOrEmpty(searchVal)) - .OrderByDescending(x => x.InizioStato) - .Take(numRecord) + .FromSqlRaw("EXEC stp_UI_DDBTurni_GetByFilter @dataFrom,@dataTo,@idxMacchina,@IdxODL,@KeyRichiesta,@CodArticolo", dataFrom, dataTo, idxMacchina, idxODL, keyRichiesta, codArticolo) .ToList(); return dbResult; diff --git a/MP.Stats/Data/MpStatsService.cs b/MP.Stats/Data/MpStatsService.cs index 4b2a9352..7455e85d 100644 --- a/MP.Stats/Data/MpStatsService.cs +++ b/MP.Stats/Data/MpStatsService.cs @@ -112,9 +112,26 @@ namespace MP.Stats.Data return Task.FromResult(dbController.StatControlliGetAll(DataStart, DataEnd, IdxMacchina, IdxODL, KeyRichiesta, CodArticolo).ToArray()); } - public Task StatDdbGetAll(int numRecord, string searchVal = "") + public async Task> StatDdbGetAll(SelectData CurrFilter, string searchVal = "") { - return Task.FromResult(dbController.StatDdbGetAll(numRecord, searchVal).ToArray()); + //return Task.FromResult(dbController.StatDdbGetAll(numRecord, searchVal).ToArray()); + List dbResult = new List(); + string cacheKey = getCacheKey("MP:STATS:DDBT", CurrFilter); + string rawData; + var redisDataList = await distributedCache.GetAsync(cacheKey); + if (redisDataList != null) + { + rawData = Encoding.UTF8.GetString(redisDataList); + dbResult = JsonConvert.DeserializeObject>(rawData); + } + else + { + dbResult = dbController.StatDdbGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); + rawData = JsonConvert.SerializeObject(dbResult); + redisDataList = Encoding.UTF8.GetBytes(rawData); + await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + } + return await Task.FromResult(dbResult); } public Task StatMacchineGetAll() diff --git a/MP.Stats/Pages/Diario.razor b/MP.Stats/Pages/Diario.razor index b9769c30..94f8c0ef 100644 --- a/MP.Stats/Pages/Diario.razor +++ b/MP.Stats/Pages/Diario.razor @@ -1,7 +1,6 @@ @page "/diario" @using MP.Stats.Components -@using MP.Stats.Data
@@ -12,40 +11,38 @@
- @if (currRecord != null) +
+
+ +
+
+ @if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0) { - @**@ - } - @if (ListRecords == null) - { -
+ } else { -
-
- -
-
- - - - @**@ - - - - - - - - @**@ - - - - @foreach (var record in ListRecords) +
+
+ +
+
+
MacchinaDataODL/CommessaArticoloStatoDurataPezziOperatore
+ + + + + + + + + + + + + @foreach (var record in ListRecords) { - @**@ } - -
MacchinaDataODL/CommessaArticoloStatoDurataPezzi
 
@record.CodMacchina
@record.IdxMacchina
@@ -61,13 +58,13 @@
@record.TotPzProd
-
-
+ + +
+ } \ No newline at end of file diff --git a/MP.Stats/Pages/Diario.razor.cs b/MP.Stats/Pages/Diario.razor.cs index e94b882d..69ea6466 100644 --- a/MP.Stats/Pages/Diario.razor.cs +++ b/MP.Stats/Pages/Diario.razor.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using MP.Stats.Data; using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -13,9 +14,8 @@ namespace MP.Stats.Pages private MP.Data.DatabaseModels.DdbTurni currRecord = null; - private MP.Data.DatabaseModels.DdbTurni[] ListRecords; - - private MP.Data.DatabaseModels.DdbTurni[] SearchRecords; + private List ListRecords; + private List SearchRecords; #endregion Private Fields @@ -41,16 +41,28 @@ namespace MP.Stats.Pages [Inject] protected MpStatsService StatService { get; set; } + protected int totalCount + { + get + { + int answ = 0; + if (SearchRecords != null) + { + answ = SearchRecords.Count; + } + return answ; + } + } + #endregion Protected Properties #region Private Methods private async Task reloadData() { - // fare VERO filtro periodo - SearchRecords = await StatService.StatDdbGetAll(200, MessageService.SearchVal); - // SearchRecords = await StatService.StatDdbGetAll(currFilter.DateStart, currFilter.DateEnd, currFilter.IdxMacchina, currFilter.IdxOdl, currFilter.KeyRichiesta, currFilter.CodArticolo, MessageService.SearchVal); - ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToArray(); + // SearchRecords = await StatService.StatDdbGetAll(200, MessageService.SearchVal); + SearchRecords = await StatService.StatDdbGetAll(currFilter, MessageService.SearchVal); + ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); } #endregion Private Methods @@ -59,6 +71,8 @@ namespace MP.Stats.Pages protected async Task DoFilter(SelectData newFilter) { + SearchRecords = null; + ListRecords = null; currFilter = newFilter; await reloadData(); } @@ -78,6 +92,7 @@ namespace MP.Stats.Pages protected override async Task OnInitializedAsync() { numRecord = 10; + currFilter = SelectData.Init(5, 7); MessageService.ShowSearch = false; MessageService.EA_SearchUpdated += OnSeachUpdated; await reloadData(); From b5ab8f73023d6d8f84b23ac8366a268285d44685 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 20 May 2021 19:34:21 +0200 Subject: [PATCH 02/13] Fix paginatore sul cambio pagina --- MP.Stats/Components/DataPager.razor | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor index eab20eca..6b407189 100644 --- a/MP.Stats/Components/DataPager.razor +++ b/MP.Stats/Components/DataPager.razor @@ -10,7 +10,7 @@ - @for (int i = 1; i <= LastPage; ++i) + @for (int i = @startPage; i <= endPage; ++i) { var pageNum = i; @@ -57,6 +57,28 @@ reportChangePage(); } + private int numPages { get; set; } = 10; + + // calcola un set 1..numPOages centrato sulla pagina corrente... + private int startPage + { + get + { + int answ = (int)(currPage / numPages) * numPages - 2; + answ = answ > 0 ? answ : 1; + return answ; + } + } + private int endPage + { + get + { + int answ = (int)(currPage / numPages) * numPages + numPages + 2; + answ = answ < LastPage ? answ : LastPage; + return answ; + } + } + private int LastPage { get From 0e974c868d02adb45d3da34ada6a4d971d43b290 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 20 May 2021 19:35:55 +0200 Subject: [PATCH 03/13] Fix doppio filtro diario... --- MP.Stats/Pages/Diario.razor | 77 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/MP.Stats/Pages/Diario.razor b/MP.Stats/Pages/Diario.razor index 94f8c0ef..73c79d77 100644 --- a/MP.Stats/Pages/Diario.razor +++ b/MP.Stats/Pages/Diario.razor @@ -18,50 +18,47 @@ @if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0) { - + } else { -
-
- +
+
+ + + + + + + + + + + + + + @foreach (var record in ListRecords) + { + + + + + + + + + + } + +
MacchinaDataODL/CommessaArticoloStatoDurataPezzi
+
@record.CodMacchina
+
@record.IdxMacchina
+
+
@record.InizioStato.ToString("yyyy.MM.dd")
+
@record.InizioStato.ToString("ddd HH:mm.ss")
+
@record.IdxOdl | @record.KeyRichiesta@record.CodArticolo@record.Descrizione@record.DurataMin@record.TotPzProd
+
-
- - - - - - - - - - - - - - @foreach (var record in ListRecords) - { - - - - - - - - - - } - -
MacchinaDataODL/CommessaArticoloStatoDurataPezzi
-
@record.CodMacchina
-
@record.IdxMacchina
-
-
@record.InizioStato.ToString("yyyy.MM.dd")
-
@record.InizioStato.ToString("ddd HH:mm.ss")
-
@record.IdxOdl | @record.KeyRichiesta@record.CodArticolo@record.Descrizione@record.DurataMin@record.TotPzProd
-
-
}
- @totalCount records + @if (showLoading) + { + + + + } + else + { + @totalCountrecords + }
@@ -87,6 +96,9 @@ } } + [Parameter] + public bool showLoading { get; set; } = false; + [Parameter] public int totalCount { get; set; } = 0; diff --git a/MP.Stats/Pages/Diario.razor b/MP.Stats/Pages/Diario.razor index 73c79d77..4126fe6c 100644 --- a/MP.Stats/Pages/Diario.razor +++ b/MP.Stats/Pages/Diario.razor @@ -18,50 +18,50 @@ @if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0) { - + } else { -
-
- - - - - - - - - - - - - - @foreach (var record in ListRecords) +
+
+
MacchinaDataODL/CommessaArticoloStatoDurataPezzi
+ + + + + + + + + + + + + @foreach (var record in ListRecords) { - - - - - - - - - + + + + + + + + + } - -
MacchinaDataODL/CommessaArticoloStatoDurataPezzi
-
@record.CodMacchina
-
@record.IdxMacchina
-
-
@record.InizioStato.ToString("yyyy.MM.dd")
-
@record.InizioStato.ToString("ddd HH:mm.ss")
-
@record.IdxOdl | @record.KeyRichiesta@record.CodArticolo@record.Descrizione@record.DurataMin@record.TotPzProd
+
@record.CodMacchina
+
@record.IdxMacchina
+
+
@record.InizioStato.ToString("yyyy.MM.dd")
+
@record.InizioStato.ToString("ddd HH:mm.ss")
+
@record.IdxOdl | @record.KeyRichiesta@record.CodArticolo@record.Descrizione@record.DurataMin@record.TotPzProd
-
+ +
+ } \ No newline at end of file diff --git a/MP.Stats/Pages/Diario.razor.cs b/MP.Stats/Pages/Diario.razor.cs index bec9f26f..992e8e1e 100644 --- a/MP.Stats/Pages/Diario.razor.cs +++ b/MP.Stats/Pages/Diario.razor.cs @@ -23,6 +23,7 @@ namespace MP.Stats.Pages private SelectData currFilter { get; set; } = new SelectData(); private int currPage { get; set; } = 1; + private bool isLoading { get; set; } = false; private int numRecord { get; set; } = 10; #endregion Private Properties @@ -60,10 +61,10 @@ namespace MP.Stats.Pages private async Task reloadData() { - SearchRecords = null; - ListRecords = null; + isLoading = true; SearchRecords = await StatService.StatDdbGetAll(currFilter, MessageService.SearchVal); ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); + isLoading = false; } #endregion Private Methods @@ -72,6 +73,8 @@ namespace MP.Stats.Pages protected async Task DoFilter(SelectData newFilter) { + SearchRecords = null; + ListRecords = null; currFilter = newFilter; await reloadData(); } diff --git a/MP.Stats/Pages/Oee.razor b/MP.Stats/Pages/Oee.razor index d48e8323..97424547 100644 --- a/MP.Stats/Pages/Oee.razor +++ b/MP.Stats/Pages/Oee.razor @@ -18,49 +18,49 @@ @if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0) { - + } else { -
-
- - - - - - - - - - - - - - @foreach (var record in ListRecords) +
+
+
DataTurnoMacchinaArticoloDurataPezziOEE %
+ + + + + + + + + + + + + @foreach (var record in ListRecords) { - - - - - - - - - + + + + + + + + + } - -
DataTurnoMacchinaArticoloDurataPezziOEE %
-
@record.DataRif.ToString("yyyy.MM.dd")
-
@record.Turno -
@record.CodMacchina
-
@record.IdxMacchina
-
@record.CodArticolo@record.TotPeriodo.ToString("N2")@record.TotPz@record.OEE.ToString("P2")
+
@record.DataRif.ToString("yyyy.MM.dd")
+
@record.Turno +
@record.CodMacchina
+
@record.IdxMacchina
+
@record.CodArticolo@record.TotPeriodo.ToString("N2")@record.TotPz@record.OEE.ToString("P2")
-
+ +
+ } \ No newline at end of file diff --git a/MP.Stats/Pages/Oee.razor.cs b/MP.Stats/Pages/Oee.razor.cs index d5fd3934..310db664 100644 --- a/MP.Stats/Pages/Oee.razor.cs +++ b/MP.Stats/Pages/Oee.razor.cs @@ -24,6 +24,7 @@ namespace MP.Stats.Pages private SelectData currFilter { get; set; } = new SelectData(); private int currPage { get; set; } = 1; + private bool isLoading { get; set; } = false; private int numRecord { get; set; } = 10; #endregion Private Properties @@ -61,8 +62,10 @@ namespace MP.Stats.Pages private async Task reloadData() { + isLoading = true; SearchRecords = await StatService.StatTurniOeeGetAllCached(currFilter, MessageService.SearchVal); ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); + isLoading = false; } #endregion Private Methods From 229980b54837019277daee52fd552092a212748b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 21 May 2021 08:11:33 +0200 Subject: [PATCH 06/13] fix display --- MP.Stats/Components/DataPager.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor index 6d8d6074..32f4c64f 100644 --- a/MP.Stats/Components/DataPager.razor +++ b/MP.Stats/Components/DataPager.razor @@ -36,7 +36,7 @@ } else { - @totalCountrecords + @totalCount records } From 50079ddb37f373c0f3907e6d9fa02d28512ba5a4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 21 May 2021 13:17:12 +0200 Subject: [PATCH 07/13] INSERIMENTO SERVIZIO TIMER (DA APPROFONDIRE) --- MP.Stats/Services/BlazorTimer.cs | 49 ++++++++++++++++++++++++++++++++ MP.Stats/Startup.cs | 1 + 2 files changed, 50 insertions(+) create mode 100644 MP.Stats/Services/BlazorTimer.cs diff --git a/MP.Stats/Services/BlazorTimer.cs b/MP.Stats/Services/BlazorTimer.cs new file mode 100644 index 00000000..2836323d --- /dev/null +++ b/MP.Stats/Services/BlazorTimer.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Timers; + +namespace MP.Stats.Services +{ + /// + /// Timer a consumo + /// https://wellsb.com/csharp/aspnet/blazor-timer-navigate-programmatically/ + /// (da verificare) + /// + public class BlazorTimer + { + #region Private Fields + + private Timer _timer; + + #endregion Private Fields + + #region Public Events + + public event Action OnElapsed; + + #endregion Public Events + + #region Private Methods + + private void NotifyTimerElapsed(Object source, ElapsedEventArgs e) + { + OnElapsed?.Invoke(); + _timer.Dispose(); + } + + #endregion Private Methods + + #region Public Methods + + public void SetTimer(double interval) + { + _timer = new Timer(interval); + _timer.Elapsed += NotifyTimerElapsed; + _timer.Enabled = true; + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP.Stats/Startup.cs b/MP.Stats/Startup.cs index 905e67a9..42f0661d 100644 --- a/MP.Stats/Startup.cs +++ b/MP.Stats/Startup.cs @@ -95,6 +95,7 @@ namespace MP.Stats services.AddRazorPages(); services.AddServerSideBlazor(); services.AddSingleton(Configuration); + services.AddTransient(); #if false services.AddDbContext(options => From 61db2f33e59377b68b0046578bdb4a45fe12c7e1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 21 May 2021 13:17:19 +0200 Subject: [PATCH 08/13] update pager con avanzamento random --- MP.Stats/Components/DataPager.razor | 49 ++++++++++++++++++++++++----- MP.Stats/Data/MpStatsService.cs | 16 ++++++++-- 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor index 32f4c64f..03cdd0d5 100644 --- a/MP.Stats/Components/DataPager.razor +++ b/MP.Stats/Components/DataPager.razor @@ -1,4 +1,6 @@ -
+@inject Services.BlazorTimer Timer + +
@@ -28,16 +30,20 @@ }
+ @if (!showLoading) + { + @totalCount records + } +
+
+
+
@if (showLoading) { - + } - else - { - @totalCount records - }
@@ -96,8 +102,37 @@ } } + protected override Task OnInitializedAsync() + { + showLoading = false; + return base.OnInitializedAsync(); + } + + protected int percLoading { get; set; } = 0; + + protected bool _showLoading = false; + [Parameter] - public bool showLoading { get; set; } = false; + public bool showLoading + { + get + { + return _showLoading; + } + set + { + if (value) + { + Random random = new Random(); + percLoading = random.Next(30, 90); + } + else + { + percLoading = 5; + } + _showLoading = value; + } + } [Parameter] public int totalCount { get; set; } = 0; diff --git a/MP.Stats/Data/MpStatsService.cs b/MP.Stats/Data/MpStatsService.cs index 7455e85d..cc9fa595 100644 --- a/MP.Stats/Data/MpStatsService.cs +++ b/MP.Stats/Data/MpStatsService.cs @@ -24,8 +24,6 @@ namespace MP.Stats.Data private readonly IDistributedCache distributedCache; private readonly IMemoryCache memoryCache; - private DistributedCacheEntryOptions cacheOpt; - /// /// Durata assoluta massima della cache /// @@ -42,6 +40,7 @@ namespace MP.Stats.Data #region Protected Fields protected static string connStringBBM = ""; + protected static string connStringFatt = ""; #endregion Protected Fields @@ -61,7 +60,6 @@ namespace MP.Stats.Data // conf cache this.memoryCache = memoryCache; this.distributedCache = distributedCache; - cacheOpt = new DistributedCacheEntryOptions().SetAbsoluteExpiration(DateTime.Now.AddMinutes(chAbsExp)).SetSlidingExpiration(TimeSpan.FromMinutes(chSliExp)); // conf DB string connStr = _configuration.GetConnectionString("Mp.Stats"); if (string.IsNullOrEmpty(connStr)) @@ -80,6 +78,18 @@ namespace MP.Stats.Data #endregion Public Constructors + #region Private Properties + + private DistributedCacheEntryOptions cacheOpt + { + get + { + return new DistributedCacheEntryOptions().SetAbsoluteExpiration(DateTime.Now.AddMinutes(chAbsExp)).SetSlidingExpiration(TimeSpan.FromMinutes(chSliExp)); + } + } + + #endregion Private Properties + #region Protected Methods protected string getCacheKey(string TableName, SelectData CurrFilter) From 2952046ae25ff311aa5f4e35ef0c950116cbad7c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 21 May 2021 13:38:10 +0200 Subject: [PATCH 09/13] COmpletata review pagiazione --- MP.Stats/Components/DataPager.razor | 37 ++++++++++++-- MP.Stats/Components/LoadingData.razor | 4 +- MP.Stats/Pages/Index.razor | 2 +- MP.Stats/Pages/Oee.razor | 70 +++++++++++++-------------- 4 files changed, 71 insertions(+), 42 deletions(-) diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor index 03cdd0d5..424d7640 100644 --- a/MP.Stats/Components/DataPager.razor +++ b/MP.Stats/Components/DataPager.razor @@ -9,7 +9,12 @@ - + + + + + + @for (int i = @startPage; i <= endPage; ++i) @@ -21,9 +26,14 @@ } + + + + + - + @@ -79,7 +89,7 @@ { get { - int answ = (int)(currPage / numPages) * numPages - 2; + int answ = (int)(currPage / numPages) * numPages; answ = answ > 0 ? answ : 1; return answ; } @@ -88,7 +98,26 @@ { get { - int answ = (int)(currPage / numPages) * numPages + numPages + 2; + int answ = (int)(currPage / numPages) * numPages + numPages; + answ = answ < LastPage ? answ : LastPage; + return answ; + } + } + + private int prevBlock + { + get + { + int answ = currPage - numPages; + answ = answ > 0 ? answ : 1; + return answ; + } + } + private int nextBlock + { + get + { + int answ = currPage + numPages; answ = answ < LastPage ? answ : LastPage; return answ; } diff --git a/MP.Stats/Components/LoadingData.razor b/MP.Stats/Components/LoadingData.razor index 4eb9ffb3..2ffebab8 100644 --- a/MP.Stats/Components/LoadingData.razor +++ b/MP.Stats/Components/LoadingData.razor @@ -1,5 +1,5 @@ -
-
+
+

loading data

diff --git a/MP.Stats/Pages/Index.razor b/MP.Stats/Pages/Index.razor index f2d91a2f..8466112e 100644 --- a/MP.Stats/Pages/Index.razor +++ b/MP.Stats/Pages/Index.razor @@ -28,7 +28,7 @@
- + diff --git a/MP.Stats/Pages/Oee.razor b/MP.Stats/Pages/Oee.razor index 97424547..3b2527fa 100644 --- a/MP.Stats/Pages/Oee.razor +++ b/MP.Stats/Pages/Oee.razor @@ -16,48 +16,48 @@
- @if (totalCount == 0 || ListRecords == null || ListRecords.Count() == 0) + @if (totalCount == 0 || ListRecords == null) { - + } else { -
-
- - - - - - - - - - - - - - @foreach (var record in ListRecords) +
+
+
DataTurnoMacchinaArticoloDurataPezziOEE %
+ + + + + + + + + + + + + @foreach (var record in ListRecords) { - - - - - - - - - + + + + + + + + + } - -
DataTurnoMacchinaArticoloDurataPezziOEE %
-
@record.DataRif.ToString("yyyy.MM.dd")
-
@record.Turno -
@record.CodMacchina
-
@record.IdxMacchina
-
@record.CodArticolo@record.TotPeriodo.ToString("N2")@record.TotPz@record.OEE.ToString("P2")
+
@record.DataRif.ToString("yyyy.MM.dd")
+
@record.Turno +
@record.CodMacchina
+
@record.IdxMacchina
+
@record.CodArticolo@record.TotPeriodo.ToString("N2")@record.TotPz@record.OEE.ToString("P2")
+ + +
-
}