From d0f32c6c5d543fcc7fa91e3e8024296d4c1d709d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 17:21:06 +0100 Subject: [PATCH 01/21] Bozza modifica img unificata SVG/PNG --- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 8 +- .../Services/ImageCacheService.cs | 9 +- Lux.API/Controllers/GenericController.cs | 2 +- Lux.API/Controllers/ImageController.cs | 133 +++++++++++++++--- Lux.API/Controllers/WindowController.cs | 4 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor | 1 - Lux.UI/Components/Compo/OfferRowMan.razor.cs | 19 ++- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 148 insertions(+), 38 deletions(-) diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 4f48ae54..67ec17bf 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -44,10 +44,10 @@ namespace EgwCoreLib.Lux.Data // init dati x invio serializzazioni da environment modelBuilder.Entity().HasData( - new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, SerStrucKey = "Jwd" }, - new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, SerStrucKey = "Btl" }, - new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, SerStrucKey = "Btl" }, - new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, SerStrucKey = "Btl" } + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, SerStrucKey = "SerializedData" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, SerStrucKey = "SerializedData" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, SerStrucKey = "SerializedData" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, SerStrucKey = "SerializedData" } ); modelBuilder.Entity().HasData( diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index 274b47be..b50ccdd1 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -123,12 +123,19 @@ namespace EgwCoreLib.Lux.Data.Services public string ImageUrl(string baseUrl, bool isLive, string imgUID, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { string tag = isLive ? liveTag : cacheTag; + string fType = "undef"; if (imgUID.EndsWith(".svg")) { + fType = "svg"; imgUID.Replace(".svg", ""); } + else if (imgUID.EndsWith(".png")) + { + fType = "png"; + imgUID.Replace(".png", ""); + } string rndImg = $"{DateTime.Now:HHmmssfff}"; - string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.svg?envir={envir}".Replace("////", "//"); + string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?envir={envir}".Replace("////", "//"); return fullUrl; } diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs index 048c9b62..fc1a9a72 100644 --- a/Lux.API/Controllers/GenericController.cs +++ b/Lux.API/Controllers/GenericController.cs @@ -92,7 +92,7 @@ namespace Lux.API.Controllers DictExec.Add("Mode", $"{(int)Enums.QuestionModes.BOM}"); // UID cablato x ora... DictExec.Add("UID", id); - DictExec.Add("Jwd", currSer); + DictExec.Add("SerializedData", currSer); int nId = 1; // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); diff --git a/Lux.API/Controllers/ImageController.cs b/Lux.API/Controllers/ImageController.cs index 9501e2d2..2cf19496 100644 --- a/Lux.API/Controllers/ImageController.cs +++ b/Lux.API/Controllers/ImageController.cs @@ -1,7 +1,9 @@ using EgwCoreLib.Lux.Data.Services; +using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using NLog; +using System; using System.Diagnostics; using System.Text; @@ -11,11 +13,45 @@ namespace Lux.API.Controllers [ApiController] public class ImageController : ControllerBase { + #region Public Constructors + public ImageController(ImageCacheService imgServ, ILogger logger) { _imgService = imgServ; _logger = logger; } + + #endregion Public Constructors + + #region Public Methods + + /// + /// Chiamata GET: restituisce file PNG (da file o da cache) + /// PUT: api/image/png/00000000-0000-0000-0000-000000000000 + /// + /// id oggetto + /// + [HttpGet("png/{id}")] + public async Task png(string id) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + string base64Encoded = ""; + byte[] decodedBytes = new byte[0]; + // ...se ricevo percorso --> leggo jwd/svg cablato + if (!string.IsNullOrEmpty(id)) + { + // bonifica nome svg da + base64Encoded = _imgService.LoadPng(id, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM); + // converto base64 + decodedBytes = Convert.FromBase64String(base64Encoded); + } + sw.Stop(); + Log.Info($"pngString | {sw.Elapsed.TotalMilliseconds:N3} ms"); + //return Ok(decodedString); + return File(decodedBytes, "image/png"); + } + /// /// Chiamata GET: riceve Json in formato JwdDto, restituisce svg file /// GET: api/Jwd/svg/00000000-0000-0000-0000-000000000000 @@ -35,37 +71,98 @@ namespace Lux.API.Controllers return File(bytes, "image/svg+xml"); } - /// - /// Chiamata GET: restituisce file PNG (da file o da cache) - /// PUT: api/image/png/00000000-0000-0000-0000-000000000000 + /// Chiamata GET: restituisce file SVG/PNG (da file o cache REDIS), eliminando nome rand (x force refresh) + /// GET: api/image/file/OFF0000001.001.svg?env=WINDOW + /// GET: api/image/cache/OFF0000001.001.svg?env=WINDOW + /// GET: api/image/file/OFF0000002.001.png?env=WINDOW + /// GET: api/image/cache/OFF0000002.001.png?env=WINDOW + /// GET: api/image/file/OFF0000002.002-123456.png?env=WINDOW + /// GET: api/image/cache/OFF0000002.002-123456.png?env=WINDOW /// - /// id oggetto + /// uid oggetto + /// environment oggetto /// - [HttpGet("png/{id}")] - public async Task png(string id) + [HttpGet("{id}")] + //[HttpGet("file/{id}")] + //[HttpGet("cache/{id}")] + public async Task cacheFile(string id, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS env = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { Stopwatch sw = new Stopwatch(); sw.Start(); - string base64Encoded = ""; - byte[] decodedBytes = new byte[0]; + + if (string.IsNullOrEmpty(id)) + return NotFound(); + + string mimeType = "txt"; + byte[] bytes = new byte[0]; // ...se ricevo percorso --> leggo jwd/svg cablato if (!string.IsNullOrEmpty(id)) { - // bonifica nome svg da - base64Encoded = _imgService.LoadPng(id, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM); - // converto base64 - decodedBytes = Convert.FromBase64String(base64Encoded); + // se contiene ".svg" lo levo... + if (id.EndsWith(".svg")) + { + mimeType = "image/svg+xml"; + //id = id.Replace(".svg", ""); + } + else if (id.EndsWith(".png")) + { + mimeType = "image/png"; + //id.Replace(".png", ""); + } + // se contiene i caratteri casuali x forzare reload --> li levo + if (id.Contains("-")) + { + id = id.Substring(0, id.IndexOf("-")); + } + + // secondo del tipo + envr decodifico valore corretto + switch (env) + { + case Constants.EXECENVIRONMENTS.NULL: + break; + case Constants.EXECENVIRONMENTS.WINDOW: + mimeType = "image/svg+xml"; + string svgContent = await _imgService.LoadSvgAsync(id, env); + // se vuoto --> leggo img logo... + if (string.IsNullOrEmpty(svgContent)) + { + string filePath = Path.Combine("DemoImg", "LogoEgalware.svg"); + svgContent = await System.IO.File.ReadAllTextAsync(filePath); + } + bytes = Encoding.UTF8.GetBytes(svgContent); + break; + case Constants.EXECENVIRONMENTS.BEAM: + case Constants.EXECENVIRONMENTS.WALL: + case Constants.EXECENVIRONMENTS.CABINET: + default: + mimeType = "image/png"; + string base64Encoded = _imgService.LoadPng(id, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM); + // converto base64 + bytes = Convert.FromBase64String(base64Encoded); + break; + } } sw.Stop(); - Log.Info($"pngString | {sw.Elapsed.TotalMilliseconds:N3} ms"); - //return Ok(decodedString); - return File(decodedBytes, "image/png"); + Log.Info($"{mimeType} | {sw.Elapsed.TotalMilliseconds:N3} ms"); + return File(bytes, mimeType); } - private ImageCacheService _imgService { get; set; } - private readonly ILogger _logger; + + #endregion Public Methods + + #region Private Fields + private static Logger Log = LogManager.GetCurrentClassLogger(); + private readonly ILogger _logger; + + #endregion Private Fields + + #region Private Properties + + private ImageCacheService _imgService { get; set; } + + #endregion Private Properties } -} +} \ No newline at end of file diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index 479b52aa..3e6b752d 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -64,7 +64,7 @@ namespace Lux.API.Controllers DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}"); // UID cablato x ora... DictExec.Add("UID", id); - DictExec.Add("Jwd", currJwd); + DictExec.Add("SerializedData", currJwd); int nId = 1; // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); @@ -242,7 +242,7 @@ namespace Lux.API.Controllers DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}"); // UID cablato x ora... DictExec.Add("UID", id); - DictExec.Add("Jwd", currJwd); + DictExec.Add("SerializedData", currJwd); int nId = 1; // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 2918b445..15480cf1 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0318 + 0.9.2511.0417 diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index ff07f72c..87df8a22 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -88,7 +88,6 @@ else - @* @item.RowNum *@ @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 72375eeb..0681cfa2 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -711,9 +711,9 @@ namespace Lux.UI.Components.Compo await reqBomUpdate(EditRecord); } // aggiorno nel dizionari - if (reqDict.ContainsKey("Jwd")) + if (reqDict.ContainsKey("SerializedData")) { - reqDict["Jwd"] = prevJwd; + reqDict["SerializedData"] = prevJwd; } if (reqDict != null && reqDict.Count > 0) @@ -1058,7 +1058,7 @@ namespace Lux.UI.Components.Compo Dictionary DictExec = new Dictionary(); // verifico parametri da conf envir... var envRec = AllConfEnvir.FirstOrDefault(x => x.EnvirID == currRec.Envir); - string serKey = envRec != null ? envRec.SerStrucKey : "Jwd"; + string serKey = envRec != null ? envRec.SerStrucKey : "SerializedData"; // cablata la BOM DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}"); // UID cablato x ora... @@ -1108,9 +1108,9 @@ namespace Lux.UI.Components.Compo if (EditRecord != null) { // SE contiene il mio Jwd... - if (args.ContainsKey("Jwd")) + if (args.ContainsKey("SerializedData")) { - string serStruct = args["Jwd"]; + string serStruct = args["SerializedData"]; // controllo SE variato... if (!prevJwd.Equals(serStruct) || !EgwCoreLib.Utils.DictUtils.DictAreEqual(reqDict, args)) { @@ -1231,13 +1231,20 @@ namespace Lux.UI.Components.Compo // parametri richiesta fileArgs.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}"); - fileArgs.Add("Btl", rawContent); + 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; await ICService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO); + // ora chiedo anche la BOM! + #if false // salvo in locale il file: SISTEMARE PERMESSI saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 9b58d213..e2fcfaf3 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0318 + 0.9.2511.0417 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 277c271a..13597d39 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.0318

+

