diff --git a/MP-TAB-SERV/Components/ProdStat.razor b/MP-TAB-SERV/Components/ProdStat.razor index c76e0975..3a0e6707 100644 --- a/MP-TAB-SERV/Components/ProdStat.razor +++ b/MP-TAB-SERV/Components/ProdStat.razor @@ -1,5 +1,117 @@ -

ProdStat

+
+
+

+ +

+
+
+ @if (RecMSE != null) + { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ @($"ODL num: {RecMSE.IdxOdl}, iniziato {RecMSE.DataInizioOdl:ddd yyyy.MM.dd, HH:mm}") +
+ Cod articolo + + Nr pezzi lanciati + + Nr pezzi confermati + + Nr pezzi fatti +
+ @RecMSE.CodArticolo + + @($"{RecMSE.NumPezzi:N0}") pz. + + @RecMSE.PezziConf pz. + + (@($"{RecMSE.PezziProd:N0}") pz.) +
+ Efficienza Globale + + Efficienza Lavoro + + Efficienza Teorica +
+ @RecMSE.OEE_tot +
+ +
+ @RecMSE.OEE_wrk +
+ +
+ @RecMSE.OEE_run +
+ +
+ Tc Medio + + Tc Lavoro + + Tc Tecnico + + Tc impostato +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ } +
+
+
+
-@code { -} diff --git a/MP-TAB-SERV/Components/ProdStat.razor.cs b/MP-TAB-SERV/Components/ProdStat.razor.cs new file mode 100644 index 00000000..4bb7f45b --- /dev/null +++ b/MP-TAB-SERV/Components/ProdStat.razor.cs @@ -0,0 +1,25 @@ +using global::Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; + +namespace MP_TAB_SERV.Components +{ + public partial class ProdStat + { + #region Public Properties + + [Parameter] + public MappaStatoExpl? RecMSE { get; set; } = null; + + #endregion Public Properties + + #region Protected Methods + + protected override async Task OnParametersSetAsync() + { + await Task.Delay(1); + } + + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/MachineDetail.razor b/MP-TAB-SERV/Pages/MachineDetail.razor index b145d4de..482510f8 100644 --- a/MP-TAB-SERV/Pages/MachineDetail.razor +++ b/MP-TAB-SERV/Pages/MachineDetail.razor @@ -10,7 +10,7 @@ else
- +
diff --git a/MP.Data/DatabaseModels/MappaStatoExpl.cs b/MP.Data/DatabaseModels/MappaStatoExpl.cs index 34052fb4..02dc2388 100644 --- a/MP.Data/DatabaseModels/MappaStatoExpl.cs +++ b/MP.Data/DatabaseModels/MappaStatoExpl.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; #nullable disable // @@ -37,5 +38,59 @@ namespace MP.Data.DatabaseModels public decimal? TCMedioRt { get; set; } public decimal? TCLavRT { get; set; } public decimal? TCEffRT { get; set; } + + [NotMapped] + public decimal TProd + { + get + { + return (TCAssegnato ?? 0) * (PezziConf ?? 0); + } + } + [NotMapped] + public string OEE_tot + { + get + { + string answ = "N/A"; + decimal denom = TempoOn ?? 1; + if (denom != 0) + { + var oee = ((TCAssegnato ?? 0) * (PezziConf ?? 0)) / denom; + answ = $"{oee:P2}"; + } + return answ; + } + } + [NotMapped] + public string OEE_wrk + { + get + { + string answ = "N/A"; + decimal denom = TempoAuto ?? 1; + if (denom != 0) + { + var oee = ((TCAssegnato ?? 0) * (PezziConf ?? 0)) / denom; + answ = $"{oee:P2}"; + } + return answ; + } + } + [NotMapped] + public string OEE_run + { + get + { + string answ = "N/A"; + decimal denom = TempoRun ?? 1; + if (denom != 0) + { + var oee = ((TCAssegnato ?? 0) * (PezziConf ?? 0)) / denom; + answ = $"{oee:P2}"; + } + return answ; + } + } } }