diff --git a/MP.Data/Repository/Anag/AnagRepository.cs b/MP.Data/Repository/Anag/AnagRepository.cs index c68cd626..568a04d6 100644 --- a/MP.Data/Repository/Anag/AnagRepository.cs +++ b/MP.Data/Repository/Anag/AnagRepository.cs @@ -12,10 +12,16 @@ namespace MP.Data.Repository.Anag { public class AnagRepository : BaseRepository, IAnagRepository { + #region Public Constructors + public AnagRepository(IDbContextFactory ctxFactory) : base(ctxFactory) { } + #endregion Public Constructors + + #region Public Methods + /// public async Task AnagCountersGetNextAsync(string cntType) { @@ -189,20 +195,6 @@ namespace MP.Data.Repository.Anag return await ListValuesFiltAsync("AnagArticoli", "Tipo"); } -#if false - /// - public async Task> ArticleWithDossierAsync() - { - using var dbCtx = new MoonPro_FluxContext(_configuration); - return await dbCtx - .DbSetDossiers - .AsNoTracking() - .Select(i => i.CodArticolo) - .Distinct() - .ToListAsync(); - } -#endif - /// public async Task ArticoliCountAsync() { @@ -236,6 +228,19 @@ namespace MP.Data.Repository.Anag return await query.OrderBy(x => x.CodArticolo).CountAsync(); } + /// + public async Task ArticoliCountUsedAsync() + { + await using var dbCtx = await CreateContextAsync(); + var result = await dbCtx + .DbSetCounter + .FromSqlRaw("EXEC stp_ART_CountUsed") + .AsNoTracking() + .ToListAsync(); + + return result.FirstOrDefault()?.NumCount ?? 0; + } + /// public async Task ArticoliDeleteRecordAsync(AnagArticoliModel currRec) { @@ -380,6 +385,36 @@ namespace MP.Data.Repository.Anag } } + /// + public async Task> OperatoriGetFiltAsync(string codGruppo) + { + List dbResult = new List(); + 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; + } + /// public async Task> PODL_getDictOdlPodlAsync(List 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); } /// /// Recupero dizionario traduzioni da cache o DB + /// /// Codice lingua /// Dizionario di traduzioni @@ -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 } -} +} \ No newline at end of file diff --git a/MP.Data/Repository/Anag/IAnagRepository.cs b/MP.Data/Repository/Anag/IAnagRepository.cs index e817d469..695c1c7f 100644 --- a/MP.Data/Repository/Anag/IAnagRepository.cs +++ b/MP.Data/Repository/Anag/IAnagRepository.cs @@ -7,6 +7,8 @@ namespace MP.Data.Repository.Anag { public interface IAnagRepository { + #region Public Methods + /// /// Stacca un nuovo counter x il tipo richiesto /// @@ -32,7 +34,7 @@ namespace MP.Data.Repository.Anag /// Delete record AnagraficaGruppi /// /// Record da eliminare - /// True se l'eliminazione è avvenuta + /// True se l'eliminazione � avvenuta Task AnagGruppiDeleteAsync(AnagGruppiModel updRec); /// @@ -42,7 +44,7 @@ namespace MP.Data.Repository.Anag Task> AnagGruppiFaseAsync(); /// - /// Gruppi x tipo modalità Async + /// Gruppi x tipo modalit� Async /// /// Tipo di gruppo (es. REPARTO, FASE, AZIENDA) /// Lista di modelli anagrafica gruppi @@ -58,7 +60,7 @@ namespace MP.Data.Repository.Anag /// Upsert record AnagraficaGruppi (solo codice/descrizione) /// /// Record da inserire o aggiornare - /// True se l'operazione è riuscita + /// True se l'operazione � riuscita Task AnagGruppiUpsertAsync(AnagGruppiModel updRec); /// @@ -78,7 +80,7 @@ namespace MP.Data.Repository.Anag /// Elenco codice articoli che abbiano dati Dossier /// /// Lista di codici articolo - Task> ArticleWithDossierAsync(); + Task> ArticleWithDossierAsync(); #endif /// @@ -96,6 +98,12 @@ namespace MP.Data.Repository.Anag /// Conteggio risultati ricerca Task ArticoliCountSearchAsync(string tipoArt = "*", string azienda = "*", string searchVal = ""); + /// + /// Conteggio articoli IMPIEGATI (da stored stp_ART_getUsed) Async + /// + /// Conteggio articoli impiegati + Task ArticoliCountUsedAsync(); + /// /// Eliminazione Record Articolo /// @@ -128,13 +136,7 @@ namespace MP.Data.Repository.Anag Task> ArticoliGetUnusedAsync(); /// - /// Elenco tabella Articoli IMPIEGATI (da stored stp_ART_getUsed) Async - /// - /// Lista di articoli impiegati - Task> ArticoliGetUsedAsync(); - - /// - /// Elenco Articoli che sono in KIT Child + /// Dizionario associazione ODL/PODL /// /// Lista di articoli in kit Task> ArticoliInKitAsync(); @@ -168,6 +170,13 @@ namespace MP.Data.Repository.Anag /// Lista di macchine Task> MacchineGetFiltAsync(string codGruppo); + /// + /// Elenco operatori dato filtro gruppo + /// + /// Codice gruppo + /// Lista di operatori + Task> OperatoriGetFiltAsync(string codGruppo); + /// /// Dizionario associazione ODL/PODL /// @@ -182,5 +191,6 @@ namespace MP.Data.Repository.Anag /// Dizionario di traduzioni Task> VocabolarioGetLangAsync(string lingua); + #endregion Public Methods } -} +} \ No newline at end of file diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index c5a7f331..4998857b 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 8.16.2606.113 + 8.16.2606.118 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 19fc2e90..937bfdaf 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 8.16.2606.113

+

Versione: 8.16.2606.118


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 142014de..515eeea2 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.113 +8.16.2606.118 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 4c8d4a7e..84d88c29 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.113 + 8.16.2606.118 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj index 892725f7..727fa0fb 100644 --- a/MP.IOC/MP.IOC.csproj +++ b/MP.IOC/MP.IOC.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 8.16.2606.116 + 8.16.2606.118 diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html index 793b3777..9e4106d9 100644 --- a/MP.IOC/Resources/ChangeLog.html +++ b/MP.IOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-IOC -

    Versione: 8.16.2606.116

    +

    Versione: 8.16.2606.118


    Note di rilascio:
    • diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt index 87293708..515eeea2 100644 --- a/MP.IOC/Resources/VersNum.txt +++ b/MP.IOC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.116 +8.16.2606.118 diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml index 4818c638..1c26c859 100644 --- a/MP.IOC/Resources/manifest.xml +++ b/MP.IOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.116 + 8.16.2606.118 https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html false diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj index fa1991a8..509dc1ba 100644 --- a/MP.Land/MP.Land.csproj +++ b/MP.Land/MP.Land.csproj @@ -3,7 +3,7 @@ net8.0 MP.Land - 8.16.2606.0113 + 8.16.2606.0118 Debug;Release;Debug_LiManDebug en True diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html index fa3e2870..0dc5539b 100644 --- a/MP.Land/Resources/ChangeLog.html +++ b/MP.Land/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo Tablet MAPO - DotNet6 -

      Versione: 8.16.2606.0113

      +

      Versione: 8.16.2606.0118


      Note di rilascio:
        diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt index 5e53158e..9a5e6157 100644 --- a/MP.Land/Resources/VersNum.txt +++ b/MP.Land/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.0113 +8.16.2606.0118 diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml index 44a961c6..02892851 100644 --- a/MP.Land/Resources/manifest.xml +++ b/MP.Land/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.0113 + 8.16.2606.0118 https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html false diff --git a/MP.MON/MP.MON.csproj b/MP.MON/MP.MON.csproj index 7c5b2eeb..a22e68ad 100644 --- a/MP.MON/MP.MON.csproj +++ b/MP.MON/MP.MON.csproj @@ -6,7 +6,7 @@ enable MP.MON $(AssemblyName.Replace(' ', '_')) - 8.16.2606.113 + 8.16.2606.118 diff --git a/MP.MON/Resources/ChangeLog.html b/MP.MON/Resources/ChangeLog.html index 91e3fb3c..093f0774 100644 --- a/MP.MON/Resources/ChangeLog.html +++ b/MP.MON/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

        Versione: 8.16.2606.113

        +

        Versione: 8.16.2606.118


        Note di rilascio:
        • diff --git a/MP.MON/Resources/VersNum.txt b/MP.MON/Resources/VersNum.txt index 142014de..515eeea2 100644 --- a/MP.MON/Resources/VersNum.txt +++ b/MP.MON/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.113 +8.16.2606.118 diff --git a/MP.MON/Resources/manifest.xml b/MP.MON/Resources/manifest.xml index ab4aa2e7..9b559a4d 100644 --- a/MP.MON/Resources/manifest.xml +++ b/MP.MON/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.113 + 8.16.2606.118 https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html false diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj index 91c9f10d..9bed72f0 100644 --- a/MP.Prog/MP.Prog.csproj +++ b/MP.Prog/MP.Prog.csproj @@ -3,7 +3,7 @@ net8.0 MP.Prog - 8.16.2606.0113 + 8.16.2606.0118 True diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html index 4dfd359b..cbb1a653 100644 --- a/MP.Prog/Resources/ChangeLog.html +++ b/MP.Prog/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo gestione Programmi MAPO -

          Versione: 8.16.2606.0113

          +

          Versione: 8.16.2606.0118


          Note di rilascio:
            diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt index 5e53158e..9a5e6157 100644 --- a/MP.Prog/Resources/VersNum.txt +++ b/MP.Prog/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.0113 +8.16.2606.0118 diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml index 6325cd45..4b843e6e 100644 --- a/MP.Prog/Resources/manifest.xml +++ b/MP.Prog/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.0113 + 8.16.2606.0118 https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html false diff --git a/MP.RIOC/MP.RIOC.csproj b/MP.RIOC/MP.RIOC.csproj index 1f7aa719..f32af328 100644 --- a/MP.RIOC/MP.RIOC.csproj +++ b/MP.RIOC/MP.RIOC.csproj @@ -5,7 +5,7 @@ enable enable MP.RIOC - 8.16.2606.113 + 8.16.2606.118 diff --git a/MP.RIOC/Resources/ChangeLog.html b/MP.RIOC/Resources/ChangeLog.html index e367897f..f9feea47 100644 --- a/MP.RIOC/Resources/ChangeLog.html +++ b/MP.RIOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-RIOC -

            Versione: 8.16.2606.113

            +

            Versione: 8.16.2606.118


            Note di rilascio:
            • diff --git a/MP.RIOC/Resources/VersNum.txt b/MP.RIOC/Resources/VersNum.txt index 142014de..515eeea2 100644 --- a/MP.RIOC/Resources/VersNum.txt +++ b/MP.RIOC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.113 +8.16.2606.118 diff --git a/MP.RIOC/Resources/manifest.xml b/MP.RIOC/Resources/manifest.xml index c0386092..c9f0e54b 100644 --- a/MP.RIOC/Resources/manifest.xml +++ b/MP.RIOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.113 + 8.16.2606.118 https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html false diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 98dcf7d9..7c7b2789 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 8.16.2606.116 + 8.16.2606.118 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 3f744dfc..093f0774 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

              Versione: 8.16.2606.116

              +

              Versione: 8.16.2606.118


              Note di rilascio:
              • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 87293708..515eeea2 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.116 +8.16.2606.118 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a0393e81..f23654c5 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.116 + 8.16.2606.118 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false