TAB3: fix invio parametri come Donati
This commit is contained in:
@@ -168,8 +168,14 @@
|
||||
}
|
||||
</div>
|
||||
<div class="col d-flex justify-content-between">
|
||||
@if (!showPOdlData)
|
||||
@if (CurrOdl != null && !showPOdlData)
|
||||
{
|
||||
<div class="px-0 small">
|
||||
Inizio:
|
||||
</div>
|
||||
<div class="px-0 text-end fw-bold">
|
||||
@($"{CurrOdl.DataInizio:ddd yyyy.MM.dd HH:mm:ss}")
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -546,7 +546,7 @@ namespace MP_TAB3.Components
|
||||
***************************************************/
|
||||
|
||||
// preparo gestione progress display
|
||||
MaxVal = 11;
|
||||
MaxVal = 10;
|
||||
int currStep = 0;
|
||||
// elimino dati status...
|
||||
isProcessing = true;
|
||||
@@ -630,47 +630,10 @@ namespace MP_TAB3.Components
|
||||
sb.AppendLine(String.Format(evText, idxODL_curr));
|
||||
await processaEvento(IdxMaccSel, idxEvento, sb.ToString(), idxODL_curr);
|
||||
await advStep(currStep++);
|
||||
// indico INIZIO SETUP su REDIS come EXE della macchina...
|
||||
string ts = string.Format("{0:yyMMdd}T{0:HHmmss.fff}Z", DateTime.Now);
|
||||
string outData = $"TS:{ts}|MATR:{MatrOpr}|ODL:{idxODL_curr}";
|
||||
// aggiungo articolo, commessa, richiesta pezzi...
|
||||
try
|
||||
{
|
||||
var datiODL = await TabDServ.OdlCurrByMacc(IdxMaccSel, true);
|
||||
string setArtVal = $"{datiODL.CodArticolo}";
|
||||
string setPzCommVal = $"{datiODL.NumPezzi}";
|
||||
string setCommVal = $"ODL{datiODL.IdxOdl:00000000}";
|
||||
// FIXME TODO: scrivere come sotto? testare valvital x linea LASCO
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.startSetup, outData);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setArt, setArtVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setComm, setCommVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setPzComm, setPzCommVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setArt", setArtVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setComm", setCommVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setPzComm", setPzCommVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setParameter, "ForceUpdate");
|
||||
await advStep(currStep++);
|
||||
// li aggiungo ANCHE sui PLC slave se ci sono...
|
||||
if (isMaster)
|
||||
{
|
||||
// calcolo gli slave...
|
||||
var slaveList = SMServ.ListM2S
|
||||
.Where(x => x.IdxMacchina.Equals(IdxMaccSel, StringComparison.InvariantCultureIgnoreCase))
|
||||
.ToList();
|
||||
foreach (var machine in slaveList)
|
||||
{
|
||||
outData = $"TS:{ts}|MATR:{MatrOpr}|Master Machine: {IdxMaccSel}";
|
||||
// invio chiusura attrezzaggio
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.startSetup, outData);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setArt", setArtVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setComm", setCommVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setPzComm", setPzCommVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setParameter, "ForceUpdate");
|
||||
}
|
||||
}
|
||||
await sendTaskOdl(idxODL_curr);
|
||||
await advStep(currStep++);
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -743,6 +706,48 @@ namespace MP_TAB3.Components
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task sendTaskOdl(int idxODL_curr)
|
||||
{
|
||||
// indico INIZIO SETUP su REDIS come EXE della macchina...
|
||||
string ts = string.Format("{0:yyMMdd}T{0:HHmmss.fff}Z", DateTime.Now);
|
||||
string outData = $"TS:{ts}|MATR:{MatrOpr}|ODL:{idxODL_curr}";
|
||||
var datiODL = await TabDServ.OdlCurrByMacc(IdxMaccSel, true);
|
||||
string setArtVal = $"{datiODL.CodArticolo}";
|
||||
string setPzCommVal = $"{datiODL.NumPezzi}";
|
||||
string setCommVal = $"ODL{datiODL.IdxOdl:00000000}";
|
||||
// FIXME TODO: scrivere come sotto? testare valvital x linea LASCO
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.startSetup, outData);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setArt, setArtVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setComm, setCommVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setPzComm, setPzCommVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setArt", setArtVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setComm", setCommVal);
|
||||
TabDServ.MachineParamUpdate(IdxMaccSel, "setPzComm", setPzCommVal);
|
||||
TabDServ.addTask4Machine(IdxMaccSel, taskType.setParameter, "ForceUpdate");
|
||||
//await advStep(currStep++);
|
||||
// li aggiungo ANCHE sui PLC slave se ci sono...
|
||||
if (isMaster)
|
||||
{
|
||||
// calcolo gli slave...
|
||||
var slaveList = SMServ.ListM2S
|
||||
.Where(x => x.IdxMacchina.Equals(IdxMaccSel, StringComparison.InvariantCultureIgnoreCase))
|
||||
.ToList();
|
||||
foreach (var machine in slaveList)
|
||||
{
|
||||
outData = $"TS:{ts}|MATR:{MatrOpr}|Master Machine:{IdxMaccSel}";
|
||||
// invio chiusura attrezzaggio
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.startSetup, outData);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setArt", setArtVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setComm", setCommVal);
|
||||
TabDServ.MachineParamUpdate(machine.IdxMacchinaSlave, "setPzComm", setPzCommVal);
|
||||
TabDServ.addTask4Machine(machine.IdxMacchinaSlave, taskType.setParameter, "ForceUpdate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
//baseLang = SMServ.GetConf("baseLang");
|
||||
@@ -1075,7 +1080,7 @@ namespace MP_TAB3.Components
|
||||
SDService.MachProdStRem(IdxMaccSel);
|
||||
|
||||
// preparo gestione progress display
|
||||
MaxVal = 9;
|
||||
MaxVal = 10;
|
||||
int currStep = 0;
|
||||
await advStep(currStep);
|
||||
|
||||
@@ -1123,6 +1128,12 @@ namespace MP_TAB3.Components
|
||||
await advStep(currStep++);
|
||||
showSplitOdlRiattr = false;
|
||||
await ReloadXDL(true);
|
||||
// invio richiesta reset NUOVO ODL...
|
||||
if (IdxOdl > 0)
|
||||
{
|
||||
await sendTaskOdl(IdxOdl);
|
||||
}
|
||||
await advStep(currStep++);
|
||||
// chiudo update...
|
||||
isProcessing = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
@@ -8,26 +8,6 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
public partial class ProdConfirm
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private bool chkPzBuoniNeg = false;
|
||||
|
||||
private bool confRett = false;
|
||||
|
||||
private bool enableMagPrint = false;
|
||||
|
||||
private bool enablePzProdLasciati = false;
|
||||
|
||||
private bool isMulti = false;
|
||||
|
||||
private string lblOut = "";
|
||||
|
||||
private int modoConfProd = 0;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
@@ -95,7 +75,6 @@ namespace MP_TAB3.Components
|
||||
protected StatoProdModel? datiProdAct { get; set; } = null;
|
||||
|
||||
protected DateTime dtFine { get; set; } = DateTime.Today.AddMonths(-1);
|
||||
|
||||
protected DateTime dtInizio { get; set; } = DateTime.Today.AddMonths(-2);
|
||||
|
||||
/// <summary>
|
||||
@@ -145,7 +124,6 @@ namespace MP_TAB3.Components
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
protected int numPz2Rec { get; set; } = 0;
|
||||
|
||||
protected int numPzBuoniConf { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
@@ -172,13 +150,10 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
protected int numPzProdotti { get; set; } = 0;
|
||||
|
||||
protected int numPzProdotti2Rec { get; set; } = 0;
|
||||
|
||||
protected int numPzRilav2Rec { get; set; } = 0;
|
||||
protected int numPzRilavConf { get; set; } = 0;
|
||||
protected int numPzScaConf { get; set; } = 0;
|
||||
|
||||
protected int numPzScarto2Rec { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
@@ -226,31 +201,6 @@ namespace MP_TAB3.Components
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private bool confProdActive { get; set; } = false;
|
||||
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
|
||||
private DateTime dtReqUpdate { get; set; } = DateTime.Now;
|
||||
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
|
||||
private bool isProcessing { get; set; } = false;
|
||||
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
get => MsgServ.MatrOpr;
|
||||
}
|
||||
|
||||
private int numPzLasc { get; set; } = 0;
|
||||
|
||||
private bool showConfirm { get; set; } = true;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -296,21 +246,24 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
numPzLasciati = 0;
|
||||
}
|
||||
// verifico se la macchina sia configurata tra le MSFD...
|
||||
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
|
||||
if (!confDone)
|
||||
{
|
||||
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
|
||||
}
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
if (isMulti)
|
||||
{
|
||||
var idxMSel = MsgServ.UserPrefGet(IdxMaccSel);
|
||||
if (!string.IsNullOrEmpty(idxMSel))
|
||||
// verifico se la macchina sia configurata tra le MSFD...
|
||||
if (SMServ.DictMacchMulti.ContainsKey(RecMSE.IdxMacchina))
|
||||
{
|
||||
IdxMaccSel = idxMSel;
|
||||
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
|
||||
}
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
if (isMulti)
|
||||
{
|
||||
var idxMSel = MsgServ.UserPrefGet(IdxMaccSel);
|
||||
if (!string.IsNullOrEmpty(idxMSel))
|
||||
{
|
||||
IdxMaccSel = idxMSel;
|
||||
}
|
||||
}
|
||||
}
|
||||
//salvo lastRec...
|
||||
// salvo lastRec...
|
||||
lastRecMSE = RecMSE;
|
||||
dtReqUpdate = DateTime.Now.AddMilliseconds(100);
|
||||
await DoUpdate();
|
||||
@@ -382,6 +335,53 @@ namespace MP_TAB3.Components
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private bool chkPzBuoniNeg = false;
|
||||
|
||||
private bool confRett = false;
|
||||
|
||||
private bool enableMagPrint = false;
|
||||
|
||||
private bool enablePzProdLasciati = false;
|
||||
|
||||
private bool confDone = false;
|
||||
private bool isMulti = false;
|
||||
private bool isSlave = false;
|
||||
|
||||
private string lblOut = "";
|
||||
|
||||
private int modoConfProd = 0;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private bool confProdActive { get; set; } = false;
|
||||
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
|
||||
private DateTime dtReqUpdate { get; set; } = DateTime.Now;
|
||||
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
|
||||
private bool isProcessing { get; set; } = false;
|
||||
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
get => MsgServ.MatrOpr;
|
||||
}
|
||||
|
||||
private int numPzLasc { get; set; } = 0;
|
||||
|
||||
private bool showConfirm { get; set; } = true;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2503.1314</Version>
|
||||
<Version>6.16.2503.1315</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2503.1314</h4>
|
||||
<h4>Versione: 6.16.2503.1315</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2503.1314
|
||||
6.16.2503.1315
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2503.1314</version>
|
||||
<version>6.16.2503.1315</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>
|
||||
|
||||
Reference in New Issue
Block a user