Update display bilanciamento
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user