Merge branch 'Release/FixSelPOdlTavola'

This commit is contained in:
Samuele Locatelli
2024-04-11 17:08:28 +02:00
6 changed files with 79 additions and 34 deletions
+25 -21
View File
@@ -17,6 +17,7 @@ namespace MP_TAB3.Components
[Parameter]
public MappaStatoExpl? RecMSE { get; set; } = null;
#endregion Public Properties
#region Protected Properties
@@ -66,30 +67,33 @@ namespace MP_TAB3.Components
// inizilamente riporto machcina corrente da MSE
if (RecMSE != null)
{
// verifico se la macchina sia configurata tra le MSFD...
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
if (string.IsNullOrEmpty(idxMaccSel))
{
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
}
if (isMulti)
{
var listMulti = await TDataService.VMSFDGetAll();
ListMacchine = listMulti
.Where(x => x.IdxMacchina.Contains($"{RecMSE.IdxMacchina}#"))
.ToDictionary(x => x.IdxMacchina, x => x.CodMaccArticolo);
if (ListMacchine.Count > 0 && string.IsNullOrEmpty(idxMaccSel))
// verifico se la macchina sia configurata tra le MSFD...
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
{
// cerco se ho in storage la macchina selezionata...
var idxMSel = MsgServ.UserPrefGet(idxMaccCurr);
if (!string.IsNullOrEmpty(idxMSel))
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
}
if (isMulti)
{
var listMulti = await TDataService.VMSFDGetAll();
ListMacchine = listMulti
.Where(x => x.IdxMacchina.Contains($"{RecMSE.IdxMacchina}#"))
.ToDictionary(x => x.IdxMacchina, x => x.CodMaccArticolo);
if (ListMacchine.Count > 0)
{
idxMaccSel = idxMSel;
}
else
{
IdxMaccSel = ListMacchine.FirstOrDefault().Key;
// cerco se ho in storage la macchina selezionata...
var idxMSel = MsgServ.UserPrefGet(idxMaccCurr);
if (!string.IsNullOrEmpty(idxMSel))
{
IdxMaccSel = idxMSel;
}
else
{
IdxMaccSel = ListMacchine.FirstOrDefault().Key;
}
}
}
}
+50 -9
View File
@@ -106,7 +106,7 @@ namespace MP_TAB3.Components
protected StatusData MDataService { get; set; } = null!;
[Inject]
protected MessageService MServ { get; set; } = null!;
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
@@ -197,7 +197,7 @@ namespace MP_TAB3.Components
{
#if false
// rileggo ODL
await updateIdxOdl();
await updateIdxOdl();
#endif
// verifico attrezzaggio su macchina corrente o se multi su parent
string idxMacc2check = isMulti ? IdxMaccParent : IdxMaccSel;
@@ -223,7 +223,6 @@ namespace MP_TAB3.Components
}
}
/// <summary>
/// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina...
/// </summary>
@@ -740,7 +739,7 @@ namespace MP_TAB3.Components
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
if (isMulti)
{
var idxMSel = MServ.UserPrefGet(IdxMaccSel);
var idxMSel = MsgServ.UserPrefGet(IdxMaccSel);
if (!string.IsNullOrEmpty(idxMSel))
{
IdxMaccSel = idxMSel;
@@ -899,7 +898,7 @@ namespace MP_TAB3.Components
if (ListMSE != null)
{
// salvo in LocalStorage...
await MServ.SaveMse(ListMSE);
await MsgServ.SaveMse(ListMSE);
// aggiorno MSE attuale
RecMSE = ListMSE.Find(x => x.IdxMacchina == IdxMaccSel);
await E_Updated.InvokeAsync(ListMSE);
@@ -1080,41 +1079,75 @@ namespace MP_TAB3.Components
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private bool approvTCEnabled = false;
private bool confRett = true;
private double currVal = 0;
private List<string> emailAdmDest = new List<string>();
private bool enableAnnullaSetup = false;
private bool enableFixSetup = false;
private bool enableRiattrezzaggio = false;
private bool enableRPO = true;
private bool enableSchedaTecnica = false;
private bool enableSplitODL = false;
private int expTimeMsec = 500;
private bool forceCloseOdl = true;
private int gPeriodReopenOdlTav = 1;
private string IdxMaccSel { get; set; } = "";
private int idxPOdlSel = 0;
private bool isMaster = false;
private bool isMulti = false;
private bool isProcessing = false;
private bool isSlave = false;
private int lastIdxPOdl = 0;
private string lblOut = "";
private int MaxVal = 10;
private int modoConfProd = 0;
private double nextVal = 0;
private string noteAttr = "";
private int numDayOdl = 5;
private int PzPallet = 0;
private string searchPodl = "";
private bool showAll = false;
private bool showChkCloseOdlVal = false;
private bool showOdlDetail = false;
private bool showOdlProvv = false;
private bool showPOdlData = true;
private bool showReopenOdlTav = false;
private bool showSplitOdlOnTav = false;
private bool showSplitOdlRiattr = false;
#endregion Private Fields
@@ -1123,7 +1156,7 @@ namespace MP_TAB3.Components
private string baseLang
{
get => MServ.UserPrefGet("Lang");
get => MsgServ.UserPrefGet("Lang");
}
private bool cancelSetupEnabled
@@ -1137,7 +1170,9 @@ namespace MP_TAB3.Components
}
private ODLExpModel currOdl { get; set; } = new ODLExpModel();
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
private MappaStatoExpl? currRecMSE { get; set; } = null;
/// <summary>
@@ -1166,6 +1201,8 @@ namespace MP_TAB3.Components
/// </summary>
private string IdxMaccParent { get; set; } = "";
private string IdxMaccSel { get; set; } = "";
/// <summary>
/// Valore calcolato key ODL corrente...
/// </summary>
@@ -1177,7 +1214,9 @@ namespace MP_TAB3.Components
private int IdxOdlAltra { get; set; } = 0;
private bool inAttr { get; set; } = false;
private bool isLoading { get; set; } = false;
private MappaStatoExpl? lastRecMSE { get; set; } = null;
private string lblWarnBody
@@ -1192,7 +1231,7 @@ namespace MP_TAB3.Components
private int MatrOpr
{
get => MServ.MatrOpr;
get => MsgServ.MatrOpr;
}
private bool needConfProd { get; set; } = false;
@@ -1527,7 +1566,9 @@ namespace MP_TAB3.Components
}
if (!string.IsNullOrEmpty(IdxMaccSel))
{
ListODLAll = await TabDServ.VSOdlGetUnused(IdxMaccParent, ShowAll, numDayOdl);
//2024.04.11 passo macchina selezionata SE multi... era "IdxMaccParent"
ListODLAll = await TabDServ.VSOdlGetUnused(IdxMaccSel, ShowAll, numDayOdl);
//ListODLAll = await TabDServ.VSOdlGetUnused(IdxMaccParent, ShowAll, numDayOdl);
if (string.IsNullOrEmpty(SearchPodl))
{
ListODL = ListODLAll;
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2404.916</Version>
<Version>6.16.2404.1117</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2404.916</h4>
<h4>Versione: 6.16.2404.1117</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2404.916
6.16.2404.1117
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2404.916</version>
<version>6.16.2404.1117</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>