diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs
index de3496ce..d22bbe3a 100644
--- a/MP.SPEC/Components/ListODL.razor.cs
+++ b/MP.SPEC/Components/ListODL.razor.cs
@@ -49,16 +49,10 @@ namespace MP.SPEC.Components
ListRecords = null;
ListStati = null;
ListOdlStats = null;
- ListOdlStatsNetto = null;
statRecord = null;
GC.Collect();
}
- public string formDurata(double durataMin)
- {
- return MP.Data.Utils.FormDurata(durataMin);
- }
-
#endregion Public Methods
#region Protected Fields
@@ -108,16 +102,6 @@ namespace MP.SPEC.Components
await reloadData();
}
- protected string colorChanger(string colorCSS)
- {
- string answ = "";
- if (colorCSS == "yellow")
- {
- answ = "text-dark";
- }
- return answ;
- }
-
///
/// Richiesta invio sync all'IOB-WIN
///
@@ -224,6 +208,16 @@ namespace MP.SPEC.Components
browseRecord = currRec;
}
+ protected async Task selRecord(ODLExpModel? currRec)
+ {
+ await Task.Delay(1);
+ browseRecord = null;
+ selDtFine = DateTime.Now;
+ currRecord = currRec;
+ showStats = false;
+ ListOdlStats = null;
+ }
+
protected async Task selStatRecord(ODLExpModel? currRec)
{
browseRecord = null;
@@ -242,27 +236,6 @@ namespace MP.SPEC.Components
}
}
- protected async Task selRecord(ODLExpModel? currRec)
- {
- await Task.Delay(1);
- browseRecord = null;
- selDtFine = DateTime.Now;
- currRecord = currRec;
- showStats = false;
- ListOdlStats = null;
- ListOdlStatsNetto = null;
- }
-
- protected async Task toggleSpenta()
- {
- hideSpenta = !hideSpenta;
- await Task.Delay(1);
- if (statRecord != null)
- {
- await reloadStatsData(statRecord);
- }
- }
-
protected async Task UpdateData()
{
await selRecord(null);
@@ -285,8 +258,6 @@ namespace MP.SPEC.Components
private List
? ListOdlStats;
- private List? ListOdlStatsNetto;
-
private List? ListRecords;
private List? ListStati;
@@ -307,39 +278,6 @@ namespace MP.SPEC.Components
set => currFilter.CurrPage = value;
}
- private string durataFilt
- {
- get
- {
- string answ = "ND";
- if (statRecord != null)
- {
- if (hideSpenta)
- {
- if (ListOdlStatsNetto != null)
- {
- var tsDurata = TimeSpan.FromMinutes(ListOdlStatsNetto.Sum(x => x.TotDurata));
- if (tsDurata.TotalDays < 1)
- {
- answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
- }
- else
- {
- answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
- }
- }
- }
- else
- {
- answ = statRecord.DurataMinuti;
- }
- }
- return answ;
- }
- }
-
- private bool hideSpenta { get; set; } = false;
-
///
/// Indica se si tratti di ODL correnti
///
@@ -350,39 +288,12 @@ namespace MP.SPEC.Components
private bool isLoading { get; set; } = false;
- private string leftStringCSS
- {
- get => hideSpenta ? "text-secondary" : "text-dark fw-bold";
- }
-
- private List? ListOdlStatsAct
- {
- get
- {
- List? answ = new List();
- if (hideSpenta)
- {
- answ = ListOdlStatsNetto;
- }
- else
- {
- answ = ListOdlStats;
- }
- return answ;
- }
- }
-
private int numRecord
{
get => currFilter.NumRec;
set => currFilter.NumRec = value;
}
- private string rightStringCSS
- {
- get => hideSpenta ? "text-dark fw-bold" : "text-secondary";
- }
-
private DateTime selDtFine { get; set; } = DateTime.Now;
private bool showBrowse { get; set; } = false;
@@ -424,28 +335,6 @@ namespace MP.SPEC.Components
}
}
- private double calcolaPerc(double durata)
- {
- double answ = 0;
-
- double tot = 0;
- if (ListOdlStatsAct != null)
- {
- tot = ListOdlStatsAct.Sum(x => x.TotDurata);
-
- double perc = (durata / tot) * 100;
- if (perc > 1)
- {
- answ = Math.Round(perc, 2);
- }
- else
- {
- answ = Math.Round(perc, 4);
- }
- }
- return answ;
- }
-
///
/// Chiama metodo x chiedere sync DB
///
@@ -457,27 +346,6 @@ namespace MP.SPEC.Components
await addTask2Exe(IdxMacc, "syncDbData", "");
}
- private string pbStyle(string css)
- {
- string answ = "";
- if (ListOdlStats != null)
- {
- if (css == "yellow")
- {
- answ = "orange";
- }
- else if (css == "blue")
- {
- answ = "#2874A6";
- }
- else
- {
- answ = css;
- }
- }
- return answ;
- }
-
private async Task reloadData()
{
isLoading = true;
@@ -495,12 +363,10 @@ namespace MP.SPEC.Components
if (currRec != null)
{
ListOdlStats = await MDService.StatOdl(currRec.IdxOdl);
- ListOdlStatsNetto = ListOdlStats.Where(x => x.Semaforo != "sGr").ToList();
}
else
{
ListOdlStats = null;
- ListOdlStatsNetto = null;
}
}
diff --git a/MP.SPEC/Components/ODLPlot.razor.cs b/MP.SPEC/Components/ODLPlot.razor.cs
index f554545d..b4e0cba4 100644
--- a/MP.SPEC/Components/ODLPlot.razor.cs
+++ b/MP.SPEC/Components/ODLPlot.razor.cs
@@ -38,7 +38,6 @@ namespace MP.SPEC.Components
#region Protected Properties
- //protected DataLogFilter _SelFilter { get; set; } = new DataLogFilter();
protected int _selParam { get; set; } = -1;
[Inject]
diff --git a/MP.SPEC/Components/StatsOdl.razor b/MP.SPEC/Components/StatsOdl.razor
new file mode 100644
index 00000000..c56a8808
--- /dev/null
+++ b/MP.SPEC/Components/StatsOdl.razor
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+ |
+ N° pezzi: @statRecord.NumPezzi
+ T. Ciclo: @statRecord.Tcassegnato.ToString("N3")
+ |
+
+
+
+ @($"{@statRecord.DataInizio:yyyy/MM/dd}")
+ @($"{@statRecord.DataInizio:ddd HH:mm:ss}")
+
+
+
+
+
+ @if (@statRecord.DataFine != null)
+ {
+ @($"{@statRecord.DataFine:yyyy/MM/dd}")
+ @($"{@statRecord.DataFine:ddd HH:mm:ss}")
+ }
+ else
+ {
+
+ @($"{DateTime.Now:yyyy/MM/dd}")
+ @($"{DateTime.Now:ddd HH:mm:ss}")
+
+ }
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+ @tradFase(statRecord.KeyRichiesta)
+
+ @if (statRecord.Note != "")
+ {
+
+ @statRecord.Note
+
+ }
+ |
+
+
+ |
+
+
+
+
+
+ @if (ListOdlStatsAct != null)
+ {
+ @foreach (var stat in ListOdlStatsAct)
+ {
+
+
+
+ @stat.Descrizione
+
+
+ @(formDurata(stat.TotDurata))
+
+
+
+
+
@($"{calcolaPerc(stat.TotDurata):N1}%")
+
+
+
+ }
+ }
+
+
+
+ @if (ListOdlStats != null)
+ {
+
+
+
+
+ }
+
+
+
+
diff --git a/MP.SPEC/Components/StatsOdl.razor.cs b/MP.SPEC/Components/StatsOdl.razor.cs
new file mode 100644
index 00000000..1005517b
--- /dev/null
+++ b/MP.SPEC/Components/StatsOdl.razor.cs
@@ -0,0 +1,183 @@
+using Microsoft.AspNetCore.Components;
+using MP.Data.DatabaseModels;
+using MP.SPEC.Data;
+
+namespace MP.SPEC.Components
+{
+ public partial class StatsOdl
+ {
+ #region Public Properties
+
+ [Parameter]
+ public List? ListOdlStats { get; set; }
+
+ protected List? ListOdlStatsNetto
+ {
+ get => ListOdlStats != null ? ListOdlStats.Where(x => x.Semaforo != "sGr").ToList() : null;
+ }
+
+ [Parameter]
+ public List? ListStati { get; set; }
+
+ [Parameter]
+ public ODLExpModel statRecord { get; set; } = null!;
+
+ #endregion Public Properties
+
+ #region Protected Properties
+
+ [Inject]
+ protected MpDataService MDService { get; set; } = null!;
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected string colorChanger(string colorCSS)
+ {
+ string answ = "";
+ if (colorCSS == "yellow")
+ {
+ answ = "text-dark";
+ }
+ return answ;
+ }
+
+ protected string formDurata(double durataMin)
+ {
+ return MP.Data.Utils.FormDurata(durataMin);
+ }
+
+ protected void toggleSpenta()
+ {
+ hideSpenta = !hideSpenta;
+ }
+
+ #endregion Protected Methods
+
+ #region Private Properties
+
+ private string durataFilt
+ {
+ get
+ {
+ string answ = "ND";
+ if (statRecord != null)
+ {
+ if (hideSpenta)
+ {
+ if (ListOdlStatsNetto != null)
+ {
+ var tsDurata = TimeSpan.FromMinutes(ListOdlStatsNetto.Sum(x => x.TotDurata));
+ if (tsDurata.TotalDays < 1)
+ {
+ answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
+ }
+ else
+ {
+ answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
+ }
+ }
+ }
+ else
+ {
+ answ = statRecord.DurataMinuti;
+ }
+ }
+ return answ;
+ }
+ }
+
+ private bool hideSpenta { get; set; } = false;
+
+ private string leftStringCSS
+ {
+ get => hideSpenta ? "text-secondary" : "text-dark fw-bold";
+ }
+
+ private List? ListOdlStatsAct
+ {
+ get
+ {
+ List? answ = new List();
+ if (hideSpenta)
+ {
+ answ = ListOdlStatsNetto;
+ }
+ else
+ {
+ answ = ListOdlStats;
+ }
+ return answ;
+ }
+ }
+
+ private string rightStringCSS
+ {
+ get => hideSpenta ? "text-dark fw-bold" : "text-secondary";
+ }
+
+ #endregion Private Properties
+
+ #region Private Methods
+
+ private double calcolaPerc(double durata)
+ {
+ double answ = 0;
+
+ double tot = 0;
+ if (ListOdlStatsAct != null)
+ {
+ tot = ListOdlStatsAct.Sum(x => x.TotDurata);
+
+ double perc = (durata / tot) * 100;
+ if (perc > 1)
+ {
+ answ = Math.Round(perc, 2);
+ }
+ else
+ {
+ answ = Math.Round(perc, 4);
+ }
+ }
+ return answ;
+ }
+
+ private string pbStyle(string css)
+ {
+ string answ = "";
+ if (ListOdlStats != null)
+ {
+ if (css == "yellow")
+ {
+ answ = "orange";
+ }
+ else if (css == "blue")
+ {
+ answ = "#2874A6";
+ }
+ else
+ {
+ answ = css;
+ }
+ }
+ return answ;
+ }
+
+ private string tradFase(string codFase)
+ {
+ string answ = codFase;
+ if (ListStati != null && ListStati.Count > 0)
+ {
+ var recSel = ListStati.FirstOrDefault(x => x.value == codFase);
+ if (recSel != null)
+ {
+ answ = recSel.label;
+ }
+ }
+ return answ;
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index 52466251..231ce382 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 6.16.2410.1512
+ 6.16.2410.1518
1800a78a-6ff1-40f9-b490-87fb8bfc1394
@@ -40,11 +40,11 @@
-
-
+
+
-
+
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 0cf8f014..07fcab54 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2410.1512
+ Versione: 6.16.2410.1518
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index fef9b7cd..cd9fc992 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.1512
+6.16.2410.1518
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 861f3da8..f728b80f 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.1512
+ 6.16.2410.1518
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false