From 136b25fd7798f0f1dc4d2d76b914bdfcec3b24cc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 6 Dec 2025 11:31:29 +0100 Subject: [PATCH] Update display workable --- .../RestPayload/WorkLoadDetailDTO.cs | 41 ++++++++-- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OrderRowMan.razor | 79 ++++++++++++++----- Lux.UI/Components/Compo/OrderRowMan.razor.cs | 30 ++++++- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 127 insertions(+), 33 deletions(-) diff --git a/EgwCoreLib.Lux.Core/RestPayload/WorkLoadDetailDTO.cs b/EgwCoreLib.Lux.Core/RestPayload/WorkLoadDetailDTO.cs index a6a1ed7a..a7f27b99 100644 --- a/EgwCoreLib.Lux.Core/RestPayload/WorkLoadDetailDTO.cs +++ b/EgwCoreLib.Lux.Core/RestPayload/WorkLoadDetailDTO.cs @@ -31,10 +31,13 @@ namespace EgwCoreLib.Lux.Core.RestPayload if (!workable) { var listKo = new List(); - // cerco l'insieme dei pezzi DAVVERO non lavorabili + // pezzi lavorabili + listWorkable = MachineCalc.Utils.IntersectTags(machineCalcResults, p => p.CalcResult == Enums.PartVerificationResult.MACHINABLE).ToList(); + // cerco l'insieme dei pezzi NON lavorabili listUnWorkable = MachineCalc.Utils.IntersectTags(machineCalcResults, p => p.CalcResult != Enums.PartVerificationResult.MACHINABLE).ToList(); workable = !listUnWorkable.Any(); numKo = listUnWorkable.Count(); + numOk = listWorkable.Count(); } LoadDetail = MachineCalc.Utils.CalculateIntersections(machineCalcResults); @@ -51,13 +54,6 @@ namespace EgwCoreLib.Lux.Core.RestPayload { get => string.Join(", ", machineCalcResults.Select(x => x.Name).OrderBy(x => x).ToList()); } - /// - /// Num Macchine - /// - public int NumMachines - { - get => machineCalcResults.Count(); - } /// /// Elenco delle etichette parts non OK @@ -67,6 +63,14 @@ namespace EgwCoreLib.Lux.Core.RestPayload get => listUnWorkable ?? new List(); } + /// + /// Elenco etichette parts OK + /// + public List ListWorkable + { + get => listWorkable ?? new List(); + } + /// /// Dettaglio combinazioni carico di lavoro /// @@ -77,11 +81,30 @@ namespace EgwCoreLib.Lux.Core.RestPayload get => machineCalcResults; } + /// + /// Numero di parts non lavorabili + /// public int NumKo { get => numKo; } + /// + /// Num Macchine + /// + public int NumMachines + { + get => machineCalcResults.Count(); + } + + /// + /// Numero di parts lavorabili + /// + public int NumOk + { + get => numOk; + } + /// /// Tempo massimo complessivo in ORE /// @@ -113,8 +136,10 @@ namespace EgwCoreLib.Lux.Core.RestPayload #region Private Fields private List? listUnWorkable = null; + private List? listWorkable = null; private List machineCalcResults = new List(); private int numKo = 0; + private int numOk = 0; private string uID = ""; private bool workable = false; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 0d7c1538..b74db9e4 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2512.0610 + 0.9.2512.0611 diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor b/Lux.UI/Components/Compo/OrderRowMan.razor index 7b4d435b..38e3b054 100644 --- a/Lux.UI/Components/Compo/OrderRowMan.razor +++ b/Lux.UI/Components/Compo/OrderRowMan.razor @@ -94,6 +94,7 @@ else } @* Totale Marg. *@ + # OK # KO Timing @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) @@ -234,11 +235,8 @@ else
(@item.Original.UnitCost.ToString("C2"))
*@ - @item.WorkLoad.NumMachines - -
- @($"{item.Original.ProdItemQtyTot:N0}") -
+ + @item.WorkLoad.NumMachines @if (@item.WorkLoad.Workable) { @@ -248,6 +246,18 @@ else } + +
+ @($"{item.Original.ProdItemQtyTot:N0}") +
+ + + + @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { @@ -348,9 +358,8 @@ else } @($"{GrandTotNumItems:N0}") - - @GrandTotNumKo - + @GrandTotNumOk + @GrandTotNumKo @if ((GrandTotMaxTime - GrandTotMinTime) > 1) { @@ -444,8 +453,8 @@ else if (WorkLoadRecord != null) Dettaglio Carico
-
@EditRecord.Note
- @EditRecord.OrderRowUID +
Workable Parts: @WorkLoadRecord.NumOk
+ @WorkLoadRecord.ListMachines
+ + + + } + else if (CurrEditMode == EditMode.DetailOK) + { +
-
UnworkableParts: @WorkLoadRecord.NumKo
+
Unworkable Parts: @WorkLoadRecord.NumKo
@WorkLoadRecord.ListMachines
@@ -481,17 +528,11 @@ else if (WorkLoadRecord != null)
@foreach (var item in WorkLoadRecord.ListUnWorkable) { -
+
@item
}
- @*
    - @foreach (var item in WorkLoadRecord.ListUnWorkable) - { -
  • @item
  • - } -
*@
diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/OrderRowMan.razor.cs index b0142dd3..fc907394 100644 --- a/Lux.UI/Components/Compo/OrderRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OrderRowMan.razor.cs @@ -60,7 +60,12 @@ namespace Lux.UI.Components.Compo /// /// Dettaglio pezzi KO /// - DetailKO + DetailKO, + + /// + /// Dettaglio pezzi OK + /// + DetailOK } #endregion Public Enums @@ -223,6 +228,18 @@ namespace Lux.UI.Components.Compo return answ; } } + protected int GrandTotNumOk + { + get + { + int answ = 0; + if (ListRecords != null && ListRecords.Count > 0) + { + answ = ListRecords.Sum(x => x.WorkLoad.NumOk); + } + return answ; + } + } /// /// Importo totale calcolato x offerta @@ -695,6 +712,17 @@ namespace Lux.UI.Components.Compo WorkLoadRecord = detailRec; } + /// + /// salva dettaglio workload x mostrare elenco valori OK + /// + /// + protected void ShowDetailOk(WorkLoadDetailDTO detailRec) + { + CurrEditMode = EditMode.DetailOK; + EditRecord = null; + WorkLoadRecord = detailRec; + } + /// /// Restituisce struttura dettaglio WorkLoad x item /// diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index d01be4a0..6755ee58 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2512.0610 + 0.9.2512.0611 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index f7d84088..74399498 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2512.0610

+

Versione: 0.9.2512.0611


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index be6806db..358381e5 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2512.0610 +0.9.2512.0611 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 7faf08e4..26bc3c1f 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2512.0610 + 0.9.2512.0611 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false