Update display bilanciamento

This commit is contained in:
Samuele Locatelli
2026-01-13 18:40:47 +01:00
parent 15633a06cd
commit 745dc5cddf
8 changed files with 95 additions and 19 deletions
@@ -79,10 +79,29 @@ namespace EgwCoreLib.Lux.Data.DbModel.Production
/// <summary>
/// Tempo stimato complessivo
/// - se BarQty = 0 --> MAX
/// - se BarQty > 0 --> SUM
/// </summary>
[NotMapped]
public decimal TotalEstimTime => WorkGroupList?.Sum(x => x.Value.Time) ?? 0;
public decimal TotalEstimTime
{
get
{
decimal answ = 0;
if (WorkGroupList != null && WorkGroupList.Count > 0)
{
if (WorkGroupList?.FirstOrDefault().Value.BarQty > 0)
{
answ = WorkGroupList?.Sum(x => x.Value.Time) ?? 0;
}
else
{
answ = WorkGroupList?.Max(x => x.Value.Time) ?? 0;
}
}
return answ;
}
}
/// <summary>
/// Elenco dei Plants riferiti nel gruppo