Continuo spostamento metodi nel repository Anag
This commit is contained in:
@@ -12,10 +12,16 @@ namespace MP.Data.Repository.Anag
|
||||
{
|
||||
public class AnagRepository : BaseRepository, IAnagRepository
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public AnagRepository(IDbContextFactory<MoonProContext> ctxFactory) : base(ctxFactory)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<AnagCountersModel> AnagCountersGetNextAsync(string cntType)
|
||||
{
|
||||
@@ -189,20 +195,6 @@ namespace MP.Data.Repository.Anag
|
||||
return await ListValuesFiltAsync("AnagArticoli", "Tipo");
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <inheritdoc />
|
||||
public async Task<List<string>> ArticleWithDossierAsync()
|
||||
{
|
||||
using var dbCtx = new MoonPro_FluxContext(_configuration);
|
||||
return await dbCtx
|
||||
.DbSetDossiers
|
||||
.AsNoTracking()
|
||||
.Select(i => i.CodArticolo)
|
||||
.Distinct()
|
||||
.ToListAsync();
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<int> ArticoliCountAsync()
|
||||
{
|
||||
@@ -236,6 +228,19 @@ namespace MP.Data.Repository.Anag
|
||||
return await query.OrderBy(x => x.CodArticolo).CountAsync();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<int> ArticoliCountUsedAsync()
|
||||
{
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
var result = await dbCtx
|
||||
.DbSetCounter
|
||||
.FromSqlRaw("EXEC stp_ART_CountUsed")
|
||||
.AsNoTracking()
|
||||
.ToListAsync();
|
||||
|
||||
return result.FirstOrDefault()?.NumCount ?? 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<bool> ArticoliDeleteRecordAsync(AnagArticoliModel currRec)
|
||||
{
|
||||
@@ -380,6 +385,36 @@ namespace MP.Data.Repository.Anag
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<List<AnagOperatoriModel>> OperatoriGetFiltAsync(string codGruppo)
|
||||
{
|
||||
List<AnagOperatoriModel> dbResult = new List<AnagOperatoriModel>();
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
if (codGruppo == "*")
|
||||
{
|
||||
dbResult = await dbCtx
|
||||
.DbOperatori
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = await dbCtx
|
||||
.DbSetGrp2Oper
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbOperatori,
|
||||
g => g.MatrOpr,
|
||||
m => m.MatrOpr,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.MatrOpr)
|
||||
.ToListAsync();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Dictionary<int, int>> PODL_getDictOdlPodlAsync(List<int> missingIds)
|
||||
{
|
||||
@@ -388,14 +423,15 @@ namespace MP.Data.Repository.Anag
|
||||
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
return await dbCtx
|
||||
.DbSetPODL
|
||||
.AsNoTracking()
|
||||
.Where(x => missingIds.Contains(x.IdxOdl))
|
||||
.ToDictionaryAsync(x => x.IdxOdl, x => x.IdxPromessa);
|
||||
.DbSetPODL
|
||||
.AsNoTracking()
|
||||
.Where(x => missingIds.Contains(x.IdxOdl))
|
||||
.ToDictionaryAsync(x => x.IdxOdl, x => x.IdxPromessa);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero dizionario traduzioni da cache o DB
|
||||
|
||||
/// </summary>
|
||||
/// <param name="lingua">Codice lingua</param>
|
||||
/// <returns>Dizionario di traduzioni</returns>
|
||||
@@ -413,5 +449,7 @@ namespace MP.Data.Repository.Anag
|
||||
.DistinctBy(t => t.Lemma, StringComparer.OrdinalIgnoreCase)
|
||||
.ToDictionary(t => t.Lemma, t => t.Traduzione, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ namespace MP.Data.Repository.Anag
|
||||
{
|
||||
public interface IAnagRepository
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Stacca un nuovo counter x il tipo richiesto
|
||||
/// </summary>
|
||||
@@ -32,7 +34,7 @@ namespace MP.Data.Repository.Anag
|
||||
/// Delete record AnagraficaGruppi
|
||||
/// </summary>
|
||||
/// <param name="updRec">Record da eliminare</param>
|
||||
/// <returns>True se l'eliminazione è avvenuta</returns>
|
||||
/// <returns>True se l'eliminazione � avvenuta</returns>
|
||||
Task<bool> AnagGruppiDeleteAsync(AnagGruppiModel updRec);
|
||||
|
||||
/// <summary>
|
||||
@@ -42,7 +44,7 @@ namespace MP.Data.Repository.Anag
|
||||
Task<List<AnagGruppiModel>> AnagGruppiFaseAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Gruppi x tipo modalità Async
|
||||
/// Gruppi x tipo modalit� Async
|
||||
/// </summary>
|
||||
/// <param name="tipoGruppo">Tipo di gruppo (es. REPARTO, FASE, AZIENDA)</param>
|
||||
/// <returns>Lista di modelli anagrafica gruppi</returns>
|
||||
@@ -58,7 +60,7 @@ namespace MP.Data.Repository.Anag
|
||||
/// Upsert record AnagraficaGruppi (solo codice/descrizione)
|
||||
/// </summary>
|
||||
/// <param name="updRec">Record da inserire o aggiornare</param>
|
||||
/// <returns>True se l'operazione è riuscita</returns>
|
||||
/// <returns>True se l'operazione � riuscita</returns>
|
||||
Task<bool> AnagGruppiUpsertAsync(AnagGruppiModel updRec);
|
||||
|
||||
/// <summary>
|
||||
@@ -78,7 +80,7 @@ namespace MP.Data.Repository.Anag
|
||||
/// Elenco codice articoli che abbiano dati Dossier
|
||||
/// </summary>
|
||||
/// <returns>Lista di codici articolo</returns>
|
||||
Task<List<string>> ArticleWithDossierAsync();
|
||||
Task<List<string>> ArticleWithDossierAsync();
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
@@ -96,6 +98,12 @@ namespace MP.Data.Repository.Anag
|
||||
/// <returns>Conteggio risultati ricerca</returns>
|
||||
Task<int> ArticoliCountSearchAsync(string tipoArt = "*", string azienda = "*", string searchVal = "");
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio articoli IMPIEGATI (da stored stp_ART_getUsed) Async
|
||||
/// </summary>
|
||||
/// <returns>Conteggio articoli impiegati</returns>
|
||||
Task<int> ArticoliCountUsedAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione Record Articolo
|
||||
/// </summary>
|
||||
@@ -128,13 +136,7 @@ namespace MP.Data.Repository.Anag
|
||||
Task<List<AnagArticoliModel>> ArticoliGetUnusedAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco tabella Articoli IMPIEGATI (da stored stp_ART_getUsed) Async
|
||||
/// </summary>
|
||||
/// <returns>Lista di articoli impiegati</returns>
|
||||
Task<List<AnagArticoliModel>> ArticoliGetUsedAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Articoli che sono in KIT Child
|
||||
/// Dizionario associazione ODL/PODL
|
||||
/// </summary>
|
||||
/// <returns>Lista di articoli in kit</returns>
|
||||
Task<List<AnagArticoliModel>> ArticoliInKitAsync();
|
||||
@@ -168,6 +170,13 @@ namespace MP.Data.Repository.Anag
|
||||
/// <returns>Lista di macchine</returns>
|
||||
Task<List<MacchineModel>> MacchineGetFiltAsync(string codGruppo);
|
||||
|
||||
/// <summary>
|
||||
/// Elenco operatori dato filtro gruppo
|
||||
/// </summary>
|
||||
/// <param name="codGruppo">Codice gruppo</param>
|
||||
/// <returns>Lista di operatori</returns>
|
||||
Task<List<AnagOperatoriModel>> OperatoriGetFiltAsync(string codGruppo);
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario associazione ODL/PODL
|
||||
/// </summary>
|
||||
@@ -182,5 +191,6 @@ namespace MP.Data.Repository.Anag
|
||||
/// <returns>Dizionario di traduzioni</returns>
|
||||
Task<Dictionary<string, string>> VocabolarioGetLangAsync(string lingua);
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>8.16.2606.113</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 8.16.2606.113</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.113
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.113</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>8.16.2606.116</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: 8.16.2606.116</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.116
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.116</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Land</RootNamespace>
|
||||
<Version>8.16.2606.0113</Version>
|
||||
<Version>8.16.2606.0118</Version>
|
||||
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo Tablet MAPO - DotNet6</i>
|
||||
<h4>Versione: 8.16.2606.0113</h4>
|
||||
<h4>Versione: 8.16.2606.0118</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.0113
|
||||
8.16.2606.0118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.0113</version>
|
||||
<version>8.16.2606.0118</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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.MON</RootNamespace>
|
||||
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
|
||||
<Version>8.16.2606.113</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2606.113</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.113
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.113</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>8.16.2606.0113</Version>
|
||||
<Version>8.16.2606.0118</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 8.16.2606.0113</h4>
|
||||
<h4>Versione: 8.16.2606.0118</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.0113
|
||||
8.16.2606.0118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.0113</version>
|
||||
<version>8.16.2606.0118</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>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.RIOC</RootNamespace>
|
||||
<Version>8.16.2606.113</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-RIOC </i>
|
||||
<h4>Versione: 8.16.2606.113</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.113
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.113</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>8.16.2606.116</Version>
|
||||
<Version>8.16.2606.118</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2606.116</h4>
|
||||
<h4>Versione: 8.16.2606.118</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2606.116
|
||||
8.16.2606.118
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2606.116</version>
|
||||
<version>8.16.2606.118</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>
|
||||
|
||||
Reference in New Issue
Block a user