pulizia + commento aree MpIocController (legacy)

This commit is contained in:
Samuele Locatelli
2026-06-09 15:17:43 +02:00
parent db7372b10a
commit 26ca34f99a
37 changed files with 92 additions and 113 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>8.16.2606.817</Version>
<Version>8.16.2606.915</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.2606.817</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.817
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.817</version>
<version>8.16.2606.915</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>
+56 -77
View File
@@ -24,21 +24,8 @@ namespace MP.Data.Controllers
IDbContextFactory<MoonProContext> ctxFactory,
IDbContextFactory<MoonPro_FluxContext> ctxFactoryFL)
{
#if false
_configuration = configuration;
#endif
_ctxFactory = ctxFactory;
_ctxFactoryFL = ctxFactoryFL;
#if false
string connStr = configuration.GetConnectionString("MP.Data");
options = new DbContextOptionsBuilder<MoonProContext>()
.UseSqlServer(connStr)
.Options;
string connStrFlux = configuration.GetConnectionString("MP.Flux");
optionsFlux = new DbContextOptionsBuilder<MoonPro_FluxContext>()
.UseSqlServer(connStrFlux)
.Options;
#endif
Log.Info("Avviata classe MpIocController");
}
@@ -500,9 +487,6 @@ namespace MP.Data.Controllers
// Update() allega l'entità e segna tutti i campi come Modified
dbCtx.DbSetMicroStatoMacc.Update(actRec);
#if false
dbCtx.Entry(actRec).State = EntityState.Modified;
#endif
}
// ora record EVList
@@ -540,6 +524,7 @@ namespace MP.Data.Controllers
.ToListAsync();
}
#if false
/// <summary>
/// Elenco ultimi n record flux log dato macchina e flusso (ordinato x data registrazione)
/// </summary>
@@ -560,7 +545,8 @@ namespace MP.Data.Controllers
.OrderByDescending(x => x.dtEvento)
.Take(MaxRec)
.ToListAsync();
}
}
#endif
/// <summary>
/// Aggiunta record FluxLog
@@ -574,7 +560,7 @@ namespace MP.Data.Controllers
var currRec = dbCtx
.DbSetFluxLog
.Add(newRec);
return await dbCtx.SaveChangesAsync()>0;
return await dbCtx.SaveChangesAsync() > 0;
}
@@ -597,6 +583,7 @@ namespace MP.Data.Controllers
return result > 0;
}
#if false
/// <summary>
/// Upsert record keepalive
/// </summary>
@@ -635,7 +622,7 @@ namespace MP.Data.Controllers
fatto = await dbCtx.SaveChangesAsync() > 0;
return fatto;
}
}
public async Task<List<LinkMenuModel>> ListLinkFiltAsync(string tipoLink)
{
@@ -856,6 +843,7 @@ namespace MP.Data.Controllers
return dbResult;
}
#endif
/// <summary>
/// Generazione automatica ODL
@@ -929,6 +917,7 @@ namespace MP.Data.Controllers
return answ;
}
#if false
/// <summary>
/// Fix ODL per macchine SLAVE
/// </summary>
@@ -949,7 +938,32 @@ namespace MP.Data.Controllers
.ExecuteSqlRawAsync("EXEC stp_ODL_fixMachineSlave @IdxMacchina, @NumDayPrev, @DoInsert", idxMaccParam, numDayPrevParam, doInsertParam);
return result != -1;
}
/// <summary>
/// Elenco ODL data macchina e periodo
/// </summary>
/// <param name="idxMacchina"></param>
/// <param name="dtStart"></param>
/// <param name="dtEnd"></param>
/// <returns></returns>
public async Task<List<ODLExpModel>> OdlListByMaccPeriodoAsync(string idxMacchina, DateTime dtStart, DateTime dtEnd)
{
List<ODLExpModel> dbResult = new List<ODLExpModel>();
using var dbCtx = _ctxFactory.CreateDbContext();
var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
var DataFrom = new SqlParameter("@dataFrom", dtStart);
var DataTo = new SqlParameter("@dataTo", dtEnd);
dbResult = await dbCtx
.DbSetODLExp
.FromSqlRaw("EXEC stp_ODL_getByMacchinaPeriodo @IdxMacchina, @dataFrom, @dataTo", IdxMacchina, DataFrom, DataTo)
.AsNoTracking()
.ToListAsync();
return dbResult;
}
#endif
/// <summary>
/// Fix ODL per macchine SLAVE Async
@@ -993,29 +1007,6 @@ namespace MP.Data.Controllers
return answ;
}
/// <summary>
/// Elenco ODL data macchina e periodo
/// </summary>
/// <param name="idxMacchina"></param>
/// <param name="dtStart"></param>
/// <param name="dtEnd"></param>
/// <returns></returns>
public async Task<List<ODLExpModel>> OdlListByMaccPeriodoAsync(string idxMacchina, DateTime dtStart, DateTime dtEnd)
{
List<ODLExpModel> dbResult = new List<ODLExpModel>();
using var dbCtx = _ctxFactory.CreateDbContext();
var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
var DataFrom = new SqlParameter("@dataFrom", dtStart);
var DataTo = new SqlParameter("@dataTo", dtEnd);
dbResult = await dbCtx
.DbSetODLExp
.FromSqlRaw("EXEC stp_ODL_getByMacchinaPeriodo @IdxMacchina, @dataFrom, @dataTo", IdxMacchina, DataFrom, DataTo)
.AsNoTracking()
.ToListAsync();
return dbResult;
}
/// <summary>
/// Conteggio PzProd Macchina Async
@@ -1131,27 +1122,6 @@ namespace MP.Data.Controllers
return result != 0;
}
/// <summary>
/// Update record Registro Dichiarazioni
/// </summary>
/// <param name="newRec"></param>
/// <returns></returns>
public async Task<bool> RegDichiarUpdateAsync(RegistroDichiarazioniModel newRec)
{
using var dbCtx = _ctxFactory.CreateDbContext();
var Original_IdxDich = new SqlParameter("@Original_IdxDich", newRec.IdxDich);
var DtRec = new SqlParameter("@DtRec", newRec.DtRec);
var TagCode = new SqlParameter("@TagCode", newRec.TagCode);
var ValString = new SqlParameter("@ValString", newRec.ValString);
var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr);
var result = await dbCtx
.Database
.ExecuteSqlRawAsync("exec dbo.stp_DD_updateQuery @Original_IdxDich, @DtRec, @TagCode, @ValString, @MatrOpr", Original_IdxDich, DtRec, TagCode, ValString, MatrOpr);
return result != 0;
}
/// <summary>
/// Aggiunta record RegistroScarti
/// </summary>
@@ -1222,6 +1192,28 @@ namespace MP.Data.Controllers
return fatto;
}
#if false
/// <summary>
/// Update record Registro Dichiarazioni
/// </summary>
/// <param name="newRec"></param>
/// <returns></returns>
public async Task<bool> RegDichiarUpdateAsync(RegistroDichiarazioniModel newRec)
{
using var dbCtx = _ctxFactory.CreateDbContext();
var Original_IdxDich = new SqlParameter("@Original_IdxDich", newRec.IdxDich);
var DtRec = new SqlParameter("@DtRec", newRec.DtRec);
var TagCode = new SqlParameter("@TagCode", newRec.TagCode);
var ValString = new SqlParameter("@ValString", newRec.ValString);
var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr);
var result = await dbCtx
.Database
.ExecuteSqlRawAsync("exec dbo.stp_DD_updateQuery @Original_IdxDich, @DtRec, @TagCode, @ValString, @MatrOpr", Original_IdxDich, DtRec, TagCode, ValString, MatrOpr);
return result != 0;
}
/// <summary>
/// Aggiunta record RemoteRebootLog
/// </summary>
@@ -1375,6 +1367,7 @@ namespace MP.Data.Controllers
return dbResult;
}
#endif
/// <summary>
/// Stato prod macchina (completo) Async
@@ -1458,23 +1451,9 @@ namespace MP.Data.Controllers
#endregion Public Methods
#region Private Fields
#if false
private static IConfiguration _configuration;
#endif
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#if false
private DbContextOptions<MoonProContext> options;
#endif
private DbContextOptions<MoonPro_FluxContext> optionsFlux;
#endregion Private Fields
#if false
public void Dispose()
{
_configuration = null;
}
#endif
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.INVE</RootNamespace>
<Version>8.16.2606.414</Version>
<Version>8.16.2606.915</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOINVE </i>
<h4>Versione: 8.16.2606.414</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.414
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.414</version>
<version>8.16.2606.915</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.2606.814</Version>
<Version>8.16.2606.915</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 8.16.2606.814</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.814
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.814</version>
<version>8.16.2606.915</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.2606.0414</Version>
<Version>8.16.2606.0915</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.2606.0414</h4>
<h4>Versione: 8.16.2606.0915</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.0414
8.16.2606.0915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.0414</version>
<version>8.16.2606.0915</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.2606.414</Version>
<Version>8.16.2606.915</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2606.414</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.414
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.414</version>
<version>8.16.2606.915</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.2606.0414</Version>
<Version>8.16.2606.0915</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 8.16.2606.0414</h4>
<h4>Versione: 8.16.2606.0915</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.0414
8.16.2606.0915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.0414</version>
<version>8.16.2606.0915</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.2606.414</Version>
<Version>8.16.2606.915</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-RIOC </i>
<h4>Versione: 8.16.2606.414</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.414
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.414</version>
<version>8.16.2606.915</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>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>8.16.2606.817</Version>
<Version>8.16.2606.915</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.2606.817</h4>
<h4>Versione: 8.16.2606.915</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.817
8.16.2606.915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.817</version>
<version>8.16.2606.915</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.2606.0414</Version>
<Version>8.16.2606.0915</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.2606.0414</h4>
<h4>Versione: 8.16.2606.0915</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.0414
8.16.2606.0915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.0414</version>
<version>8.16.2606.0915</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>