Update x richeista ricalco,oBOM
This commit is contained in:
@@ -36,13 +36,7 @@ namespace Lux.API.Controllers
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string svgContent = "";
|
||||
|
||||
// se contiene ".svg" lo levo...
|
||||
if (id.EndsWith(".svg"))
|
||||
{
|
||||
id = id.Replace(".svg", "");
|
||||
}
|
||||
string retVal = "";
|
||||
|
||||
// ...se ricevo percorso --> leggo jwd/svg cablato
|
||||
if (currReq != null)
|
||||
@@ -62,11 +56,48 @@ namespace Lux.API.Controllers
|
||||
QuestionDTO currArgs = new QuestionDTO(nId, currReq.EnvType, DictExec);
|
||||
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
svgContent = "DONE";
|
||||
retVal = "DONE";
|
||||
}
|
||||
sw.Stop();
|
||||
Log.Info($"calcSvg | {sw.Elapsed.TotalMilliseconds:N3} ms");
|
||||
return Ok(svgContent);
|
||||
return Ok(retVal);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata POST: riceve Json in formato JWD serializzato, invia richiesta calcolo modo 2 (BOM)
|
||||
/// PUT: api/window/bom/00000000-0000-0000-0000-000000000000
|
||||
/// </summary>
|
||||
/// <param name="id">id oggetto</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("bom/{id}")]
|
||||
public async Task<ActionResult<string>> getBom(string id, [FromBody] string currSer)
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
string retVal = "";
|
||||
|
||||
// se messaggio vuoto --> uso default!
|
||||
currSer = string.IsNullOrEmpty(currSer) ? "" : currSer;
|
||||
|
||||
// ...se ricevo percorso --> leggo jwd/svg cablato
|
||||
if (!string.IsNullOrEmpty(currSer))
|
||||
{
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
// cablata la BOM
|
||||
DictExec.Add("Mode", "2");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
DictExec.Add("Jwd", currSer);
|
||||
int nId = 1;
|
||||
// da modificare con tipo richiesta...
|
||||
QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec);
|
||||
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
retVal = "DONE";
|
||||
}
|
||||
sw.Stop();
|
||||
Log.Info($"getBom | {sw.Elapsed.TotalMilliseconds:N3} ms");
|
||||
return Ok(retVal);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
Reference in New Issue
Block a user