Update controllers
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Lux.API.Controllers
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public WindowController(IConfiguration config, ImageCacheService imgServ, IRedisService redisService)
|
||||
public WindowController(IConfiguration config, IRedisService redisService, ImageCacheService imgServ)
|
||||
{
|
||||
_config = config;
|
||||
_redisService = redisService;
|
||||
@@ -32,7 +32,7 @@ namespace Lux.API.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata POST: riceve Json in formato JWD serializzato, invia richeista calcolo modo 2 (BOM)
|
||||
/// 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>
|
||||
@@ -56,19 +56,16 @@ namespace Lux.API.Controllers
|
||||
// ...se ricevo percorso --> leggo jwd/svg cablato
|
||||
if (!string.IsNullOrEmpty(currJwd))
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
DictExec.Add("Mode", "2");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
DictExec.Add("Jwd", currJwd);
|
||||
int nId = 1;
|
||||
ProcessArgs currArgs = new ProcessArgs(nId, DictExec);
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
DictExec.Add("Mode", "2");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
DictExec.Add("Jwd", currJwd);
|
||||
int nId = 1;
|
||||
ProcessArgs currArgs = new ProcessArgs(nId, DictExec);
|
||||
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
svgContent = "DONE";
|
||||
}
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
svgContent = "DONE";
|
||||
}
|
||||
sw.Stop();
|
||||
Log.Info($"getBom | {sw.Elapsed.TotalMilliseconds:N3} ms");
|
||||
@@ -76,7 +73,7 @@ namespace Lux.API.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata POST: riceve Json in formato JWD serializzato, lo ripete come risposta
|
||||
/// Chiamata GET: restituisce file SVG (da file o da cache)
|
||||
/// PUT: api/window/svg/00000000-0000-0000-0000-000000000000
|
||||
/// </summary>
|
||||
/// <param name="id">id oggetto</param>
|
||||
@@ -98,7 +95,7 @@ namespace Lux.API.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata POST: riceve Json in formato JWD serializzato, lo ripete come risposta
|
||||
/// Chiamata GET: restituisce file SVG (da file o da cache)
|
||||
/// PUT: api/window/svg-file/00000000-0000-0000-0000-000000000000
|
||||
/// </summary>
|
||||
/// <param name="id">id oggetto</param>
|
||||
@@ -154,19 +151,16 @@ namespace Lux.API.Controllers
|
||||
// ...se ricevo percorso --> leggo jwd/svg cablato
|
||||
if (!string.IsNullOrEmpty(currJwd))
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
DictExec.Add("Mode", "1");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
DictExec.Add("Jwd", currJwd);
|
||||
int nId = 1;
|
||||
ProcessArgs currArgs = new ProcessArgs(nId, DictExec);
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
DictExec.Add("Mode", "1");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
DictExec.Add("Jwd", currJwd);
|
||||
int nId = 1;
|
||||
ProcessArgs currArgs = new ProcessArgs(nId, DictExec);
|
||||
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
svgContent = "DONE";
|
||||
}
|
||||
await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs);
|
||||
svgContent = "DONE";
|
||||
}
|
||||
sw.Stop();
|
||||
Log.Info($"calcSvg | {sw.Elapsed.TotalMilliseconds:N3} ms");
|
||||
|
||||
Reference in New Issue
Block a user