diff --git a/MP-TAB3/Components/ProdConfMan.razor.cs b/MP-TAB3/Components/ProdConfMan.razor.cs
index 286943a8..0a5e1e80 100644
--- a/MP-TAB3/Components/ProdConfMan.razor.cs
+++ b/MP-TAB3/Components/ProdConfMan.razor.cs
@@ -24,37 +24,6 @@ namespace MP_TAB3.Components
#endregion Public Properties
- ///
- /// Init da valori configurazione
- ///
- private void InitConfig()
- {
- TabDServ.ConfigGetVal("TAB_confProdPeriodLastODL", ref ShowLastOdl);
- TabDServ.ConfigGetVal("TAB_confProdShowRilav", ref ShowRilav);
- TabDServ.ConfigGetVal("TAB_confProdShowArtDescr", ref ShowArtDescr);
- TabDServ.ConfigGetVal("TAB_confProdShowExtCode", ref ShowExtCode);
- }
-
- ///
- /// Indica se mostrare rilavorati in conferma produzione
- ///
- private bool ShowRilav = false;
-
- ///
- /// Indica se partire da ultimo ODL x definire ultimo periodo...
- ///
- private bool ShowLastOdl = false;
-
- ///
- /// Indica se mostrare descrizione articolo su 3° riga
- ///
- private bool ShowArtDescr = false;
-
- ///
- /// Indica se mostrare CodExt (commessa) su 3° riga
- ///
- private bool ShowExtCode = false;
-
#region Public Methods
public void Dispose()
@@ -137,8 +106,8 @@ namespace MP_TAB3.Components
if (recOdl != null && recOdl.IdxOdl == IdxOdl)
{
DateTime fine = DateTime.Today.AddDays(1);
- DateTime inizio = fine.AddMonths(-6);
- CurrPeriodo = new Periodo(recOdl.DataInizio ?? inizio.AddMonths(-6), recOdl.DataFine ?? fine);
+ DateTime inizio = fine.AddMonths(-1);
+ CurrPeriodo = new Periodo(recOdl.DataInizio ?? inizio.AddDays(-1), recOdl.DataFine ?? fine);
}
}
// altrimenti reset..
@@ -202,6 +171,26 @@ namespace MP_TAB3.Components
private int PageNum = 1;
+ ///
+ /// Indica se mostrare descrizione articolo su 3° riga
+ ///
+ private bool ShowArtDescr = false;
+
+ ///
+ /// Indica se mostrare CodExt (commessa) su 3° riga
+ ///
+ private bool ShowExtCode = false;
+
+ ///
+ /// Indica se partire da ultimo ODL x definire ultimo periodo...
+ ///
+ private bool ShowLastOdl = false;
+
+ ///
+ /// Indica se mostrare rilavorati in conferma produzione
+ ///
+ private bool ShowRilav = false;
+
private int TotalCount = 0;
private bool useOdl = false;
@@ -283,6 +272,7 @@ namespace MP_TAB3.Components
{
var recOdl = ListaOdl
.Where(x => x.DataInizio <= dtRif && (x.DataFine >= dtRif || x.DataFine == null))
+ .OrderByDescending(x => x.DataInizio)
.FirstOrDefault();
return recOdl ?? new ODLExpModel();
}
@@ -295,6 +285,17 @@ namespace MP_TAB3.Components
return recOdl ?? new ODLExpModel();
}
+ ///
+ /// Init da valori configurazione
+ ///
+ private void InitConfig()
+ {
+ TabDServ.ConfigGetVal("TAB_confProdPeriodLastODL", ref ShowLastOdl);
+ TabDServ.ConfigGetVal("TAB_confProdShowRilav", ref ShowRilav);
+ TabDServ.ConfigGetVal("TAB_confProdShowArtDescr", ref ShowArtDescr);
+ TabDServ.ConfigGetVal("TAB_confProdShowExtCode", ref ShowExtCode);
+ }
+
private string OperDto(int matr)
{
string answ = $"[{matr}]";
@@ -333,9 +334,19 @@ namespace MP_TAB3.Components
{
isProcessing = true;
await Task.Delay(1);
+ DateTime dtEnd = DateTime.Today.AddDays(1);
+ DateTime dtStart = dtEnd.AddMonths(-3);
if (!string.IsNullOrEmpty(IdxMaccSel))
{
- ListaOdl = await TabDServ.OdlListByMaccPeriodo(IdxMaccSel, CurrPeriodo.Inizio.AddMonths(-6), DateTime.Today.AddDays(1));
+ ListaOdl = await TabDServ.OdlListByMaccPeriodo(IdxMaccSel, dtStart, dtEnd);
+ // se vuoto prendo 1 anno...
+ int maxTry = 3;
+ while (ListaOdl.Count < 1 && maxTry > 0)
+ {
+ dtStart = dtStart.AddMonths(-3);
+ ListaOdl = await TabDServ.OdlListByMaccPeriodo(IdxMaccSel, dtStart, dtEnd);
+ maxTry--;
+ }
ListComplete = await TabDServ.ElencoConfProdFiltAsync(IdxMaccSel, CurrPeriodo.Inizio, CurrPeriodo.Fine);
TotalCount = ListComplete.Count;
// esegue paginazione
@@ -368,12 +379,11 @@ namespace MP_TAB3.Components
if (doSet)
{
DateTime fine = DateTime.Today.AddDays(1);
- DateTime inizio = fine.AddMonths(-6);
+ DateTime inizio = fine.AddMonths(-1);
CurrPeriodo = new Periodo(inizio, fine);
}
}
-
#endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP-TAB3/Components/ProdPlanMan.razor b/MP-TAB3/Components/ProdPlanMan.razor
index e970b625..18a67f61 100644
--- a/MP-TAB3/Components/ProdPlanMan.razor
+++ b/MP-TAB3/Components/ProdPlanMan.razor
@@ -1,16 +1,20 @@

-
-
+
+
Piano Produzione - PODL
-
+
+
+
@if (isProcessing)
{
diff --git a/MP-TAB3/Components/ProdPlanMan.razor.cs b/MP-TAB3/Components/ProdPlanMan.razor.cs
index e2f77b13..330e9be8 100644
--- a/MP-TAB3/Components/ProdPlanMan.razor.cs
+++ b/MP-TAB3/Components/ProdPlanMan.razor.cs
@@ -11,6 +11,12 @@ namespace MP_TAB3.Components
[Parameter]
public MappaStatoExplModel? RecMSE { get; set; } = null;
+ [Parameter]
+ public string IdxMacchSub { get; set; } = "";
+
+ [Parameter]
+ public EventCallback
E_MachSel { get; set; }
+
#endregion Public Properties
#region Public Methods
@@ -76,11 +82,12 @@ namespace MP_TAB3.Components
protected async Task SetMacc(string selIdxMacc)
{
isProcessing = true;
- await Task.Delay(10);
+ await Task.Delay(1);
IdxMaccSel = selIdxMacc;
+ await Task.Delay(1);
await doUpdate();
isProcessing = false;
- await Task.Delay(10);
+ await E_MachSel.InvokeAsync(selIdxMacc);
}
protected string TCMinSec(object _TC)
diff --git a/MP-TAB3/Components/ScrapMan.razor.cs b/MP-TAB3/Components/ScrapMan.razor.cs
index 616f7c20..f03a22ed 100644
--- a/MP-TAB3/Components/ScrapMan.razor.cs
+++ b/MP-TAB3/Components/ScrapMan.razor.cs
@@ -13,6 +13,9 @@ namespace MP_TAB3.Components
[Parameter]
public EventCallback E_MachSel { get; set; }
+ [Parameter]
+ public string IdxMacchSub { get; set; } = "";
+
[Parameter]
public MappaStatoExplModel? RecMSE { get; set; } = null;
@@ -115,7 +118,6 @@ namespace MP_TAB3.Components
IdxMaccSel = selIdxMacc;
await ReloadData();
isProcessing = false;
- await Task.Delay(1);
await E_MachSel.InvokeAsync(selIdxMacc);
}
diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj
index 64afdeb8..db9146d1 100644
--- a/MP-TAB3/MP-TAB3.csproj
+++ b/MP-TAB3/MP-TAB3.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2509.912
+ 6.16.2509.917
enable
MP_TAB3
diff --git a/MP-TAB3/Pages/BasePage.razor.cs b/MP-TAB3/Pages/BasePage.razor.cs
index f923b4b9..7b33b6b1 100644
--- a/MP-TAB3/Pages/BasePage.razor.cs
+++ b/MP-TAB3/Pages/BasePage.razor.cs
@@ -42,6 +42,15 @@ namespace MP_TAB3.Pages
#endregion Public Methods
+ #region Protected Fields
+
+ ///
+ /// IdxMacchinaSub (tavola)
+ ///
+ protected string IdxMaccSubSel = "";
+
+ #endregion Protected Fields
+
#region Protected Properties
///
@@ -135,6 +144,19 @@ namespace MP_TAB3.Pages
}
}
+ ///
+ /// Selezione macchina SUB
+ ///
+ ///
+ protected void SetMacc(string selIdxMacc)
+ {
+ IdxMaccSubSel = selIdxMacc;
+ }
+
+ ///
+ /// Variabile caricamento
+ ///
+ protected bool IsLoading = false;
#endregion Protected Methods
#region Private Fields
diff --git a/MP-TAB3/Pages/Controls.razor.cs b/MP-TAB3/Pages/Controls.razor.cs
index 31725104..51872c2f 100644
--- a/MP-TAB3/Pages/Controls.razor.cs
+++ b/MP-TAB3/Pages/Controls.razor.cs
@@ -17,19 +17,6 @@ namespace MP_TAB3.Pages
await ReloadData();
}
- protected void SetMacc(string selIdxMacc)
- {
- IdxMaccSubSel = selIdxMacc;
- }
-
#endregion Protected Methods
-
- #region Private Fields
-
- private string IdxMaccSubSel = "";
-
- private bool IsLoading = false;
-
- #endregion Private Fields
}
}
\ No newline at end of file
diff --git a/MP-TAB3/Pages/MachineDetail.razor.cs b/MP-TAB3/Pages/MachineDetail.razor.cs
index 29952f51..b88c0937 100644
--- a/MP-TAB3/Pages/MachineDetail.razor.cs
+++ b/MP-TAB3/Pages/MachineDetail.razor.cs
@@ -8,8 +8,10 @@ namespace MP_TAB3.Pages
{
#region Protected Properties
+#if false
[Inject]
- protected TabDataService TabServ { get; set; } = null!;
+ protected TabDataService TabServ { get; set; } = null!;
+#endif
#endregion Protected Properties
@@ -26,11 +28,6 @@ namespace MP_TAB3.Pages
}
}
- protected void SetMacc(string selIdxMacc)
- {
- IdxMaccSubSel = selIdxMacc;
- }
-
#endregion Protected Methods
#region Private Fields
@@ -38,7 +35,6 @@ namespace MP_TAB3.Pages
private static Logger Log = LogManager.GetCurrentClassLogger();
private bool enableMagLotti = false;
private bool enableSchedaTecnica = false;
- private string IdxMaccSubSel = "";
private DateTime lastSave = DateTime.Now;
#endregion Private Fields
@@ -69,8 +65,6 @@ namespace MP_TAB3.Pages
#endif
}
-
-
private async Task setupConf()
{
enableSchedaTecnica = MStor.GetConfBool("enableSchedaTecnica");
diff --git a/MP-TAB3/Pages/ODL.razor.cs b/MP-TAB3/Pages/ODL.razor.cs
index 9ce9d862..69bf8764 100644
--- a/MP-TAB3/Pages/ODL.razor.cs
+++ b/MP-TAB3/Pages/ODL.razor.cs
@@ -9,17 +9,6 @@ namespace MP_TAB3.Pages
await base.OnInitializedAsync();
}
- protected void SetMacc(string selIdxMacc)
- {
- IdxMaccSubSel = selIdxMacc;
- }
-
#endregion Protected Methods
-
- #region Private Fields
-
- private string IdxMaccSubSel = "";
-
- #endregion Private Fields
}
}
\ No newline at end of file
diff --git a/MP-TAB3/Pages/ProdConf.razor b/MP-TAB3/Pages/ProdConf.razor
index f47ecf41..dc08e2ba 100644
--- a/MP-TAB3/Pages/ProdConf.razor
+++ b/MP-TAB3/Pages/ProdConf.razor
@@ -10,5 +10,5 @@ else
{
-
+
}
diff --git a/MP-TAB3/Pages/ProdConf.razor.cs b/MP-TAB3/Pages/ProdConf.razor.cs
index 266c027b..bcfaa534 100644
--- a/MP-TAB3/Pages/ProdConf.razor.cs
+++ b/MP-TAB3/Pages/ProdConf.razor.cs
@@ -1,7 +1,3 @@
-
-using Microsoft.AspNetCore.Components;
-using MP.Data.Services;
-
namespace MP_TAB3.Pages
{
public partial class ProdConf
@@ -11,7 +7,7 @@ namespace MP_TAB3.Pages
protected async Task ForceReload()
{
IsLoading = true;
- await Task.Delay(5);
+ await Task.Delay(10);
IsLoading = false;
}
@@ -21,20 +17,6 @@ namespace MP_TAB3.Pages
await ReloadData();
}
-
- protected void SetMacc(string selIdxMacc)
- {
- IdxMaccSubSel = selIdxMacc;
- }
-
#endregion Protected Methods
-
- #region Private Fields
-
- private string IdxMaccSubSel = "";
-
- private bool IsLoading = false;
-
- #endregion Private Fields
}
}
\ No newline at end of file
diff --git a/MP-TAB3/Pages/ProdPlan.razor b/MP-TAB3/Pages/ProdPlan.razor
index 6dae82d0..8b53e450 100644
--- a/MP-TAB3/Pages/ProdPlan.razor
+++ b/MP-TAB3/Pages/ProdPlan.razor
@@ -8,6 +8,6 @@
else
{
-
-
+
+
}
diff --git a/MP-TAB3/Pages/ProdPlan.razor.cs b/MP-TAB3/Pages/ProdPlan.razor.cs
index 4c08742e..deedc267 100644
--- a/MP-TAB3/Pages/ProdPlan.razor.cs
+++ b/MP-TAB3/Pages/ProdPlan.razor.cs
@@ -4,6 +4,13 @@ namespace MP_TAB3.Pages
{
#region Protected Methods
+ protected async Task ForceReload()
+ {
+ IsLoading = true;
+ await Task.Delay(10);
+ IsLoading = false;
+ }
+
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
diff --git a/MP-TAB3/Pages/Scrap.razor b/MP-TAB3/Pages/Scrap.razor
index b35784ea..0ebe2dd4 100644
--- a/MP-TAB3/Pages/Scrap.razor
+++ b/MP-TAB3/Pages/Scrap.razor
@@ -9,5 +9,5 @@ else
{
-
+
}
diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html
index 4f03d47c..5853e646 100644
--- a/MP-TAB3/Resources/ChangeLog.html
+++ b/MP-TAB3/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2509.912
+ Versione: 6.16.2509.917
Note di rilascio:
-
diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt
index 1dfaa100..f8cbadf0 100644
--- a/MP-TAB3/Resources/VersNum.txt
+++ b/MP-TAB3/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2509.912
+6.16.2509.917
diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml
index 4d35d34e..1134051c 100644
--- a/MP-TAB3/Resources/manifest.xml
+++ b/MP-TAB3/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2509.912
+ 6.16.2509.917
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html
false
diff --git a/MP-TAB3/appsettings.json b/MP-TAB3/appsettings.json
index a2e4fc8b..3b9b08c2 100644
--- a/MP-TAB3/appsettings.json
+++ b/MP-TAB3/appsettings.json
@@ -8,6 +8,13 @@
"AllowedHosts": "*",
"CodApp": "MP.TAB",
"ConnectionStrings": {
+ //"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=6,connectTimeout=15000,syncTimeout=15000,asyncTimeout=15000,abortConnect=false,ssl=false,allowAdmin=true",
+ //"MP.All": "Server=SQL2022PROD;Database=Donati_LAV_MoonPro_prod; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
+ //"MP.Mon": "Server=SQL2022PROD;Database=Donati_LAV_MoonPro_prod; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
+ //"MP.IS": "Server=SQL2022PROD;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
+ //"MP.Tab": "Server=SQL2022PROD;Database=Donati_LAV_MoonPro_prod; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
+ //"MP.Mag": "Server=SQL2022PROD;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
+
"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=15000,syncTimeout=15000,asyncTimeout=15000,abortConnect=false,ssl=false,allowAdmin=true",
"MP.All": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
"MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",