Versione: 0.9.2511.0417


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 081d5110..3fcebeaf 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0318 +0.9.2511.0417 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 803dc1a4..63fb2cc5 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0318 + 0.9.2511.0417 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 9303320cdcd2f509c7baa0df0c4e401488a3a60a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 17:39:59 +0100 Subject: [PATCH 02/21] Update image in test... --- EgwCoreLib.Lux.Data/Services/ImageCacheService.cs | 15 +++++++++++++++ Lux.API/Controllers/ImageController.cs | 12 ------------ Lux.UI/appsettings.json | 4 ++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index b50ccdd1..6b2c755f 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -134,6 +134,21 @@ namespace EgwCoreLib.Lux.Data.Services fType = "png"; imgUID.Replace(".png", ""); } + switch (envir) + { + case Constants.EXECENVIRONMENTS.NULL: + break; + case Constants.EXECENVIRONMENTS.WINDOW: + fType = "svg"; + break; + case Constants.EXECENVIRONMENTS.BEAM: + case Constants.EXECENVIRONMENTS.WALL: + case Constants.EXECENVIRONMENTS.CABINET: + default: + fType = "png"; + break; + } + string rndImg = $"{DateTime.Now:HHmmssfff}"; string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?envir={envir}".Replace("////", "//"); return fullUrl; diff --git a/Lux.API/Controllers/ImageController.cs b/Lux.API/Controllers/ImageController.cs index 2cf19496..cd7c7879 100644 --- a/Lux.API/Controllers/ImageController.cs +++ b/Lux.API/Controllers/ImageController.cs @@ -99,18 +99,6 @@ namespace Lux.API.Controllers // ...se ricevo percorso --> leggo jwd/svg cablato if (!string.IsNullOrEmpty(id)) { - // se contiene ".svg" lo levo... - if (id.EndsWith(".svg")) - { - mimeType = "image/svg+xml"; - //id = id.Replace(".svg", ""); - } - else if (id.EndsWith(".png")) - { - mimeType = "image/png"; - //id.Replace(".png", ""); - } - // se contiene i caratteri casuali x forzare reload --> li levo if (id.Contains("-")) { diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 74068ca7..f786bf0d 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -59,9 +59,9 @@ "HostOs": "Win", "CalcTag": "calc", "GenericBaseUrl": "generic", - //"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", "Prog.ApiUrl": "https://localhost:7135/api", - "ImageBaseUrl": "window", + //"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", + "ImageBaseUrl": "Image", "RouteBaseUrl": "window", "BomChannel": "Egw:bom", "HwListChannel": "Egw:hw:list", From 2e4500f93496cf9701790e436a680ddcb3849a82 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 17:53:05 +0100 Subject: [PATCH 03/21] update conf path image cache --- Lux.API/Controllers/ImageController.cs | 8 ++++---- Lux.UI/appsettings.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lux.API/Controllers/ImageController.cs b/Lux.API/Controllers/ImageController.cs index cd7c7879..924faf67 100644 --- a/Lux.API/Controllers/ImageController.cs +++ b/Lux.API/Controllers/ImageController.cs @@ -73,19 +73,19 @@ namespace Lux.API.Controllers /// /// Chiamata GET: restituisce file SVG/PNG (da file o cache REDIS), eliminando nome rand (x force refresh) - /// GET: api/image/file/OFF0000001.001.svg?env=WINDOW + /// GET: api/image/OFF0000001.001.svg?env=WINDOW /// GET: api/image/cache/OFF0000001.001.svg?env=WINDOW - /// GET: api/image/file/OFF0000002.001.png?env=WINDOW + /// GET: api/image/OFF0000002.001.png?env=WINDOW /// GET: api/image/cache/OFF0000002.001.png?env=WINDOW - /// GET: api/image/file/OFF0000002.002-123456.png?env=WINDOW + /// GET: api/image/OFF0000002.002-123456.png?env=WINDOW /// GET: api/image/cache/OFF0000002.002-123456.png?env=WINDOW /// /// uid oggetto /// environment oggetto /// [HttpGet("{id}")] + [HttpGet("cache/{id}")] //[HttpGet("file/{id}")] - //[HttpGet("cache/{id}")] public async Task cacheFile(string id, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS env = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { Stopwatch sw = new Stopwatch(); diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index f786bf0d..4cb25216 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -73,8 +73,8 @@ "PngChannel": "Egw:png:img", "SvgChannel": "Egw:svg:img", "UpdateChannel": "Egw:update", - "ImageCalcTag": "svg-preview", - "ImageFileTag": "svgfile", + "ImageCalcTag": "live", + "ImageFileTag": "cache", "ImageLiveTag": "svg", "BaseUrl": "/lux/ui/" } From fe545f0fa1a55d751e0d57487cf546b8fedd1d88 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 17:57:29 +0100 Subject: [PATCH 04/21] primo ok preview BEAM!!! --- EgwCoreLib.Lux.Data/Services/ImageCacheService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index 6b2c755f..21f48305 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -150,7 +150,7 @@ namespace EgwCoreLib.Lux.Data.Services } string rndImg = $"{DateTime.Now:HHmmssfff}"; - string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?envir={envir}".Replace("////", "//"); + string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?env={envir}".Replace("////", "//"); return fullUrl; } From 17c63668341f4f682a5cd2e37132a1d8c55488e1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 19:09:35 +0100 Subject: [PATCH 05/21] Update BTL preview - da completare info BTL --- Lux.API/Lux.API.csproj | 2 +- .../Components/Compo/FileMan/BtlPreview.razor | 32 +++++ .../Compo/FileMan/BtlPreview.razor.cs | 122 ++++++++++++++++++ Lux.UI/Components/Compo/OfferRowMan.razor | 33 +++-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 56 +++++++- Lux.UI/Components/_Imports.razor | 1 + Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 10 files changed, 239 insertions(+), 15 deletions(-) create mode 100644 Lux.UI/Components/Compo/FileMan/BtlPreview.razor create mode 100644 Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 15480cf1..79346e9f 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0417 + 0.9.2511.0419 diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor new file mode 100644 index 00000000..2d33bd20 --- /dev/null +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -0,0 +1,32 @@ +
    +
    +
    +
    +

    BTL preview

    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
      +
    • Info BTL
    • +
    • # pezzi
    • +
    • # barre
    • +
    • somma metri
    • +
    • tempo totale
    • +
    +
    +
    + +
    +
    +
    +
    + diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs new file mode 100644 index 00000000..f3686d60 --- /dev/null +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs @@ -0,0 +1,122 @@ +using EgwCoreLib.Lux.Core.RestPayload; +using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.Services; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Forms; + +namespace Lux.UI.Components.Compo.FileMan +{ + public partial class BtlPreview + { + #region Public Properties + + [Parameter] + public string ApiUrl { get; set; } = ""; + + [Parameter] + public string CalcTag { get; set; } = ""; + + [Parameter] + public OfferRowModel CurrItem { get; set; } + + [Parameter] + public EventCallback> EC_DoUpdate { get; set; } + + [Parameter] + public EventCallback EC_OnClose { get; set; } + + [Parameter] + public string GenericBasePath { get; set; } = ""; + + [Parameter] + public string ImgBasePath { get; set; } = ""; + + #endregion Public Properties + + #region Protected Properties + + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + [Inject] + protected ImageCacheService ICService { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + /// + /// Calcolo URL immagine + /// + /// + /// + /// + protected string imgUrl(string imgUid, string env) + { + // cast string su env.. + EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + Enum.TryParse(env, out envir); + return ICService.ImageUrl($"{ApiUrl}/{ImgBasePath}", false, imgUid, envir); + } + + #endregion Protected Methods + + /// + /// Esegue lettura file + invio richiesta specifica + /// + /// + /// + + #region Private Methods + + private async Task UploadFile(InputFileChangeEventArgs e) + { + // init dizionari arg richiesta update + Dictionary fileArgs = new Dictionary(); + + // leggo il contenuto del PRIMO (singolo) file + IBrowserFile file = e.File; + // limite file size (al momento 10 MB) + var maxAllowedSize = 10 * 1024 * 1024; + + using var stream = file.OpenReadStream(maxAllowedSize); + using var reader = new StreamReader(stream); + string rawContent = await reader.ReadToEndAsync(); + + // calcolo il nome del file trusted... + string trustedFileName = Path.GetRandomFileName(); + CurrItem.FileResource = trustedFileName; + CurrItem.FileName = file.Name; + CurrItem.FileSize = rawContent.LongCount(); + // salvo sul DB i dati (nome, nome sicuro, size...) + await DLService.OffertRowUpdateFileData(CurrItem); + + // parametri richiesta + 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; + await ICService.CallRestPost($"{ApiUrl}/{GenericBasePath}", $"{CalcTag}/{CurrItem.OfferRowUID}", calcRequestDTO); + + // ora chiedo anche la BOM! + +#if false + // salvo in locale il file: SISTEMARE PERMESSI + saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); +#endif + } + + #endregion Private Methods + private void CloseEdit(Microsoft.AspNetCore.Components.Web.MouseEventArgs args) + { + _ = EC_OnClose.InvokeAsync(true); + } + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 87df8a22..1b41a029 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -1,10 +1,24 @@ -@if (EditRecord != null && CurrEditMode == EditMode.SerStruc) +@if (EditRecord != null) { - - + if (EditRecord.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || CurrEditMode == EditMode.SerStruc) + { + + + } + else + { + + + } } else { @@ -130,13 +144,14 @@ else @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { - @if (string.IsNullOrEmpty(item.SerStruct) || item.SerStruct.Length <= 2) + @* @if (!string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) *@ + @if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { - + } else { - + } } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 0681cfa2..0a0bdbb5 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -6,6 +6,7 @@ using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; +using Microsoft.IdentityModel.Tokens; using Microsoft.JSInterop; using Newtonsoft.Json; using WebWindowComplex; @@ -312,6 +313,26 @@ namespace Lux.UI.Components.Compo CurrEditMode = EditMode.RecData; } + + /// + /// Edit del file: + /// - abilitazione fileUpload + /// - anteprima grande (live) + /// + /// + protected void DoEditFile(OfferRowModel curRec) + { + EditRecord = curRec; + /// modalitàedit: gestione JWD + CurrEditMode = EditMode.File; +#if false + // preparazione dati da record corrente + PrepareWindowData(EditRecord.SerStruct); + // reset prev + prevJwd = ""; +#endif + } + /// /// Apre editor finestre del record richiesto /// @@ -792,7 +813,7 @@ namespace Lux.UI.Components.Compo { if (currArgs.msgUid.Equals($"{hwOptChannel}:{EditRecord.OfferRowUID}")) { - var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage) ?? new Dictionary(); + var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage) ?? new Dictionary(); currHwOption = rawDict; // salvo in live data... CurrData.DictOptionsXml = currHwOption; @@ -1095,6 +1116,39 @@ namespace Lux.UI.Components.Compo return answ; } + + /// + /// Salvataggio dei dati del file caricato + /// + /// Dizionario info file + private void SaveFile(Dictionary fileDict) + { + // verifico di avere parametri... + if (fileDict != null && fileDict.Count > 0) + { + string folderPath = ""; + string secureName = ""; + string content = ""; + if (fileDict.ContainsKey("folderPath")) + { + folderPath = fileDict["folderPath"]; + } + if (fileDict.ContainsKey("secureName")) + { + secureName = fileDict["secureName"]; + } + if (fileDict.ContainsKey("content")) + { + content = fileDict["content"]; + } + if (!string.IsNullOrEmpty(folderPath) && !string.IsNullOrEmpty(secureName) && !string.IsNullOrEmpty(content)) + { + // salvo! + saveFileContent(folderPath, secureName, content); + } + } + } + /// /// Salvataggio del JWD aggiornato nella mia riga di offerta /// diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index e922df07..8c39cb52 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -19,4 +19,5 @@ @using Lux.UI.Components.Compo @* @using Lux.UI.Components.Compo.Base *@ @using Lux.UI.Components.Compo.Config +@using Lux.UI.Components.Compo.FileMan @using Lux.UI.Components.Compo.JobTask diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index e2fcfaf3..cc276375 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0417 + 0.9.2511.0419 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 13597d39..7b37b923 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2511.0417

    +

    Versione: 0.9.2511.0419


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 3fcebeaf..88433802 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0417 +0.9.2511.0419 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 63fb2cc5..14bc5914 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0417 + 0.9.2511.0419 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 13912a4ecc22774a3dbaf1e368c249461ae0c810 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 19:12:22 +0100 Subject: [PATCH 06/21] Update previ --- Lux.UI/Components/Compo/FileMan/BtlPreview.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor index 2d33bd20..9845897a 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -1,8 +1,8 @@ 
      -
      -

      BTL preview

      +
      + File Preview
      @@ -14,7 +14,7 @@
      -
      +
      • Info BTL
      • # pezzi
      • From 1be8afbeba86342d5e6e2212450c22145ef75b06 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 4 Nov 2025 19:13:28 +0100 Subject: [PATCH 07/21] Ancora update display --- Lux.UI/Components/Compo/FileMan/BtlPreview.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor index 9845897a..1891c8b7 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -12,9 +12,9 @@
      -
      +
      -
      +
      • Info BTL
      • # pezzi
      • From 086878abdb986f128eb8621366ff78ee30812ad4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Nov 2025 10:01:51 +0100 Subject: [PATCH 08/21] Update icone chiusura editing offerta/righe/dettagli --- Lux.API/Lux.API.csproj | 2 +- .../Components/Compo/FileMan/BtlPreview.razor | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor | 5 +++-- Lux.UI/Components/Pages/Offers.razor | 18 +++++++++--------- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 79346e9f..aad11ff5 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0419 + 0.9.2511.0509 diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor index 1891c8b7..18b5db0a 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -7,7 +7,7 @@
        - +
      diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 1b41a029..a2d4746e 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -169,7 +169,7 @@ else } @if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName)) { -
      + @*
      @if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) { @@ -182,7 +182,8 @@ else @item.FileName | @fSize(item.FileSize) } -
      +
      *@ + @item.FileName | @fSize(item.FileSize) } @if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 3f8e285b..e8f0de4a 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -6,12 +6,12 @@ {
      -
      -
      -
      - Edit Offerta @EditRecord.OfferCode +
      +
      +
      + @EditRecord.OfferCode
      -
      +
      @@ -41,12 +41,12 @@
      - @*
      - -
      *@
      +
      + +
      diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index cc276375..a6986193 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0419 + 0.9.2511.0509 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 7b37b923..b8876c44 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2511.0419

      +

      Versione: 0.9.2511.0509


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 88433802..cbf36c77 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0419 +0.9.2511.0509 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 14bc5914..694921ae 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0419 + 0.9.2511.0509 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 4786cc58f1b463b21f257ab4d2a122446d79a92c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Nov 2025 12:18:29 +0100 Subject: [PATCH 09/21] Update conf canali x staging, develop e producton --- Lux.API/Lux.API.csproj | 2 +- Lux.API/Program.cs | 9 +++++++++ Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/Program.cs | 1 + Lux.UI/appsettings.Development.json | 3 +-- Lux.UI/appsettings.Production.json | 8 ++++++++ Lux.UI/appsettings.Staging.json | 21 +++++++++++++++++++++ Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 10 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 Lux.UI/appsettings.Staging.json diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index aad11ff5..cd2c56ee 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0509 + 0.9.2511.0510 diff --git a/Lux.API/Program.cs b/Lux.API/Program.cs index 86926adb..e9537634 100644 --- a/Lux.API/Program.cs +++ b/Lux.API/Program.cs @@ -10,6 +10,8 @@ using System.Reflection; using System.Runtime.Intrinsics.X86; var builder = WebApplication.CreateBuilder(args); +// recupero env corrente +var env = builder.Environment; var logger = LogManager.Setup() .LoadConfigurationFromAppSettings() .GetCurrentClassLogger(); @@ -18,6 +20,7 @@ var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version?.ToStrin ConfigurationManager configuration = builder.Configuration; logger.Info($"Program.cs: startup | v.{assemblyVersion}"); +logger.Info($"Current ASPNETCORE_ENVIRONMENT: {env.EnvironmentName}"); // Add services to the container. builder.Services.AddControllers(); @@ -57,6 +60,12 @@ var app = builder.Build(); string baseUrl = configuration.GetValue("ServerConf:BaseUrl") ?? ""; app.UsePathBase(baseUrl); logger.Info($"BaseUrl: {baseUrl}"); +List listParams = new List() { "PngChannel", "SubChannel", "PubChannel", "SvgChannel" }; +foreach (var param in listParams) +{ + logger.Info($"{param}: {configuration.GetValue($"ServerConf:{param}") ?? ""}"); +} + // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment() || app.Environment.IsStaging()) diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index a6986193..8c1edeee 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0509 + 0.9.2511.0510 diff --git a/Lux.UI/Program.cs b/Lux.UI/Program.cs index 47297a1a..9dcbe12d 100644 --- a/Lux.UI/Program.cs +++ b/Lux.UI/Program.cs @@ -23,6 +23,7 @@ var logger = LogManager.Setup() ConfigurationManager configuration = builder.Configuration; logger.Info("Program.cs: startup"); +logger.Info($"Current ASPNETCORE_ENVIRONMENT: {env.EnvironmentName}"); // Add services to the container. builder.Services.AddRazorComponents() diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index b3bcab40..88683eed 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -7,7 +7,6 @@ }, "ServerConf": { "PubChannel": "EgwDevEngineInput", - "SubChannel": "EgwDevEngineOutput", - "Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" + "SubChannel": "EgwDevEngineOutput" } } diff --git a/Lux.UI/appsettings.Production.json b/Lux.UI/appsettings.Production.json index 14eb2fe3..29e8ff8b 100644 --- a/Lux.UI/appsettings.Production.json +++ b/Lux.UI/appsettings.Production.json @@ -6,6 +6,14 @@ } }, "ServerConf": { + "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", "Prog.ApiUrl": "https://office.egalware.com/lux/srv/api" diff --git a/Lux.UI/appsettings.Staging.json b/Lux.UI/appsettings.Staging.json new file mode 100644 index 00000000..a890cf97 --- /dev/null +++ b/Lux.UI/appsettings.Staging.json @@ -0,0 +1,21 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "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", + "PubChannel": "EgwEngineInput", + "SubChannel": "EgwEngineOutput", + "Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" + } +} diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index b8876c44..1e764d59 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

        Versione: 0.9.2511.0509

        +

        Versione: 0.9.2511.0510


        Note di rilascio:
        • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index cbf36c77..1fe287b5 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0509 +0.9.2511.0510 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 694921ae..c4340941 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0509 + 0.9.2511.0510 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 0174514b8e4564abd8cb9e94970de508b4487f67 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Nov 2025 19:16:04 +0100 Subject: [PATCH 10/21] Update migration x items tipo BeamTrunk + update BOM x qty double da trunk --- EgwCoreLib.Lux.Core/RestPayload/BomItemDTO.cs | 2 +- .../Controllers/LuxController.cs | 1 + .../20251105181045_AddGroupBeam.Designer.cs | 3508 +++++++++++++++++ .../Migrations/20251105181045_AddGroupBeam.cs | 477 +++ .../DataLayerContextModelSnapshot.cs | 149 +- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 3 +- .../Services/DataLayerServices.cs | 17 +- .../Services/ImageCacheService.cs | 4 +- 8 files changed, 4078 insertions(+), 83 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.cs diff --git a/EgwCoreLib.Lux.Core/RestPayload/BomItemDTO.cs b/EgwCoreLib.Lux.Core/RestPayload/BomItemDTO.cs index cda63b13..c2adc5cf 100644 --- a/EgwCoreLib.Lux.Core/RestPayload/BomItemDTO.cs +++ b/EgwCoreLib.Lux.Core/RestPayload/BomItemDTO.cs @@ -25,7 +25,7 @@ namespace EgwCoreLib.Lux.Core.RestPayload ///
public double PriceEff { get; set; } = 0; public int ItemID { get; set; } = 0; - public int ItemQty { get; set; } = 0; + public double ItemQty { get; set; } = 0; /// /// Importo calcolato come prezzo x quantità /// diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index bdb8f7f6..5ab98461 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1808,6 +1808,7 @@ namespace EgwCoreLib.Lux.Data.Controllers currRec.FileName = updRec.FileName; currRec.FileResource = updRec.FileResource; currRec.FileSize = updRec.FileSize; + currRec.SerStruct = updRec.SerStruct; dbCtx.Entry(currRec).State = EntityState.Modified; } diff --git a/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.Designer.cs new file mode 100644 index 00000000..508534db --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.Designer.cs @@ -0,0 +1,3508 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251105181045_AddGroupBeam")] + partial class AddGroupBeam + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.21") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "SerializedData" + }, + new + { + EnvirID = 2, + SerStrucKey = "SerializedData" + }, + new + { + EnvirID = 4, + SerStrucKey = "SerializedData" + }, + new + { + EnvirID = 3, + SerStrucKey = "SerializedData" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "0001", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "0002", + Description = "Vetro BE 2S 4/16/4", + Thickness = 24.0 + }, + new + { + GlassID = 3, + Code = "0003", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 4, + Code = "0004", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }, + new + { + GlassID = 5, + Code = "0005", + Description = "Vetro BE 2S 4T/12/4T", + Thickness = 20.0 + }, + new + { + GlassID = 6, + Code = "0006", + Description = "Vetro BE 2S 4T/16/4T", + Thickness = 24.0 + }, + new + { + GlassID = 7, + Code = "0007", + Description = "Vetro BE 3S 4T/12/4T/12/4T", + Thickness = 36.0 + }, + new + { + GlassID = 8, + Code = "0008", + Description = "Vetro BE 3S 4T/16/4T/16/4T", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "0001", + Description = "Profilo60", + Thickness = 60.0 + }, + new + { + ProfileID = 2, + Code = "0002", + Description = "Profilo78", + Thickness = 78.0 + }, + new + { + ProfileID = 3, + Code = "0003", + Description = "Profilo90", + Thickness = 90.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Code = "0001", + Description = "Abete", + Type = 1 + }, + new + { + WoodID = 2, + Code = "0002", + Description = "Acero", + Type = 1 + }, + new + { + WoodID = 3, + Code = "0003", + Description = "Pino", + Type = 2 + }, + new + { + WoodID = 4, + Code = "0004", + Description = "Tek", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CodResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CodResource = "0000", + CostDriverBudget = 1m, + CostDriverID = 3, + EBTPerc = 0.15m, + FixedCost = 50m, + LaborCost = 100m, + Name = "Item Generico", + OverHeadCost = 100m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 50m + }, + new + { + ResourceID = 2, + CodResource = "0010", + CostDriverBudget = 2200m, + CostDriverID = 3, + EBTPerc = 0.15m, + FixedCost = 200000m, + LaborCost = 200000m, + Name = "Serramento (media annua globale)", + OverHeadCost = 100000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 200000m + }, + new + { + ResourceID = 3, + CodResource = "0110", + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CodResource = "0120.01", + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 5, + CodResource = "0120.02", + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 6, + CodResource = "0130.01", + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 7, + CodResource = "0130.02", + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 8, + CodResource = "0140", + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 9, + CodResource = "0150", + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "BeamTrunk", + Description = "Barre legno per lavorazione Travi" + }, + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione Finestre" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 500.0, + Description = "Finestra Anta Singola", + Envir = 1, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 300.0, + Description = "Finestra Vetro Fisso ", + Envir = 1, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 150.0, + Description = "Persiana anta singola", + Envir = 1, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 200.0, + Description = "Installazione", + Envir = 1, + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 1000.0, + Description = "Trave lamellare", + Envir = 2, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 500.0, + Description = "Cabinet", + Envir = 4, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 7, + Cost = 2000.0, + Description = "Parete", + Envir = 3, + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("ConsNote") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("DueDateProm") + .HasColumnType("datetime(6)"); + + b.Property("DueDateReq") + .HasColumnType("datetime(6)"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + ConsNote = "", + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + DictPresel = "", + Discount = 0.0, + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), + Envir = 1, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9801), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9803), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9799) + }, + new + { + OfferID = 2, + ConsNote = "", + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + DictPresel = "", + Discount = 0.0, + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), + Envir = 2, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9818), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9819), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9817) + }, + new + { + OfferID = 3, + ConsNote = "", + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + DictPresel = "", + Discount = 0.0, + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), + Envir = 4, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9828), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9830), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9827) + }, + new + { + OfferID = 4, + ConsNote = "", + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + DictPresel = "", + Discount = 0.0, + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), + Envir = 3, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9838), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9840), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9837) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemJCD") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepFlowTime") + .HasColumnType("double"); + + b.Property("StepLeadTime") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9951), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9953), + Note = "Finestra Anta Singola 2025", + OfferID = 1, + OfferRowUID = "SOR.25.00000002", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9967), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9969), + Note = "Finestra Vetro Fisso 2025", + OfferID = 1, + OfferRowUID = "SOR.25.00000001", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9980), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9982), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "SOR.25.00000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9993), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9995), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "SOR.25.00000004", + Qty = 3.0, + RowNum = 4, + SellingItemID = 4, + SerStruct = "{}", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(29), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(30), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "SOR.25.00000005", + Qty = 10.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(42), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(43), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "SOR.25.00000006", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(73), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(75), + Note = "Demo file 01", + OfferID = 3, + OfferRowUID = "SOR.25.00000007", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(86), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(88), + Note = "Demo file 02", + OfferID = 3, + OfferRowUID = "SOR.25.00000008", + Qty = 12.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(116), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(118), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "SOR.25.00000009", + Qty = 6.0, + RowNum = 1, + SellingItemID = 7, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 10, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(130), + ItemBOM = "", + ItemJCD = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(131), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "SOR.25.0000000A", + Qty = 4.0, + RowNum = 1, + SellingItemID = 7, + SerStruct = "", + StepCost = 0.0, + StepFlowTime = 0.0, + StepLeadTime = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("ConsNote") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("DueDateProm") + .HasColumnType("datetime(6)"); + + b.Property("DueDateReq") + .HasColumnType("datetime(6)"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OrderState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemJCD") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("OrderRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepFlowTime") + .HasColumnType("double"); + + b.Property("StepLeadTime") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2290), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2407), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2410), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2412), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2414), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2415), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2418), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2419), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2421), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2423), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2425), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2427), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2429), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2430), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2432), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2434), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2436), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2437), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2440), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2441), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobDriverConfigModel", b => + { + b.Property("JobDriverConfID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobDriverConfID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("DefaultVal") + .HasColumnType("double"); + + b.Property("Intercept") + .HasColumnType("double"); + + b.Property("JobDriverID") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Regress") + .HasColumnType("double"); + + b.HasKey("JobDriverConfID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobDriverID"); + + b.HasIndex("JobID"); + + b.ToTable("task_job_driver_config"); + + b.HasData( + new + { + JobDriverConfID = 1, + CostDriverID = 3, + DefaultVal = 1.0, + Intercept = 0.0, + JobDriverID = 3, + JobID = 6, + Note = "Numero prodotti", + Regress = 1.0 + }, + new + { + JobDriverConfID = 2, + CostDriverID = 3, + DefaultVal = 1.0, + Intercept = 0.0, + JobDriverID = 3, + JobID = 7, + Note = "Numero prodotti", + Regress = 1.0 + }, + new + { + JobDriverConfID = 3, + CostDriverID = 1, + DefaultVal = 5.0, + Intercept = 0.0, + JobDriverID = 1, + JobID = 7, + Note = "Ore Equivalenti", + Regress = 0.016666666666666666 + }, + new + { + JobDriverConfID = 4, + CostDriverID = 3, + DefaultVal = 1.0, + Intercept = 0.0, + JobDriverID = 3, + JobID = 2, + Note = "Numero prodotti", + Regress = 1.0 + }, + new + { + JobDriverConfID = 5, + CostDriverID = 1, + DefaultVal = 5.0, + Intercept = 0.0, + JobDriverID = 1, + JobID = 2, + Note = "Ore Equivalenti", + Regress = 0.016666666666666666 + }, + new + { + JobDriverConfID = 6, + CostDriverID = 1, + DefaultVal = 8.0, + Intercept = 0.0, + JobDriverID = 4, + JobID = 2, + Note = "Ore Extra per complex Articolo (1 min/pezzo)", + Regress = 0.016666666666666666 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobDriverModel", b => + { + b.Property("JobDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobDriverID"); + + b.ToTable("task_job_driver"); + + b.HasData( + new + { + JobDriverID = 1, + Descript = "Tempo netto di lavorazione, in minuti", + Name = "LeadTime" + }, + new + { + JobDriverID = 2, + Descript = "Tempo di attraversamento complessivo del processo, in giorni lavorativi", + Name = "FlowTime" + }, + new + { + JobDriverID = 3, + Descript = "Numero Articoli/Prodotti", + Name = "NumArticoli" + }, + new + { + JobDriverID = 4, + Descript = "Numero Items per Articolo", + Name = "NumItems" + }, + new + { + JobDriverID = 5, + Descript = "Indice complex lavorazioni", + Name = "WorkCompScore" + }, + new + { + JobDriverID = 6, + Descript = "Indice complex materiali", + Name = "MaterialCompScore" + }, + new + { + JobDriverID = 7, + Descript = "Indice complex generale", + Name = "GeneralScore" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("TagsModelCodTag") + .HasColumnType("varchar(255)"); + + b.HasKey("JobStepID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.HasIndex("TagsModelCodTag"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + Description = "Preparazione Tronchetti", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 3 + }, + new + { + JobStepID = 2, + Description = "Taglio profilo", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 3, + Description = "Verniciatura", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 4, + Description = "Assemblaggio Serramento", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 8 + }, + new + { + JobStepID = 5, + Description = "Installazione cliente", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 9 + }, + new + { + JobStepID = 6, + Description = "Produzione Serramento (media annua)", + Index = 1, + JobID = 6, + PhaseID = 7, + ProductivityRate = 1m, + ResourceID = 2 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepTagModel", b => + { + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("CodTag") + .HasColumnType("varchar(255)"); + + b.HasKey("JobStepID", "CodTag"); + + b.HasIndex("CodTag"); + + b.ToTable("task_job_step_tag"); + + b.HasData( + new + { + JobStepID = 1, + CodTag = "Serramento" + }, + new + { + JobStepID = 2, + CodTag = "Serramento" + }, + new + { + JobStepID = 3, + CodTag = "Serramento" + }, + new + { + JobStepID = 4, + CodTag = "Serramento" + }, + new + { + JobStepID = 5, + CodTag = "Serramento" + }, + new + { + JobStepID = 6, + CodTag = "Serramento" + }, + new + { + JobStepID = 2, + CodTag = "LineaCNC" + }, + new + { + JobStepID = 4, + CodTag = "Montaggio" + }, + new + { + JobStepID = 5, + CodTag = "Servizi" + }, + new + { + JobStepID = 2, + CodTag = "LineaManuale" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("Lock") + .HasColumnType("tinyint(1)"); + + b.Property("TagsModelCodTag") + .HasColumnType("varchar(255)"); + + b.HasKey("JobID"); + + b.HasIndex("TagsModelCodTag"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi", + Enabled = true, + Index = 4, + Lock = true + }, + new + { + JobID = 2, + Description = "Serramento Legno - Ciclo Completo con installazione", + Enabled = true, + Index = 3, + Lock = true + }, + new + { + JobID = 3, + Description = "Realizzazione Trave", + Enabled = true, + Index = 5, + Lock = true + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet", + Enabled = true, + Index = 6, + Lock = true + }, + new + { + JobID = 5, + Description = "Realizzazione Parete", + Enabled = true, + Index = 7, + Lock = true + }, + new + { + JobID = 6, + Description = "Serramento - ciclo base", + Enabled = true, + Index = 1, + Lock = true + }, + new + { + JobID = 7, + Description = "Serramento - ciclo intermedio", + Enabled = true, + Index = 2, + Lock = true + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskTagModel", b => + { + b.Property("JobID") + .HasColumnType("int"); + + b.Property("CodTag") + .HasColumnType("varchar(255)"); + + b.HasKey("JobID", "CodTag"); + + b.HasIndex("CodTag"); + + b.ToTable("task_job_task_tag"); + + b.HasData( + new + { + JobID = 1, + CodTag = "Rivendita" + }, + new + { + JobID = 2, + CodTag = "Serramento" + }, + new + { + JobID = 3, + CodTag = "Trave" + }, + new + { + JobID = 4, + CodTag = "Cabinet" + }, + new + { + JobID = 5, + CodTag = "Parete" + }, + new + { + JobID = 6, + CodTag = "Serramento" + }, + new + { + JobID = 7, + CodTag = "Serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("CodPhase") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + CodPhase = "010", + Description = "Taglio tronchetti", + Name = "Taglio" + }, + new + { + PhaseID = 2, + CodPhase = "020", + Description = "Lavorazione pezzi serramento", + Name = "Lavorazione CNC" + }, + new + { + PhaseID = 3, + CodPhase = "030", + Description = "Verniciatura", + Name = "Verniciatura" + }, + new + { + PhaseID = 4, + CodPhase = "030.01", + Description = "Assemblaggio completo", + Name = "Montaggio" + }, + new + { + PhaseID = 5, + CodPhase = "030.02", + Description = "Assemblaggio Ferramenta", + Name = "Ferramenta" + }, + new + { + PhaseID = 6, + CodPhase = "040", + Description = "Installazione e posa in opera", + Name = "Installazione" + }, + new + { + PhaseID = 7, + CodPhase = "000", + Description = "Produzione Completa: Fase Unica complessiva", + Name = "Produzione Completa" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + b.HasData( + new + { + GenValID = 1, + ClassCod = "WoodCol", + Index = 1, + ValString = "Blue" + }, + new + { + GenValID = 2, + ClassCod = "WoodCol", + Index = 2, + ValString = "White" + }, + new + { + GenValID = 3, + ClassCod = "WoodCol", + Index = 3, + ValString = "Red" + }, + new + { + GenValID = 4, + ClassCod = "WoodCol", + Index = 4, + ValString = "Black" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Index = 1, + ValString = "Rectangle" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Index = 2, + ValString = "Trapezoid" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Index = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Index = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Index = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Index = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Index = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Index = 8, + ValString = "Circle" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("CodTag") + .HasColumnType("varchar(255)"); + + b.HasKey("CodTag"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + CodTag = "Cabinet" + }, + new + { + CodTag = "LineaCNC" + }, + new + { + CodTag = "LineaManuale" + }, + new + { + CodTag = "Montaggio" + }, + new + { + CodTag = "Parete" + }, + new + { + CodTag = "Rivendita" + }, + new + { + CodTag = "Serramento" + }, + new + { + CodTag = "Servizi" + }, + new + { + CodTag = "Trave" + }, + new + { + CodTag = "Trave_200x200" + }, + new + { + CodTag = "Trave_400x400" + }, + new + { + CodTag = "Trave_800x600" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav") + .WithMany() + .HasForeignKey("CustomerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", "DealerNav") + .WithMany() + .HasForeignKey("DealerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav") + .WithMany() + .HasForeignKey("CustomerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", "DealerNav") + .WithMany() + .HasForeignKey("DealerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany("OrderRowNav") + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobDriverConfigModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "CostDriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobDriverModel", "JobDriverNav") + .WithMany() + .HasForeignKey("JobDriverID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CostDriverNav"); + + b.Navigation("JobDriverNav"); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", null) + .WithMany("JobSteps") + .HasForeignKey("TagsModelCodTag") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepTagModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", "TagNav") + .WithMany() + .HasForeignKey("CodTag") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany("TagNav") + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobStepNav"); + + b.Navigation("TagNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", null) + .WithMany("JobTasks") + .HasForeignKey("TagsModelCodTag") + .OnDelete(DeleteBehavior.Restrict); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskTagModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", "TagNav") + .WithMany() + .HasForeignKey("CodTag") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", "JobNav") + .WithMany("TagNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + + b.Navigation("TagNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Navigation("OrderRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Navigation("TagNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobTaskModel", b => + { + b.Navigation("JobStepNav"); + + b.Navigation("TagNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Navigation("JobSteps"); + + b.Navigation("JobTasks"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.cs b/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.cs new file mode 100644 index 00000000..ebf2c696 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251105181045_AddGroupBeam.cs @@ -0,0 +1,477 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddGroupBeam : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 1, + column: "SerStrucKey", + value: "SerializedData"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 2, + column: "SerStrucKey", + value: "SerializedData"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 3, + column: "SerStrucKey", + value: "SerializedData"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 4, + column: "SerStrucKey", + value: "SerializedData"); + + migrationBuilder.UpdateData( + table: "cost_resource", + keyColumn: "ResourceID", + keyValue: 1, + columns: new[] { "CostDriverBudget", "FixedCost", "VariableCost" }, + values: new object[] { 1m, 50m, 50m }); + + migrationBuilder.UpdateData( + table: "item_group", + keyColumn: "CodGroup", + keyValue: "WindowTrunk", + column: "Description", + value: "Barre legno per lavorazione Finestre"); + + migrationBuilder.InsertData( + table: "item_group", + columns: new[] { "CodGroup", "Description" }, + values: new object[] { "BeamTrunk", "Barre legno per lavorazione Travi" }); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 1, + column: "SerStruct", + value: "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}"); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 2, + column: "SerStruct", + value: "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9801), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9803), new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9799) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9818), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9819), new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9817) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9828), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9830), new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9827) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9838), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9840), new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9837) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "SerStruct" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9967), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9969), "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "SerStruct" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9951), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9953), "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9980), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9982) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9993), new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9995) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(29), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(30) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(42), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(43) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(73), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(75) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(86), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(88) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(116), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(118) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 10, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(130), new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(131) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2290)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2410)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2414)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2418)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2421)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2425)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2429)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2432)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2436)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2440)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "item_group", + keyColumn: "CodGroup", + keyValue: "BeamTrunk"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 1, + column: "SerStrucKey", + value: "Jwd"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 2, + column: "SerStrucKey", + value: "Btl"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 3, + column: "SerStrucKey", + value: "Btl"); + + migrationBuilder.UpdateData( + table: "conf_envir", + keyColumn: "EnvirID", + keyValue: 4, + column: "SerStrucKey", + value: "Btl"); + + migrationBuilder.UpdateData( + table: "cost_resource", + keyColumn: "ResourceID", + keyValue: 1, + columns: new[] { "CostDriverBudget", "FixedCost", "VariableCost" }, + values: new object[] { 2200m, 100m, 100m }); + + migrationBuilder.UpdateData( + table: "item_group", + keyColumn: "CodGroup", + keyValue: "WindowTrunk", + column: "Description", + value: "Barre legno per lavorazione"); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 1, + column: "SerStruct", + value: "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"GroupId\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}"); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 2, + column: "SerStruct", + value: "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4725), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4727), new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4723) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4745), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4747), new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4743) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4756), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4758), new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4755) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "DueDateProm", "DueDateReq", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4766), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4767), new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4764) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "SerStruct" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4902), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4904), "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "SerStruct" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4888), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4890), "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"GroupId\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4915), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4916) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4927), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4929) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4959), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4961) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4972), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4973) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5002), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5004) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5014), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5016) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5044), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5046) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 10, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5057), new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5059) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8841)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8916)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8919)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8923)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8926)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8930)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8934)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8937)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8941)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8944)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 5fadf835..69188f4b 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -39,22 +39,22 @@ namespace EgwCoreLib.Lux.Data.Migrations new { EnvirID = 1, - SerStrucKey = "Jwd" + SerStrucKey = "SerializedData" }, new { EnvirID = 2, - SerStrucKey = "Btl" + SerStrucKey = "SerializedData" }, new { EnvirID = 4, - SerStrucKey = "Btl" + SerStrucKey = "SerializedData" }, new { EnvirID = 3, - SerStrucKey = "Btl" + SerStrucKey = "SerializedData" }); }); @@ -337,16 +337,16 @@ namespace EgwCoreLib.Lux.Data.Migrations { ResourceID = 1, CodResource = "0000", - CostDriverBudget = 2200m, + CostDriverBudget = 1m, CostDriverID = 3, EBTPerc = 0.15m, - FixedCost = 100m, + FixedCost = 50m, LaborCost = 100m, Name = "Item Generico", OverHeadCost = 100m, OverHeadPerc = 0.15m, PriceMargin = 0.2m, - VariableCost = 100m + VariableCost = 50m }, new { @@ -484,10 +484,15 @@ namespace EgwCoreLib.Lux.Data.Migrations b.ToTable("item_group"); b.HasData( + new + { + CodGroup = "BeamTrunk", + Description = "Barre legno per lavorazione Travi" + }, new { CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" + Description = "Barre legno per lavorazione Finestre" }, new { @@ -840,7 +845,7 @@ namespace EgwCoreLib.Lux.Data.Migrations ItemSteps = "", JobID = 2, Margin = 0.20000000000000001, - SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"GroupId\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", SupplCode = "", UM = "#" }, @@ -856,7 +861,7 @@ namespace EgwCoreLib.Lux.Data.Migrations ItemSteps = "", JobID = 2, Margin = 0.20000000000000001, - SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}", + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", SupplCode = "", UM = "#" }, @@ -1287,16 +1292,16 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", DictPresel = "", Discount = 0.0, - DueDateProm = new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), - DueDateReq = new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), Envir = 1, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4725), - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4727), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9801), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9803), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4723) + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9799) }, new { @@ -1307,16 +1312,16 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta BEAM", DictPresel = "", Discount = 0.0, - DueDateProm = new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), - DueDateReq = new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), Envir = 2, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4745), - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4747), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9818), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9819), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4743) + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9817) }, new { @@ -1327,16 +1332,16 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Cabinet", DictPresel = "", Discount = 0.0, - DueDateProm = new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), - DueDateReq = new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), Envir = 4, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4756), - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4758), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9828), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9830), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4755) + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9827) }, new { @@ -1347,16 +1352,16 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Wall", DictPresel = "", Discount = 0.0, - DueDateProm = new DateTime(2025, 12, 29, 0, 0, 0, 0, DateTimeKind.Local), - DueDateReq = new DateTime(2025, 11, 29, 0, 0, 0, 0, DateTimeKind.Local), + DueDateProm = new DateTime(2026, 1, 4, 0, 0, 0, 0, DateTimeKind.Local), + DueDateReq = new DateTime(2025, 12, 5, 0, 0, 0, 0, DateTimeKind.Local), Envir = 3, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4766), - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4767), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9838), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9840), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4764) + ValidUntil = new DateTime(2025, 12, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9837) }); }); @@ -1475,19 +1480,19 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4888), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9951), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4890), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9953), Note = "Finestra Anta Singola 2025", OfferID = 1, OfferRowUID = "SOR.25.00000002", Qty = 3.0, RowNum = 1, SellingItemID = 1, - SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"GroupId\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", StepCost = 0.0, StepFlowTime = 0.0, StepLeadTime = 0.0, @@ -1505,19 +1510,19 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4902), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9967), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4904), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9969), Note = "Finestra Vetro Fisso 2025", OfferID = 1, OfferRowUID = "SOR.25.00000001", Qty = 3.0, RowNum = 2, SellingItemID = 2, - SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"GroupId\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"GroupId\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}", + SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}", StepCost = 0.0, StepFlowTime = 0.0, StepLeadTime = 0.0, @@ -1535,12 +1540,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4915), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9980), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4916), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9982), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "SOR.25.00000003", @@ -1565,12 +1570,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4927), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9993), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4929), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 390, DateTimeKind.Local).AddTicks(9995), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "SOR.25.00000004", @@ -1595,12 +1600,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4959), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(29), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4961), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(30), Note = "Demo file 01", OfferID = 2, OfferRowUID = "SOR.25.00000005", @@ -1625,12 +1630,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4972), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(42), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(4973), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(43), Note = "Demo file 02", OfferID = 2, OfferRowUID = "SOR.25.00000006", @@ -1655,12 +1660,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5002), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(73), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5004), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(75), Note = "Demo file 01", OfferID = 3, OfferRowUID = "SOR.25.00000007", @@ -1685,12 +1690,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5014), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(86), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5016), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(88), Note = "Demo file 02", OfferID = 3, OfferRowUID = "SOR.25.00000008", @@ -1715,12 +1720,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5044), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(116), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5046), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(118), Note = "Demo file 01", OfferID = 4, OfferRowUID = "SOR.25.00000009", @@ -1745,12 +1750,12 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5057), + Inserted = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(130), ItemBOM = "", ItemJCD = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 30, 16, 58, 41, 494, DateTimeKind.Local).AddTicks(5059), + Modified = new DateTime(2025, 11, 5, 19, 10, 44, 391, DateTimeKind.Local).AddTicks(131), Note = "Demo file 02", OfferID = 4, OfferRowUID = "SOR.25.0000000A", @@ -1999,8 +2004,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8841), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8913), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2290), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2407), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -2012,8 +2017,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8916), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8917), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2410), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2412), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -2025,8 +2030,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8919), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8921), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2414), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2415), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -2038,8 +2043,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8923), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8924), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2418), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2419), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -2051,8 +2056,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8926), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8928), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2421), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2423), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -2064,8 +2069,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8930), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8931), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2425), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2427), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -2077,8 +2082,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8934), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8935), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2429), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2430), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -2090,8 +2095,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8937), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8938), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2432), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2434), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -2103,8 +2108,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8941), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8942), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2436), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2437), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -2116,8 +2121,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8944), - DtMod = new DateTime(2025, 10, 30, 16, 58, 41, 490, DateTimeKind.Local).AddTicks(8945), + DtCreate = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2440), + DtMod = new DateTime(2025, 11, 5, 19, 10, 44, 387, DateTimeKind.Local).AddTicks(2441), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 67ec17bf..fbf192c4 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -113,7 +113,8 @@ namespace EgwCoreLib.Lux.Data // inizializzazione dei valori di default x gruppi item modelBuilder.Entity().HasData( - new ItemGroupModel { CodGroup = "WindowTrunk", Description = "Barre legno per lavorazione" }, + new ItemGroupModel { CodGroup = "BeamTrunk", Description = "Barre legno per lavorazione Travi" }, + new ItemGroupModel { CodGroup = "WindowTrunk", Description = "Barre legno per lavorazione Finestre" }, new ItemGroupModel { CodGroup = "WindowGlass", Description = "Vetri serramento" }, new ItemGroupModel { CodGroup = "WindowVarnish", Description = "Vernici per legno" }, new ItemGroupModel { CodGroup = "WindowHardware", Description = "Ferramenta serramento" } diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 658f1ba0..b378a63b 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -1221,19 +1221,20 @@ namespace EgwCoreLib.Lux.Data.Services // salvo sul DB il risultato della BOM if (!string.IsNullOrEmpty(bomContent)) { + List? bomList = null; try { // deserializzo la Bom... - var bomList = JsonConvert.DeserializeObject>(bomContent); - if (bomList != null) - { - // verifico 1:1 gli item ricevuti dalla BOM sul DB con eventuale insert in anagrafica dei nuovi - dbController.ItemUpsertFromBom(bomList); - // salvo la BOM nel record del DB relativo all'oggetto richiesto - dbController.OfferUpsertFromBom(uID, bomList); - } + bomList = JsonConvert.DeserializeObject>(bomContent); } catch { } + if (bomList != null) + { + // verifico 1:1 gli item ricevuti dalla BOM sul DB con eventuale insert in anagrafica dei nuovi + dbController.ItemUpsertFromBom(bomList); + // salvo la BOM nel record del DB relativo all'oggetto richiesto + dbController.OfferUpsertFromBom(uID, bomList); + } } await Task.Delay(1); } diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index 21f48305..db3f5ff9 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -310,7 +310,9 @@ namespace EgwCoreLib.Lux.Data.Services var done = await _redisService.SetAsync(currKey, pngContent); // invio notifica nuova png generata sul canale... viene inviato solo contenuto con ID nel canale string notifyChannel = $"{pngChannel}:{imgId}"; - long numSent = await _redisService.PublishAsync(notifyChannel, pngContent); + long numSent = await _redisService.PublishAsync(notifyChannel, "PNG"); + // NON pubblico contenuto che x PNG non serve... + //long numSent = await _redisService.PublishAsync(notifyChannel, pngContent); return done; } From bba55167d01a4fa9b662fafdcfca4e947c3c2a80 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Nov 2025 19:16:20 +0100 Subject: [PATCH 11/21] update gestione BOM x BTL, update vari x conf settings channels --- Lux.API/Lux.API.csproj | 2 +- Lux.API/Program.cs | 2 ++ Lux.API/Services/ExternalMessageProcessor.cs | 4 +-- Lux.API/appsettings.Development.json | 8 +++++ Lux.API/appsettings.Production.json | 8 +++++ Lux.API/appsettings.Staging.json | 8 +++++ Lux.API/appsettings.json | 26 ++++++++++----- .../Components/Compo/FileMan/BtlPreview.razor | 5 +-- .../Compo/FileMan/BtlPreview.razor.cs | 32 +++++++++++++++---- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/appsettings.Development.json | 8 +++++ Lux.UI/appsettings.json | 27 +++++++++++----- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 15 files changed, 106 insertions(+), 32 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index cd2c56ee..f1fcd9a7 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0510 + 0.9.2511.0519 diff --git a/Lux.API/Program.cs b/Lux.API/Program.cs index e9537634..038d35cb 100644 --- a/Lux.API/Program.cs +++ b/Lux.API/Program.cs @@ -60,6 +60,8 @@ var app = builder.Build(); string baseUrl = configuration.GetValue("ServerConf:BaseUrl") ?? ""; app.UsePathBase(baseUrl); logger.Info($"BaseUrl: {baseUrl}"); + +// log channels di ritorno UI List listParams = new List() { "PngChannel", "SubChannel", "PubChannel", "SvgChannel" }; foreach (var param in listParams) { diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index 7281c159..6f8b2469 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -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); } diff --git a/Lux.API/appsettings.Development.json b/Lux.API/appsettings.Development.json index 5da17538..b0906ead 100644 --- a/Lux.API/appsettings.Development.json +++ b/Lux.API/appsettings.Development.json @@ -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", diff --git a/Lux.API/appsettings.Production.json b/Lux.API/appsettings.Production.json index 535094eb..521e3972 100644 --- a/Lux.API/appsettings.Production.json +++ b/Lux.API/appsettings.Production.json @@ -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/" diff --git a/Lux.API/appsettings.Staging.json b/Lux.API/appsettings.Staging.json index c294297e..ccb18f94 100644 --- a/Lux.API/appsettings.Staging.json +++ b/Lux.API/appsettings.Staging.json @@ -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" diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index cdd3a2bd..daf94e32 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -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", diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor index 18b5db0a..9bbb4d4c 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -2,7 +2,7 @@
- File Preview + Item: @CurrItem.OfferRowUID
@@ -18,8 +18,9 @@
  • Info BTL
  • # pezzi
  • -
  • # barre
  • +
  • # sezioni
  • somma metri
  • +
  • somma volume
  • tempo totale
diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs index f3686d60..73372ffb 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs @@ -73,6 +73,7 @@ namespace Lux.UI.Components.Compo.FileMan { // init dizionari arg richiesta update Dictionary fileArgs = new Dictionary(); + Dictionary bomArgs = new Dictionary(); // 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 diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 8c1edeee..9aab1a33 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0510 + 0.9.2511.0519 diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index 88683eed..f0316739 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -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" } diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 4cb25216..efd933d7 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -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", diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 1e764d59..82f9edba 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.0510

+

Versione: 0.9.2511.0519


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 1fe287b5..042632f4 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0510 +0.9.2511.0519 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index c4340941..051c5be4 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0510 + 0.9.2511.0519 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 041ef5bfab3fc2d45517c1744249c878fa313f3c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 5 Nov 2025 19:25:00 +0100 Subject: [PATCH 12/21] Update gestione display btn BOM --- Lux.UI/Components/Compo/OfferRowMan.razor | 3 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 34 +++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index a2d4746e..241269ac 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -157,7 +157,8 @@ else }
    @item.OfferRowUID
    - @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) + @* @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) *@ + @if(ShowBom(item)) {
+ @if (ShowVolume) + { + @($"{item.Value.Volume:N3}") + } @($"{item.Value.Qty:N3}") @($"{item.Value.PriceEff:C2}") @($"{item.Value.TotalCost:C2}") @@ -49,6 +57,10 @@ @item.Value.ClassCode @item.Value.ItemCode @* @item.Value.DescriptionCode *@ + @if (ShowVolume) + { + @($"{item.Value.Volume:N3}") + } @($"{item.Value.Qty:N3}") @($"{item.Value.PriceEff:C2}") @($"{item.Value.TotalCost:C2}") @@ -58,7 +70,12 @@ - @BomList.Count record + @BomList.Count materiali + @if (ShowVolume) + { + @($"{VolTotale:N3}") + } + @($"{QtyTotale:N3}") tot: @($"{ImportoTotale:C2}") diff --git a/Lux.UI/Components/Compo/EditBom.razor.cs b/Lux.UI/Components/Compo/EditBom.razor.cs index d85213bc..401d0acb 100644 --- a/Lux.UI/Components/Compo/EditBom.razor.cs +++ b/Lux.UI/Components/Compo/EditBom.razor.cs @@ -1,5 +1,6 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.DbModel.Items; +using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; @@ -14,6 +15,9 @@ namespace Lux.UI.Components.Compo [Parameter] public List BomList { get; set; } = null!; + [Parameter] + public OfferRowModel CurrRowRec { get; set; } = null!; + [Parameter] public EventCallback> EC_Updated { get; set; } @@ -37,9 +41,40 @@ namespace Lux.UI.Components.Compo } } + protected double QtyTotale + { + get + { + double valTot = 0; + if (bomDict != null) + { + valTot = bomDict.Sum(x => x.Value.Qty); + } + return valTot; + } + } + + protected double VolTotale + { + get + { + double valTot = 0; + if (bomDict != null) + { + valTot = bomDict.Sum(x => x.Value.Volume); + } + return valTot; + } + } + #endregion Protected Properties + private bool ShowVolume + { + get => CurrRowRec.Envir == Constants.EXECENVIRONMENTS.BEAM || CurrRowRec.Envir == Constants.EXECENVIRONMENTS.WALL; + } + #region Protected Methods protected void DoCancel() diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs index 73372ffb..b8b3d4b2 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor.cs @@ -20,7 +20,7 @@ namespace Lux.UI.Components.Compo.FileMan public OfferRowModel CurrItem { get; set; } [Parameter] - public EventCallback> EC_DoUpdate { get; set; } + public EventCallback> EC_ReqSave { get; set; } [Parameter] public EventCallback EC_OnClose { get; set; } @@ -84,57 +84,68 @@ namespace Lux.UI.Components.Compo.FileMan using var reader = new StreamReader(stream); string rawContent = await reader.ReadToEndAsync(); - // calcolo il nome del file trusted... - string trustedFileName = Path.GetRandomFileName(); - 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("Height", "1200"); - fileArgs.Add("Width", "1800"); - // invio! - CalcRequestDTO calcRequestDTO = new CalcRequestDTO() + // se ho contenuto nel file... + if (!string.IsNullOrEmpty(rawContent)) { - EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, - DictExec = fileArgs - }; - // richiesta PNG - await ICService.CallRestPost($"{ApiUrl}/{GenericBasePath}", $"{CalcTag}/{CurrItem.OfferRowUID}", calcRequestDTO); - - - // 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); + // elimino vecchio file... richiedendo save senza parametri + Dictionary dictSave = new Dictionary(); + await EC_ReqSave.InvokeAsync(dictSave); + // calcolo il nome del file trusted... + string trustedFileName = Path.GetRandomFileName(); + CurrItem.FileResource = trustedFileName; + CurrItem.FileName = file.Name; + CurrItem.FileSize = rawContent.LongCount(); #if false - // salvo in locale il file: SISTEMARE PERMESSI - saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); + // aggiungo contenuto come SerStruct (in attesa di valutare FS save...) + CurrItem.SerStruct = rawContent; #endif + // 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("Height", "1200"); + fileArgs.Add("Width", "1800"); + // invio! + CalcRequestDTO calcRequestDTO = new CalcRequestDTO() + { + EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, + DictExec = fileArgs + }; + // richiesta PNG + await ICService.CallRestPost($"{ApiUrl}/{GenericBasePath}", $"{CalcTag}/{CurrItem.OfferRowUID}", calcRequestDTO); + + + // 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); + + dictSave.Add("secureName", trustedFileName); + dictSave.Add("content", rawContent); + await EC_ReqSave.InvokeAsync(dictSave); + + } } #endregion Private Methods private void CloseEdit(Microsoft.AspNetCore.Components.Web.MouseEventArgs args) { - _ = EC_OnClose.InvokeAsync(true); + // false --> NON salvo serializzato eprché ho già salvato l file x cui NON ricalcola la BOM + _ = EC_OnClose.InvokeAsync(false); } } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 241269ac..e6a7d040 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -15,7 +15,7 @@ CalcTag="@calcTag" GenericBasePath="@genericBasePath" ImgBasePath="@imgBasePath" - EC_DoUpdate="SaveFile" + EC_ReqSave="SaveFile" EC_OnClose="CloseEdit"> } @@ -321,7 +321,7 @@ else
diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index fa533653..f11b2ee7 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Components.Forms; using Microsoft.IdentityModel.Tokens; using Microsoft.JSInterop; using Newtonsoft.Json; +using NLog; using WebWindowComplex; using WebWindowComplex.DTO; using static EgwCoreLib.Lux.Core.Enums; @@ -314,7 +315,6 @@ namespace Lux.UI.Components.Compo CurrEditMode = EditMode.RecData; } - /// /// Edit del file: /// - abilitazione fileUpload @@ -330,7 +330,7 @@ namespace Lux.UI.Components.Compo // preparazione dati da record corrente PrepareWindowData(EditRecord.SerStruct); // reset prev - prevJwd = ""; + prevJwd = ""; #endif } @@ -589,6 +589,7 @@ namespace Lux.UI.Components.Compo #region Private Fields + private static Logger Log = LogManager.GetCurrentClassLogger(); private List AllColors = new(); private List AllConfEnvir = new(); @@ -615,6 +616,11 @@ namespace Lux.UI.Components.Compo private List AvailProfileList = new List(); + /// + /// Base path x network share files + /// + private string basePath = "unsafe_uploads"; + private string calcTag = "calc"; private List? CurrBomList = null; @@ -630,10 +636,10 @@ namespace Lux.UI.Components.Compo private int currPage = 1; + private string currPng = ""; private List currProfList = new List(); private string currSvg = ""; - private string currPng = ""; /// /// Record in Edit corrente @@ -755,6 +761,7 @@ namespace Lux.UI.Components.Compo private void ConfInit() { + basePath = Config.GetValue("ServerConf:FileSharePath") ?? "unsafe_uploads"; apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; genericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? ""; @@ -837,10 +844,10 @@ namespace Lux.UI.Components.Compo if (currArgs.msgUid.Equals($"{pngChannel}:{EditRecord.OfferRowUID}")) { currPng = currArgs.newMessage; - // non devo passarlo al componente di gestione finestre... + // non devo passarlo al componente... #if false // salvo in live data... - CurrData.SvgPreview = currSvg; + CurrData.SvgPreview = currSvg; #endif } await InvokeAsync(StateHasChanged); @@ -1064,6 +1071,27 @@ namespace Lux.UI.Components.Compo } } + /// + /// Eliminazione file (old) + /// + /// Nome secure da impiegare + /// Contenuto file + private bool removeOldFile(string folderPath, string secureName) + { + bool answ = false; + if (!string.IsNullOrEmpty(folderPath)) + { + // calcolo path file... + string filePath = Path.Combine(basePath, folderPath, secureName); + // se esiste... + if (File.Exists(filePath)) + { + File.Delete(filePath); + } + } + return answ; + } + /// /// Effettua vera richiesta della BOM /// @@ -1085,10 +1113,25 @@ namespace Lux.UI.Components.Compo DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}"); // UID cablato x ora... DictExec.Add("UID", currRec.OfferRowUID); - DictExec.Add(serKey, currRec.SerStruct); - - // aggiungo comunque filename... - DictExec.Add("FileName", $"{currRec.FileName}"); + // aggiungo file secondo ambiente... + switch (currRec.Envir) + { + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW: + DictExec.Add(serKey, currRec.SerStruct); + break; + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM: + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL: + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET: + // rileggo da file... + string folderPath = $"SO-{currRec.OfferID:X8}"; + string rawData = loadFileContent(folderPath, currRec.FileResource); + DictExec.Add(serKey, rawData); + DictExec.Add("FileName", currRec.FileName); + break; + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL: + default: + break; + } CalcRequestDTO req = new CalcRequestDTO() { @@ -1102,9 +1145,47 @@ namespace Lux.UI.Components.Compo await CService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req); } + /// + /// Salvataggio dei dati del file caricato + /// + /// Dizionario info file + private void SaveFile(Dictionary fileDict) + { + // verifico di essere in edit... + if (EditRecord != null) + { + string folderPath = $"SO-{EditRecord.OfferID:X8}"; + // verifico di avere parametri... + if (fileDict != null && fileDict.Count > 0) + { + string secureName = ""; + string content = ""; + if (fileDict.ContainsKey("secureName")) + { + secureName = fileDict["secureName"]; + } + if (fileDict.ContainsKey("content")) + { + content = fileDict["content"]; + } + if (!string.IsNullOrEmpty(folderPath) && !string.IsNullOrEmpty(secureName) && !string.IsNullOrEmpty(content)) + { + // salvo! + saveFileContent(folderPath, secureName, content); + } + } + // altrimenti signifca cleanup eventuale vecchio file... + else + { + removeOldFile(folderPath, EditRecord.FileResource); + } + } + } + /// /// Esegue salvataggio del file ricevuto /// + /// Path relativo x file (tipicamente UID parent order) /// Nome secure da impiegare /// Contenuto file private bool saveFileContent(string folderPath, string secureName, string content) @@ -1113,43 +1194,50 @@ namespace Lux.UI.Components.Compo if (!string.IsNullOrEmpty(folderPath)) { // calcolo path file... - string filePath = Path.Combine("unsafe_uploads", folderPath, secureName); - File.WriteAllText(filePath, content); + string filePath = Path.Combine(basePath, folderPath, secureName); + string? directoryPath = Path.GetDirectoryName(filePath); + try + { + if (!string.IsNullOrEmpty(directoryPath)) + { + Directory.CreateDirectory(directoryPath); + } + File.WriteAllText(filePath, content); + } + catch (Exception exc) + { + Log.Error($"Exception on save{Environment.NewLine}{exc}"); + } } return answ; } - /// - /// Salvataggio dei dati del file caricato + /// Restituisce il contenuto del file salvato /// - /// Dizionario info file - private void SaveFile(Dictionary fileDict) + /// + /// + /// + private string loadFileContent(string folderPath, string secureName) { - // verifico di avere parametri... - if (fileDict != null && fileDict.Count > 0) + string answ = ""; + if (!string.IsNullOrEmpty(folderPath)) { - string folderPath = ""; - string secureName = ""; - string content = ""; - if (fileDict.ContainsKey("folderPath")) + try { - folderPath = fileDict["folderPath"]; + // calcolo path file... + string filePath = Path.Combine(basePath, folderPath, secureName); + if (File.Exists(filePath)) + { + answ = File.ReadAllText(filePath); + } } - if (fileDict.ContainsKey("secureName")) + catch (Exception exc) { - secureName = fileDict["secureName"]; - } - if (fileDict.ContainsKey("content")) - { - content = fileDict["content"]; - } - if (!string.IsNullOrEmpty(folderPath) && !string.IsNullOrEmpty(secureName) && !string.IsNullOrEmpty(content)) - { - // salvo! - saveFileContent(folderPath, secureName, content); + Log.Error($"Exception on loadFileContent{Environment.NewLine}{exc}"); } } + return answ; } /// @@ -1200,6 +1288,37 @@ namespace Lux.UI.Components.Compo } } + /// + /// Verifia ammissibilità display btn ricalcolo BOM da item + /// + /// + /// + private bool ShowBom(OfferRowModel reqItem) + { + bool answ = false; + if (DisplayMode == Enums.DisplayMode.Edit) + { + switch (reqItem.Envir) + { + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW: + answ = !string.IsNullOrEmpty(reqItem.SerStruct) && reqItem.SerStruct.Length > 2; + break; + + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM: + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL: + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET: + // da cambiare con ricerca file su disco?!? + answ = !string.IsNullOrEmpty(reqItem.FileResource) && !string.IsNullOrEmpty(reqItem.FileName); + break; + + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL: + default: + break; + } + } + return answ; + } + /// /// Elenco SalesOfferRows calcolabili: /// - contengono serializzazione come JWD @@ -1239,35 +1358,6 @@ namespace Lux.UI.Components.Compo } } - /// - /// Verifia ammissibilità display btn ricalcolo BOM da item - /// - /// - /// - private bool ShowBom(OfferRowModel reqItem) - { - bool answ = false; - if (DisplayMode == Enums.DisplayMode.Edit) - { - switch (reqItem.Envir) - { - case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW: - answ = string.IsNullOrEmpty(reqItem.SerStruct) && reqItem.SerStruct.Length > 2; - break; - case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM: - case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL: - case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET: - // da cambiare con ricerca file su disco?!? - answ = string.IsNullOrEmpty(reqItem.SerStruct) && reqItem.SerStruct.Length > 2; - break; - case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL: - default: - break; - } - } - return answ; - } - /// /// Filtro e paginazione /// diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index fa1db90a..9e8b5631 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0610 + 0.9.2511.0616 diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index efd933d7..9007ba16 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -87,6 +87,7 @@ "ImageCalcTag": "live", "ImageFileTag": "cache", "ImageLiveTag": "svg", - "BaseUrl": "/lux/ui/" + "BaseUrl": "/lux/ui/", + "FileSharePath": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\LuxUploads" } } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 9d10e8ab..6610edb0 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.0610

