diff --git a/MP-TAB-SERV/Components/OdlMan.razor.cs b/MP-TAB-SERV/Components/OdlMan.razor.cs
index b2f03b15..3e2cf2d3 100644
--- a/MP-TAB-SERV/Components/OdlMan.razor.cs
+++ b/MP-TAB-SERV/Components/OdlMan.razor.cs
@@ -152,8 +152,7 @@ namespace MP_TAB_SERV.Components
// se in attr --> carico podlCurr...
if (inAttr && RecMSE != null)
{
- int currIdxPOdl = RecMSE != null ? RecMSE.IdxPOdl ?? 0 : 0;
- currPodl = await TabDServ.PODLExp_getByKey(currIdxPOdl);
+ await ReloadXDL(false);
}
}
@@ -284,7 +283,7 @@ namespace MP_TAB_SERV.Components
idxOdl = idxODLStart;
await advStep(currStep++);
// faccio refresh e riporto
- await refreshData();
+ await RefreshData();
await CheckAttr();
// chiudo update...
isProcessing = false;
@@ -296,8 +295,13 @@ namespace MP_TAB_SERV.Components
///
protected async Task OdlSetupStart()
{
- if (!await JSRuntime.InvokeAsync("confirm", $"Confermi inizio della fase di attrezzaggio per l'articolo [{currPodl.CodArticolo}] {currPodl.DescArticolo}?"))
+ TimeSpan estDur = TimeSpan.FromMinutes((double)tcRichAttr * currPodl.NumPezzi);
+ string stima = estDur.TotalHours > 1 ? $"{estDur.TotalHours:N1} ore" : $"{estDur.TotalMinutes:N1} min";
+ if (!await JSRuntime.InvokeAsync("confirm", $"PODL: {currPodl.IdxPromessa}{Environment.NewLine}Art: [{currPodl.CodArticolo}] {currPodl.DescArticolo}{Environment.NewLine}Pezzi: {currPodl.NumPezzi:N0} * TCiclo: {tcRichAttr:N3}min{Environment.NewLine}Tempo stimato: {stima}{Environment.NewLine}{Environment.NewLine}Confermi inizio della fase di attrezzaggio?"))
return;
+
+ //if (!await JSRuntime.InvokeAsync("confirm", $"Confermi inizio della fase di attrezzaggio per l'articolo [{currPodl.CodArticolo}] {currPodl.DescArticolo}?"))
+ // return;
/***************************************************
* comprende gestione machineSlave x fix ODL master --> slave
*
@@ -489,7 +493,7 @@ namespace MP_TAB_SERV.Components
checkBtnStatus();
fixSplitBtn(false);
// faccio refresh e riporto
- await refreshData();
+ await RefreshData();
await CheckAttr();
isProcessing = false;
}
@@ -622,13 +626,13 @@ namespace MP_TAB_SERV.Components
}
await advStep(currStep++);
// faccio refresh e riporto
- await refreshData();
+ await RefreshData();
await CheckAttr();
await advStep(currStep++);
isProcessing = false;
}
- protected async Task refreshData()
+ protected async Task RefreshData()
{
// refresh tabella dati tablet...
TabDServ.RicalcMse(IdxMaccSel, 0);
@@ -638,10 +642,8 @@ namespace MP_TAB_SERV.Components
{
// salvo in LocalStorage...
await MServ.SaveMse(ListMSE);
-#if false
// aggiorno MSE attuale
RecMSE = ListMSE.Find(x => x.IdxMacchina == IdxMaccSel);
-#endif
await E_Updated.InvokeAsync(ListMSE);
}
// update dati liste ODL
@@ -662,7 +664,7 @@ namespace MP_TAB_SERV.Components
string baseUrlAdmin = SMServ.GetConf("baseUrlAdmin");
string pageUrlApprODL = SMServ.GetConf("pageUrlApprODL");
string pageUrl = $"{baseUrlAdmin}{pageUrlApprODL}";
- string corpo = $"ODL: {idxOdl} | TC Assegnato: {tcAss} | TC Rich: {tcRich}{Environment.NewLine}{Environment.NewLine}";
+ string corpo = $"ODL: {idxOdl} | TC Assegnato: {tcAss:N3} | TC Rich: {tcRich}{Environment.NewLine}{Environment.NewLine}";
corpo += string.Format(corpoChgTc, Environment.NewLine, pageUrl);
corpo = corpo.Replace($"{Environment.NewLine}", "
");
MailKitMailData mData = new MailKitMailData()
@@ -699,8 +701,22 @@ namespace MP_TAB_SERV.Components
// se devo mostrare, carico dati ODL!
if (showOdlDetail && RecMSE != null)
{
- int currIdxPOdl = RecMSE != null ? RecMSE.IdxPOdl ?? 0 : 0;
- currPodl = await TabDServ.PODLExp_getByKey(currIdxPOdl);
+ await ReloadXDL(true);
+ }
+ }
+
+ private async Task ReloadXDL(bool reloadFromOdl)
+ {
+ int currIdxPOdl = IdxPOdlSel;
+ if (reloadFromOdl)
+ {
+ currIdxPOdl = RecMSE != null ? RecMSE.IdxPOdl ?? 0 : 0;
+ }
+ currPodl = await TabDServ.PODLExp_getByKey(currIdxPOdl);
+ // update a runtime dati ODL se assegnato
+ if (currPodl.IdxOdl > 0)
+ {
+ currOdl = await TabDServ.OdlByIdx(currPodl.IdxOdl, false);
}
}
@@ -709,6 +725,32 @@ namespace MP_TAB_SERV.Components
return SMServ.Traduci($"{baseLang}_{lemma}".ToUpper());
}
+ protected async Task SendFixEndSetup()
+ {
+ if (!await JSRuntime.InvokeAsync("confirm", $"Confermi invio FIX chiusura atrtezzaggio ad impianto?"))
+ return;
+
+ string ts = string.Format("{0:yyMMdd}T{0:HHmmss.fff}Z", DateTime.Now);
+ string outData = $"TS:{ts}|MATR:{MatrOpr}|ODL:{IdxOdl}";
+ TabDServ.addTask4Machine(IdxMaccSel, taskType.fixStopSetup, outData);
+ outData = "Inserita richiesta invio Fix chiusura attrezzaggio " + outData;
+ lblOut = outData;
+ // se è master --> chiamo update child!
+ if (isMaster)
+ {
+ // invio eventi ad IOB slave...
+ var slaveList = SMServ.ListM2S
+ .Where(x => x.IdxMacchina.Equals(IdxMaccSel, StringComparison.InvariantCultureIgnoreCase))
+ .ToList();
+ foreach (var machine in slaveList)
+ {
+ // invio chiusura attrezzaggio
+ outData = $"TS:{ts}|MATR:{MatrOpr}|ODL:{idxOdl}|master machine:{IdxMaccSel}";
+ TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.fixStopSetup, outData);
+ }
+ }
+ }
+
#endregion Protected Methods
#region Private Fields
@@ -786,6 +828,7 @@ namespace MP_TAB_SERV.Components
}
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
+ private ODLExpModel currOdl { get; set; } = new ODLExpModel();
///
/// Variabile idxMacc parent x selezione ODL
@@ -825,6 +868,11 @@ namespace MP_TAB_SERV.Components
}
}
+ private bool endProdDisabled
+ {
+ get => !odlOk || needConfProd;
+ }
+
private int numPz2Conf
{
get
@@ -848,7 +896,7 @@ namespace MP_TAB_SERV.Components
}
private string titleOdlDetail
{
- get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : "Parametri ODL Corrente";
+ get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : inAttr ? "Parametri PODL in Attrezzaggio" : "Parametri ODL Corrente";
}
private string cssDetailOdl
@@ -1174,13 +1222,18 @@ namespace MP_TAB_SERV.Components
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
}
}
+ // imposto tcRichAttr in base allo stato...
+ if (odlOk)
+ {
+ tcRichAttr = currPodl.Tcassegnato; ;
+ }
}
private async Task ReloadPOdlDetailData()
{
if (IdxPOdlSel > 0)
{
- currPodl = await TabDServ.PODLExp_getByKey(IdxPOdlSel);
+ await ReloadXDL(false);
// controllo se � cambiato PODL
if (IdxPOdlSel != lastIdxPOdl)
{
diff --git a/MP-TAB-SERV/Components/SelTempoMSMC.razor b/MP-TAB-SERV/Components/SelTempoMSMC.razor
index 380f5379..76a84cea 100644
--- a/MP-TAB-SERV/Components/SelTempoMSMC.razor
+++ b/MP-TAB-SERV/Components/SelTempoMSMC.razor
@@ -23,6 +23,6 @@
}
- @lblTempo
+ → @lblTempo
diff --git a/MP-TAB-SERV/Components/SelTempoMSMC.razor.cs b/MP-TAB-SERV/Components/SelTempoMSMC.razor.cs
index 11a1b619..19fdc160 100644
--- a/MP-TAB-SERV/Components/SelTempoMSMC.razor.cs
+++ b/MP-TAB-SERV/Components/SelTempoMSMC.razor.cs
@@ -218,7 +218,7 @@ namespace MP_TAB_SERV.Components
{
get
{
- string answ = tcMode == "mc" ? $"--> {TempoMS.TotalMinutes:N0}:{TempoMS:ss} (min:sec)" : $"--> {TempoMC:0.000} (min.cent)";
+ string answ = tcMode == "mc" ? $"{TempoMS.TotalMinutes:N0}:{TempoMS:ss} (min:sec)" : $"{TempoMC:0.000} (min.cent)";
return answ;
}
}
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index fd8b09d0..56514f72 100644
--- a/MP-TAB-SERV/MP-TAB-SERV.csproj
+++ b/MP-TAB-SERV/MP-TAB-SERV.csproj
@@ -3,7 +3,7 @@
diff --git a/MP-TAB-SERV/Pages/StatusMap.razor b/MP-TAB-SERV/Pages/StatusMap.razor
index 72bf0725..250dd569 100644
--- a/MP-TAB-SERV/Pages/StatusMap.razor
+++ b/MP-TAB-SERV/Pages/StatusMap.razor
@@ -2,17 +2,11 @@
@page "/home"
@page "/status-map"
-
@if (ListMSE == null || ListMSE.Count == 0 || isCalcSize)
{
- @*@for (int i = 0; i < 10; i++)
- {
-
- @*
-
- }*@
-
+
}
else
{
diff --git a/MP-TAB-SERV/Pages/StatusMap.razor.cs b/MP-TAB-SERV/Pages/StatusMap.razor.cs
index de20447a..49cfeb7b 100644
--- a/MP-TAB-SERV/Pages/StatusMap.razor.cs
+++ b/MP-TAB-SERV/Pages/StatusMap.razor.cs
@@ -96,6 +96,8 @@ namespace MP_TAB_SERV.Pages
{
await getWDim();
isCalcSize = false;
+ ListMSE = await MDataService.MseGetAll();
+ await InvokeAsync(StateHasChanged);
}
if (ListMSE != null)
{
@@ -104,21 +106,20 @@ namespace MP_TAB_SERV.Pages
}
}
- protected override async Task OnInitializedAsync()
+ protected override void OnInitialized()
{
var df = MServ.UserPrefGet("DefCardMode");
ShowCard = df == "shrink" ? false : true;
isCalcSize = true;
ListMSE = null;
SetupConf();
- ListMSE = await MDataService.MseGetAll();
}
- protected async Task RefreshData(List
newList)
+ protected void SaveData(List newList)
{
+ //await Task.Delay(1);
ListMSE = newList;
- await InvokeAsync(StateHasChanged);
- //Log.Trace("StatusMap | RefreshData");
+ //await InvokeAsync(StateHasChanged);
}
#endregion Protected Methods
diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index 514eae7a..ffefa68b 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2311.909
+ Versione: 6.16.2311.915
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index c3aa4abd..8fd925f8 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2311.909
+6.16.2311.915
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index 5ea45187..cb13f8ba 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2311.909
+ 6.16.2311.915
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Controllers/MpTabController.cs b/MP.Data/Controllers/MpTabController.cs
index 40800ec6..58d01c22 100644
--- a/MP.Data/Controllers/MpTabController.cs
+++ b/MP.Data/Controllers/MpTabController.cs
@@ -782,7 +782,7 @@ namespace MP.Data.Controllers
var OnlyUnused = new SqlParameter("@onlyUnused", onlyUnused);
dbResult = dbCtx
.DbSetODLExp
- .FromSqlRaw("EXEC stp_ODL_getByIdx @IdxOdl, @onlyUnused", IdxOdl, onlyUnused)
+ .FromSqlRaw("EXEC stp_ODL_getByIdx @IdxOdl, @onlyUnused", IdxOdl, OnlyUnused)
.AsNoTracking()
.ToList();
}
diff --git a/MP.Data/DatabaseModels/PODLExpModel.cs b/MP.Data/DatabaseModels/PODLExpModel.cs
index ff1c3cfc..018da8b1 100644
--- a/MP.Data/DatabaseModels/PODLExpModel.cs
+++ b/MP.Data/DatabaseModels/PODLExpModel.cs
@@ -47,10 +47,18 @@ namespace MP.Data.DatabaseModels
get
{
string answ = "*";
- var allData = KeyRichiesta.Split('_');
- if (allData.Length > 0)
+ if (!string.IsNullOrEmpty(KeyRichiesta))
{
- answ = allData[0];
+ try
+ {
+ var allData = KeyRichiesta.Split('_');
+ if (allData.Length > 0)
+ {
+ answ = allData[0];
+ }
+ }
+ catch
+ { }
}
return answ;
}