diff --git a/MP.IOC/Controllers/IOBController.cs b/MP.IOC/Controllers/IOBController.cs
index 17791532..12214c94 100644
--- a/MP.IOC/Controllers/IOBController.cs
+++ b/MP.IOC/Controllers/IOBController.cs
@@ -171,6 +171,38 @@ namespace MP.IOC.Controllers
}
}
+ ///
+ /// Restituisce la quantità pezzi dell'odl correntemente in lavorazione sulla macchina...
+ /// GET: IOB/getCurrOdlQtaReq/SIMUL_01
+ ///
+ ///
+ ///
+ [HttpGet("getCurrOdlQtaReq/{id}")]
+ public async Task GetCurrOdlQtaReq(string id)
+ {
+ if (string.IsNullOrEmpty(id)) return BadRequest("Missing ID");
+
+ // Multi: gestione carattere "|" trasformato in "#"
+ id = id.Replace("|", "#");
+
+ int answ = 0;
+ // chiamo metodo redis/db...
+ try
+ {
+ var odlData = await DService.OdlCurrByMaccAsync(id);
+ if (odlData != null && odlData.DataInizio.HasValue)
+ {
+ answ = odlData.NumPezzi;
+ }
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Eccezione in recupero GetCurrOdlQtaReq{Environment.NewLine}{exc}");
+ return StatusCode(StatusCodes.Status500InternalServerError, "NO");
+ }
+ return Ok(answ);
+ }
+
///
/// Restituisce data-ora inizio dell'odl correntemente in lavorazione sulla macchina...
/// es: http://url_site/MP/IO/IOB/getCurrOdlStart/SIMUL_03