Update prod stat

This commit is contained in:
Samuele Locatelli
2023-10-03 11:32:38 +02:00
parent a8c1706283
commit 543d37c5ff
4 changed files with 196 additions and 4 deletions
+115 -3
View File
@@ -1,5 +1,117 @@
<h3>ProdStat</h3>
<div class="accordion my-2" id="accProd">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
<i class="fa fa-gear"></i><b>Statistiche produzione</b>
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accProd">
<div class="accordion-body p-1">
@if (RecMSE != null)
{
<table class="table table-sm table-striped small text-center">
<tr class="bg-dark text-light text-center fw-bold1">
<th colspan="4">
@($"ODL num: {RecMSE.IdxOdl}, iniziato {RecMSE.DataInizioOdl:ddd yyyy.MM.dd, HH:mm}")
</th>
</tr>
<tr class="stdFont" style="text-align: center; font-size: x-small">
<td>
Cod articolo
</td>
<td>
Nr pezzi lanciati
</td>
<td>
Nr pezzi confermati
</td>
<td>
Nr pezzi fatti
</td>
</tr>
<tr class="rowStyle stdFont fw-bold">
<td>
@RecMSE.CodArticolo
</td>
<td>
@($"{RecMSE.NumPezzi:N0}") pz.
</td>
<td>
@RecMSE.PezziConf pz.
</td>
<td>
(@($"{RecMSE.PezziProd:N0}") pz.)
</td>
</tr>
<tr class="stdFont" style="text-align: center;">
<td>
Efficienza Globale
</td>
<td>
Efficienza Lavoro
</td>
<td>
Efficienza Teorica
</td>
<td></td>
</tr>
<tr class="stdFont">
<td>
@RecMSE.OEE_tot
<br />
<asp:Label runat="server" ID="lblEfficienzaTotRT" />
</td>
<td>
@RecMSE.OEE_wrk
<br />
<asp:Label runat="server" ID="lblEfficienzaLavoroRT" />
</td>
<td>
@RecMSE.OEE_run
<br />
<asp:Label runat="server" ID="lblEfficienzaEffRT" />
</td>
<td></td>
</tr>
<tr class="stdFont" style="text-align: center;">
<td>
Tc Medio
</td>
<td>
Tc Lavoro
</td>
<td>
Tc Tecnico
</td>
<td>
Tc impostato
</td>
</tr>
<tr class="stdFont" style="font-weight: bold;">
<td>
<asp:Label runat="server" ID="lblTcMedio" />
<br />
<asp:Label runat="server" ID="lblTcMedioRT" Font-Bold="false" />
</td>
<td>
<asp:Label runat="server" ID="lblTcLavoro" />
<br />
<asp:Label runat="server" ID="lblTcLavoroRT" Font-Bold="false" />
</td>
<td>
<asp:Label runat="server" ID="lblTcEffettivo" />
<br />
<asp:Label runat="server" ID="lblTcEffettivoRT" Font-Bold="false" />
</td>
<td>
<asp:Label runat="server" ID="lblTcImpostato" />
</td>
</tr>
</table>
}
</div>
</div>
</div>
</div>
@code {
}
+25
View File
@@ -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
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ else
<div>
<MachineBlock RecMSE="CurrMSE" FullMode="false"></MachineBlock>
</div>
<ProdStat></ProdStat>
<ProdStat RecMSE="CurrMSE"></ProdStat>
<PrintMag></PrintMag>
<ProdConfirm></ProdConfirm>
<div class="row">
+55
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// <Auto-Generated>
@@ -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;
}
}
}
}