+

Versione: 0.9.2511.0616


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 5026efda..95367acd 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0610 +0.9.2511.0616 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index b97b7928..7dfa66cf 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0610 + 0.9.2511.0616 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 8fa8732cf1541b7e366a7cd680384c3738690746 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 6 Nov 2025 18:10:47 +0100 Subject: [PATCH 16/21] Channels: - renaming in conf json - fix gestione classi post rename --- EgwCoreLib.Lux.Data/Services/BaseServ.cs | 183 +++++++++++------- .../Services/CalcRequestService.cs | 6 +- .../Services/ImageCacheService.cs | 61 +++--- Lux.API/Controllers/GenericController.cs | 8 +- Lux.API/Controllers/WindowController.cs | 10 +- Lux.API/Lux.API.csproj | 2 +- Lux.API/Program.cs | 2 +- Lux.API/Services/RedisSubscriberService.cs | 6 +- Lux.API/appsettings.Development.json | 20 +- Lux.API/appsettings.Production.json | 20 +- Lux.API/appsettings.Staging.json | 20 +- Lux.API/appsettings.json | 36 ++-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 60 +++--- Lux.UI/Components/Pages/Scratch.razor.cs | 8 +- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/appsettings.Development.json | 20 +- Lux.UI/appsettings.Production.json | 20 +- Lux.UI/appsettings.Staging.json | 20 +- Lux.UI/appsettings.json | 31 +-- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 22 files changed, 277 insertions(+), 264 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/BaseServ.cs b/EgwCoreLib.Lux.Data/Services/BaseServ.cs index ee1bc5a1..19b52e97 100644 --- a/EgwCoreLib.Lux.Data/Services/BaseServ.cs +++ b/EgwCoreLib.Lux.Data/Services/BaseServ.cs @@ -37,49 +37,58 @@ namespace EgwCoreLib.Lux.Data.Services _config = Configuration; redisConn = RedisConn; redisDb = redisConn.GetDatabase(); - - // channel name setup - pngChannel = _config.GetValue("ServerConf:PngChannel") ?? "Egw:png:img"; - svgChannel = _config.GetValue("ServerConf:SvgChannel") ?? "Egw:svg:img"; - bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw:bom"; - updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw:update"; - shapeChannel = _config.GetValue("ServerConf:ShapeChannel") ?? "Egw:shape:curr"; - hwListChannel = _config.GetValue("ServerConf:HwListChannel") ?? "Egw:hw:list"; - hwOptChannel = _config.GetValue("ServerConf:HwOptChannel") ?? "Egw:hw:opt"; - profListChannel = _config.GetValue("ServerConf:ProfListChannel") ?? "Egw:prof:list"; + // receving channel name setup + chBom = _config.GetValue("ServerConf:ChannelBom") ?? "lux:bom"; + chHwList = _config.GetValue("ServerConf:ChannelHwList") ?? "lux:hw:list"; + chHwOpt = _config.GetValue("ServerConf:ChannelHwOpt") ?? "lux:hw:opt"; + chPng = _config.GetValue("ServerConf:ChannelPng") ?? "lux:png:img"; + chProfList = _config.GetValue("ServerConf:ChannelProfList") ?? "lux:prof:list"; + chShape = _config.GetValue("ServerConf:ChannelShape") ?? "lux:shape:curr"; + chSvg = _config.GetValue("ServerConf:ChannelSvg") ?? "lux:svg:img"; + chUpdate = _config.GetValue("ServerConf:ChannelUpdate") ?? "lux:update"; // Appends ":*" to the channels to enable wildcard subscription for dynamic events - if (!pngChannel.EndsWith(":*")) + fixRecChannel(ref chBom); + fixRecChannel(ref chHwList); + fixRecChannel(ref chHwOpt); + fixRecChannel(ref chPng); + fixRecChannel(ref chProfList); + fixRecChannel(ref chShape); + fixRecChannel(ref chSvg); + fixRecChannel(ref chUpdate); +#if false + if (!chPng.EndsWith(":*")) { - pngChannel += ":*"; + chPng += ":*"; } - if (!svgChannel.EndsWith(":*")) + if (!chSvg.EndsWith(":*")) { - svgChannel += ":*"; + chSvg += ":*"; } - if (!bomChannel.EndsWith(":*")) + if (!chBom.EndsWith(":*")) { - bomChannel += ":*"; + chBom += ":*"; } - if (!updateChannel.EndsWith(":*")) + if (!chUpdate.EndsWith(":*")) { - updateChannel += ":*"; + chUpdate += ":*"; } - if (!shapeChannel.EndsWith(":*")) + if (!chShape.EndsWith(":*")) { - shapeChannel += ":*"; + chShape += ":*"; } - if (!hwListChannel.EndsWith(":*")) + if (!chHwList.EndsWith(":*")) { - hwListChannel += ":*"; + chHwList += ":*"; } - if (!hwOptChannel.EndsWith(":*")) + if (!chHwOpt.EndsWith(":*")) { - hwOptChannel += ":*"; + chHwOpt += ":*"; } - if (!profListChannel.EndsWith(":*")) + if (!chProfList.EndsWith(":*")) { - profListChannel += ":*"; + chProfList += ":*"; } +#endif // Configurazione serializzatore JSON per risolvere errore di loop circolare JSSettings = new JsonSerializerSettings() @@ -88,14 +97,14 @@ namespace EgwCoreLib.Lux.Data.Services }; // Configurazione pipe dei messaggi - PipePng = new MessagePipe(redisConn, pngChannel); - PipeSvg = new MessagePipe(redisConn, svgChannel); - PipeBom = new MessagePipe(RedisConn, bomChannel); - PipeUpdate = new MessagePipe(RedisConn, updateChannel); - PipeShape = new MessagePipe(RedisConn, shapeChannel); - PipeHwList = new MessagePipe(RedisConn, hwListChannel); - PipeHwOpt = new MessagePipe(RedisConn, hwOptChannel); - PipeProfList = new MessagePipe(RedisConn, profListChannel); + PipeBom = new MessagePipe(redisConn, chBom); + PipeHwList = new MessagePipe(redisConn, chHwList); + PipeHwOpt = new MessagePipe(redisConn, chHwOpt); + PipePng = new MessagePipe(redisConn, chPng); + PipeProfList = new MessagePipe(redisConn, chProfList); + PipeShape = new MessagePipe(redisConn, chShape); + PipeSvg = new MessagePipe(redisConn, chSvg); + PipeUpdate = new MessagePipe(redisConn, chUpdate); } #endregion Public Constructors @@ -109,36 +118,37 @@ namespace EgwCoreLib.Lux.Data.Services /// /// Pipe dei messaggi per ritorno HwList da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da HwListChannel. + /// I messaggi vengono inviati sul canale Redis definito da ChannelHwList. /// public MessagePipe PipeHwList { get; set; } = null!; + /// /// Pipe dei messaggi per ritorno HwOptions calcolate da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da HwOptChannel. + /// I messaggi vengono inviati sul canale Redis definito da ChannelHwOpt. /// public MessagePipe PipeHwOpt { get; set; } = null!; + /// + /// Pipe dei messaggi per ritorno PNG calcolati da Engine di calcolo verso interfaccia utente. + /// I messaggi vengono inviati sul canale Redis definito da ChannelPng. + /// + public MessagePipe PipePng { get; set; } = null!; + /// /// Pipe dei messaggi per ritorno ProfileList calcolate da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da ProfListChannel. + /// I messaggi vengono inviati sul canale Redis definito da ChannelProfList. /// public MessagePipe PipeProfList { get; set; } = null!; /// /// Pipe dei messaggi per ritorno Shape calcolate da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da ShapeChannel. + /// I messaggi vengono inviati sul canale Redis definito da ChannelShape. /// public MessagePipe PipeShape { get; set; } = null!; - /// - /// Pipe dei messaggi per ritorno PNG calcolati da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da PngChannel. - /// - public MessagePipe PipePng { get; set; } = null!; - /// /// Pipe dei messaggi per ritorno SVG calcolati da Engine di calcolo verso interfaccia utente. - /// I messaggi vengono inviati sul canale Redis definito da SvgChannel. + /// I messaggi vengono inviati sul canale Redis definito da ChannelSvg. /// public MessagePipe PipeSvg { get; set; } = null!; @@ -220,11 +230,6 @@ namespace EgwCoreLib.Lux.Data.Services ///
private static Logger Log = LogManager.GetCurrentClassLogger(); - /// - /// Redis channel for BOM related info - /// - private string bomChannel = ""; - /// /// Durata della cache lunga in secondi (predefinito: 5 minuti) /// Utilizzato nella proprietà LongCache per definire quanto a lungo i dati devono essere memorizzati in cache. @@ -237,19 +242,47 @@ namespace EgwCoreLib.Lux.Data.Services /// private int cacheTtlShort = 60 * 1; + /// + /// Redis channel for BOM related info + /// + private string chBom = ""; + /// /// Canale ritorno Hw List /// - private string hwListChannel = ""; + private string chHwList = ""; + /// /// Canale ritorno Hw Options /// - private string hwOptChannel = ""; + private string chHwOpt = ""; + + /// + /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img png. + /// Predefinito a "png:img" con suffisso ":*". + /// + private string chPng = ""; /// /// Canale ritorno Profile List /// - private string profListChannel = ""; + private string chProfList = ""; + + /// + /// Canale ritorno shape calcolate + /// + private string chShape = ""; + + /// + /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg. + /// Predefinito a "svg:img" con suffisso ":*". + /// + private string chSvg = ""; + + /// + /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi di update + /// + private string chUpdate = ""; /// /// Generatore di numeri casuali utilizzato per introdurre variabilità dinamica nelle durate della cache @@ -257,28 +290,28 @@ namespace EgwCoreLib.Lux.Data.Services /// private Random rnd = new Random(); - /// - /// Canale ritorno shape calcolate - /// - private string shapeChannel = ""; - - /// - /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg. - /// Predefinito a "svg:img" con suffisso ":*". - /// - private string svgChannel = ""; - - /// - /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img png. - /// Predefinito a "png:img" con suffisso ":*". - /// - private string pngChannel = ""; - - /// - /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi di update - /// - private string updateChannel = ""; - #endregion Private Fields + + #region Private Methods + + /// + /// Fix Receive Channel (ricerca "like") + /// + /// + private void fixRecChannel(ref string currCh) + { +#if false + if (!currCh.EndsWith(":*")) + { + //currCh += ":*"; + } +#endif + if (!currCh.EndsWith("*")) + { + currCh += "*"; + } + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs b/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs index e74fb77f..362ec442 100644 --- a/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs +++ b/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs @@ -14,11 +14,9 @@ namespace EgwCoreLib.Lux.Data.Services { #region Public Constructors - public CalcRequestService(IConfiguration config, IRedisService redisService) + public CalcRequestService(IConfiguration config) { _config = config; - _redisService = redisService; - bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "bom"; // verifico la url base apiUrl = _config.GetValue("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api"; routeBasePath = _config.GetValue("ServerConf:RouteBaseUrl") ?? "window"; @@ -61,9 +59,7 @@ namespace EgwCoreLib.Lux.Data.Services #region Private Fields private static Logger Log = LogManager.GetCurrentClassLogger(); - private readonly IRedisService _redisService; private readonly string apiUrl = ""; - private readonly string bomChannel = "bomdev"; private readonly string routeBasePath = ""; private IConfiguration _config; diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index db3f5ff9..6e959604 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -1,15 +1,8 @@ -using EgwCoreLib.Lux.Core.RestPayload; -using EgwMultiEngineManager.Data; +using EgwMultiEngineManager.Data; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; using RestSharp; -using StackExchange.Redis; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace EgwCoreLib.Lux.Data.Services { @@ -22,14 +15,14 @@ namespace EgwCoreLib.Lux.Data.Services _config = config; _redisService = redisService; // conf channels x comunicazione broadcast - hwOptChannel = _config.GetValue("ServerConf:HwOptChannel") ?? "Egw:hw"; - pngChannel = _config.GetValue("ServerConf:PngChannel") ?? "Egw:png:img"; - svgChannel = _config.GetValue("ServerConf:SvgChannel") ?? "Egw:svg:img"; - bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw:bom"; - hmlChannel = _config.GetValue("ServerConf:HwListChannel") ?? "Egw:hml"; - profListChannel = _config.GetValue("ServerConf:ProfListChannel") ?? "Egw:prof"; - shapeChannel = _config.GetValue("ServerConf:ShapeChannel") ?? "Egw:shape"; - updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw:update"; + chBom = _config.GetValue("ServerConf:ChannelBom") ?? "lux:bom"; + chHwList = _config.GetValue("ServerConf:ChannelHwList") ?? "lux:hw:list"; + chHwOpt = _config.GetValue("ServerConf:ChannelHwOpt") ?? "lux:hw:opt"; + chPng = _config.GetValue("ServerConf:ChannelPng") ?? "lux:png:img"; + chProfList = _config.GetValue("ServerConf:ChannelProfList") ?? "lux:prof"; + chShape = _config.GetValue("ServerConf:ChannelShape") ?? "lux:shape"; + chSvg = _config.GetValue("ServerConf:ChannelSvg") ?? "lux:svg:img"; + chUpdate = _config.GetValue("ServerConf:ChannelUpdate") ?? "lux:update"; // conf tag x cache liveTag = _config.GetValue("ServerConf:ImageLiveTag") ?? "svg"; cacheTag = _config.GetValue("ServerConf:ImageFileTag") ?? "svgfile"; @@ -138,9 +131,11 @@ namespace EgwCoreLib.Lux.Data.Services { case Constants.EXECENVIRONMENTS.NULL: break; + case Constants.EXECENVIRONMENTS.WINDOW: fType = "svg"; break; + case Constants.EXECENVIRONMENTS.BEAM: case Constants.EXECENVIRONMENTS.WALL: case Constants.EXECENVIRONMENTS.CABINET: @@ -148,7 +143,7 @@ namespace EgwCoreLib.Lux.Data.Services fType = "png"; break; } - + string rndImg = $"{DateTime.Now:HHmmssfff}"; string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?env={envir}".Replace("////", "//"); return fullUrl; @@ -203,7 +198,7 @@ namespace EgwCoreLib.Lux.Data.Services { bool done = false; // invio notifica sul canale di update generale... - string notifyChannel = $"{updateChannel}:{env}"; + string notifyChannel = $"{chUpdate}:{env}"; // contenuto è UID long numSent = await _redisService.PublishAsync(notifyChannel, $"{uid}"); done = numSent > 0; @@ -241,7 +236,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:BOM:{uid.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, bomContent); // invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale - string notifyChannel = $"{bomChannel}:{uid}"; + string notifyChannel = $"{chBom}:{uid}"; long numSent = await _redisService.PublishAsync(notifyChannel, bomContent); return done; } @@ -257,7 +252,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:HML:{uid.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, rawData); // invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale - string notifyChannel = $"{hmlChannel}:{uid}"; + string notifyChannel = $"{chHwList}:{uid}"; long numSent = await _redisService.PublishAsync(notifyChannel, rawData); return done; } @@ -275,7 +270,7 @@ namespace EgwCoreLib.Lux.Data.Services // lascio in cache 15 min x poterlo verificare var done = await _redisService.SetAsync(currKey, xmlContent, TimeSpan.FromMinutes(15)); // invio notifica nuova XML sul canale (inviato solo XML pulito con ID nel canale) - string notifyChannel = $"{hwOptChannel}:{uid}"; + string notifyChannel = $"{chHwOpt}:{uid}"; long numSent = await _redisService.PublishAsync(notifyChannel, xmlContent); return done; } @@ -309,7 +304,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:Img:Png:{imgId.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, pngContent); // invio notifica nuova png generata sul canale... viene inviato solo contenuto con ID nel canale - string notifyChannel = $"{pngChannel}:{imgId}"; + string notifyChannel = $"{chPng}:{imgId}"; long numSent = await _redisService.PublishAsync(notifyChannel, "PNG"); // NON pubblico contenuto che x PNG non serve... //long numSent = await _redisService.PublishAsync(notifyChannel, pngContent); @@ -327,7 +322,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:PROFLIST:{uid.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, rawData); // invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale - string notifyChannel = $"{profListChannel}:{uid}"; + string notifyChannel = $"{chProfList}:{uid}"; long numSent = await _redisService.PublishAsync(notifyChannel, rawData); return done; } @@ -344,7 +339,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:Shape:{uid}"; var done = await _redisService.SetAsync(currKey, shapeContent); // invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale - string notifyChannel = $"{shapeChannel}:{uid}"; + string notifyChannel = $"{chShape}:{uid}"; long numSent = await _redisService.PublishAsync(notifyChannel, shapeContent); return done; } @@ -378,7 +373,7 @@ namespace EgwCoreLib.Lux.Data.Services string currKey = $"{redisBaseKey}:{env}:Img:Svg:{imgId.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, svgContent); // invio notifica nuova svg generata sul canale... viene inviato solo contenuto con ID nel canale - string notifyChannel = $"{svgChannel}:{imgId}"; + string notifyChannel = $"{chSvg}:{imgId}"; long numSent = await _redisService.PublishAsync(notifyChannel, svgContent); return done; } @@ -393,18 +388,18 @@ namespace EgwCoreLib.Lux.Data.Services private readonly string apiUrl = ""; - private readonly string bomChannel = "bom:item"; private readonly string cacheTag = "svgfile"; private readonly string calcTag = "svgpreview"; - private readonly string hmlChannel = "hml:item"; - private readonly string hwOptChannel = "hw:opt"; + private readonly string chBom = "lux:bom"; + private readonly string chHwList = "lux:hw:list"; + private readonly string chHwOpt = "lux:hw:opt"; + private readonly string chPng = "lux:png:img"; + private readonly string chProfList = "lux:prof:list"; + private readonly string chShape = "shape:curr"; + private readonly string chSvg = "lux:svg:img"; + private readonly string chUpdate = "lux::update"; private readonly string imgBasePath = ""; private readonly string liveTag = "svg"; - private readonly string pngChannel = "png:img"; - private readonly string profListChannel = "prof:list"; - private readonly string shapeChannel = "shape:curr"; - private readonly string svgChannel = "svg:img"; - private readonly string updateChannel = "ui:update"; private IConfiguration _config; private string imageBaseUrl = ""; diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs index fc1a9a72..447f33d6 100644 --- a/Lux.API/Controllers/GenericController.cs +++ b/Lux.API/Controllers/GenericController.cs @@ -19,7 +19,7 @@ namespace Lux.API.Controllers _config = config; _redisService = redisService; _imgService = imgServ; - pubChannel = _config.GetValue("ServerConf:PubChannel") ?? ""; + chPub = _config.GetValue("ServerConf:ChannelPub") ?? ""; } #endregion Public Constructors @@ -60,7 +60,7 @@ namespace Lux.API.Controllers // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, currReq.EnvType, DictExec); - await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + await _redisService.PublishAsync(chPub, currArgs.sProcessArgs); retVal = "DONE"; } sw.Stop(); @@ -97,7 +97,7 @@ namespace Lux.API.Controllers // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); - await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + await _redisService.PublishAsync(chPub, currArgs.sProcessArgs); retVal = "DONE"; } sw.Stop(); @@ -111,7 +111,7 @@ namespace Lux.API.Controllers private static Logger Log = LogManager.GetCurrentClassLogger(); private readonly IRedisService _redisService; - private readonly string pubChannel = ""; + private readonly string chPub = ""; private IConfiguration _config; #endregion Private Fields diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index 3e6b752d..f2e048a9 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -21,7 +21,7 @@ namespace Lux.API.Controllers _redisService = redisService; _imgService = imgServ; _confService = confServ; - pubChannel = _config.GetValue("ServerConf:PubChannel") ?? ""; + chPub = _config.GetValue("ServerConf:ChannelPub") ?? ""; } #endregion Public Constructors @@ -69,7 +69,7 @@ namespace Lux.API.Controllers // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); - await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + await _redisService.PublishAsync(chPub, currArgs.sProcessArgs); svgContent = "DONE"; } sw.Stop(); @@ -111,7 +111,7 @@ namespace Lux.API.Controllers int nId = 1; // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); - await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + await _redisService.PublishAsync(chPub, currArgs.sProcessArgs); } /// @@ -247,7 +247,7 @@ namespace Lux.API.Controllers // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); - await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + await _redisService.PublishAsync(chPub, currArgs.sProcessArgs); svgContent = "DONE"; } sw.Stop(); @@ -261,7 +261,7 @@ namespace Lux.API.Controllers private static Logger Log = LogManager.GetCurrentClassLogger(); private readonly IRedisService _redisService; - private readonly string pubChannel = ""; + private readonly string chPub = ""; private IConfiguration _config; /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index daa7f078..496890e2 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0616 + 0.9.2511.0618 diff --git a/Lux.API/Program.cs b/Lux.API/Program.cs index 038d35cb..5e3c5290 100644 --- a/Lux.API/Program.cs +++ b/Lux.API/Program.cs @@ -62,7 +62,7 @@ app.UsePathBase(baseUrl); logger.Info($"BaseUrl: {baseUrl}"); // log channels di ritorno UI -List listParams = new List() { "PngChannel", "SubChannel", "PubChannel", "SvgChannel" }; +List listParams = new List() { "ChannelPng", "ChannelSub", "ChannelPub", "ChannelSvg" }; foreach (var param in listParams) { logger.Info($"{param}: {configuration.GetValue($"ServerConf:{param}") ?? ""}"); diff --git a/Lux.API/Services/RedisSubscriberService.cs b/Lux.API/Services/RedisSubscriberService.cs index c4baac4f..ccc845af 100644 --- a/Lux.API/Services/RedisSubscriberService.cs +++ b/Lux.API/Services/RedisSubscriberService.cs @@ -12,7 +12,7 @@ namespace Lux.API.Services _subManager = subManager; _processor = processor; _config = config; - subChannel = _config.GetValue("ServerConf:SubChannel") ?? ""; + chSub = _config.GetValue("ServerConf:ChannelSub") ?? ""; } #endregion Public Constructors @@ -21,7 +21,7 @@ namespace Lux.API.Services protected override Task ExecuteAsync(CancellationToken stoppingToken) { - _subManager.Subscribe(subChannel, async (ch, msg) => + _subManager.Subscribe(chSub, async (ch, msg) => { await _processor.HandleResultMessageAsync($"{ch}", $"{msg}"); }); @@ -36,7 +36,7 @@ namespace Lux.API.Services private readonly IConfiguration _config; private readonly ExternalMessageProcessor _processor; private readonly RedisSubscriptionManager _subManager; - private readonly string subChannel = ""; + private readonly string chSub = ""; #endregion Private Fields } diff --git a/Lux.API/appsettings.Development.json b/Lux.API/appsettings.Development.json index b0906ead..2bb4275c 100644 --- a/Lux.API/appsettings.Development.json +++ b/Lux.API/appsettings.Development.json @@ -6,17 +6,17 @@ } }, "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", + "ChannelPng": "luxdev:png:img", + "ChannelSvg": "luxdev:svg:img", + "ChannelShape": "luxdev:shape:curr", + "ChannelHwList": "luxdev:hw:list", + "ChannelHwOpt": "luxdev:hw:opt", + "ChannelProfList": "luxdev:prof:list", + "ChannelBom": "luxdev:bom", + "ChannelUpdate": "luxdev:update", "BaseUrl": "/lux/srv/", - //"PubChannel": "EgwDevEngineInput", - //"SubChannel": "EgwDevEngineOutput", + //"ChannelPub": "EgwDevEngineInput", + //"ChannelSub": "EgwDevEngineOutput", "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/" } } diff --git a/Lux.API/appsettings.Production.json b/Lux.API/appsettings.Production.json index 521e3972..b9600590 100644 --- a/Lux.API/appsettings.Production.json +++ b/Lux.API/appsettings.Production.json @@ -7,16 +7,16 @@ }, "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", + "ChannelPng": "Egw:png:img", + "ChannelSvg": "Egw:svg:img", + "ChannelShape": "Egw:shape:curr", + "ChannelHwList": "Egw:hw:list", + "ChannelHwOpt": "Egw:hw:opt", + "ChannelProfList": "Egw:prof:list", + "ChannelBom": "Egw:bom", + "ChannelUpdate": "Egw:update", + "ChannelPub": "EgwEngineInput", + "ChannelSub": "EgwEngineOutput", "ImageBaseUrl": "https://office.egalware.com/lux/srv/api/window/" } } diff --git a/Lux.API/appsettings.Staging.json b/Lux.API/appsettings.Staging.json index ccb18f94..194c1cc8 100644 --- a/Lux.API/appsettings.Staging.json +++ b/Lux.API/appsettings.Staging.json @@ -6,16 +6,16 @@ } }, "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", + "ChannelPng": "luxstag:png:img", + "ChannelSvg": "luxstag:svg:img", + "ChannelShape": "luxstag:shape:curr", + "ChannelHwList": "luxstag:hw:list", + "ChannelHwOpt": "luxstag:hw:opt", + "ChannelProfList": "luxstag:prof:list", + "ChannelBom": "luxstag:bom", + "ChannelUpdate": "luxstag:update", "BaseUrl": "/lux/srv/", - "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput" + "ChannelPub": "EgwEngineInput", + "ChannelSub": "EgwEngineOutput" } } diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index a15138a6..f9edf26a 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -56,26 +56,26 @@ }, "ServerConf": { "CalcTag": "calc", - "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput", + "ChannelPub": "EgwEngineInput", + "ChannelSub": "EgwEngineOutput", - "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", + "ChannelPng": "luxdev:png:img", + "ChannelSvg": "luxdev:svg:img", + "ChannelShape": "luxdev:shape:curr", + "ChannelHwList": "luxdev:hw:list", + "ChannelHwOpt": "luxdev:hw:opt", + "ChannelProfList": "luxdev:prof:list", + "ChannelBom": "luxdev:bom", + "ChannelUpdate": "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", + //"ChannelPng": "Egw:png:img", + //"ChannelSvg": "Egw:svg:img", + //"ChannelShape": "Egw:shape:curr", + //"ChannelHwList": "Egw:hw:list", + //"ChannelHwOpt": "Egw:hw:opt", + //"ChannelProfList": "Egw:prof:list", + //"ChannelBom": "Egw:bom", + //"ChannelUpdate": "Egw:update", "BaseUrl": "/lux/srv/", "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/", "ImageCalcTag": "svg-preview", diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index f11b2ee7..689a931f 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -22,7 +22,7 @@ namespace Lux.UI.Components.Compo #region Public Enums /// - /// modalità modifica riga offerta + /// modalit� modifica riga offerta /// public enum EditMode { @@ -276,7 +276,7 @@ namespace Lux.UI.Components.Compo var listCalc = SorListCalc(); foreach (var item in listCalc) { - // se UID è tra quelli da ricalcolare... + // se UID � tra quelli da ricalcolare... if (list2fix.Contains(item.OfferRowUID)) { // chiedo BOM e immagine @@ -311,7 +311,7 @@ namespace Lux.UI.Components.Compo { // imposto edit record EditRecord = curRec; - /// modalitàedit: gestione valori campi record + /// modalit�edit: gestione valori campi record CurrEditMode = EditMode.RecData; } @@ -324,7 +324,7 @@ namespace Lux.UI.Components.Compo protected void DoEditFile(OfferRowModel curRec) { EditRecord = curRec; - /// modalitàedit: gestione JWD + /// modalit�edit: gestione JWD CurrEditMode = EditMode.File; #if false // preparazione dati da record corrente @@ -341,7 +341,7 @@ namespace Lux.UI.Components.Compo protected void DoEditJwd(OfferRowModel curRec) { EditRecord = curRec; - /// modalitàedit: gestione JWD + /// modalit�edit: gestione JWD CurrEditMode = EditMode.SerStruc; // preparazione dati da record corrente PrepareWindowData(EditRecord.SerStruct); @@ -369,19 +369,19 @@ namespace Lux.UI.Components.Compo } /// - /// Seleziono riga senza cambiare modalità editing + /// Seleziono riga senza cambiare modalit� editing /// /// protected void DoSelect(OfferRowModel curRec) { // imposto edit record EditRecord = curRec; - /// modalitàedit: gestione valori campi record + /// modalit�edit: gestione valori campi record CurrEditMode = EditMode.None; } /// - /// Imposta modalità edit ciclo di lavoro + /// Imposta modalit� edit ciclo di lavoro /// /// protected void DoSwapJobCycle(OfferRowModel currRow) @@ -392,7 +392,7 @@ namespace Lux.UI.Components.Compo } /// - /// Imposta modalità ad edit BOM + /// Imposta modalit� ad edit BOM /// /// protected void DoSwapMat(OfferRowModel currRow) @@ -449,7 +449,7 @@ namespace Lux.UI.Components.Compo foreach (var item in listCalc) { await DLService.OffertUpdateAwaitState(item.OfferRowID, true, true); - // poiché non è gestito evento ritorno update window interno si "scassa" --> try catch/ if FALSE + // poich� non � gestito evento ritorno update window interno si "scassa" --> try catch/ if FALSE try { string rColor = CurrSel.GetVal("Color"); @@ -626,7 +626,7 @@ namespace Lux.UI.Components.Compo private List? CurrBomList = null; /// - /// Modalità editint attiva + /// Modalit� editint attiva /// private EditMode CurrEditMode = EditMode.None; @@ -651,12 +651,12 @@ namespace Lux.UI.Components.Compo /// /// Channel update HwOptions /// - private string hwOptChannel = ""; + private string chHwOpt = ""; private string imgBasePath = ""; /// - /// Semaforo x definire se sia già in modalità ionterattiva o di prerendering + /// Semaforo x definire se sia gi� in modalit� ionterattiva o di prerendering /// private bool isInteractive = false; @@ -674,7 +674,7 @@ namespace Lux.UI.Components.Compo /// /// Channel update PNG /// - private string pngChannel = ""; + private string chPng = ""; /// /// Versione precedente JWD x test e confronto @@ -684,7 +684,7 @@ namespace Lux.UI.Components.Compo /// /// Channel update Profile List /// - private string profListChannel = ""; + private string chProfList = ""; /// /// Dizionario richieste @@ -694,12 +694,12 @@ namespace Lux.UI.Components.Compo /// /// Channel update Shape /// - private string shapeChannel = ""; + private string chShape = ""; /// /// Channel update SVG /// - private string svgChannel = ""; + private string chSvg = ""; private int totalCount = 0; @@ -766,11 +766,11 @@ namespace Lux.UI.Components.Compo imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; genericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? ""; calcTag = Config.GetValue("ServerConf:CalcTag") ?? "calc"; - pngChannel = Config.GetValue("ServerConf:PngChannel") ?? ""; - svgChannel = Config.GetValue("ServerConf:SvgChannel") ?? ""; - shapeChannel = Config.GetValue("ServerConf:ShapeChannel") ?? ""; - hwOptChannel = Config.GetValue("ServerConf:HwOptChannel") ?? ""; - profListChannel = Config.GetValue("ServerConf:ProfListChannel") ?? ""; + chHwOpt = Config.GetValue("ServerConf:ChannelHwOpt") ?? ""; + chPng = Config.GetValue("ServerConf:ChannelPng") ?? ""; + chProfList = Config.GetValue("ServerConf:ChannelProfList") ?? ""; + chShape = Config.GetValue("ServerConf:ChannelShape") ?? ""; + chSvg = Config.GetValue("ServerConf:ChannelSvg") ?? ""; } private async Task DoRecalcOffer() @@ -819,7 +819,7 @@ namespace Lux.UI.Components.Compo // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.Equals($"{hwOptChannel}:{EditRecord.OfferRowUID}")) + if (currArgs.msgUid.Equals($"{chHwOpt}:{EditRecord.OfferRowUID}")) { var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage) ?? new Dictionary(); currHwOption = rawDict; @@ -841,7 +841,7 @@ namespace Lux.UI.Components.Compo // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.Equals($"{pngChannel}:{EditRecord.OfferRowUID}")) + if (currArgs.msgUid.Equals($"{chPng}:{EditRecord.OfferRowUID}")) { currPng = currArgs.newMessage; // non devo passarlo al componente... @@ -870,7 +870,7 @@ namespace Lux.UI.Components.Compo // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.Equals($"{profListChannel}:{EditRecord.OfferRowUID}")) + if (currArgs.msgUid.Equals($"{chProfList}:{EditRecord.OfferRowUID}")) { try { @@ -918,7 +918,7 @@ namespace Lux.UI.Components.Compo // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.StartsWith($"{shapeChannel}:{EditRecord.OfferRowUID}")) + if (currArgs.msgUid.StartsWith($"{chShape}:{EditRecord.OfferRowUID}")) { // deserializzo il dizionario delle risposte... var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage); @@ -944,7 +944,7 @@ namespace Lux.UI.Components.Compo } /// - /// Ricevuto SVG, se è il mio lo aggiorno... + /// Ricevuto SVG, se � il mio lo aggiorno... /// /// /// @@ -958,7 +958,7 @@ namespace Lux.UI.Components.Compo // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.Equals($"{svgChannel}:{EditRecord.OfferRowUID}")) + if (currArgs.msgUid.Equals($"{chSvg}:{EditRecord.OfferRowUID}")) { currSvg = currArgs.newMessage; // salvo in live data... @@ -1289,7 +1289,7 @@ namespace Lux.UI.Components.Compo } /// - /// Verifia ammissibilità display btn ricalcolo BOM da item + /// Verifia ammissibilit� display btn ricalcolo BOM da item /// /// /// @@ -1333,7 +1333,7 @@ namespace Lux.UI.Components.Compo } /// - /// Toggle visibilità modifica file indicando ID della OfferRow corrente (o zero se deselect) + /// Toggle visibilit� modifica file indicando ID della OfferRow corrente (o zero se deselect) /// private void ToggleFileEdit(OfferRowModel? currRec) { diff --git a/Lux.UI/Components/Pages/Scratch.razor.cs b/Lux.UI/Components/Pages/Scratch.razor.cs index ad79aca8..7ee86681 100644 --- a/Lux.UI/Components/Pages/Scratch.razor.cs +++ b/Lux.UI/Components/Pages/Scratch.razor.cs @@ -60,7 +60,7 @@ namespace Lux.UI.Components.Pages apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; calcTag = Config.GetValue("ServerConf:ImageCalcTag") ?? ""; - subChannel = Config.GetValue("ServerConf:SvgChannel") ?? ""; + chSub = Config.GetValue("ServerConf:ChannelSvg") ?? ""; DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage; } @@ -97,11 +97,11 @@ namespace Lux.UI.Components.Pages private string imgBasePath = ""; /// - /// Semaforo x definire se sia già in modalità ionterattiva o di prerendering + /// Semaforo x definire se sia gi� in modalit� ionterattiva o di prerendering /// private bool isInteractive = false; - private string subChannel = ""; + private string chSub = ""; private string windowUid = "TestWindow"; #endregion Private Fields @@ -115,7 +115,7 @@ namespace Lux.UI.Components.Pages // conversione on-the-fly SVG da mostrare if (!string.IsNullOrEmpty(currArgs.newMessage)) { - if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}")) + if (currArgs.msgUid.Equals($"{chSub}:{windowUid}")) { currSvg = currArgs.newMessage; } diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 9e8b5631..698fe88b 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0616 + 0.9.2511.0618 diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index f0316739..ffc97388 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -6,15 +6,15 @@ } }, "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" + "ChannelPng": "luxdev:png:img", + "ChannelSvg": "luxdev:svg:img", + "ChannelShape": "luxdev:shape:curr", + "ChannelHwList": "luxdev:hw:list", + "ChannelHwOpt": "luxdev:hw:opt", + "ChannelProfList": "luxdev:prof:list", + "ChannelBom": "luxdev:bom", + "ChannelUpdate": "luxdev:update", + "ChannelPub": "EgwDevEngineInput", + "ChannelSub": "EgwDevEngineOutput" } } diff --git a/Lux.UI/appsettings.Production.json b/Lux.UI/appsettings.Production.json index 29e8ff8b..57f430a4 100644 --- a/Lux.UI/appsettings.Production.json +++ b/Lux.UI/appsettings.Production.json @@ -6,16 +6,16 @@ } }, "ServerConf": { - "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", + "ChannelPng": "Egw:png:img", + "ChannelSvg": "Egw:svg:img", + "ChannelShape": "Egw:shape:curr", + "ChannelHwList": "Egw:hw:list", + "ChannelHwOpt": "Egw:hw:opt", + "ChannelProfList": "Egw:prof:list", + "ChannelBom": "Egw:bom", + "ChannelUpdate": "Egw:update", + "ChannelPub": "EgwEngineInput", + "ChannelSub": "EgwEngineOutput", "Prog.ApiUrl": "https://office.egalware.com/lux/srv/api" } } diff --git a/Lux.UI/appsettings.Staging.json b/Lux.UI/appsettings.Staging.json index a890cf97..577bf87d 100644 --- a/Lux.UI/appsettings.Staging.json +++ b/Lux.UI/appsettings.Staging.json @@ -6,16 +6,16 @@ } }, "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", - "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput", + "ChannelPng": "luxstag:png:img", + "ChannelSvg": "luxstag:svg:img", + "ChannelShape": "luxstag:shape:curr", + "ChannelHwList": "luxstag:hw:list", + "ChannelHwOpt": "luxstag:hw:opt", + "ChannelProfList": "luxstag:prof:list", + "ChannelBom": "luxstag:bom", + "ChannelUpdate": "luxstag:update", + "ChannelPub": "EgwEngineInput", + "ChannelSub": "EgwEngineOutput", "Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" } } diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 9007ba16..49e322f2 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -63,27 +63,16 @@ //"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", "ImageBaseUrl": "Image", "RouteBaseUrl": "window", - - "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", - "SubChannel": "EgwEngineOutput", + "ChannelBom": "luxdev:bom", + "ChannelHwList": "luxdev:hw:list", + "ChannelHwOpt": "luxdev:hw:opt", + "ChannelPng": "luxdev:png:img", + "ChannelProfList": "luxdev:prof:list", + "ChannelPub": "EgwEngineInput", + "ChannelShape": "luxdev:shape:curr", + "ChannelSub": "EgwEngineOutput", + "ChannelSvg": "luxdev:svg:img", + "ChannelUpdate": "luxdev:update", "ImageCalcTag": "live", "ImageFileTag": "cache", "ImageLiveTag": "svg", diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 6610edb0..4510fb8c 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.0616

