Merge branch 'release/AddBom4Btl_01'
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.11.315" />
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.315" />
|
||||
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.11.718" />
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.718" />
|
||||
<PackageReference Include="Egw.Window.Data" Version="2.7.10.2116" />
|
||||
<PackageReference Include="EgwMultiEngineManager.Data" Version="2.7.10.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace EgwCoreLib.Lux.Core.RestPayload
|
||||
public string ClassCode { get; set; } = "";
|
||||
public string DescriptionCode { get; set; } = "";
|
||||
public string ItemCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantità articolo (anche frazionaria) x calcolo moltiplicativo
|
||||
/// </summary>
|
||||
@@ -25,7 +26,17 @@ namespace EgwCoreLib.Lux.Core.RestPayload
|
||||
/// </summary>
|
||||
public double PriceEff { get; set; } = 0;
|
||||
public int ItemID { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Item
|
||||
/// </summary>
|
||||
public int ItemQty { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Volume relativo (m3)
|
||||
/// </summary>
|
||||
public double Volume { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Importo calcolato come prezzo x quantità
|
||||
/// </summary>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue un mass update dei valori di margine, qtyMax, costo di un set di dati ricevuto
|
||||
/// </summary>
|
||||
/// <param name="list2upd">Elenco items da aggiornare</param>
|
||||
/// <param name="setCost">Costo standard (al volume m3)</param>
|
||||
/// <param name="defMargin">Margine da impostare per tutti</param>
|
||||
/// <param name="defQtyMax">Valore qty max da impostare per tutti</param>
|
||||
/// <param name="defUM">Valore UM da impostare per tutti</param>
|
||||
/// <param name="roundVal">Valore di arrotondamento richiesto (0 = non arrotondo)</param>
|
||||
/// <param name="scaleFactor">Valore di scala da unità in ingresso x unità di costo (mm x mm x m --> m3)</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
internal async Task<bool> ItemMassUpdate(List<BomItemDTO> 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<ItemModel>();
|
||||
|
||||
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;
|
||||
@@ -1126,11 +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<ItemModel> listInserted = new List<ItemModel>();
|
||||
|
||||
// ciclo x ogni elemento della BOM, cercando x gruppo e ExtItemCode
|
||||
foreach (var item in item2save)
|
||||
{
|
||||
@@ -1142,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()
|
||||
@@ -1497,37 +1630,6 @@ namespace EgwCoreLib.Lux.Data.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Elenco item Child da ID Parent (per sostituzione)
|
||||
/// </summary>
|
||||
/// <param name="ItemIdParent">ID parent (valido quindi >0)</param>
|
||||
/// <returns></returns>
|
||||
internal List<ItemModel> ItemGetChild(int ItemIdParent)
|
||||
{
|
||||
List<ItemModel> dbResult = new List<ItemModel>();
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Upsert record
|
||||
/// </summary>
|
||||
@@ -1622,6 +1724,35 @@ namespace EgwCoreLib.Lux.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Ritorna direttamente 1 riga offerta
|
||||
/// </summary>
|
||||
/// <param name="offerRowID"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Elimina riga e sposta eventuali righe successive...
|
||||
/// </summary>
|
||||
@@ -1808,6 +1939,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;
|
||||
}
|
||||
|
||||
@@ -2232,8 +2364,74 @@ namespace EgwCoreLib.Lux.Data.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
internal bool UpdateCodGroup(List<BomItemDTO> 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<string> 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
|
||||
/// <summary>
|
||||
/// Elenco item Child da ID Parent (per sostituzione)
|
||||
/// </summary>
|
||||
/// <param name="ItemIdParent">ID parent (valido quindi >0)</param>
|
||||
/// <returns></returns>
|
||||
internal List<ItemModel> ItemGetChild(int ItemIdParent)
|
||||
{
|
||||
List<ItemModel> dbResult = new List<ItemModel>();
|
||||
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;
|
||||
@@ -2254,8 +2452,8 @@ namespace EgwCoreLib.Lux.Data.Controllers
|
||||
/// <param name="bomList">Lista BOM precedente da confrontare x scelta alternativi</param>
|
||||
/// <param name="totCost">Costo netto componenti BOM calcolato</param>
|
||||
/// <param name="totPrice">Prezzo complessivo calcolato (con aggiunta marginalità)</param>
|
||||
/// <param name="numGroupOk">Controllo coerenza calcoli sui gruppi items</param>
|
||||
/// <param name="numItemOk">Controllo coerenza calcoli su num items</param>
|
||||
/// <param name="numGroupOk">Controllo coerenza calcoli sui gruppi list2upd</param>
|
||||
/// <param name="numItemOk">Controllo coerenza calcoli su num list2upd</param>
|
||||
private static void validateBom(List<ItemGroupModel> itemGroupList, List<ItemModel> bomGenList, ref List<BomItemDTO> bomList, List<BomItemDTO>? bomListPrev, ref double totCost, ref double totPrice, ref int numGroupOk, ref int numItemOk)
|
||||
{
|
||||
double margin = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.11.315" />
|
||||
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.11.718" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.21" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.21" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.21" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,477 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EgwCoreLib.Lux.Data.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddGroupBeam : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
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));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace EgwCoreLib.Lux.Data
|
||||
|
||||
// init dati x invio serializzazioni da environment
|
||||
modelBuilder.Entity<EnvirParamModel>().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<GenValueModel>().HasData(
|
||||
@@ -113,7 +113,8 @@ namespace EgwCoreLib.Lux.Data
|
||||
|
||||
// inizializzazione dei valori di default x gruppi item
|
||||
modelBuilder.Entity<ItemGroupModel>().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" }
|
||||
|
||||
@@ -37,49 +37,58 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
_config = Configuration;
|
||||
redisConn = RedisConn;
|
||||
redisDb = redisConn.GetDatabase();
|
||||
|
||||
// channel name setup
|
||||
pngChannel = _config.GetValue<string>("ServerConf:PngChannel") ?? "Egw:png:img";
|
||||
svgChannel = _config.GetValue<string>("ServerConf:SvgChannel") ?? "Egw:svg:img";
|
||||
bomChannel = _config.GetValue<string>("ServerConf:BomChannel") ?? "Egw:bom";
|
||||
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw:update";
|
||||
shapeChannel = _config.GetValue<string>("ServerConf:ShapeChannel") ?? "Egw:shape:curr";
|
||||
hwListChannel = _config.GetValue<string>("ServerConf:HwListChannel") ?? "Egw:hw:list";
|
||||
hwOptChannel = _config.GetValue<string>("ServerConf:HwOptChannel") ?? "Egw:hw:opt";
|
||||
profListChannel = _config.GetValue<string>("ServerConf:ProfListChannel") ?? "Egw:prof:list";
|
||||
// receving channel name setup
|
||||
chBom = _config.GetValue<string>("ServerConf:ChannelBom") ?? "lux:bom";
|
||||
chHwList = _config.GetValue<string>("ServerConf:ChannelHwList") ?? "lux:hw:list";
|
||||
chHwOpt = _config.GetValue<string>("ServerConf:ChannelHwOpt") ?? "lux:hw:opt";
|
||||
chPng = _config.GetValue<string>("ServerConf:ChannelPng") ?? "lux:png:img";
|
||||
chProfList = _config.GetValue<string>("ServerConf:ChannelProfList") ?? "lux:prof:list";
|
||||
chShape = _config.GetValue<string>("ServerConf:ChannelShape") ?? "lux:shape:curr";
|
||||
chSvg = _config.GetValue<string>("ServerConf:ChannelSvg") ?? "lux:svg:img";
|
||||
chUpdate = _config.GetValue<string>("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
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public MessagePipe PipeHwList { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public MessagePipe PipeHwOpt { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Pipe dei messaggi per ritorno PNG calcolati da Engine di calcolo verso interfaccia utente.
|
||||
/// I messaggi vengono inviati sul canale Redis definito da ChannelPng.
|
||||
/// </summary>
|
||||
public MessagePipe PipePng { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public MessagePipe PipeProfList { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public MessagePipe PipeShape { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Pipe dei messaggi per ritorno PNG calcolati da Engine di calcolo verso interfaccia utente.
|
||||
/// I messaggi vengono inviati sul canale Redis definito da PngChannel.
|
||||
/// </summary>
|
||||
public MessagePipe PipePng { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public MessagePipe PipeSvg { get; set; } = null!;
|
||||
|
||||
@@ -220,11 +230,6 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
/// <summary>
|
||||
/// Redis channel for BOM related info
|
||||
/// </summary>
|
||||
private string bomChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
private int cacheTtlShort = 60 * 1;
|
||||
|
||||
/// <summary>
|
||||
/// Redis channel for BOM related info
|
||||
/// </summary>
|
||||
private string chBom = "";
|
||||
|
||||
/// <summary>
|
||||
/// Canale ritorno Hw List
|
||||
/// </summary>
|
||||
private string hwListChannel = "";
|
||||
private string chHwList = "";
|
||||
|
||||
/// <summary>
|
||||
/// Canale ritorno Hw Options
|
||||
/// </summary>
|
||||
private string hwOptChannel = "";
|
||||
private string chHwOpt = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img png.
|
||||
/// Predefinito a "png:img" con suffisso ":*".
|
||||
/// </summary>
|
||||
private string chPng = "";
|
||||
|
||||
/// <summary>
|
||||
/// Canale ritorno Profile List
|
||||
/// </summary>
|
||||
private string profListChannel = "";
|
||||
private string chProfList = "";
|
||||
|
||||
/// <summary>
|
||||
/// Canale ritorno shape calcolate
|
||||
/// </summary>
|
||||
private string chShape = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg.
|
||||
/// Predefinito a "svg:img" con suffisso ":*".
|
||||
/// </summary>
|
||||
private string chSvg = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi di update
|
||||
/// </summary>
|
||||
private string chUpdate = "";
|
||||
|
||||
/// <summary>
|
||||
/// Generatore di numeri casuali utilizzato per introdurre variabilità dinamica nelle durate della cache
|
||||
@@ -257,28 +290,28 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
/// </summary>
|
||||
private Random rnd = new Random();
|
||||
|
||||
/// <summary>
|
||||
/// Canale ritorno shape calcolate
|
||||
/// </summary>
|
||||
private string shapeChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg.
|
||||
/// Predefinito a "svg:img" con suffisso ":*".
|
||||
/// </summary>
|
||||
private string svgChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img png.
|
||||
/// Predefinito a "png:img" con suffisso ":*".
|
||||
/// </summary>
|
||||
private string pngChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi di update
|
||||
/// </summary>
|
||||
private string updateChannel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Fix Receive Channel (ricerca "like")
|
||||
/// </summary>
|
||||
/// <param name="currCh"></param>
|
||||
private void fixRecChannel(ref string currCh)
|
||||
{
|
||||
#if false
|
||||
if (!currCh.EndsWith(":*"))
|
||||
{
|
||||
//currCh += ":*";
|
||||
}
|
||||
#endif
|
||||
if (!currCh.EndsWith("*"))
|
||||
{
|
||||
currCh += "*";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -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<string>("ServerConf:BomChannel") ?? "bom";
|
||||
// verifico la url base
|
||||
apiUrl = _config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api";
|
||||
routeBasePath = _config.GetValue<string>("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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
/// <summary>
|
||||
/// Sistema gli item che mancassero di ItemID leggendo da DB
|
||||
/// </summary>
|
||||
/// <param name="listOrg"></param>
|
||||
/// <returns></returns>
|
||||
public List<BomItemDTO> BomFixItemId(List<BomItemDTO> listOrg)
|
||||
{
|
||||
List<BomItemDTO> 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco completo Config Envir
|
||||
/// </summary>
|
||||
@@ -608,7 +631,6 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
/// <summary>
|
||||
/// Elenco item da ricerca completa Async
|
||||
/// </summary>
|
||||
/// <param name="SearchVal"></param>
|
||||
/// <param name="CodGroup"></param>
|
||||
/// <param name="ItemType"></param>
|
||||
/// <returns></returns>
|
||||
@@ -713,6 +735,24 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esecuzione mass update di un set di item cui manca pezzo/quantità max
|
||||
/// </summary>
|
||||
/// <param name="list2upd"></param>
|
||||
/// <param name="setCost"></param>
|
||||
/// <param name="defMargin"></param>
|
||||
/// <param name="defQtyMax"></param>
|
||||
/// <param name="defUM">Valore UM da impostare per tutti</param>
|
||||
/// <param name="roundVal"></param>
|
||||
/// <param name="scaleFactor">Valore di scala da unità in ingresso x unità di costo (mm x mm x m --> m3)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ItemMassUpdate(List<BomItemDTO> 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update / Insert record item
|
||||
/// </summary>
|
||||
@@ -931,6 +971,26 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
return result;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Recupero nuovo record BOM diretto dal DB
|
||||
/// </summary>
|
||||
/// <param name="offerRowID"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Converte il campo raw della BOM in lista oggetti da gestire
|
||||
/// </summary>
|
||||
@@ -1221,19 +1281,20 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
// salvo sul DB il risultato della BOM
|
||||
if (!string.IsNullOrEmpty(bomContent))
|
||||
{
|
||||
List<BomItemDTO>? bomList = null;
|
||||
try
|
||||
{
|
||||
// deserializzo la Bom...
|
||||
var bomList = JsonConvert.DeserializeObject<List<BomItemDTO>>(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<List<BomItemDTO>>(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);
|
||||
}
|
||||
|
||||
@@ -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<string>("ServerConf:HwOptChannel") ?? "Egw:hw";
|
||||
pngChannel = _config.GetValue<string>("ServerConf:PngChannel") ?? "Egw:png:img";
|
||||
svgChannel = _config.GetValue<string>("ServerConf:SvgChannel") ?? "Egw:svg:img";
|
||||
bomChannel = _config.GetValue<string>("ServerConf:BomChannel") ?? "Egw:bom";
|
||||
hmlChannel = _config.GetValue<string>("ServerConf:HwListChannel") ?? "Egw:hml";
|
||||
profListChannel = _config.GetValue<string>("ServerConf:ProfListChannel") ?? "Egw:prof";
|
||||
shapeChannel = _config.GetValue<string>("ServerConf:ShapeChannel") ?? "Egw:shape";
|
||||
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw:update";
|
||||
chBom = _config.GetValue<string>("ServerConf:ChannelBom") ?? "lux:bom";
|
||||
chHwList = _config.GetValue<string>("ServerConf:ChannelHwList") ?? "lux:hw:list";
|
||||
chHwOpt = _config.GetValue<string>("ServerConf:ChannelHwOpt") ?? "lux:hw:opt";
|
||||
chPng = _config.GetValue<string>("ServerConf:ChannelPng") ?? "lux:png:img";
|
||||
chProfList = _config.GetValue<string>("ServerConf:ChannelProfList") ?? "lux:prof";
|
||||
chShape = _config.GetValue<string>("ServerConf:ChannelShape") ?? "lux:shape";
|
||||
chSvg = _config.GetValue<string>("ServerConf:ChannelSvg") ?? "lux:svg:img";
|
||||
chUpdate = _config.GetValue<string>("ServerConf:ChannelUpdate") ?? "lux:update";
|
||||
// conf tag x cache
|
||||
liveTag = _config.GetValue<string>("ServerConf:ImageLiveTag") ?? "svg";
|
||||
cacheTag = _config.GetValue<string>("ServerConf:ImageFileTag") ?? "svgfile";
|
||||
@@ -123,12 +116,36 @@ 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", "");
|
||||
}
|
||||
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}.svg?envir={envir}".Replace("////", "//");
|
||||
string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.{fType}?env={envir}".Replace("////", "//");
|
||||
return fullUrl;
|
||||
}
|
||||
|
||||
@@ -181,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;
|
||||
@@ -219,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;
|
||||
}
|
||||
@@ -235,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;
|
||||
}
|
||||
@@ -253,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;
|
||||
}
|
||||
@@ -287,8 +304,10 @@ 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}";
|
||||
long numSent = await _redisService.PublishAsync(notifyChannel, pngContent);
|
||||
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);
|
||||
return done;
|
||||
}
|
||||
|
||||
@@ -303,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;
|
||||
}
|
||||
@@ -320,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;
|
||||
}
|
||||
@@ -354,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;
|
||||
}
|
||||
@@ -369,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 = "";
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Lux.API.Controllers
|
||||
_config = config;
|
||||
_redisService = redisService;
|
||||
_imgService = imgServ;
|
||||
pubChannel = _config.GetValue<string>("ServerConf:PubChannel") ?? "";
|
||||
chPub = _config.GetValue<string>("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();
|
||||
@@ -92,12 +92,12 @@ 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);
|
||||
|
||||
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
|
||||
|
||||
@@ -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<ImageController> logger)
|
||||
{
|
||||
_imgService = imgServ;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata GET: restituisce file PNG (da file o da cache)
|
||||
/// PUT: api/image/png/00000000-0000-0000-0000-000000000000
|
||||
/// </summary>
|
||||
/// <param name="id">id oggetto</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("png/{id}")]
|
||||
public async Task<IActionResult> 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");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata GET: riceve Json in formato JwdDto, restituisce svg file
|
||||
/// GET: api/Jwd/svg/00000000-0000-0000-0000-000000000000
|
||||
@@ -35,37 +71,86 @@ namespace Lux.API.Controllers
|
||||
return File(bytes, "image/svg+xml");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 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/OFF0000001.001.svg?env=WINDOW
|
||||
/// GET: api/image/cache/OFF0000001.001.svg?env=WINDOW
|
||||
/// GET: api/image/OFF0000002.001.png?env=WINDOW
|
||||
/// GET: api/image/cache/OFF0000002.001.png?env=WINDOW
|
||||
/// GET: api/image/OFF0000002.002-123456.png?env=WINDOW
|
||||
/// GET: api/image/cache/OFF0000002.002-123456.png?env=WINDOW
|
||||
/// </summary>
|
||||
/// <param name="id">id oggetto</param>
|
||||
/// <param name="id">uid oggetto</param>
|
||||
/// <param name="env">environment oggetto</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("png/{id}")]
|
||||
public async Task<IActionResult> png(string id)
|
||||
[HttpGet("{id}")]
|
||||
[HttpGet("cache/{id}")]
|
||||
//[HttpGet("file/{id}")]
|
||||
public async Task<IActionResult> 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 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<ImageController> _logger;
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private readonly ILogger<ImageController> _logger;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private ImageCacheService _imgService { get; set; }
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace Lux.API.Controllers
|
||||
_redisService = redisService;
|
||||
_imgService = imgServ;
|
||||
_confService = confServ;
|
||||
pubChannel = _config.GetValue<string>("ServerConf:PubChannel") ?? "";
|
||||
chPub = _config.GetValue<string>("ServerConf:ChannelPub") ?? "";
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -64,12 +64,12 @@ 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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -242,12 +242,12 @@ 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);
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>0.9.2511.0318</Version>
|
||||
<Version>0.9.2511.0718</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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();
|
||||
@@ -58,6 +61,14 @@ string baseUrl = configuration.GetValue<string>("ServerConf:BaseUrl") ?? "";
|
||||
app.UsePathBase(baseUrl);
|
||||
logger.Info($"BaseUrl: {baseUrl}");
|
||||
|
||||
// log channels di ritorno UI
|
||||
List<string> listParams = new List<string>() { "ChannelPng", "ChannelSub", "ChannelPub", "ChannelSvg" };
|
||||
foreach (var param in listParams)
|
||||
{
|
||||
logger.Info($"{param}: {configuration.GetValue<string>($"ServerConf:{param}") ?? ""}");
|
||||
}
|
||||
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,55 +159,5 @@ namespace Lux.API.Services
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Restituisce una risposta all'esecuzione
|
||||
/// </summary>
|
||||
/// <param name="ProcessArgsResult"></param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salva risultato calcolo da broadcast channel REDIS
|
||||
/// </summary>
|
||||
/// <param name="channel"></param>
|
||||
/// <param name="message"></param>
|
||||
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<ProcessArgsResult>(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
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace Lux.API.Services
|
||||
_subManager = subManager;
|
||||
_processor = processor;
|
||||
_config = config;
|
||||
subChannel = _config.GetValue<string>("ServerConf:SubChannel") ?? "";
|
||||
chSub = _config.GetValue<string>("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
|
||||
}
|
||||
|
||||
@@ -6,9 +6,17 @@
|
||||
}
|
||||
},
|
||||
"ServerConf": {
|
||||
"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/"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,16 @@
|
||||
},
|
||||
"ServerConf": {
|
||||
"BaseUrl": "/lux/srv/",
|
||||
"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/"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,16 @@
|
||||
}
|
||||
},
|
||||
"ServerConf": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
+22
-11
@@ -56,20 +56,31 @@
|
||||
},
|
||||
"ServerConf": {
|
||||
"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",
|
||||
"ChannelPub": "EgwEngineInput",
|
||||
"ChannelSub": "EgwEngineOutput",
|
||||
|
||||
"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",
|
||||
|
||||
//"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",
|
||||
"ImageLiveTag": "svg",
|
||||
"ImageFileTag": "svgfile"
|
||||
"ImageFileTag": "svgfile",
|
||||
"FileSharePath": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\LuxUploads"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.315" />
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.718" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.21" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.21" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,66 +1,156 @@
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr class="table-dark">
|
||||
<td>#</td>
|
||||
<td class="text-center"><i class="fa-solid fa-repeat"></i></td>
|
||||
<td>Class</td>
|
||||
<td>Descrizione</td>
|
||||
@* <td>Cod</td> *@
|
||||
<td class="text-end">Qty</td>
|
||||
<td class="text-end">UnitPrice</td>
|
||||
<td class="text-end">Importo</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in bomDict)
|
||||
{
|
||||
@if (EditRecord != null && item.Key == currIdx)
|
||||
{
|
||||
<tr class="table-info">
|
||||
<td>@(item.Key + 1)</td>
|
||||
<td colspan="3">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-sm btn-warning" title="Effettua Cambio" @onclick="() => DoCancel()"><i class="fa-solid fa-ban"></i></button>
|
||||
<select @bind="@EditRecord.ItemID" class="form-select">
|
||||
@foreach (var itemAlt in ListItemAlt)
|
||||
{
|
||||
<option value="@itemAlt.ItemID">@itemAlt.Description | @($"{itemAlt.Cost:C2}")</option>
|
||||
}
|
||||
</select>
|
||||
<button class="btn btn-sm btn-success" title="Effettua Cambio" @onclick="() => DoSave()"><i class="fa-solid fa-check"></i></button>
|
||||
@if (isLoading)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (MassEdit)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control form-control-lg text-end" @bind="@defUM">
|
||||
<label class="small bg-opacity-50">UM</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-floating">
|
||||
<InputDouble CssClass="form-control form-control-lg text-end" Decimals="2" @bind-Value="@totCost"></InputDouble>
|
||||
<label class="small bg-opacity-50">Tot. Cost</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-floating">
|
||||
<InputPercent CssClass="form-control form-control-lg text-end" ForceInvariantParsing="true" Decimals="1" @bind-Value="@defMargin"></InputPercent>
|
||||
<label class="small bg-opacity-50">Margin</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-floating">
|
||||
<input type="number" class="form-control form-control-lg text-end" @bind="@defQtyMax">
|
||||
<label class="small bg-opacity-50">Qty Max</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-floating">
|
||||
<input type="number" class="form-control form-control-lg text-end" @bind="@defRound">
|
||||
<label class="small bg-opacity-50">Round</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@if (showMassEditSave)
|
||||
{
|
||||
<button class="btn btn-lg btn-success w-100" @onclick="ForceItemPrice">Save <i class="fa-solid fa-cloud-arrow-up"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-lg btn-secondary w-100" disabled>Save <i class="fa-solid fa-cloud-arrow-up"></i></button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr class="table-dark">
|
||||
<td>
|
||||
@if (MassEdit)
|
||||
{
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" title="Seleziona/Deseleziona tutti" @bind="SelAll">
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end">@($"{item.Value.Qty:N3}")</td>
|
||||
<td class="text-end">@($"{item.Value.PriceEff:C2}")</td>
|
||||
<td class="text-end">@($"{item.Value.TotalCost:C2}")</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
}
|
||||
</td>
|
||||
<td class="text-center"><i class="fa-solid fa-repeat"></i></td>
|
||||
<td>Class</td>
|
||||
<td>Descrizione</td>
|
||||
@* <td>Cod</td> *@
|
||||
@if (ShowVolume)
|
||||
{
|
||||
<td class="text-end">Vol</td>
|
||||
}
|
||||
<td class="text-end">Qty</td>
|
||||
<td class="text-end">UnitPrice</td>
|
||||
<td class="text-end">Importo</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in bomPaged)
|
||||
{
|
||||
<tr>
|
||||
<td>@(item.Key + 1)</td>
|
||||
<td class="text-center">
|
||||
@if (item.Value.Price == 0)
|
||||
@if (EditRecord != null && item.numRow == EditRecord.numRow)
|
||||
{
|
||||
<tr class="table-info">
|
||||
<td>@(item.numRow)</td>
|
||||
<td colspan="3">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-sm btn-warning" title="Effettua Cambio" @onclick="() => DoCancel()"><i class="fa-solid fa-ban"></i></button>
|
||||
<select @bind="@EditRecord.ItemID" class="form-select">
|
||||
@foreach (var itemAlt in ListItemAlt)
|
||||
{
|
||||
<option value="@itemAlt.ItemID">@itemAlt.Description | @($"{itemAlt.Cost:C2}")</option>
|
||||
}
|
||||
</select>
|
||||
<button class="btn btn-sm btn-success" title="Effettua Cambio" @onclick="() => DoSave()"><i class="fa-solid fa-check"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
@if (ShowVolume)
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" title="Effettua Cambio" @onclick="() => DoEdit(item.Key, item.Value)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
|
||||
<td class="text-end">@($"{item.Volume:N3}")</td>
|
||||
}
|
||||
<td class="text-end">@($"{item.Qty:N3}")</td>
|
||||
<td class="text-end">@($"{item.PriceEff:C2}")</td>
|
||||
<td class="text-end">@($"{item.TotalCost:C2}")</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@(item.numRow)
|
||||
@if (MassEdit)
|
||||
{
|
||||
<input class="form-check-input" type="checkbox" role="switch" title="Seleziona per Mass Update" @bind="item.isSelected">
|
||||
}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
@if (item.Price == 0)
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" title="Effettua Cambio" @onclick="() => DoEdit(item)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
|
||||
}
|
||||
</td>
|
||||
<td>@item.ClassCode</td>
|
||||
<td>@item.ItemCode</td>
|
||||
@* <td>@item.Value.DescriptionCode</td> *@
|
||||
@if (ShowVolume)
|
||||
{
|
||||
<td class="text-end">@($"{item.Volume:N3}")</td>
|
||||
}
|
||||
<td class="text-end">@($"{item.Qty:N3}")</td>
|
||||
<td class="text-end">@($"{item.PriceEff:C2}")</td>
|
||||
<td class="text-end">@($"{item.TotalCost:C2}")</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@{
|
||||
int numCol = ShowVolume ? 8 : 7;
|
||||
<tr class="table-primary">
|
||||
<td colspan="4" class="text-start"><b>@BomList.Count</b> materiali</td>
|
||||
@if (ShowVolume)
|
||||
{
|
||||
<td class="text-end">@($"{VolTotale:N3}")</td>
|
||||
}
|
||||
<td class="text-end">@($"{QtyTotale:N3}")</td>
|
||||
<td class="text-end">tot:</td>
|
||||
<td class="text-end fw-bold">@($"{ImportoTotale:C2}")</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="@numCol">
|
||||
<EgwCoreLib.Razor.DataPager currPage="@currPage" PageSize="@numRecord" totalCount="@totalCount" numPageChanged="SavePage" numRecordChanged="SaveNumRec"></EgwCoreLib.Razor.DataPager>
|
||||
</td>
|
||||
<td>@item.Value.ClassCode</td>
|
||||
<td>@item.Value.ItemCode</td>
|
||||
@* <td>@item.Value.DescriptionCode</td> *@
|
||||
<td class="text-end">@($"{item.Value.Qty:N3}")</td>
|
||||
<td class="text-end">@($"{item.Value.PriceEff:C2}")</td>
|
||||
<td class="text-end">@($"{item.Value.TotalCost:C2}")</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="table-primary">
|
||||
<td colspan="5" class="text-end">@BomList.Count record</td>
|
||||
<td class="text-end">tot:</td>
|
||||
<td class="text-end fw-bold">@($"{ImportoTotale:C2}")</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</tfoot>
|
||||
</table>
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
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;
|
||||
using RestSharp.Serializers.Xml;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lux.UI.Components.Compo
|
||||
@@ -14,9 +17,15 @@ namespace Lux.UI.Components.Compo
|
||||
[Parameter]
|
||||
public List<BomItemDTO> BomList { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public OfferRowModel CurrRowRec { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<List<BomItemDTO>> EC_Updated { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool MassEdit { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -31,7 +40,49 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
protected double QtyTotale
|
||||
{
|
||||
get
|
||||
{
|
||||
double valTot = 0;
|
||||
if (bomDict != null)
|
||||
{
|
||||
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
|
||||
{
|
||||
double valTot = 0;
|
||||
if (bomDict != null)
|
||||
{
|
||||
valTot = bomDict.Sum(x => x.Volume);
|
||||
}
|
||||
return valTot;
|
||||
}
|
||||
@@ -39,16 +90,15 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
|
||||
#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)
|
||||
{
|
||||
@@ -64,7 +114,6 @@ namespace Lux.UI.Components.Compo
|
||||
{
|
||||
ListItemAlt = new List<ItemModel>();
|
||||
}
|
||||
currIdx = key;
|
||||
EditRecord = editRec;
|
||||
}
|
||||
|
||||
@@ -73,13 +122,46 @@ namespace Lux.UI.Components.Compo
|
||||
/// </summary>
|
||||
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
|
||||
@@ -89,14 +171,76 @@ namespace Lux.UI.Components.Compo
|
||||
/// <summary>
|
||||
/// Dizionario interno oggetti x editare con indice
|
||||
/// </summary>
|
||||
private Dictionary<int, BomItemDTO> bomDict = new Dictionary<int, BomItemDTO>();
|
||||
private List<BomDtoSel> bomDict = new List<BomDtoSel>();
|
||||
|
||||
private List<BomDtoSel> bomPaged = new List<BomDtoSel>();
|
||||
|
||||
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<ItemModel> ListItemAlt = new List<ItemModel>();
|
||||
|
||||
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<BomItemDTO>().ToList();
|
||||
await DLService.ItemMassUpdate(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound);
|
||||
// ...e passo al controller parent LINQ projection to base type
|
||||
List<BomItemDTO> baseList = bomDict.Cast<BomItemDTO>().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
|
||||
|
||||
/// <summary>
|
||||
@@ -104,21 +248,18 @@ namespace Lux.UI.Components.Compo
|
||||
/// </summary>
|
||||
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<BomItemDTO> baseList = bomDict.Cast<BomItemDTO>().ToList();
|
||||
await EC_Updated.InvokeAsync(baseList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -126,14 +267,28 @@ namespace Lux.UI.Components.Compo
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="updatedItem"></param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Filtro e paginazione
|
||||
/// </summary>
|
||||
private void UpdateTable()
|
||||
{
|
||||
// fix paginazione
|
||||
bomPaged = bomDict
|
||||
.Skip(numRecord * (currPage - 1))
|
||||
.Take(numRecord)
|
||||
.ToList();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0 fs-3">
|
||||
<b>Item:</b> <small>@CurrItem.OfferRowUID</small>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<div class="input-group">
|
||||
<InputFile class="form-control" OnChange="UploadFile" style="min-width: 24rem;" />
|
||||
<button class="btn btn-sm btn-success" @onclick="CloseEdit"><i class="fa-solid fa-xmark" title="Close"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body bg-info bg-gradient bg-opacity-10 p-2">
|
||||
<div class="row">
|
||||
<div class="col-2 fs-5 pe-0">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item Active">Info BTL</li>
|
||||
<li class="list-group-item"># pezzi</li>
|
||||
<li class="list-group-item"># sezioni</li>
|
||||
<li class="list-group-item">somma metri</li>
|
||||
<li class="list-group-item">somma volume</li>
|
||||
<li class="list-group-item">tempo totale</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<img class="img-fluid" src="@(imgUrl(CurrItem.OfferRowUID, $"{CurrItem.Envir}"))" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
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<Dictionary<string, string>> EC_ReqSave { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> 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
|
||||
|
||||
/// <summary>
|
||||
/// Calcolo URL immagine
|
||||
/// </summary>
|
||||
/// <param name="imgUid"></param>
|
||||
/// <param name="env"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Esegue lettura file + invio richiesta specifica
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task UploadFile(InputFileChangeEventArgs e)
|
||||
{
|
||||
// init dizionari arg richiesta update
|
||||
Dictionary<string, string> fileArgs = new Dictionary<string, string>();
|
||||
Dictionary<string, string> bomArgs = new Dictionary<string, string>();
|
||||
|
||||
// leggo il contenuto del PRIMO (singolo) file
|
||||
IBrowserFile file = e.File;
|
||||
// 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();
|
||||
|
||||
// se ho contenuto nel file...
|
||||
if (!string.IsNullOrEmpty(rawContent))
|
||||
{
|
||||
// elimino vecchio file... richiedendo save senza parametri
|
||||
Dictionary<string, string> dictSave = new Dictionary<string, string>();
|
||||
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
|
||||
// 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)
|
||||
{
|
||||
// false --> NON salvo serializzato eprché ho già salvato l file x cui NON ricalcola la BOM
|
||||
_ = EC_OnClose.InvokeAsync(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,24 @@
|
||||
@if (EditRecord != null && CurrEditMode == EditMode.SerStruc)
|
||||
@if (EditRecord != null)
|
||||
{
|
||||
<WebWindowComplex.TableComp ListPayload="SetupList"
|
||||
LiveData="CurrData"
|
||||
EC_DoUpdate="SaveJWD"
|
||||
EC_OnClose="CloseEdit">
|
||||
</WebWindowComplex.TableComp>
|
||||
if (EditRecord.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || CurrEditMode == EditMode.SerStruc)
|
||||
{
|
||||
<WebWindowComplex.TableComp ListPayload="SetupList"
|
||||
LiveData="CurrData"
|
||||
EC_DoUpdate="SaveJWD"
|
||||
EC_OnClose="CloseEdit">
|
||||
</WebWindowComplex.TableComp>
|
||||
}
|
||||
else
|
||||
{
|
||||
<BtlPreview CurrItem="EditRecord"
|
||||
ApiUrl="@apiUrl"
|
||||
CalcTag="@calcTag"
|
||||
GenericBasePath="@genericBasePath"
|
||||
ImgBasePath="@imgBasePath"
|
||||
EC_ReqSave="SaveFile"
|
||||
EC_OnClose="CloseEdit">
|
||||
</BtlPreview>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -88,7 +102,6 @@ else
|
||||
<tr class="@RowClass(item)">
|
||||
<td class="text-nowrap">
|
||||
<span class="px-1">
|
||||
@* @item.RowNum *@
|
||||
<button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
</span>
|
||||
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
||||
@@ -131,45 +144,41 @@ else
|
||||
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
||||
{
|
||||
<td>
|
||||
@if (string.IsNullOrEmpty(item.SerStruct) || item.SerStruct.Length <= 2)
|
||||
@if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW)
|
||||
{
|
||||
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" />
|
||||
<img class="img-fluid image-hover-pop p-1" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="64" @onclick="() => DoEditJwd(item)" title="Edit Item" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" @onclick="() => DoEditJwd(item)" title="Edit Item" />
|
||||
<img class="img-fluid image-hover-pop" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="150" @onclick="() => DoEditFile(item)" title="Edit Item" />
|
||||
}
|
||||
</td>
|
||||
}
|
||||
<td class="small">
|
||||
<div>@item.OfferRowUID</div>
|
||||
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2)
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
|
||||
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
|
||||
@if (item.AwaitBom)
|
||||
<td>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1">
|
||||
<div class="fw-bold">@item.OfferRowUID</div>
|
||||
@if (ShowBom(item))
|
||||
{
|
||||
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
|
||||
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
|
||||
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
|
||||
@if (item.AwaitBom)
|
||||
{
|
||||
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
|
||||
}
|
||||
</button>
|
||||
}
|
||||
</button>
|
||||
}
|
||||
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
|
||||
{
|
||||
<div class="input-group input-group-sm">
|
||||
@if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
|
||||
{
|
||||
<span>
|
||||
<InputFile class="form-control" OnChange="UploadFile" style="width: 24rem;" />
|
||||
</span>
|
||||
<button class="btn btn-sm btn-info" @onclick="() => ToggleFileEdit(null)"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="input-group-text small"><b>@item.FileName</b> | @fSize(item.FileSize)</span>
|
||||
<button class="btn btn-sm btn-primary" @onclick="() => ToggleFileEdit(item)"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</li>
|
||||
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
|
||||
{
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start px-2 py-1 small">
|
||||
<div class="mx-0">
|
||||
<div class="">@item.FileName</div>
|
||||
</div>
|
||||
<span class="small">@fSize(item.FileSize)</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</td>
|
||||
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
|
||||
{
|
||||
@@ -295,17 +304,21 @@ else
|
||||
<div class="col-4 fs-3">
|
||||
Materiali (BOM)
|
||||
</div>
|
||||
<div class="col-4 text-center border border-2 rounded">
|
||||
<div class="col-4 text-center text-bg-secondary bg-gradient border border-2 rounded">
|
||||
<div class="fw-bold">@EditRecord.Note</div>
|
||||
<small class="small">@EditRecord.OfferRowUID</small>
|
||||
</div>
|
||||
<div class="col-4 text-end fs-4">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick="ClosePopup">
|
||||
</button>
|
||||
<div class="form-check form-switch small" title="Abilita editing massivo">
|
||||
<input class="form-check-input" type="checkbox" role="switch" @bind="enableMassEdit">
|
||||
<label class="form-check-label">Mass Edit</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<EditBom BomList="@CurrBomList" EC_Updated="UpdateBom"></EditBom>
|
||||
<EditBom CurrRowRec="@EditRecord" MassEdit="enableMassEdit" BomList="CurrBomList" EC_Updated="UpdateBom"></EditBom>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,10 +4,13 @@ using EgwCoreLib.Lux.Data.DbModel.Config;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Lux.UI.Components.Pages;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
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;
|
||||
@@ -19,7 +22,7 @@ namespace Lux.UI.Components.Compo
|
||||
#region Public Enums
|
||||
|
||||
/// <summary>
|
||||
/// modalità modifica riga offerta
|
||||
/// modalit� modifica riga offerta
|
||||
/// </summary>
|
||||
public enum EditMode
|
||||
{
|
||||
@@ -273,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
|
||||
@@ -308,10 +311,29 @@ 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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit del file:
|
||||
/// - abilitazione fileUpload
|
||||
/// - anteprima grande (live)
|
||||
/// </summary>
|
||||
/// <param name="curRec"></param>
|
||||
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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apre editor finestre del record richiesto
|
||||
/// </summary>
|
||||
@@ -319,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);
|
||||
@@ -347,37 +369,35 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Seleziono riga senza cambiare modalità editing
|
||||
/// Seleziono riga senza cambiare modalit� editing
|
||||
/// </summary>
|
||||
/// <param name="curRec"></param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta modalità edit ciclo di lavoro
|
||||
/// Imposta modalita edit ciclo di lavoro
|
||||
/// </summary>
|
||||
/// <param name="currRow"></param>
|
||||
protected void DoSwapJobCycle(OfferRowModel currRow)
|
||||
{
|
||||
CurrEditMode = EditMode.JobCycle;
|
||||
EditRecord = currRow;
|
||||
CurrBomList = DLService.OffertGetBomList(EditRecord);
|
||||
selectBom(currRow);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta modalità ad edit BOM
|
||||
/// Imposta modalita ad edit BOM
|
||||
/// </summary>
|
||||
/// <param name="currRow"></param>
|
||||
protected void DoSwapMat(OfferRowModel currRow)
|
||||
{
|
||||
CurrEditMode = EditMode.BOM;
|
||||
EditRecord = currRow;
|
||||
CurrBomList = DLService.OffertGetBomList(EditRecord);
|
||||
selectBom(currRow);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -427,7 +447,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");
|
||||
@@ -567,6 +587,8 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private List<GenValueModel> AllColors = new();
|
||||
|
||||
private List<EnvirParamModel> AllConfEnvir = new();
|
||||
@@ -593,12 +615,42 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
private List<string> AvailProfileList = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Base path x network share files
|
||||
/// </summary>
|
||||
private string basePath = "unsafe_uploads";
|
||||
|
||||
private string calcTag = "calc";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update HwOptions
|
||||
/// </summary>
|
||||
private string chHwOpt = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update PNG
|
||||
/// </summary>
|
||||
private string chPng = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update Profile List
|
||||
/// </summary>
|
||||
private string chProfList = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update Shape
|
||||
/// </summary>
|
||||
private string chShape = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update SVG
|
||||
/// </summary>
|
||||
private string chSvg = "";
|
||||
|
||||
private List<BomItemDTO>? CurrBomList = null;
|
||||
|
||||
/// <summary>
|
||||
/// Modalità editint attiva
|
||||
/// Modalit� editint attiva
|
||||
/// </summary>
|
||||
private EditMode CurrEditMode = EditMode.None;
|
||||
|
||||
@@ -608,27 +660,28 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
private int currPage = 1;
|
||||
|
||||
private string currPng = "";
|
||||
|
||||
private List<string> currProfList = new List<string>();
|
||||
|
||||
private string currSvg = "";
|
||||
private string currPng = "";
|
||||
|
||||
/// <summary>
|
||||
/// Record in Edit corrente
|
||||
/// </summary>
|
||||
private OfferRowModel? EditRecord = null;
|
||||
|
||||
private string genericBasePath = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update HwOptions
|
||||
/// Abilita edit massivo record ITEM
|
||||
/// </summary>
|
||||
private string hwOptChannel = "";
|
||||
private bool enableMassEdit = false;
|
||||
|
||||
private string genericBasePath = "";
|
||||
|
||||
private string imgBasePath = "";
|
||||
|
||||
/// <summary>
|
||||
/// Semaforo x definire se sia già in modalità ionterattiva o di prerendering
|
||||
/// Semaforo x definire se sia gi� in modalit� ionterattiva o di prerendering
|
||||
/// </summary>
|
||||
private bool isInteractive = false;
|
||||
|
||||
@@ -643,36 +696,16 @@ namespace Lux.UI.Components.Compo
|
||||
/// </summary>
|
||||
private string origJwd = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update PNG
|
||||
/// </summary>
|
||||
private string pngChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione precedente JWD x test e confronto
|
||||
/// </summary>
|
||||
private string prevJwd = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update Profile List
|
||||
/// </summary>
|
||||
private string profListChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario richieste
|
||||
/// </summary>
|
||||
private Dictionary<string, string> reqDict = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Channel update Shape
|
||||
/// </summary>
|
||||
private string shapeChannel = "";
|
||||
|
||||
/// <summary>
|
||||
/// Channel update SVG
|
||||
/// </summary>
|
||||
private string svgChannel = "";
|
||||
|
||||
private int totalCount = 0;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -711,9 +744,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)
|
||||
@@ -733,15 +766,16 @@ namespace Lux.UI.Components.Compo
|
||||
|
||||
private void ConfInit()
|
||||
{
|
||||
basePath = Config.GetValue<string>("ServerConf:FileSharePath") ?? "unsafe_uploads";
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
|
||||
genericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "calc";
|
||||
pngChannel = Config.GetValue<string>("ServerConf:PngChannel") ?? "";
|
||||
svgChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
shapeChannel = Config.GetValue<string>("ServerConf:ShapeChannel") ?? "";
|
||||
hwOptChannel = Config.GetValue<string>("ServerConf:HwOptChannel") ?? "";
|
||||
profListChannel = Config.GetValue<string>("ServerConf:ProfListChannel") ?? "";
|
||||
chHwOpt = Config.GetValue<string>("ServerConf:ChannelHwOpt") ?? "";
|
||||
chPng = Config.GetValue<string>("ServerConf:ChannelPng") ?? "";
|
||||
chProfList = Config.GetValue<string>("ServerConf:ChannelProfList") ?? "";
|
||||
chShape = Config.GetValue<string>("ServerConf:ChannelShape") ?? "";
|
||||
chSvg = Config.GetValue<string>("ServerConf:ChannelSvg") ?? "";
|
||||
}
|
||||
|
||||
private async Task DoRecalcOffer()
|
||||
@@ -775,6 +809,34 @@ namespace Lux.UI.Components.Compo
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce il contenuto del file salvato
|
||||
/// </summary>
|
||||
/// <param name="folderPath"></param>
|
||||
/// <param name="secureName"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricevuto HwOpt, processo
|
||||
/// </summary>
|
||||
@@ -790,9 +852,9 @@ 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<Dictionary<int, string>>(currArgs.newMessage) ?? new Dictionary<int, string>();
|
||||
var rawDict = JsonConvert.DeserializeObject<Dictionary<int, string>>(currArgs.newMessage) ?? new Dictionary<int, string>();
|
||||
currHwOption = rawDict;
|
||||
// salvo in live data...
|
||||
CurrData.DictOptionsXml = currHwOption;
|
||||
@@ -812,13 +874,13 @@ 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 di gestione finestre...
|
||||
// non devo passarlo al componente...
|
||||
#if false
|
||||
// salvo in live data...
|
||||
CurrData.SvgPreview = currSvg;
|
||||
CurrData.SvgPreview = currSvg;
|
||||
#endif
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
@@ -841,7 +903,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
|
||||
{
|
||||
@@ -889,7 +951,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<Dictionary<int, string>>(currArgs.newMessage);
|
||||
@@ -915,7 +977,7 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricevuto SVG, se è il mio lo aggiorno...
|
||||
/// Ricevuto SVG, se � il mio lo aggiorno...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
@@ -929,7 +991,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...
|
||||
@@ -980,8 +1042,7 @@ namespace Lux.UI.Components.Compo
|
||||
Glass = AvailGlassList,
|
||||
Hardware = AvailHardwareList,
|
||||
Material = AvailMaterialList,
|
||||
Profile = AvailProfileList,
|
||||
TemplateDTO = null
|
||||
Profile = AvailProfileList
|
||||
};
|
||||
CurrData = new LivePayload()
|
||||
{
|
||||
@@ -1042,6 +1103,27 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione file (old)
|
||||
/// </summary>
|
||||
/// <param name="secureName">Nome secure da impiegare</param>
|
||||
/// <param name="content">Contenuto file</param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua vera richiesta della BOM
|
||||
/// </summary>
|
||||
@@ -1058,17 +1140,36 @@ namespace Lux.UI.Components.Compo
|
||||
Dictionary<string, string> DictExec = new Dictionary<string, string>();
|
||||
// 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...
|
||||
DictExec.Add("UID", currRec.OfferRowUID);
|
||||
DictExec.Add(serKey, currRec.SerStruct);
|
||||
// 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()
|
||||
{
|
||||
EnvType = currRec.Envir,
|
||||
//EnvType = currEnv,
|
||||
DictExec = DictExec
|
||||
};
|
||||
|
||||
@@ -1078,9 +1179,47 @@ namespace Lux.UI.Components.Compo
|
||||
await CService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salvataggio dei dati del file caricato
|
||||
/// </summary>
|
||||
/// <param name="fileDict">Dizionario info file</param>
|
||||
private void SaveFile(Dictionary<string, string> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue salvataggio del file ricevuto
|
||||
/// </summary>
|
||||
/// <param name="folderPath">Path relativo x file (tipicamente UID parent order)</param>
|
||||
/// <param name="secureName">Nome secure da impiegare</param>
|
||||
/// <param name="content">Contenuto file</param>
|
||||
private bool saveFileContent(string folderPath, string secureName, string content)
|
||||
@@ -1089,8 +1228,20 @@ 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;
|
||||
}
|
||||
@@ -1108,9 +1259,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))
|
||||
{
|
||||
@@ -1135,6 +1286,21 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selezione e fix dati BOM
|
||||
/// </summary>
|
||||
/// <param name="currRow"></param>
|
||||
/// <returns></returns>
|
||||
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)
|
||||
@@ -1143,6 +1309,37 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifia ammissibilit� display btn ricalcolo BOM da item
|
||||
/// </summary>
|
||||
/// <param name="reqItem"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco SalesOfferRows calcolabili:
|
||||
/// - contengono serializzazione come JWD
|
||||
@@ -1157,7 +1354,7 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
/// </summary>
|
||||
private void ToggleFileEdit(OfferRowModel? currRec)
|
||||
{
|
||||
@@ -1179,6 +1376,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<BomItemDTO>();
|
||||
// fa refresh dei dati della BOM visualizzata
|
||||
selectBom(updRec);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1231,13 +1438,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);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
{
|
||||
<div class="card shadow">
|
||||
<div class="card-header">
|
||||
<div class="card-title fs-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
Edit Offerta <b>@EditRecord.OfferCode</b>
|
||||
<div class="card-title mb-0">
|
||||
<div class="d-flex justify-content-between align-items-center fs-4">
|
||||
<div class="px-0 fs-3">
|
||||
<b>@EditRecord.OfferCode</b>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<div class="px-4">
|
||||
<div class="d-flex">
|
||||
<div class="px-0 row">
|
||||
<div class="col px-0">
|
||||
@@ -41,12 +41,12 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@* <div class="px-0">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="card" aria-label="Close" @onclick="DoReset">
|
||||
</button>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<button type="button" class="btn-close" data-bs-dismiss="card" aria-label="Close" @onclick="DoReset">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Lux.UI.Components.Pages
|
||||
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
|
||||
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
|
||||
calcTag = Config.GetValue<string>("ServerConf:ImageCalcTag") ?? "";
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
chSub = Config.GetValue<string>("ServerConf:ChannelSvg") ?? "";
|
||||
DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage;
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ namespace Lux.UI.Components.Pages
|
||||
private string imgBasePath = "";
|
||||
|
||||
/// <summary>
|
||||
/// Semaforo x definire se sia già in modalità ionterattiva o di prerendering
|
||||
/// Semaforo x definire se sia gi� in modalit� ionterattiva o di prerendering
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>0.9.2511.0318</Version>
|
||||
<Version>0.9.2511.0718</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -17,7 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.315" />
|
||||
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.11.718" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2511.312" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2511.312" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.21" />
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -6,8 +6,15 @@
|
||||
}
|
||||
},
|
||||
"ServerConf": {
|
||||
"PubChannel": "EgwDevEngineInput",
|
||||
"SubChannel": "EgwDevEngineOutput",
|
||||
"Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api"
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,16 @@
|
||||
}
|
||||
},
|
||||
"ServerConf": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ServerConf": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
+16
-15
@@ -59,23 +59,24 @@
|
||||
"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",
|
||||
"HwOptChannel": "Egw:hw:opt",
|
||||
"ProfListChannel": "Egw:prof:list",
|
||||
"PubChannel": "EgwEngineInput",
|
||||
"ShapeChannel": "Egw:shape:curr",
|
||||
"SubChannel": "EgwEngineOutput",
|
||||
"PngChannel": "Egw:png:img",
|
||||
"SvgChannel": "Egw:svg:img",
|
||||
"UpdateChannel": "Egw:update",
|
||||
"ImageCalcTag": "svg-preview",
|
||||
"ImageFileTag": "svgfile",
|
||||
"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",
|
||||
"BaseUrl": "/lux/ui/"
|
||||
"BaseUrl": "/lux/ui/",
|
||||
"FileSharePath": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\LuxUploads"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 0.9.2511.0318</h4>
|
||||
<h4>Versione: 0.9.2511.0718</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2511.0318
|
||||
0.9.2511.0718
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2511.0318</version>
|
||||
<version>0.9.2511.0718</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user