Aggiunta RUID (raw) come segnaposto x richieste verso CALC, da integrare bene ora...
This commit is contained in:
@@ -64,6 +64,9 @@ namespace Lux.API.Controllers
|
||||
DictExec.Add("Mode", $"{(int)Egw.Window.Data.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", currJwd);
|
||||
int nId = 1;
|
||||
// da modificare con tipo richiesta...
|
||||
@@ -77,6 +80,17 @@ namespace Lux.API.Controllers
|
||||
return Ok(svgContent);
|
||||
}
|
||||
|
||||
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 GET: invia richiesta modo 3 (HardwareModelList) che sarà poi salvata
|
||||
/// GET: api/window/hwlist
|
||||
@@ -106,6 +120,8 @@ namespace Lux.API.Controllers
|
||||
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.HARDWARE}");
|
||||
// da rivedere?
|
||||
DictExec.Add("UID", "HW.AGB");
|
||||
// FixMe! todo! gestire con VERE richieste ID da servizio ReqIndexServicer!!!!
|
||||
DictExec.Add("RUID", GenerateId());
|
||||
DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionHwSubModes.LIST}");
|
||||
DictExec.Add("Manufacturer", $"{(int)Egw.Window.Data.Enums.HardwareManufacturers.AGB}");
|
||||
int nId = 1;
|
||||
@@ -192,7 +208,7 @@ namespace Lux.API.Controllers
|
||||
id = id.Replace(".svg", "");
|
||||
}
|
||||
// se contiene i caratteri casuali x forzare reload --> li levo
|
||||
if(id.Contains("-"))
|
||||
if (id.Contains("-"))
|
||||
{
|
||||
id = id.Substring(0, id.IndexOf("-"));
|
||||
}
|
||||
@@ -242,6 +258,8 @@ namespace Lux.API.Controllers
|
||||
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}");
|
||||
// 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", currJwd);
|
||||
int nId = 1;
|
||||
// da modificare con tipo richiesta...
|
||||
|
||||
Reference in New Issue
Block a user