Update MP-IO x metodo conteggio pz ODL

This commit is contained in:
Samuele Locatelli
2023-10-13 18:34:47 +02:00
parent 3a13b76bae
commit 91f5754a79
+30 -1
View File
@@ -759,7 +759,36 @@ namespace MP_IO.Controllers
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in recupero getCurrOdlRow{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
logger.lg.scriviLog($"Eccezione in getCurrOdlRow{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
return answ;
}
/// <summary>
/// Restituisce la quantità pezzi dell'odl correntemente in lavorazione sulla macchina...
/// GET: IOB/getCurrOdlQtaReq/SIMUL_01
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public int getCurrOdlQtaReq(string id)
{
// attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il
// carattere "|" che poi trasformiamo ora in "#"
id = id.Replace("|", "#");
int answ = 0;
DS_ProdTempi.ODLDataTable currData = null;
// chiamo metodo redis/db...
try
{
DataLayer DataLayerObj = new DataLayer();
currData = DataLayerObj.currODLRowTab(id);
if (currData != null && currData.Count > 0)
{
answ = currData[0].NumPezzi;
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in getCurrOdlQtaReq{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
return answ;
}