Modifica gestore DB x salvataggio info BOM restituite

This commit is contained in:
Samuele Locatelli
2025-08-07 17:23:58 +02:00
parent 293bec8f52
commit 8d7569baa7
13 changed files with 78 additions and 40 deletions
+13 -5
View File
@@ -12,9 +12,15 @@ namespace Lux.API.Services
{
#region Public Constructors
public ExternalMessageProcessor(ImageCacheService imgService)
/// <summary>
/// Init classe message processor con accesso REDIS e DB
/// </summary>
/// <param name="imgService"></param>
/// <param name="dlService"></param>
public ExternalMessageProcessor(ImageCacheService imgService, DataLayerServices dlService)
{
_cacheService = imgService;
cacheService = imgService;
dbService = dlService;
}
#endregion Public Constructors
@@ -43,14 +49,15 @@ namespace Lux.API.Services
// salvo SVG
string newSvg = retData.Args["Svg"];
string UID = retData.Args["UID"];
await _cacheService.SaveSvgAsync(UID, retData.ExecEnvironment, newSvg);
await cacheService.SaveSvgAsync(UID, retData.ExecEnvironment, newSvg);
}
if(retData.Args.ContainsKey("BOM"))
{
// salvo BOM ricevuta
string newBom = retData.Args["BOM"];
string UID = retData.Args["UID"];
await _cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
await cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
await dbService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
}
}
}
@@ -74,7 +81,8 @@ namespace Lux.API.Services
#region Private Fields
private readonly ImageCacheService _cacheService;
private readonly ImageCacheService cacheService;
private readonly DataLayerServices dbService;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields