update gestione BOM x BTL, update vari x conf settings channels

This commit is contained in:
Samuele Locatelli
2025-11-05 19:16:20 +01:00
parent 0174514b8e
commit bba55167d0
15 changed files with 106 additions and 32 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2511.0510</Version>
<Version>0.9.2511.0519</Version>
</PropertyGroup>
<ItemGroup>
+2
View File
@@ -60,6 +60,8 @@ var app = builder.Build();
string baseUrl = configuration.GetValue<string>("ServerConf:BaseUrl") ?? "";
app.UsePathBase(baseUrl);
logger.Info($"BaseUrl: {baseUrl}");
// log channels di ritorno UI
List<string> listParams = new List<string>() { "PngChannel", "SubChannel", "PubChannel", "SvgChannel" };
foreach (var param in listParams)
{
+2 -2
View File
@@ -63,9 +63,9 @@ namespace Lux.API.Services
{
// recupero UID ed SVG
string UID = retData.Args["UID"];
string newSvg = retData.Args["Png"];
string newPng = retData.Args["Png"];
// reinvio in redis (cache + channel)
await cacheService.SavePngAsync(UID, retData.ExecEnvironment, newSvg);
await cacheService.SavePngAsync(UID, retData.ExecEnvironment, newPng);
}
+8
View File
@@ -6,6 +6,14 @@
}
},
"ServerConf": {
"PngChannel": "luxdev:png:img",
"SvgChannel": "luxdev:svg:img",
"ShapeChannel": "luxdev:shape:curr",
"HwListChannel": "luxdev:hw:list",
"HwOptChannel": "luxdev:hw:opt",
"ProfListChannel": "luxdev:prof:list",
"BomChannel": "luxdev:bom",
"UpdateChannel": "luxdev:update",
"BaseUrl": "/lux/srv/",
//"PubChannel": "EgwDevEngineInput",
//"SubChannel": "EgwDevEngineOutput",
+8
View File
@@ -7,6 +7,14 @@
},
"ServerConf": {
"BaseUrl": "/lux/srv/",
"PngChannel": "Egw:png:img",
"SvgChannel": "Egw:svg:img",
"ShapeChannel": "Egw:shape:curr",
"HwListChannel": "Egw:hw:list",
"HwOptChannel": "Egw:hw:opt",
"ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"ImageBaseUrl": "https://office.egalware.com/lux/srv/api/window/"
+8
View File
@@ -6,6 +6,14 @@
}
},
"ServerConf": {
"PngChannel": "luxstag:png:img",
"SvgChannel": "luxstag:svg:img",
"ShapeChannel": "luxstag:shape:curr",
"HwListChannel": "luxstag:hw:list",
"HwOptChannel": "luxstag:hw:opt",
"ProfListChannel": "luxstag:prof:list",
"BomChannel": "luxstag:bom",
"UpdateChannel": "luxstag:update",
"BaseUrl": "/lux/srv/",
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput"
+18 -8
View File
@@ -58,14 +58,24 @@
"CalcTag": "calc",
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"PngChannel": "Egw:png:img",
"SvgChannel": "Egw:svg:img",
"ShapeChannel": "Egw:shape:curr",
"HwListChannel": "Egw:hw:list",
"HwOptChannel": "Egw:hw:opt",
"ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"PngChannel": "luxdev:png:img",
"SvgChannel": "luxdev:svg:img",
"ShapeChannel": "luxdev:shape:curr",
"HwListChannel": "luxdev:hw:list",
"HwOptChannel": "luxdev:hw:opt",
"ProfListChannel": "luxdev:prof:list",
"BomChannel": "luxdev:bom",
"UpdateChannel": "luxdev:update",
//"PngChannel": "Egw:png:img",
//"SvgChannel": "Egw:svg:img",
//"ShapeChannel": "Egw:shape:curr",
//"HwListChannel": "Egw:hw:list",
//"HwOptChannel": "Egw:hw:opt",
//"ProfListChannel": "Egw:prof:list",
//"BomChannel": "Egw:bom",
//"UpdateChannel": "Egw:update",
"BaseUrl": "/lux/srv/",
"ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/",
"ImageCalcTag": "svg-preview",
@@ -2,7 +2,7 @@
<div class="card-header">
<div class="d-flex justify-content-between">
<div class="px-0 fs-3">
<b>File Preview</b>
<b>Item:</b> <small>@CurrItem.OfferRowUID</small>
</div>
<div class="px-0">
<div class="input-group">
@@ -18,8 +18,9 @@
<ul class="list-group">
<li class="list-group-item Active">Info BTL</li>
<li class="list-group-item"># pezzi</li>
<li class="list-group-item"># barre</li>
<li class="list-group-item"># sezioni</li>
<li class="list-group-item">somma metri</li>
<li class="list-group-item">somma volume</li>
<li class="list-group-item">tempo totale</li>
</ul>
</div>
@@ -73,6 +73,7 @@ namespace Lux.UI.Components.Compo.FileMan
{
// init dizionari arg richiesta update
Dictionary<string, string> fileArgs = new Dictionary<string, string>();
Dictionary<string, string> bomArgs = new Dictionary<string, string>();
// leggo il contenuto del PRIMO (singolo) file
IBrowserFile file = e.File;
@@ -88,29 +89,46 @@ namespace Lux.UI.Components.Compo.FileMan
CurrItem.FileResource = trustedFileName;
CurrItem.FileName = file.Name;
CurrItem.FileSize = rawContent.LongCount();
// aggiungo contenuto come SerStruct (in attesa di valutare FS save...)
CurrItem.SerStruct = rawContent;
// salvo sul DB i dati (nome, nome sicuro, size...)
await DLService.OffertRowUpdateFileData(CurrItem);
// parametri richiesta
fileArgs.Add("FileName", $"{file.Name}");
fileArgs.Add("SerializedData", rawContent);
fileArgs.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}");
fileArgs.Add("SubMode", "2");
fileArgs.Add("FileName", $"{file.Name}");
fileArgs.Add("Height", "1200");
fileArgs.Add("Width", "1800");
//fileArgs.Add("Btl", rawContent);
fileArgs.Add("SerializedData", rawContent);
// invio!
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM;
calcRequestDTO.DictExec = fileArgs;
CalcRequestDTO calcRequestDTO = new CalcRequestDTO()
{
EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM,
DictExec = fileArgs
};
// richiesta PNG
await ICService.CallRestPost($"{ApiUrl}/{GenericBasePath}", $"{CalcTag}/{CurrItem.OfferRowUID}", calcRequestDTO);
// ora chiedo anche la BOM!
// aggiungo info x BOM
bomArgs.Add("FileName", $"{file.Name}");
bomArgs.Add("SerializedData", rawContent);
bomArgs.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}");
// ...infine chiedo anche la BOM!
calcRequestDTO = new CalcRequestDTO()
{
EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM,
DictExec = bomArgs
};
// richiesta BOM
await ICService.CallRestPost($"{ApiUrl}/{GenericBasePath}", $"{CalcTag}/{CurrItem.OfferRowUID}", calcRequestDTO);
#if false
// salvo in locale il file: SISTEMARE PERMESSI
saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent);
#endif
}
#endregion Private Methods
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
<Version>0.9.2511.0510</Version>
<Version>0.9.2511.0519</Version>
</PropertyGroup>
<ItemGroup>
+8
View File
@@ -6,6 +6,14 @@
}
},
"ServerConf": {
"PngChannel": "luxdev:png:img",
"SvgChannel": "luxdev:svg:img",
"ShapeChannel": "luxdev:shape:curr",
"HwListChannel": "luxdev:hw:list",
"HwOptChannel": "luxdev:hw:opt",
"ProfListChannel": "luxdev:prof:list",
"BomChannel": "luxdev:bom",
"UpdateChannel": "luxdev:update",
"PubChannel": "EgwDevEngineInput",
"SubChannel": "EgwDevEngineOutput"
}
+19 -8
View File
@@ -63,16 +63,27 @@
//"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api",
"ImageBaseUrl": "Image",
"RouteBaseUrl": "window",
"BomChannel": "Egw:bom",
"HwListChannel": "Egw:hw:list",
"HwOptChannel": "Egw:hw:opt",
"ProfListChannel": "Egw:prof:list",
"PngChannel": "luxdev:png:img",
"SvgChannel": "luxdev:svg:img",
"ShapeChannel": "luxdev:shape:curr",
"HwListChannel": "luxdev:hw:list",
"HwOptChannel": "luxdev:hw:opt",
"ProfListChannel": "luxdev:prof:list",
"BomChannel": "luxdev:bom",
"UpdateChannel": "luxdev:update",
//"BomChannel": "Egw:bom",
//"HwListChannel": "Egw:hw:list",
//"HwOptChannel": "Egw:hw:opt",
//"ProfListChannel": "Egw:prof:list",
//"ShapeChannel": "Egw:shape:curr",
//"PngChannel": "Egw:png:img",
//"SvgChannel": "Egw:svg:img",
//"UpdateChannel": "Egw:update",
"PubChannel": "EgwEngineInput",
"ShapeChannel": "Egw:shape:curr",
"SubChannel": "EgwEngineOutput",
"PngChannel": "Egw:png:img",
"SvgChannel": "Egw:svg:img",
"UpdateChannel": "Egw:update",
"ImageCalcTag": "live",
"ImageFileTag": "cache",
"ImageLiveTag": "svg",
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2511.0510</h4>
<h4>Versione: 0.9.2511.0519</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2511.0510
0.9.2511.0519
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2511.0510</version>
<version>0.9.2511.0519</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>