Aggiunta chiamata getCurrOdlQtaReq
This commit is contained in:
@@ -171,6 +171,38 @@ namespace MP.IOC.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce la quantità pezzi dell'odl correntemente in lavorazione sulla macchina...
|
||||
/// GET: IOB/getCurrOdlQtaReq/SIMUL_01
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getCurrOdlQtaReq/{id}")]
|
||||
public async Task<IActionResult> 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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce data-ora inizio dell'odl correntemente in lavorazione sulla macchina...
|
||||
/// es: http://url_site/MP/IO/IOB/getCurrOdlStart/SIMUL_03
|
||||
|
||||
Reference in New Issue
Block a user