update x salvataggio ritorno BOM in stima ODL

This commit is contained in:
Samuele Locatelli
2026-01-23 17:21:49 +01:00
parent dfbdb8d441
commit 7dd060a493
8 changed files with 155 additions and 57 deletions
+11 -1
View File
@@ -105,6 +105,16 @@ namespace Lux.API.Services
* ----------------------------------------*/
string UID = retData.Args["UID"];
string RUID = "";
string sMode = retData.Args["Mode"];
Egw.Window.Data.Enums.QuestionModes cMode = QuestionModes.NULL;
if (int.TryParse(sMode, out int iMode))
{
bool modeValido = Enum.IsDefined(typeof(QuestionModes), iMode);
if (modeValido)
{
cMode = (QuestionModes)iMode;
}
}
// gestione RUID
if (retData.Args.ContainsKey("RUID"))
@@ -145,7 +155,7 @@ namespace Lux.API.Services
// salvo BOM ricevuta RAW in redis (cache)
await cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
// salvo la BOM completa con i dati recuperati dal DB
await dbService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
await dbService.SaveBomAsync(UID, cMode, retData.ExecEnvironment, newBom);
// reset cache redis...
await cacheService.ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*");
await cacheService.ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*");