Fix display qta su ODL e calcolo dati x conferma prod

This commit is contained in:
Samuele Locatelli
2023-12-22 11:26:29 +01:00
parent 884d5885f7
commit 18068a9441
8 changed files with 50 additions and 32 deletions
+7 -2
View File
@@ -150,7 +150,6 @@ else
}
else
{
<div class="cardObj px-3 py-1">
<div class="text-center d-flex justify-content-between ">
<div class="col-4">
@@ -164,7 +163,7 @@ else
<div class="col-4"><i class="fa-regular fa-circle-check"></i></div>
<div class="col-8 d-flex justify-content-between">
<div>
@($"{RecMSE.PezziConf}")
&nbsp; @($"{RecMSE.PezziConf}")
</div>
<div class="text-danger">
+ &nbsp;
@@ -190,6 +189,12 @@ else
</div>
<div class="col-4 d-flex flex-wrap justify-content-center align-items-center " style="line-height: 1.6rem;">
<div>
@if (!string.IsNullOrEmpty(IdxMacchSub))
{
<div class="text-warning border border-warning rounded-3 px-2">
@IdxMacchSub <i class="fa-solid fa-triangle-exclamation"></i>
</div>
}
<div class="text-light d-flex justify-content-between small lh-sm">
<div class="text-start col-4">ART:</div>
<div class="text-end col-8">@($"{RecMSE.CodArticolo}")</div>
+1 -1
View File
@@ -48,7 +48,7 @@
<div class="fs-4">
@lblWarnBody
<div>
Pezzi NC: <b>@numPz2Conf.ToString("N0")</b>
Pezzi NC: <b>@numPz2Conf</b>
</div>
</div>
</div>
+37 -24
View File
@@ -30,7 +30,13 @@ namespace MP_TAB3.Components
#region Protected Fields
protected PzProdModel? prodMacchina = null;
#if false
protected PzProdModel? prodMacchina = null;
#endif
/// <summary>
/// Dati produzione rilevati
/// </summary>
protected StatoProdModel? datiProdAct { get; set; } = null;
#endregion Protected Fields
@@ -920,7 +926,7 @@ namespace MP_TAB3.Components
{
tcRichAttr = currPodl.Tcassegnato;
}
if(string.IsNullOrEmpty(noteAttr))
if (string.IsNullOrEmpty(noteAttr))
{
noteAttr = currOdl.Note;
}
@@ -1231,9 +1237,9 @@ namespace MP_TAB3.Components
get
{
int answ = -1;
if (prodMacchina != null)
if (datiProdAct != null)
{
answ = prodMacchina.pezziNonConfermati;
answ = datiProdAct.Pz2RecTot;
}
else
{
@@ -1277,18 +1283,11 @@ namespace MP_TAB3.Components
{ }
// ora verifico SE E SOLO SE è ANCORA in attrezzaggio
#if false
if (inAttr)
{
#endif
// ora verifico SE ALTRA TAVOLA ha ODL...
if (dtChiusura.AddMinutes(gPeriodReopenOdlTav) > adesso)
{
answ = showReopenOdlTav;
}
#if false
}
#endif
}
}
return answ;
@@ -1316,15 +1315,7 @@ namespace MP_TAB3.Components
// ora verifico SE ALTRA TAVOLA ha ODL...
if (!emptyOdlAltraMacc)
{
#if false
// ora verifico SE E SOLO SE è ANCORA in attrezzaggio
if (inAttr)
{
#endif
answ = showSplitOdlOnTav;
#if false
}
#endif
}
}
}
@@ -1395,20 +1386,32 @@ namespace MP_TAB3.Components
else // se NON sono in setup verifico se ho pz da confermare
{
// recupero pz da confermare
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, adesso);
#if false
var rawData = await TabDServ.PezziProdMacchina(IdxMaccSel);
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
#endif
checkConfProd();
if (prodMacchina.pezziNonConfermati > 0)
#if false
if (prodMacchina.pezziNonConfermati > 0)
#endif
if (datiProdAct.Pz2RecTot > 0)
{
// confermo produzione ZERO pezzi (in setup)
if (confRett)
{
// confermo al netto dei pezzi lasciati...
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, 0, adesso, MatrOpr);
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, 0, adesso, MatrOpr);
#endif
}
else
{
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, adesso, MatrOpr);
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, adesso, MatrOpr);
#endif
}
}
}
@@ -1531,7 +1534,10 @@ namespace MP_TAB3.Components
if (!isMulti || (isMulti && IdxMaccSel.IndexOf("#") > 0))
{
var rawData = await TabDServ.PezziProdMacchina(IdxMaccSel);
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, DateTime.Now);
#if false
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
#endif
checkConfProd();
}
}
@@ -1554,10 +1560,17 @@ namespace MP_TAB3.Components
private void checkConfProd()
{
// calcolo conferma prod...
#if false
needConfProd = RecMSE != null && prodMacchina != null;
if (prodMacchina != null)
{
needConfProd = prodMacchina.pezziNonConfermati > 0 && !isSlave;
}
#endif
needConfProd = RecMSE != null && datiProdAct != null;
if (datiProdAct != null)
{
needConfProd = datiProdAct.Pz2RecTot > 0 && !isSlave;
}
}
+1 -1
View File
@@ -73,7 +73,7 @@ namespace MP_TAB3.Components
}
/// <summary>
/// Dati produzioen rilevati
/// Dati produzione rilevati
/// </summary>
protected StatoProdModel? datiProdAct { get; set; } = null;
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2312.2210</Version>
<Version>6.16.2312.2211</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.2312.2210</h4>
<h4>Versione: 6.16.2312.2211</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2312.2210
6.16.2312.2211
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2312.2210</version>
<version>6.16.2312.2211</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>