Update pagina composizione kit PODL

This commit is contained in:
Samuele Locatelli
2026-05-29 12:01:01 +02:00
parent af264a8922
commit 7de0f88b9e
41 changed files with 111 additions and 142 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+42 -57
View File
@@ -2646,26 +2646,21 @@ namespace MP.Data.Controllers
/// Elimina record
/// </summary>
/// <param name="rec2del"></param>
public bool WipKitDelete(WipSetupKitModel rec2del)
public async Task<bool> WipKitDeleteAsync(WipSetupKitModel rec2del)
{
bool fatto = false;
using (var dbCtx = new MoonProContext(options))
using var dbCtx = new MoonProContext(options);
var actRec = await dbCtx
.DbSetWipKit
.Where(x => x.KeyFilt == rec2del.KeyFilt && x.CodOrd == rec2del.CodOrd)
.FirstOrDefaultAsync();
// se ci fosse aggiorno...
if (actRec != null)
{
var actRec = dbCtx
.DbSetWipKit
.Where(x => x.KeyFilt == rec2del.KeyFilt && x.CodOrd == rec2del.CodOrd)
.FirstOrDefault();
// se ci fosse aggiorno...
if (actRec != null)
{
dbCtx
.DbSetWipKit
.Remove(actRec);
}
var res = dbCtx.SaveChanges();
fatto = res != 0;
dbCtx
.DbSetWipKit
.Remove(actRec);
}
return fatto;
return await dbCtx.SaveChangesAsync() > 0;
}
/// <summary>
@@ -2699,26 +2694,21 @@ namespace MP.Data.Controllers
/// </summary>
/// <param name="dateLimit"></param>
/// <returns></returns>
public bool WipKitDeleteOlder(DateTime dateLimit)
public async Task<bool> WipKitDeleteOlderAsync(DateTime dateLimit)
{
bool fatto = false;
using (var dbCtx = new MoonProContext(options))
{
var actRec = dbCtx
using var dbCtx = new MoonProContext(options);
var actRec = await dbCtx
.DbSetWipKit
.Where(x => x.DataIns < dateLimit)
.ToList();
// se ci fosse aggiorno...
if (actRec != null)
{
dbCtx
.DbSetWipKit
.RemoveRange(actRec);
}
var res = dbCtx.SaveChanges();
fatto = res != 0;
.ToListAsync();
// se ci fosse aggiorno...
if (actRec != null)
{
dbCtx
.DbSetWipKit
.RemoveRange(actRec);
}
return fatto;
return await dbCtx.SaveChangesAsync() > 0;
}
/// <summary>
@@ -2746,35 +2736,30 @@ namespace MP.Data.Controllers
/// Esegue upsert record
/// </summary>
/// <param name="editRec"></param>
public bool WipKitUpsert(WipSetupKitModel editRec)
public async Task<bool> WipKitUpsertAsync(WipSetupKitModel editRec)
{
bool fatto = false;
using (var dbCtx = new MoonProContext(options))
{
var actRec = dbCtx
using var dbCtx = new MoonProContext(options);
var actRec = await dbCtx
.DbSetWipKit
.Where(x => x.KeyFilt == editRec.KeyFilt && x.CodOrd == editRec.CodOrd)
.FirstOrDefault();
.FirstOrDefaultAsync();
// se ci fosse aggiorno...
if (actRec == null)
{
dbCtx
.DbSetWipKit
.Add(editRec);
}
else
{
actRec.CodArt = editRec.CodArt;
actRec.DescArt = editRec.DescArt;
actRec.Qta = editRec.Qta;
actRec.DataIns = editRec.DataIns;
dbCtx.Entry(actRec).State = EntityState.Modified;
}
var res = dbCtx.SaveChanges();
fatto = res != 0;
// se ci fosse aggiorno...
if (actRec == null)
{
dbCtx
.DbSetWipKit
.Add(editRec);
}
return fatto;
else
{
actRec.CodArt = editRec.CodArt;
actRec.DescArt = editRec.DescArt;
actRec.Qta = editRec.Qta;
actRec.DataIns = editRec.DataIns;
dbCtx.Entry(actRec).State = EntityState.Modified;
}
return await dbCtx.SaveChangesAsync() > 0;
}
#endregion Public Methods
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.INVE</RootNamespace>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOINVE </i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo Tablet MAPO - DotNet6</i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.MON</RootNamespace>
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Prog</RootNamespace>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.RIOC</RootNamespace>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-RIOC </i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
-27
View File
@@ -285,9 +285,6 @@ namespace MP.SPEC.Components
{
SearchRecords = rawList
.Where(x =>
//EF.Functions.Like(x.CodArticolo, actFilter.SearchVal) ||
//EF.Functions.Like(x.CodFase, actFilter.SearchVal) ||
//EF.Functions.Like(x.DescArticolo, actFilter.SearchVal)
x.CodArticolo.Contains(actFilter.SearchVal, StringComparison.InvariantCulture)
|| x.CodFase.Contains(actFilter.SearchVal, StringComparison.InvariantCulture)
|| x.DescArticolo.Contains(actFilter.SearchVal, StringComparison.InvariantCulture)
@@ -304,30 +301,6 @@ namespace MP.SPEC.Components
isLoading = false;
}
#if false
protected async Task ReloadData()
{
ListRecords = null;
isLoading = true;
await UpdateOdlList();
// verifico filtro odl...
if (actFilter.ShowKit)
{
SearchRecords = await MDService.POdlListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd);
}
else
{
SearchRecords = await MDService.POdlToKitListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd);
}
if (totalCount != SearchRecords.Count)
{
totalCount = SearchRecords.Count;
}
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
isLoading = false;
}
#endif
protected async Task resetSel(bool forceUpdate)
{
currRecord = null;
@@ -42,7 +42,7 @@ namespace MP.SPEC.Components.ProdKit
// elimino TUTTO...
DateTime dtLimit = DateTime.Now;//.AddHours(-1);
var done = MDService.WipKitDeleteOlder(dtLimit);
var done = await MDService.WipKitDeleteOlderAsync(dtLimit);
await EC_ListCleared.InvokeAsync(false);
}
@@ -51,18 +51,18 @@ namespace MP.SPEC.Components.ProdKit
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione riga KIT: sei sicuro di voler procedere?"))
return;
var done = MDService.WipKitDelete(rec2del);
var done = await MDService.WipKitDeleteAsync(rec2del);
await EC_ListUpdated.InvokeAsync(false);
}
protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
// calcolo codice temporaneo utente...da apertura KIT
if (string.IsNullOrEmpty(KeyFilt))
{
// elimino dati + vecchi di 2h...
DateTime dtLimit = DateTime.Now.AddHours(-2);
var done = MDService.WipKitDeleteOlder(dtLimit);
var done = await MDService.WipKitDeleteOlderAsync(dtLimit);
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ namespace MP.SPEC.Components.ProdKit
Qta = selRec.NumPezzi,
DataIns = DateTime.Now
};
bool fatto = MDService.WipKitUpsert(newRec);
bool fatto = await MDService.WipKitUpsertAsync(newRec);
// se non già impostato riporto impostazione filtro con macchina e gruppo ricevuto...
ActFilt.IdxMacchina = selRec.IdxMacchina;
ActFilt.CodReparto = selRec.CodGruppo;
+28 -17
View File
@@ -2251,18 +2251,21 @@ namespace MP.SPEC.Data
/// Elimina record + svuotamento cache
/// </summary>
/// <param name="currRecord"></param>
public bool WipKitDelete(WipSetupKitModel currRecord)
public async Task<bool> WipKitDeleteAsync(WipSetupKitModel currRecord)
{
using var activity = ActivitySource.StartActivity("WipKitDelete");
using var activity = ActivitySource.StartActivity("WipKitDeleteAsync");
string source = "DB";
bool fatto = false;
// salvo
fatto = dbController.WipKitDelete(currRecord);
fatto = await dbController.WipKitDeleteAsync(currRecord);
// svuoto cache
EmptyWipCache();
await FlushCacheByTagAsync(Utils.redisKitWip);
#if false
EmptyWipCache();
#endif
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"WipKitDelete Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
LogTrace($"WipKitDeleteAsync Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
return fatto;
}
@@ -2270,18 +2273,21 @@ namespace MP.SPEC.Data
/// Elimina i record più vecchi della data-ora indicata
/// </summary>
/// <param name="DateLimit"></param>
public bool WipKitDeleteOlder(DateTime DateLimit)
public async Task<bool> WipKitDeleteOlderAsync(DateTime DateLimit)
{
using var activity = ActivitySource.StartActivity("WipKitDeleteOlder");
using var activity = ActivitySource.StartActivity("WipKitDeleteOlderAsync");
string source = "DB";
bool fatto = false;
// salvo
fatto = dbController.WipKitDeleteOlder(DateLimit);
// svuoto cache
EmptyWipCache();
fatto = await dbController.WipKitDeleteOlderAsync(DateLimit);
// svuoto cache KitWip
await FlushCacheByTagAsync(Utils.redisKitWip);
#if false
EmptyWipCache();
#endif
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"WipKitDeleteOlder Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
LogTrace($"WipKitDeleteOlderAsync Read from {source}: {activity?.Duration.TotalMilliseconds}ms");
return fatto;
}
@@ -2306,18 +2312,21 @@ namespace MP.SPEC.Data
/// Esegue salvataggio record + svuotamento cache
/// </summary>
/// <param name="currRecord"></param>
public bool WipKitUpsert(WipSetupKitModel currRecord)
public async Task<bool> WipKitUpsertAsync(WipSetupKitModel currRecord)
{
using var activity = ActivitySource.StartActivity("WipKitUpsert");
using var activity = ActivitySource.StartActivity("WipKitUpsertAsync");
string source = "DB";
bool fatto = false;
// salvo
fatto = dbController.WipKitUpsert(currRecord);
fatto = await dbController.WipKitUpsertAsync(currRecord);
// svuoto cache KitWip
EmptyWipCache();
await FlushCacheByTagAsync(Utils.redisKitWip);
#if false
EmptyWipCache();
#endif
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"WipKitUpsert | {source} | {activity?.Duration.TotalMilliseconds}ms");
LogTrace($"WipKitUpsertAsync | {source} | {activity?.Duration.TotalMilliseconds}ms");
return fatto;
}
@@ -2472,6 +2481,7 @@ namespace MP.SPEC.Data
#region Private Methods
#if false
/// <summary>
/// Svuota cache creazione KIT
/// </summary>
@@ -2482,7 +2492,8 @@ namespace MP.SPEC.Data
{
ExecFlushRedisPattern(pattern);
}
}
}
#endif
/// <summary>
/// Verifica caricamento dizionario ConfigData
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>8.16.2605.2911</Version>
<Version>8.16.2605.2912</Version>
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2911</h4>
<h4>Versione: 8.16.2605.2912</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2911
8.16.2605.2912
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2911</version>
<version>8.16.2605.2912</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>8.16.2605.2909</Version>
<Version>8.16.2605.2911</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 8.16.2605.2909</h4>
<h4>Versione: 8.16.2605.2911</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2909
8.16.2605.2911
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2909</version>
<version>8.16.2605.2911</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>