Aggiunta RUID (raw) come segnaposto x richieste verso CALC, da integrare bene ora...
This commit is contained in:
@@ -56,6 +56,11 @@ namespace Lux.API.Controllers
|
||||
{
|
||||
DictExec.Add("UID", id);
|
||||
}
|
||||
if (!DictExec.ContainsKey("RUID"))
|
||||
{
|
||||
// FixMe! todo! gestire con VERE richieste ID da servizio ReqIndexServicer!!!!
|
||||
DictExec.Add("RUID", GenerateId());
|
||||
}
|
||||
int nId = 1;
|
||||
// da modificare con tipo richiesta...
|
||||
QuestionDTO currArgs = new QuestionDTO(nId, currReq.EnvType, DictExec);
|
||||
@@ -68,6 +73,17 @@ namespace Lux.API.Controllers
|
||||
return Ok(retVal);
|
||||
}
|
||||
|
||||
private readonly Random _rnd = new Random();
|
||||
// ---------------------------------------------------------
|
||||
// ✅ ID incrementale: timestamp ms + random 4-6 chars
|
||||
// ---------------------------------------------------------
|
||||
private string GenerateId()
|
||||
{
|
||||
long ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
||||
string rand = Convert.ToString(_rnd.Next(0x1000, 0xFFFF), 16).ToUpper();
|
||||
return $"{ts}-{rand}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata POST: riceve Json in formato JWD serializzato, invia richiesta calcolo modo 2 (BOM)
|
||||
/// PUT: api/window/bom/00000000-0000-0000-0000-000000000000
|
||||
@@ -92,6 +108,10 @@ namespace Lux.API.Controllers
|
||||
DictExec.Add("Mode", $"{(int)Enums.QuestionModes.BOM}");
|
||||
// UID cablato x ora...
|
||||
DictExec.Add("UID", id);
|
||||
|
||||
// FixMe! todo! gestire con VERE richieste ID da servizio ReqIndexServicer!!!!
|
||||
DictExec.Add("RUID", GenerateId());
|
||||
|
||||
DictExec.Add("SerializedData", currSer);
|
||||
int nId = 1;
|
||||
// da modificare con tipo richiesta...
|
||||
|
||||
Reference in New Issue
Block a user