+

Versione: 0.9.2511.0618


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 95367acd..20e7993e 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0616 +0.9.2511.0618 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 7dfa66cf..2fb0cacd 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0616 + 0.9.2511.0618 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 4b9916cf11d0820be59005a4482633ff116c5841 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 6 Nov 2025 18:52:05 +0100 Subject: [PATCH 17/21] Update grafico IMG demo --- Lux.UI/Components/Compo/OfferRowMan.razor | 57 ++++++++++------------- Lux.UI/wwwroot/css/site.css | 11 +++++ Lux.UI/wwwroot/css/site.less | 12 +++++ Lux.UI/wwwroot/css/site.min.css | 2 +- 4 files changed, 49 insertions(+), 33 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index e6a7d040..6cf868ab 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -144,48 +144,41 @@ else @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { - @* @if (!string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) *@ @if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { - + } else { - + } } - -
    @item.OfferRowUID
    - @* @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) *@ - @if(ShowBom(item)) - { - } - - } - @if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName)) - { - @*
    - @if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) - { - - - - - } - else - { - @item.FileName | @fSize(item.FileSize) - - } -
    *@ - @item.FileName | @fSize(item.FileSize) - } +
  • + @if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName)) + { +
  • +
    +
    @item.FileName
    +
    + @fSize(item.FileSize) +
  • + } +
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) { diff --git a/Lux.UI/wwwroot/css/site.css b/Lux.UI/wwwroot/css/site.css index eeba4d85..efcad705 100644 --- a/Lux.UI/wwwroot/css/site.css +++ b/Lux.UI/wwwroot/css/site.css @@ -52,6 +52,17 @@ a, .striked { text-decoration: line-through; } +.image-hover-pop { + transition: transform 0.3s ease, box-shadow 0.3s ease; + position: relative; + z-index: 1; +} +.image-hover-pop:hover { + transform: scale(1.5); + z-index: 10; + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7); + border-radius: 1rem; +} /* Gestione dropdown menu x week planner */ .dropdown { position: relative; diff --git a/Lux.UI/wwwroot/css/site.less b/Lux.UI/wwwroot/css/site.less index 50cf1f71..cde2a01b 100644 --- a/Lux.UI/wwwroot/css/site.less +++ b/Lux.UI/wwwroot/css/site.less @@ -55,6 +55,18 @@ a, .btn-link { text-decoration: line-through; } +.image-hover-pop { + transition: transform 0.3s ease, box-shadow 0.3s ease; + position: relative; + z-index: 1; +} + +.image-hover-pop:hover { + transform: scale(1.5); + z-index: 10; + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7); + border-radius: 1rem; +} /* Gestione dropdown menu x week planner */ diff --git a/Lux.UI/wwwroot/css/site.min.css b/Lux.UI/wwwroot/css/site.min.css index 28b81084..c4dfc585 100644 --- a/Lux.UI/wwwroot/css/site.min.css +++ b/Lux.UI/wwwroot/css/site.min.css @@ -1 +1 @@ -h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto',sans-serif;line-height:1.3;}h1:focus{outline:0;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.regionnotclicked{fill:white;}.regionclicked{fill:red;}.striked{text-decoration:line-through;}.dropdown{position:relative;display:inline-block;}.dropdown:hover .dropdown-content,.dropdown:hover .dropdown-content-top,.dropdown:hover .dropdown-content-left,.dropdown:hover .dropdown-content-top-left{display:block;}.dropdown-content{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;}.dropdown-content .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content .a:hover{background-color:#ddd;}.dropdown-content-top{display:none;position:absolute;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13em;left:-10em;}.dropdown-content-top .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top .a:hover{background-color:#ddd;}.dropdown-content-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;left:-24em;}.dropdown-content-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-left .a:hover{background-color:#ddd;}.dropdown-content-top-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13em;left:-24em;}.dropdown-content-top-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top-left .a:hover{background-color:#ddd;}.textTrim{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.maxChar{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.max5Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:5rem;}.max10Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10rem;}.max20Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:20rem;}.max30Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:30rem;}.max40Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:40rem;}.max50Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50rem;}.max100Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100rem;}.footer{line-height:1.8em;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.responsive-svg{width:100%;height:40rem;display:block;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:10rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}.wHead{line-height:1;}@media(max-width:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;line-height:1.1;}}@media(max-width:1650px){body{font-size:.9em;line-height:1.2;}}.reportPivot{background:#efefef;background-image:url(../images/PivotData.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportOre{background:#efefef;background-image:url(../images/ReportGerarchico.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportFolders{background:#efefef;background-image:url(../images/ReportFolders.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportBadge{background:#efefef;background-image:url(../images/Barcode.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.areaTesto{white-space:normal;overflow:visible;position:absolute;left:0;right:0;bottom:50%;bottom:0;margin:0;padding:0 20px;min-height:25%;line-height:1.5;color:#fff;background:#333;background:rgba(50,50,50,.9);-webkit-background-clip:padding;background-clip:padding-box;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;}.areaTestoSmall{white-space:normal;overflow:visible;position:absolute;left:0;right:0;bottom:50%;bottom:0;margin:0;padding:0 3px;min-height:50%;line-height:1.5;font-size:7pt;color:#fff;background:#999;background:rgba(160,160,160,.9);-webkit-background-clip:padding;background-clip:padding-box;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;}.reportFoldersSmall{background:#efefef;background-image:url(../images/ReportGerarchico.png);background-repeat:no-repeat;background-position:left top;background-size:60px 60px;min-height:36px;height:100%;width:100%;max-width:100%;display:block;position:relative;} \ No newline at end of file +h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto',sans-serif;line-height:1.3;}h1:focus{outline:0;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.regionnotclicked{fill:white;}.regionclicked{fill:red;}.striked{text-decoration:line-through;}.image-hover-pop{transition:transform .3s ease,box-shadow .3s ease;position:relative;z-index:1;}.image-hover-pop:hover{transform:scale(1.5);z-index:10;box-shadow:0 8px 16px rgba(0,0,0,.7);border-radius:1rem;}.dropdown{position:relative;display:inline-block;}.dropdown:hover .dropdown-content,.dropdown:hover .dropdown-content-top,.dropdown:hover .dropdown-content-left,.dropdown:hover .dropdown-content-top-left{display:block;}.dropdown-content{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;}.dropdown-content .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content .a:hover{background-color:#ddd;}.dropdown-content-top{display:none;position:absolute;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13em;left:-10em;}.dropdown-content-top .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top .a:hover{background-color:#ddd;}.dropdown-content-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;left:-24em;}.dropdown-content-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-left .a:hover{background-color:#ddd;}.dropdown-content-top-left{display:none;position:absolute;left:-10em;min-width:8em;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:1;top:-13em;left:-24em;}.dropdown-content-top-left .a{color:#000;padding:12px 16px;text-decoration:none;display:block;}.dropdown-content-top-left .a:hover{background-color:#ddd;}.textTrim{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.maxChar{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.max5Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:5rem;}.max10Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:10rem;}.max20Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:20rem;}.max30Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:30rem;}.max40Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:40rem;}.max50Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:50rem;}.max100Char{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100rem;}.footer{line-height:1.8em;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.responsive-svg{width:100%;height:40rem;display:block;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:10rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}.wHead{line-height:1;}@media(max-width:640px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}body{font-size:.8em;line-height:1.1;}}@media(max-width:1650px){body{font-size:.9em;line-height:1.2;}}.reportPivot{background:#efefef;background-image:url(../images/PivotData.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportOre{background:#efefef;background-image:url(../images/ReportGerarchico.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportFolders{background:#efefef;background-image:url(../images/ReportFolders.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.reportBadge{background:#efefef;background-image:url(../images/Barcode.png);background-repeat:no-repeat;background-position:top;background-position:left;min-height:250px;height:100%;width:100%;display:block;position:relative;}.areaTesto{white-space:normal;overflow:visible;position:absolute;left:0;right:0;bottom:50%;bottom:0;margin:0;padding:0 20px;min-height:25%;line-height:1.5;color:#fff;background:#333;background:rgba(50,50,50,.9);-webkit-background-clip:padding;background-clip:padding-box;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;}.areaTestoSmall{white-space:normal;overflow:visible;position:absolute;left:0;right:0;bottom:50%;bottom:0;margin:0;padding:0 3px;min-height:50%;line-height:1.5;font-size:7pt;color:#fff;background:#999;background:rgba(160,160,160,.9);-webkit-background-clip:padding;background-clip:padding-box;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;}.reportFoldersSmall{background:#efefef;background-image:url(../images/ReportGerarchico.png);background-repeat:no-repeat;background-position:left top;background-size:60px 60px;min-height:36px;height:100%;width:100%;max-width:100%;display:block;position:relative;} \ No newline at end of file From 2075cfa0bd20e17c601261d755ac3f4e5aee0879 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 7 Nov 2025 17:14:43 +0100 Subject: [PATCH 18/21] Update forzato in massa importi BOM BEAM --- .../Controllers/LuxController.cs | 293 ++++++++++++++---- .../Services/DataLayerServices.cs | 62 +++- Lux.API/Lux.API.csproj | 2 +- Lux.API/Services/ExternalMessageProcessor.cs | 50 --- Lux.UI/Components/Compo/EditBom.razor | 219 ++++++++----- Lux.UI/Components/Compo/EditBom.razor.cs | 178 +++++++++-- Lux.UI/Components/Compo/OfferRowMan.razor | 8 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 148 +++++---- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 687 insertions(+), 281 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index b4dae47d..1f9dd2e2 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -9,6 +9,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; +using System.Globalization; using static EgwCoreLib.Lux.Core.Enums; namespace EgwCoreLib.Lux.Data.Controllers @@ -1026,6 +1027,134 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Esegue un mass update dei valori di margine, qtyMax, costo di un set di dati ricevuto + /// + /// Elenco items da aggiornare + /// Costo standard (al volume m3) + /// Margine da impostare per tutti + /// Valore qty max da impostare per tutti + /// Valore UM da impostare per tutti + /// Valore di arrotondamento richiesto (0 = non arrotondo) + /// Valore di scala da unità in ingresso x unità di costo (mm x mm x m --> m3) + /// + /// + internal async Task ItemMassUpdate(List list2upd, double setCost, double defMargin, double defQtyMax, string defUM, int roundVal, double scaleFactor) + { + bool answ = false; + if (list2upd == null || !list2upd.Any()) + return answ; + + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // Validate input + if (setCost <= 0) + throw new ArgumentException("setCost must be greater than 0."); + + // Step 1: Extract width and height from ExtItemCode + var itemUpdates = new List(); + + foreach (var item in list2upd) + { + if (string.IsNullOrWhiteSpace(item.ItemCode)) + continue; + + // Try to parse ExtItemCode: "Pine-200.0x360.0" + if (!item.ItemCode.Contains("-") || !item.ItemCode.Contains("x")) + { + // Skip invalid format + continue; + } + + // Split by "-" to get prefix and number part + var parts = item.ItemCode.Split('-', 2); + if (parts.Length < 2) + { + continue; + } + + string numberPart = parts[1]; // e.g. "200.0x360.0" + + // Split by "x" to get width and height + var widthHeight = numberPart.Split('x', 2); + if (widthHeight.Length < 2) + { + continue; + } + + if (!double.TryParse(widthHeight[0], NumberStyles.Any, CultureInfo.InvariantCulture, out double width) || + !double.TryParse(widthHeight[1], NumberStyles.Any, CultureInfo.InvariantCulture, out double height)) + { + continue; + } + + // Step 2: Calculate Cost using formula: + // Cost = setCost / 1,000,000 * width * height + double calculatedCost = (setCost / scaleFactor) * width * height; + // if requested do round ceiling + if (roundVal > 0) + { + calculatedCost = Math.Ceiling(calculatedCost / roundVal) * roundVal; + } + + // Optional: you can also apply margin to cost if needed, but you said "Cost = ..." + // So we're just computing it based on width/height + + // Step 4: Create a new ItemModel with updated values + var updatedItem = new ItemModel + { + ItemID = item.ItemID, + ExtItemCode = item.ItemCode, // keep original + Cost = calculatedCost, + Margin = defMargin, + QtyMax = defQtyMax, + UM = defUM + }; + + itemUpdates.Add(updatedItem); + } + + // Step 5: Update database using EF Core (EF Core doesn't support "update" on entire list directly) + // We'll use .UpdateRange() or a raw update via .Where() and .SetProperty() + + // ✅ Use EF Core's Update method (for bulk update) + if (itemUpdates.Any()) + { + // Update only the ones that exist in the DB + var existingItems = await dbCtx.DbSetItem + .Where(i => itemUpdates.Select(ui => ui.ItemID).Contains(i.ItemID)) + .ToListAsync(); + + if (existingItems.Any()) + { + // Update existing records using EF Core's Update method + foreach (var updatedItem in itemUpdates) + { + var existing = existingItems.FirstOrDefault(i => i.ItemID == updatedItem.ItemID); + if (existing != null) + { + // Update only the fields we're setting + existing.Cost = updatedItem.Cost; + existing.Margin = updatedItem.Margin; + existing.QtyMax = updatedItem.QtyMax; + } + } + + await dbCtx.SaveChangesAsync(); + } + } + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ItemMassUpdate{Environment.NewLine}{exc}"); + } + } + return answ; + } + internal bool ItemUpsert(ItemModel newRec) { bool answ = false; @@ -1113,17 +1242,6 @@ namespace EgwCoreLib.Lux.Data.Controllers return result; } - - internal bool UpdateCodGroup(List bomList) - { - bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(_config)) - using (DataLayerContext dbCtx = new DataLayerContext()) - { - } - return answ; - } - /// /// Upsert item ricevuti da BOM calcolata /// @@ -1137,30 +1255,15 @@ namespace EgwCoreLib.Lux.Data.Controllers { try { + // Controllo ed inserisco eventuali gruppi mancanti + UpdateCodGroup(bomList); + // prendo solo elementi a prezzo 0 da salvare sul DB var item2save = bomList .Where(x => x.Price == 0) .ToList(); List listInserted = new List(); -#if false - // in primis calcolo ii distinct dei CodGroup x eventuale insert preventivo - List distCodGroups = bomList - .Select(i => i.ClassCode) - .Distinct() - .Where(c => !string.IsNullOrWhiteSpace(c)) - .ToList(); - - // recupero l'elenco degli itemGroup gestiti - var itemGroupList = dbCtx - .DbSetItemGroup - .ToList(); - // elenco da inserire... - var codGroupsToInsert = distCodGroups - .Where(cg => !itemGroupList.Where(x => x.CodGroup == cg)) - .ToList(); -#endif - // ciclo x ogni elemento della BOM, cercando x gruppo e ExtItemCode foreach (var item in item2save) { @@ -1172,7 +1275,7 @@ namespace EgwCoreLib.Lux.Data.Controllers // se nullo --> verifico x inserire!!! if (currRec == null) { - // verifico NON sia tra gli items già in fase di inserimento + // verifico NON sia tra gli list2upd già in fase di inserimento if (!listInserted.Any(x => x.CodGroup == item.ClassCode && x.ExtItemCode == item.ItemCode)) { ItemModel newRec = new ItemModel() @@ -1527,37 +1630,6 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } -#if false - /// - /// Elenco item Child da ID Parent (per sostituzione) - /// - /// ID parent (valido quindi >0) - /// - internal List ItemGetChild(int ItemIdParent) - { - List dbResult = new List(); - if (ItemIdParent > 0) - { - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) - using (DataLayerContext dbCtx = new DataLayerContext()) - { - try - { - dbResult = dbCtx - .DbSetItem - .Where(x => x.ItemID == ItemIdParent || x.ItemIDParent == ItemIdParent) - .ToList(); - } - catch (Exception exc) - { - Log.Error($"Eccezione durante ItemGetChild{Environment.NewLine}{exc}"); - } - } - } - return dbResult; - } -#endif - /// /// Upsert record /// @@ -1652,6 +1724,35 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } +#if false + /// + /// Ritorna direttamente 1 riga offerta + /// + /// + /// + internal OfferRowModel? OfferRowGetByOfferRowID(int offerRowID) + { + OfferRowModel? dbResult = null; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = dbCtx + .DbSetOfferRow + .Where(x => x.OfferRowID == offerRowID) + .Include(s => s.SellingItemNav) + .FirstOrDefault(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OfferRowGetByOfferRowID{Environment.NewLine}{exc}"); + } + } + return dbResult; + } +#endif + /// /// Elimina riga e sposta eventuali righe successive... /// @@ -2263,8 +2364,74 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + internal bool UpdateCodGroup(List bomList) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + // in primis calcolo i distinct dei CodGroup x eventuale insert preventivo + List distCodGroups = bomList + .Select(i => i.ClassCode) + .Distinct() + .Where(c => !string.IsNullOrWhiteSpace(c)) + .ToList(); + + // recupero l'elenco degli itemGroup gestiti + var itemGroupList = dbCtx + .DbSetItemGroup + .ToList(); + // elenco da inserire... + var codGroupsToInsert = distCodGroups + .Where(x => !itemGroupList.Any(i => i.CodGroup == x)) + .Select(x => new ItemGroupModel() { CodGroup = x, Description = x }) + .ToList(); + // se ci sono inserisco! + if (codGroupsToInsert != null && codGroupsToInsert.Count > 0) + { + dbCtx + .DbSetItemGroup + .AddRange(codGroupsToInsert); + // salvo... + dbCtx.SaveChanges(); + } + } + return answ; + } + #endregion Internal Methods +#if false + /// + /// Elenco item Child da ID Parent (per sostituzione) + /// + /// ID parent (valido quindi >0) + /// + internal List ItemGetChild(int ItemIdParent) + { + List dbResult = new List(); + if (ItemIdParent > 0) + { + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = dbCtx + .DbSetItem + .Where(x => x.ItemID == ItemIdParent || x.ItemIDParent == ItemIdParent) + .ToList(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ItemGetChild{Environment.NewLine}{exc}"); + } + } + } + return dbResult; + } +#endif + #region Private Fields private static IConfiguration _configuration; @@ -2285,8 +2452,8 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Lista BOM precedente da confrontare x scelta alternativi /// Costo netto componenti BOM calcolato /// Prezzo complessivo calcolato (con aggiunta marginalità) - /// Controllo coerenza calcoli sui gruppi items - /// Controllo coerenza calcoli su num items + /// Controllo coerenza calcoli sui gruppi list2upd + /// Controllo coerenza calcoli su num list2upd private static void validateBom(List itemGroupList, List bomGenList, ref List bomList, List? bomListPrev, ref double totCost, ref double totPrice, ref int numGroupOk, ref int numItemOk) { double margin = 0; diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index b378a63b..3e4b7923 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -17,6 +17,7 @@ using System.ComponentModel.Design; using System.Diagnostics; using System.Linq; using System.Resources; +using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; @@ -50,6 +51,28 @@ namespace EgwCoreLib.Lux.Data.Services #region Public Methods + /// + /// Sistema gli item che mancassero di ItemID leggendo da DB + /// + /// + /// + public List BomFixItemId(List listOrg) + { + List listFix = listOrg; + // sistemo ItemID per gli item della BOM... + var listItemDB = dbController.ItemGetFilt("", ItemClassType.Bom); + // cerco i record da sistemare ed 1:1 li fixo... + foreach (var item in listFix.Where(x => x.ItemID == 0)) + { + var dbRec = listItemDB.FirstOrDefault(x => x.ExtItemCode == item.ItemCode); + if ((dbRec != null)) + { + item.ItemID = dbRec.ItemID; + } + } + return listFix; + } + /// /// Elenco completo Config Envir /// @@ -608,7 +631,6 @@ namespace EgwCoreLib.Lux.Data.Services /// /// Elenco item da ricerca completa Async /// - /// /// /// /// @@ -713,6 +735,24 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esecuzione mass update di un set di item cui manca pezzo/quantità max + /// + /// + /// + /// + /// + /// Valore UM da impostare per tutti + /// + /// Valore di scala da unità in ingresso x unità di costo (mm x mm x m --> m3) + /// + public async Task ItemMassUpdate(List list2upd, double setCost, double defMargin, double defQtyMax, string defUM, int roundVal = 0, double scaleFactor = 1_000_000.0) + { + bool result = await dbController.ItemMassUpdate(list2upd, setCost, defMargin, defQtyMax, defUM, roundVal, scaleFactor); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Item:*"); + return result; + } + /// /// Update / Insert record item /// @@ -931,6 +971,26 @@ namespace EgwCoreLib.Lux.Data.Services return result; } +#if false + /// + /// Recupero nuovo record BOM diretto dal DB + /// + /// + /// + /// + public OfferRowModel? OfferRowGetByOfferRowID(int offerRowID) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + OfferRowModel? result = null; + result = dbController.OfferRowGetByOfferRowID(offerRowID); + sw.Stop(); + Log.Debug($"OfferRowGetByOfferRowID | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } +#endif + /// /// Converte il campo raw della BOM in lista oggetti da gestire /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 496890e2..6a6262b5 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0618 + 0.9.2511.0717 diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index 6f8b2469..4321948b 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -159,55 +159,5 @@ namespace Lux.API.Services #endregion Private Fields -#if false - /// - /// Restituisce una risposta all'esecuzione - /// - /// - private void ProcessMan_m_AnswerReceived(ProcessArgsResult result) - { - // verifico che sia la mia richiesta con id immagine... FARE!!! - // salvo il risultato... - if (result.Args != null && result.Args.Count > 0) - { - if (result.Args.ContainsKey("Svg")) - { - // salvo SVG - string newSvg = result.Args["Svg"]; - // salvo nel dizionario - lastSvg = newSvg; - // salvo su redis - _imgService.SaveSvg("123456", lastSvg); - } - } - } - - /// - /// Salva risultato calcolo da broadcast channel REDIS - /// - /// - /// - private void SaveCalcData(RedisChannel channel, RedisValue message) - { - string rawData = $"{message}"; - if (!string.IsNullOrEmpty(rawData) && rawData.Length > 2) - { - // provo a deserializzare - try - { - var retData = JsonConvert.DeserializeObject(rawData); - if (retData != null) - { - // verifico nId di risposta x salvare correttamente - ProcessMan_m_AnswerReceived(retData); - } - } - catch (Exception exc) - { - _logger.LogError($"Errore in fase decodifica messaggio da REDIS Channel{Environment.NewLine}{exc}"); - } - } - } -#endif } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/EditBom.razor b/Lux.UI/Components/Compo/EditBom.razor index dc0c1fff..bd4e0884 100644 --- a/Lux.UI/Components/Compo/EditBom.razor +++ b/Lux.UI/Components/Compo/EditBom.razor @@ -1,83 +1,156 @@ - - - - - - - - - @* *@ - @if (ShowVolume) - { - - } - - - - - - - @foreach (var item in bomDict) - { - @if (EditRecord != null && item.Key == currIdx) - { - - -
#ClassDescrizioneCodVolQtyUnitPriceImporto
@(item.Key + 1) -
- - - +@if (isLoading) +{ + +} +else +{ + @if (MassEdit) + { +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ @if (showMassEditSave) + { + + } + else + { + + } +
+
+ } + + + + + - @if (ShowVolume) - { - } - - - - - } - else + + + + + @* *@ + @if (ShowVolume) + { + + } + + + + + + + @foreach (var item in bomPaged) { - - - + + + @if (ShowVolume) { - + } - - - - @* *@ + + + + + } + else + { + + + + + + @* *@ + @if (ShowVolume) + { + + } + + + + + } + } + + + @{ + int numCol = ShowVolume ? 8 : 7; + + @if (ShowVolume) { - + } - - - + + + + + + } - } - - - - - @if (ShowVolume) - { - - } - - - - - -
+ @if (MassEdit) + { +
+
-
@($"{item.Value.Volume:N3}")@($"{item.Value.Qty:N3}")@($"{item.Value.PriceEff:C2}")@($"{item.Value.TotalCost:C2}")
ClassDescrizioneCodVolQtyUnitPriceImporto
@(item.Key + 1) - @if (item.Value.Price == 0) + @if (EditRecord != null && item.numRow == EditRecord.numRow) + { +
@(item.numRow) +
+ + + +
+
@($"{item.Volume:N3}")@item.Value.ClassCode@item.Value.ItemCode@item.Value.DescriptionCode@($"{item.Qty:N3}")@($"{item.PriceEff:C2}")@($"{item.TotalCost:C2}")
+ @(item.numRow) + @if (MassEdit) + { + + } + + @if (item.Price == 0) + { + + } + @item.ClassCode@item.ItemCode@item.Value.DescriptionCode@($"{item.Volume:N3}")@($"{item.Qty:N3}")@($"{item.PriceEff:C2}")@($"{item.TotalCost:C2}")
@BomList.Count materiali@($"{item.Value.Volume:N3}")@($"{VolTotale:N3}")@($"{item.Value.Qty:N3}")@($"{item.Value.PriceEff:C2}")@($"{item.Value.TotalCost:C2}")@($"{QtyTotale:N3}")tot:@($"{ImportoTotale:C2}")
+ +
@BomList.Count materiali@($"{VolTotale:N3}")@($"{QtyTotale:N3}")tot:@($"{ImportoTotale:C2}")
\ No newline at end of file + +
+} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/EditBom.razor.cs b/Lux.UI/Components/Compo/EditBom.razor.cs index 401d0acb..44be553c 100644 --- a/Lux.UI/Components/Compo/EditBom.razor.cs +++ b/Lux.UI/Components/Compo/EditBom.razor.cs @@ -4,6 +4,8 @@ using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; +using RestSharp.Serializers.Xml; +using System.Collections.Generic; using System.Threading.Tasks; namespace Lux.UI.Components.Compo @@ -21,6 +23,9 @@ namespace Lux.UI.Components.Compo [Parameter] public EventCallback> EC_Updated { get; set; } + [Parameter] + public bool MassEdit { get; set; } = false; + #endregion Public Properties #region Protected Properties @@ -35,7 +40,7 @@ namespace Lux.UI.Components.Compo double valTot = 0; if (bomDict != null) { - valTot = bomDict.Sum(x => x.Value.TotalCost); + valTot = bomDict.Sum(x => x.TotalCost); } return valTot; } @@ -48,12 +53,28 @@ namespace Lux.UI.Components.Compo double valTot = 0; if (bomDict != null) { - valTot = bomDict.Sum(x => x.Value.Qty); + valTot = bomDict.Sum(x => x.Qty); } return valTot; } } + protected bool SelAll + { + get => selAll; + set + { + if (selAll != value) + { + selAll = value; + foreach (var item in bomDict) + { + item.isSelected = selAll; + } + } + } + } + protected double VolTotale { get @@ -61,7 +82,7 @@ namespace Lux.UI.Components.Compo double valTot = 0; if (bomDict != null) { - valTot = bomDict.Sum(x => x.Value.Volume); + valTot = bomDict.Sum(x => x.Volume); } return valTot; } @@ -69,21 +90,15 @@ namespace Lux.UI.Components.Compo #endregion Protected Properties - - private bool ShowVolume - { - get => CurrRowRec.Envir == Constants.EXECENVIRONMENTS.BEAM || CurrRowRec.Envir == Constants.EXECENVIRONMENTS.WALL; - } - #region Protected Methods protected void DoCancel() { EditRecord = null; - currIdx = -1; + isLoading = false; } - protected void DoEdit(int key, BomItemDTO editRec) + protected void DoEdit(BomDtoSel editRec) { if (editRec.ItemID > 0) { @@ -99,7 +114,6 @@ namespace Lux.UI.Components.Compo { ListItemAlt = new List(); } - currIdx = key; EditRecord = editRec; } @@ -108,13 +122,46 @@ namespace Lux.UI.Components.Compo ///
protected override void OnParametersSet() { - if (BomList != null) + if (BomList != null && BomList.Count > 0) { + int idx = 0; // Convert List to Dictionary with index as key bomDict = BomList - .Select((item, index) => new { index, item }) - .ToDictionary(x => x.index, x => x.item); + .Select(x => new BomDtoSel() + { + isSelected = false, + numRow = idx++, + ClassCode = x.ClassCode, + DescriptionCode = x.DescriptionCode, + ItemCode = x.ItemCode, + ItemID = x.ItemID, + ItemQty = x.ItemQty, + Price = x.Price, + PriceEff = x.PriceEff, + Qty = x.Qty, + Volume = x.Volume + }) + .ToList(); + totalCount = BomList.Count(); + UpdateTable(); + isLoading = false; } + else + { + isLoading = true; + } + } + + protected void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); } #endregion Protected Methods @@ -124,14 +171,76 @@ namespace Lux.UI.Components.Compo /// /// Dizionario interno oggetti x editare con indice /// - private Dictionary bomDict = new Dictionary(); + private List bomDict = new List(); + + private List bomPaged = new List(); + + private int currPage = 1; + + private decimal defMargin = 0.2M; + + private double defQtyMax = 999; + + private int defRound = 5; + + private string defUM = "m"; + + private BomDtoSel? EditRecord = null; + + private bool isLoading = false; - private int currIdx = -1; - private BomItemDTO? EditRecord = null; private List ListItemAlt = new List(); + private int numRecord = 10; + + private bool selAll = false; + + private int totalCount = 0; + + private double totCost = 100; + #endregion Private Fields + protected async Task ForceItemPrice() + { + isLoading = true; + // chiamo metodo update x i soli valori selezionati... + var list2upd = bomDict.Where(x => x.isSelected).Cast().ToList(); + await DLService.ItemMassUpdate(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound); + // ...e passo al controller parent LINQ projection to base type + List baseList = bomDict.Cast().ToList(); + await EC_Updated.InvokeAsync(baseList); + SelAll = false; + } + + protected bool showMassEditSave + { + get => bomDict != null && bomDict.Any(x => x.isSelected); + } + + #region Protected Classes + + protected class BomDtoSel : BomItemDTO + { + #region Public Properties + + public bool isSelected { get; set; } = false; + public int numRow { get; set; } = 0; + + #endregion Public Properties + } + + #endregion Protected Classes + + #region Private Properties + + private bool ShowVolume + { + get => CurrRowRec.Envir == Constants.EXECENVIRONMENTS.BEAM || CurrRowRec.Envir == Constants.EXECENVIRONMENTS.WALL; + } + + #endregion Private Properties + #region Private Methods /// @@ -139,21 +248,18 @@ namespace Lux.UI.Components.Compo /// private async Task DoSave() { + isLoading = true; // aggiorno l'oggetto nel mio dizionario if (EditRecord != null) { // modifico il valore ID con quello selezionato nel selettore x l'oggetto - UpdateItem(currIdx, EditRecord); + UpdateItem(EditRecord); } - // converto il dizionario in lista - var updList = bomDict - .OrderBy(kvp => kvp.Key) - .Select(kvp => kvp.Value) - .ToList(); // deseleziono... DoCancel(); - // ...e passo al controller parent - await EC_Updated.InvokeAsync(updList); + // ...e passo al controller parent LINQ projection to base type + List baseList = bomDict.Cast().ToList(); + await EC_Updated.InvokeAsync(baseList); } /// @@ -161,14 +267,28 @@ namespace Lux.UI.Components.Compo /// /// /// - private void UpdateItem(int key, BomItemDTO updatedItem) + private void UpdateItem(BomDtoSel updatedItem) { - if (bomDict.ContainsKey(key)) + int index = bomDict.FindIndex(x => x.numRow == updatedItem.numRow); + if (index >= 0) { - bomDict[key] = updatedItem; + bomDict[index] = updatedItem; } } + /// + /// Filtro e paginazione + /// + private void UpdateTable() + { + // fix paginazione + bomPaged = bomDict + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); + isLoading = false; + } + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 6cf868ab..409b3828 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -304,17 +304,21 @@ else
Materiali (BOM)
-
+
@EditRecord.Note
@EditRecord.OfferRowUID
+
+ + +
diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 689a931f..a14f7aa4 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -381,25 +381,23 @@ namespace Lux.UI.Components.Compo } /// - /// Imposta modalit� edit ciclo di lavoro + /// Imposta modalita edit ciclo di lavoro /// /// protected void DoSwapJobCycle(OfferRowModel currRow) { CurrEditMode = EditMode.JobCycle; - EditRecord = currRow; - CurrBomList = DLService.OffertGetBomList(EditRecord); + selectBom(currRow); } /// - /// Imposta modalit� ad edit BOM + /// Imposta modalita ad edit BOM /// /// protected void DoSwapMat(OfferRowModel currRow) { CurrEditMode = EditMode.BOM; - EditRecord = currRow; - CurrBomList = DLService.OffertGetBomList(EditRecord); + selectBom(currRow); } /// @@ -590,6 +588,7 @@ namespace Lux.UI.Components.Compo #region Private Fields private static Logger Log = LogManager.GetCurrentClassLogger(); + private List AllColors = new(); private List AllConfEnvir = new(); @@ -623,6 +622,31 @@ namespace Lux.UI.Components.Compo private string calcTag = "calc"; + /// + /// Channel update HwOptions + /// + private string chHwOpt = ""; + + /// + /// Channel update PNG + /// + private string chPng = ""; + + /// + /// Channel update Profile List + /// + private string chProfList = ""; + + /// + /// Channel update Shape + /// + private string chShape = ""; + + /// + /// Channel update SVG + /// + private string chSvg = ""; + private List? CurrBomList = null; /// @@ -637,6 +661,7 @@ namespace Lux.UI.Components.Compo private int currPage = 1; private string currPng = ""; + private List currProfList = new List(); private string currSvg = ""; @@ -646,12 +671,12 @@ namespace Lux.UI.Components.Compo /// private OfferRowModel? EditRecord = null; - private string genericBasePath = ""; - /// - /// Channel update HwOptions + /// Abilita edit massivo record ITEM /// - private string chHwOpt = ""; + private bool enableMassEdit = false; + + private string genericBasePath = ""; private string imgBasePath = ""; @@ -671,36 +696,16 @@ namespace Lux.UI.Components.Compo /// private string origJwd = ""; - /// - /// Channel update PNG - /// - private string chPng = ""; - /// /// Versione precedente JWD x test e confronto /// private string prevJwd = ""; - /// - /// Channel update Profile List - /// - private string chProfList = ""; - /// /// Dizionario richieste /// private Dictionary reqDict = new Dictionary(); - /// - /// Channel update Shape - /// - private string chShape = ""; - - /// - /// Channel update SVG - /// - private string chSvg = ""; - private int totalCount = 0; #endregion Private Fields @@ -804,6 +809,34 @@ namespace Lux.UI.Components.Compo isLoading = false; } + /// + /// Restituisce il contenuto del file salvato + /// + /// + /// + /// + private string loadFileContent(string folderPath, string secureName) + { + string answ = ""; + if (!string.IsNullOrEmpty(folderPath)) + { + try + { + // calcolo path file... + string filePath = Path.Combine(basePath, folderPath, secureName); + if (File.Exists(filePath)) + { + answ = File.ReadAllText(filePath); + } + } + catch (Exception exc) + { + Log.Error($"Exception on loadFileContent{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Ricevuto HwOpt, processo /// @@ -1119,6 +1152,7 @@ namespace Lux.UI.Components.Compo case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW: DictExec.Add(serKey, currRec.SerStruct); break; + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM: case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL: case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET: @@ -1128,6 +1162,7 @@ namespace Lux.UI.Components.Compo DictExec.Add(serKey, rawData); DictExec.Add("FileName", currRec.FileName); break; + case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL: default: break; @@ -1212,34 +1247,6 @@ namespace Lux.UI.Components.Compo return answ; } - /// - /// Restituisce il contenuto del file salvato - /// - /// - /// - /// - private string loadFileContent(string folderPath, string secureName) - { - string answ = ""; - if (!string.IsNullOrEmpty(folderPath)) - { - try - { - // calcolo path file... - string filePath = Path.Combine(basePath, folderPath, secureName); - if (File.Exists(filePath)) - { - answ = File.ReadAllText(filePath); - } - } - catch (Exception exc) - { - Log.Error($"Exception on loadFileContent{Environment.NewLine}{exc}"); - } - } - return answ; - } - /// /// Salvataggio del JWD aggiornato nella mia riga di offerta /// @@ -1280,6 +1287,21 @@ namespace Lux.UI.Components.Compo } } + /// + /// Selezione e fix dati BOM + /// + /// + /// + private void selectBom(OfferRowModel currRow) + { + EditRecord = currRow; + CurrBomList = DLService.OffertGetBomList(EditRecord); + if (CurrBomList.Any(x => x.ItemID == 0)) + { + CurrBomList = DLService.BomFixItemId(CurrBomList); + } + } + private async Task setAwaitPrice(bool awaitPrice, bool flushCache) { foreach (var item in AllRecords) @@ -1355,6 +1377,16 @@ namespace Lux.UI.Components.Compo // ricalcolo offerta completa await ReloadData(); UpdateTable(); + // rilegge il record da elenco appena rinfrescato... + int offerRowId = EditRecord.OfferRowID; + var updRec = AllRecords.FirstOrDefault(x => x.OfferRowID == offerRowId); + if (updRec != null) + { + CurrBomList = new List(); + // fa refresh dei dati della BOM visualizzata + selectBom(updRec); + await InvokeAsync(StateHasChanged); + } } } diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 698fe88b..c7a4515a 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0618 + 0.9.2511.0717 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 4510fb8c..e01634c7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.0618

+

Versione: 0.9.2511.0717


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 20e7993e..d27cf9fe 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0618 +0.9.2511.0717 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 2fb0cacd..ef2f082d 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0618 + 0.9.2511.0717 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 234c2387fb9b3186c5365a3e2d22d060de5a3281 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 7 Nov 2025 18:04:34 +0100 Subject: [PATCH 19/21] Update nuget componente window --- EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj | 2 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 4f572545..890522ae 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -21,7 +21,7 @@ - + diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 6a6262b5..0c05051d 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.0717 + 0.9.2511.0718 diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index c7a4515a..e3d720c7 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.0717 + 0.9.2511.0718 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index e01634c7..757e57fb 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2511.0717

    +

    Versione: 0.9.2511.0718


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index d27cf9fe..b08c6ed2 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2511.0717 +0.9.2511.0718 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index ef2f082d..806dff41 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2511.0717 + 0.9.2511.0718 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From a7ff17eb61fcda245ccc56df58ddb4b77e3ab883 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 7 Nov 2025 18:06:26 +0100 Subject: [PATCH 20/21] Completo nuget update --- EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj | 2 +- EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj | 2 +- Lux.UI.Client/Lux.UI.Client.csproj | 2 +- Lux.UI/Lux.UI.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 890522ae..c4bb068e 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -22,7 +22,7 @@ - + diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index 72990480..b76f5d2b 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -27,7 +27,7 @@ - + diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index ea08062c..644635b9 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -9,7 +9,7 @@ - + diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index e3d720c7..e43fe4e3 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -17,7 +17,7 @@ - + From a59aa71b3d4e4c7950d212998d9f2cf71607eb25 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 7 Nov 2025 18:56:18 +0100 Subject: [PATCH 21/21] Fix senza template, in prod! --- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index a14f7aa4..b15f58fb 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -1042,8 +1042,7 @@ namespace Lux.UI.Components.Compo Glass = AvailGlassList, Hardware = AvailHardwareList, Material = AvailMaterialList, - Profile = AvailProfileList, - TemplateDTO = null + Profile = AvailProfileList }; CurrData = new LivePayload() {