diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index 5b899582..236c15e4 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -2076,40 +2076,31 @@ namespace MP.Data.Controllers /// /// /// - public List OperatoriGetFilt(string codGruppo) + public async Task> OperatoriGetFiltAsync(string codGruppo) { List dbResult = new List(); - try + using var dbCtx = new MoonProContext(options); + if (codGruppo == "*") { - using (var dbCtx = new MoonProContext(options)) - { - if (codGruppo == "*") - { - dbResult = dbCtx - .DbOperatori - .AsNoTracking() - .OrderBy(x => x.MatrOpr) - .ToList(); - } - else - { - dbResult = dbCtx - .DbSetGrp2Oper - .Where(g => g.CodGruppo == codGruppo) - .Join(dbCtx.DbOperatori, - g => g.MatrOpr, - m => m.MatrOpr, - (g, m) => m - ) - .AsNoTracking() - .OrderBy(x => x.MatrOpr) - .ToList(); - } - } + dbResult = await dbCtx + .DbOperatori + .AsNoTracking() + .OrderBy(x => x.MatrOpr) + .ToListAsync(); } - catch (Exception exc) + else { - Log.Error($"Eccezione in OperatoriGetFilt{Environment.NewLine}{exc}"); + 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; } diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj index 763f7653..c0efe24e 100644 --- a/MP.INVE/MP.INVE.csproj +++ b/MP.INVE/MP.INVE.csproj @@ -5,7 +5,7 @@ enable enable MP.INVE - 8.16.2605.2812 + 8.16.2605.2813 diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 54e45418..4bee3c34 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 8.16.2605.2812

+

Versione: 8.16.2605.2813


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index 56b8c6b5..8607ff63 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 a246b3c4..ebb58f99 100644 --- a/MP.IOC/MP.IOC.csproj +++ b/MP.IOC/MP.IOC.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 8.16.2605.2812 + 8.16.2605.2813 diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html index 809025c0..35048e17 100644 --- a/MP.IOC/Resources/ChangeLog.html +++ b/MP.IOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-IOC -

    Versione: 8.16.2605.2812

    +

    Versione: 8.16.2605.2813


    Note di rilascio:
    • diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.IOC/Resources/VersNum.txt +++ b/MP.IOC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml index 5e69e8ec..f27bc7f5 100644 --- a/MP.IOC/Resources/manifest.xml +++ b/MP.IOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 fec65860..031dfb6e 100644 --- a/MP.Land/MP.Land.csproj +++ b/MP.Land/MP.Land.csproj @@ -3,7 +3,7 @@ net8.0 MP.Land - 8.16.2605.2812 + 8.16.2605.2813 Debug;Release;Debug_LiManDebug en True diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html index bce40d5e..8a6e8d56 100644 --- a/MP.Land/Resources/ChangeLog.html +++ b/MP.Land/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo Tablet MAPO - DotNet6 -

      Versione: 8.16.2605.2812

      +

      Versione: 8.16.2605.2813


      Note di rilascio:
        diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.Land/Resources/VersNum.txt +++ b/MP.Land/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml index d0ac5107..20889b50 100644 --- a/MP.Land/Resources/manifest.xml +++ b/MP.Land/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 077521b3..4785d316 100644 --- a/MP.MON/MP.MON.csproj +++ b/MP.MON/MP.MON.csproj @@ -6,7 +6,7 @@ enable MP.MON $(AssemblyName.Replace(' ', '_')) - 8.16.2605.2812 + 8.16.2605.2813 diff --git a/MP.MON/Resources/ChangeLog.html b/MP.MON/Resources/ChangeLog.html index c2315960..27cc5bf1 100644 --- a/MP.MON/Resources/ChangeLog.html +++ b/MP.MON/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

        Versione: 8.16.2605.2812

        +

        Versione: 8.16.2605.2813


        Note di rilascio:
        • diff --git a/MP.MON/Resources/VersNum.txt b/MP.MON/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.MON/Resources/VersNum.txt +++ b/MP.MON/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.MON/Resources/manifest.xml b/MP.MON/Resources/manifest.xml index 880b032e..b7f7a499 100644 --- a/MP.MON/Resources/manifest.xml +++ b/MP.MON/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 5e4cc6cb..6bdfd81f 100644 --- a/MP.Prog/MP.Prog.csproj +++ b/MP.Prog/MP.Prog.csproj @@ -3,7 +3,7 @@ net8.0 MP.Prog - 8.16.2605.2812 + 8.16.2605.2813 True diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html index 6a166642..6157c881 100644 --- a/MP.Prog/Resources/ChangeLog.html +++ b/MP.Prog/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo gestione Programmi MAPO -

          Versione: 8.16.2605.2812

          +

          Versione: 8.16.2605.2813


          Note di rilascio:
            diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.Prog/Resources/VersNum.txt +++ b/MP.Prog/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml index 1682cbce..fcda10d7 100644 --- a/MP.Prog/Resources/manifest.xml +++ b/MP.Prog/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 e4c6dc00..2d6e755f 100644 --- a/MP.RIOC/MP.RIOC.csproj +++ b/MP.RIOC/MP.RIOC.csproj @@ -5,7 +5,7 @@ enable enable MP.RIOC - 8.16.2605.2812 + 8.16.2605.2813 diff --git a/MP.RIOC/Resources/ChangeLog.html b/MP.RIOC/Resources/ChangeLog.html index d4fbb8ec..60808d02 100644 --- a/MP.RIOC/Resources/ChangeLog.html +++ b/MP.RIOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-RIOC -

            Versione: 8.16.2605.2812

            +

            Versione: 8.16.2605.2813


            Note di rilascio:
            • diff --git a/MP.RIOC/Resources/VersNum.txt b/MP.RIOC/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.RIOC/Resources/VersNum.txt +++ b/MP.RIOC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.RIOC/Resources/manifest.xml b/MP.RIOC/Resources/manifest.xml index 057cc8fa..3c7d9eba 100644 --- a/MP.RIOC/Resources/manifest.xml +++ b/MP.RIOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index a6d463ad..fb2caf8c 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -235,7 +235,7 @@ namespace MP.SPEC.Components selAzienda = await MDService.ConfigTryGetAsync("AZIENDA"); giacenzeConf = await MDService.ConfigTryGetAsync("SPEC_ShowGiacenze"); ListArticoli = await MDService.ArticoliGetSearchAsync(100000, "*", selAzienda, ""); - ListMacchine = MDService.MacchineGetFilt("*"); + ListMacchine = await MDService.MacchineGetFiltAsync("*"); await ReloadData(true); } diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs index 533f647a..582f189b 100644 --- a/MP.SPEC/Components/ListPODL.razor.cs +++ b/MP.SPEC/Components/ListPODL.razor.cs @@ -128,18 +128,18 @@ namespace MP.SPEC.Components await Task.Delay(1); } - protected void doShowRecipeArch(PODLExpModel selRec) + protected async Task doShowRecipeArch(PODLExpModel selRec) { currRecord = selRec; - currRecipeArchPath = MDService.MacchineRecipeArchive(selRec.IdxMacchina); + currRecipeArchPath = await MDService.MacchineRecipeArchiveAsync(selRec.IdxMacchina); showRecipeArch = true; showRecipeConf = false; } - protected void doShowRecipeConf(PODLExpModel selRec) + protected async Task doShowRecipeConf(PODLExpModel selRec) { currRecord = selRec; - currRecipePath = MDService.MacchineRecipeConf(selRec.IdxMacchina); + currRecipePath = await MDService.MacchineRecipeConfAsync(selRec.IdxMacchina); showRecipeArch = false; showRecipeConf = true; } diff --git a/MP.SPEC/Controllers/RecipeArchiveController.cs b/MP.SPEC/Controllers/RecipeArchiveController.cs index ca7352ce..31114e5c 100644 --- a/MP.SPEC/Controllers/RecipeArchiveController.cs +++ b/MP.SPEC/Controllers/RecipeArchiveController.cs @@ -28,7 +28,7 @@ namespace MP.SPEC.Controllers public async Task GetByPODL(string idxMacc, int idxPODL) { string answ = ""; - string archPath = DService.MacchineRecipeArchive(idxMacc); + string archPath = await DService.MacchineRecipeArchiveAsync(idxMacc); var podlData = await DService.POdlGetByKey(idxPODL); if (podlData != null) { @@ -43,10 +43,10 @@ namespace MP.SPEC.Controllers } [HttpGet("GetFile")] - public string GetFile(string idxMacc, string fileName) + public async Task GetFile(string idxMacc, string fileName) { string answ = ""; - string archPath = DService.MacchineRecipeArchive(idxMacc); + string archPath = await DService.MacchineRecipeArchiveAsync(idxMacc); if (!string.IsNullOrEmpty(archPath)) { string fullPath = Path.Combine(archPath, fileName); diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 533b6855..a54e488d 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -1349,43 +1349,6 @@ namespace MP.SPEC.Data return result; } - /// - /// Elenco di tutte le macchine filtrate x gruppo - /// - /// - /// - public List MacchineGetFilt(string codGruppo) - { - using var activity = ActivitySource.StartActivity("MacchineGetFilt"); - List? result = new List(); - string source = "DB"; - string keyGrp = codGruppo != "*" ? codGruppo : "ALL"; - string currKey = $"{Utils.redisMacList}:{keyGrp}"; - // cerco in redis dato valore sel idxMaccSel... - RedisValue rawData = redisDb.StringGet(currKey); - if (rawData.HasValue) - { - result = JsonConvert.DeserializeObject>($"{rawData}"); - source = "REDIS"; - } - else - { - result = dbController.MacchineGetFilt(codGruppo); - // serializzo e salvo... - rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); - } - if (result == null) - { - result = new List(); - } - activity?.SetTag("data.source", source); - activity?.SetTag("result.count", 1); - activity?.Stop(); - LogTrace($"MacchineGetFilt | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); - return result; - } - /// /// Elenco di tutte le macchine filtrate x gruppo /// @@ -1412,14 +1375,14 @@ namespace MP.SPEC.Data /// /// /// - public string MacchineRecipeArchive(string idxMacchina) + public async Task MacchineRecipeArchiveAsync(string idxMacchina) { - using var activity = ActivitySource.StartActivity("MacchineRecipeArchive"); + using var activity = ActivitySource.StartActivity("MacchineRecipeArchiveAsync"); string? result = ""; string source = "DB"; string currKey = $"{Utils.redisMacRecipePath}:{idxMacchina}"; // cerco in redis dato valore sel idxMaccSel... - RedisValue rawData = redisDb.StringGet(currKey); + RedisValue rawData = await redisDb.StringGetAsync(currKey); if (rawData.HasValue) { result = JsonConvert.DeserializeObject($"{rawData}"); @@ -1428,17 +1391,17 @@ namespace MP.SPEC.Data else { //recupero elenco macchine... - var machineList = MacchineGetFilt("*"); + var machineList = await MacchineGetFiltAsync("*"); var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault(); result = currMach != null ? currMach.RecipeArchivePath : null; // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); + await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache)); } activity?.SetTag("data.source", source); activity?.SetTag("result.count", 1); activity?.Stop(); - LogTrace($"MacchineRecipeArchive | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); + LogTrace($"MacchineRecipeArchiveAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); return result ?? ""; } @@ -1447,14 +1410,14 @@ namespace MP.SPEC.Data /// /// /// - public string MacchineRecipeConf(string idxMacchina) + public async Task MacchineRecipeConfAsync(string idxMacchina) { - using var activity = ActivitySource.StartActivity("MacchineRecipeConf"); + using var activity = ActivitySource.StartActivity("MacchineRecipeConfAsync"); string? result = ""; string source = "DB"; string currKey = $"{Utils.redisMacRecipeConf}:{idxMacchina}"; // cerco in redis dato valore sel idxMaccSel... - RedisValue rawData = redisDb.StringGet(currKey); + RedisValue rawData = await redisDb.StringGetAsync(currKey); if (rawData.HasValue) { result = JsonConvert.DeserializeObject($"{rawData}"); @@ -1463,17 +1426,17 @@ namespace MP.SPEC.Data else { //recupero elenco macchine... - var machineList = MacchineGetFilt("*"); + var machineList = await MacchineGetFiltAsync("*"); var currMach = machineList.Where(x => x.IdxMacchina == idxMacchina).FirstOrDefault(); result = currMach != null ? currMach.RecipePath : null; // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); + await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache)); } activity?.SetTag("data.source", source); activity?.SetTag("result.count", 1); activity?.Stop(); - LogTrace($"MacchineRecipeConf | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); + LogTrace($"MacchineRecipeConfAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); return result ?? ""; } @@ -1767,15 +1730,15 @@ namespace MP.SPEC.Data /// /// /// - public List OperatoriGetFilt(string codGruppo) + public async Task> OperatoriGetFiltAsync(string codGruppo) { - using var activity = ActivitySource.StartActivity("OperatoriGetFilt"); + using var activity = ActivitySource.StartActivity("OperatoriGetFiltAsync"); List? result = new List(); string source = "DB"; string keyGrp = codGruppo != "*" ? codGruppo : "ALL"; string currKey = $"{Utils.redisOprList}:{keyGrp}"; // cerco in redis dato valore sel idxMaccSel... - RedisValue rawData = redisDb.StringGet(currKey); + RedisValue rawData = await redisDb.StringGetAsync(currKey); if (rawData.HasValue) { result = JsonConvert.DeserializeObject>($"{rawData}"); @@ -1783,10 +1746,10 @@ namespace MP.SPEC.Data } else { - result = dbController.OperatoriGetFilt(codGruppo); + result = await dbController.OperatoriGetFiltAsync(codGruppo); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); + await redisDb.StringSetAsync(currKey, rawData, getRandTOut(redisLongTimeCache)); } if (result == null) { @@ -1794,7 +1757,7 @@ namespace MP.SPEC.Data } activity?.SetTag("result.count", result.Count); activity?.Stop(); - LogTrace($"OperatoriGetFilt | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); activity?.SetTag("data.source", source); + LogTrace($"OperatoriGetFiltAsync | Read from {source}: {activity?.Duration.TotalMilliseconds}ms"); activity?.SetTag("data.source", source); return result; } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 3b9749c9..c2064311 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 8.16.2605.2812 + 8.16.2605.2813 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/FluxLogStatus.razor.cs b/MP.SPEC/Pages/FluxLogStatus.razor.cs index 846ecdf1..1b0d3ff8 100644 --- a/MP.SPEC/Pages/FluxLogStatus.razor.cs +++ b/MP.SPEC/Pages/FluxLogStatus.razor.cs @@ -120,17 +120,17 @@ namespace MP.SPEC.Pages isReindexing = false; } - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { ReloadStats(); - ReloadData(); + await ReloadDataAsync(); } - protected void ReloadMacchine() + protected async Task ReloadMacchineAsync() { if (ListMacchineAll == null || ListMacchineAll.Count == 0) { - var rawData = MDataServ.MacchineGetFilt("*"); + var rawData = await MDataServ.MacchineGetFiltAsync("*"); // trasformo! if (rawData != null) { @@ -218,9 +218,9 @@ namespace MP.SPEC.Pages #region Private Methods - private void ReloadData() + private async Task ReloadDataAsync() { - ReloadMacchine(); + await ReloadMacchineAsync(); DateTime dtEnd = DateTime.Today.AddDays(1); DateTime dtStart = dtEnd.AddMonths(-1); CurrPeriodo = new Periodo(dtStart, dtEnd); diff --git a/MP.SPEC/Pages/GroupMacOprMan.razor.cs b/MP.SPEC/Pages/GroupMacOprMan.razor.cs index 8bd01f77..9e5c2bb1 100644 --- a/MP.SPEC/Pages/GroupMacOprMan.razor.cs +++ b/MP.SPEC/Pages/GroupMacOprMan.razor.cs @@ -1,8 +1,6 @@ -using DnsClient.Protocol; using Microsoft.AspNetCore.Components; using MP.Core.DTO; using MP.Data.DbModels; -using MP.Data.Services; using MP.SPEC.Data; namespace MP.SPEC.Pages @@ -24,13 +22,26 @@ namespace MP.SPEC.Pages [Inject] protected MpDataService MDService { get; set; } = null!; + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + ReloadDataAsync(); + } + } + } + #endregion Protected Properties #region Protected Methods protected override void OnInitialized() { - ReloadData(); + ReloadDataAsync(); } #endregion Protected Methods @@ -41,10 +52,17 @@ namespace MP.SPEC.Pages private bool isLoading = false; + private string searchVal = ""; + #endregion Private Fields #region Private Properties + private string btnSearchCss + { + get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary"; + } + private string CssMain { get => ShowDetail ? "col-3" : "col-12"; @@ -65,17 +83,22 @@ namespace MP.SPEC.Pages { CodGruppo = ""; } - ReloadData(); + ReloadDataAsync(); } - private void ReloadData() + private async Task ReloadBaseDataAsync() + { + ListMacchineAll = await MDService.MacchineGetFiltAsync("*"); + var listRaw = await MDService.OperatoriGetFiltAsync("*"); + ListOperatoriAll = listRaw.Where(x => x.isEnabled).ToList(); + } + + private async Task ReloadDataAsync() { isLoading = true; ListMacchine?.Clear(); - ListMacchineAll = MDService.MacchineGetFilt("*"); - ListOperatoriAll= MDService.OperatoriGetFilt("*").Where(x => x.isEnabled).ToList(); var rawList = MDService.ElencoRepartiDTO(); - if(string.IsNullOrEmpty(SearchVal)) + if (string.IsNullOrEmpty(SearchVal)) { ListReparti = rawList; } @@ -85,51 +108,33 @@ namespace MP.SPEC.Pages } if (!string.IsNullOrEmpty(CodGruppo)) { - ReloadDetail(); + await ReloadDetailAsync(); } isLoading = false; } - private void ReloadDetail() + private async Task ReloadDetailAsync() { if (!string.IsNullOrEmpty(CodGruppo)) { - ListMacchine = MDService.MacchineGetFilt(CodGruppo); - ListOperatori = MDService.OperatoriGetFilt(CodGruppo).Where(x => x.isEnabled).ToList(); + ListMacchine = await MDService.MacchineGetFiltAsync(CodGruppo); + ListOperatori = (await MDService.OperatoriGetFiltAsync(CodGruppo)) + .Where(x => x.isEnabled).ToList(); } } - private void SetCodGruppo(string CodGruppoSel) - { - isLoading = true; - CodGruppo = CodGruppoSel; - ReloadDetail(); - isLoading = false; - } - - private string btnSearchCss - { - get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary"; - } - private void ResetSearch() { SearchVal = ""; } - protected string SearchVal + private async Task SetCodGruppo(string CodGruppoSel) { - get => searchVal; - set - { - if (searchVal != value) - { - searchVal = value; - ReloadData(); - } - } + isLoading = true; + CodGruppo = CodGruppoSel; + await ReloadDetailAsync(); + isLoading = false; } - private string searchVal = ""; #endregion Private Methods } diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index 2b759d2d..af684446 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -111,7 +111,7 @@ namespace MP.SPEC.Pages ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList(); } ListStati = await MDService.AnagStatiCommAsync(); - ListMacchine = MDService.MacchineGetFilt(selReparto); + ListMacchine = await MDService.MacchineGetFiltAsync(selReparto); padCodXdl = await MDService.ConfigTryGetAsync("PadCodXdl"); } diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index c2315960..27cc5bf1 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

              Versione: 8.16.2605.2812

              +

              Versione: 8.16.2605.2813


              Note di rilascio:
              • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 82abe1dc..bc74aaa7 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 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 diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index cd1b64b0..c7bb86f3 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net8.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 8.16.2605.2812 + 8.16.2605.2813 true en diff --git a/MP.Stats/Resources/ChangeLog.html b/MP.Stats/Resources/ChangeLog.html index d9d4dbb0..685536af 100644 --- a/MP.Stats/Resources/ChangeLog.html +++ b/MP.Stats/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

                Versione: 8.16.2605.2812

                +

                Versione: 8.16.2605.2813


                Note di rilascio:
                  diff --git a/MP.Stats/Resources/VersNum.txt b/MP.Stats/Resources/VersNum.txt index 5f877377..44370d54 100644 --- a/MP.Stats/Resources/VersNum.txt +++ b/MP.Stats/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2605.2812 +8.16.2605.2813 diff --git a/MP.Stats/Resources/manifest.xml b/MP.Stats/Resources/manifest.xml index 8eb3c0dc..c19d4a3b 100644 --- a/MP.Stats/Resources/manifest.xml +++ b/MP.Stats/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2605.2812 + 8.16.2605.2813 https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html false diff --git a/Refactor_Plan.md b/Refactor_Plan.md index c4097387..b39f393f 100644 --- a/Refactor_Plan.md +++ b/Refactor_Plan.md @@ -42,6 +42,71 @@ I metodi verranno suddivisi in: - [x] `TksScoreAsync` - [x] `WipKitFiltAsync` - [x] `POdlGetByOdlAsync` +- [x] `FluxLogGetLastFiltAsync` +- [x] `FluxLogParetoAsync` +- [ ] `AnagEventiGeneral` +- [ ] `AnagEventiGetByMacch` +- [ ] `AnagKeyValGetAll` +- [ ] `AnagStatiComm` +- [ ] `AnagTipoArtLvAsync` +- [ ] `ArticleWithDossier` +- [ ] `ConfigGetAll` +- [ ] `DbDedupStats` +- [ ] `ElencoRepartiDTO` +- [ ] `ExpiryReloadParamGet` +- [ ] `IobInfo` +- [ ] `ListPODL_ByCodArt` +- [ ] `MacchineGetFilt` +- [ ] `MacchineRecipeArchive` +- [ ] `MacchineRecipeConf` +- [ ] `MachIobConf` +- [ ] `MseGetAll` +- [ ] `OdlByBatch` +- [ ] `OdlGetCurrentAsync` +- [ ] `OdlListGetFilt` +- [ ] `OperatoriGetFilt` +- [ ] `ParametriGetFilt` +- [ ] `POdlGetByKey` +- [ ] `POdlListByKitParent` +- [ ] `ProcFLStats` +- [ ] `StatoMacchina` +- [ ] `TagConfGetKey` +- [ ] `VocabolarioGetAll` + +#### Fase 3: Refactoring Metodi di Scrittura e Invalidazione +- [ ] `AnagGruppiDelete` +- [ ] `AnagGruppiUpsert` +- [ ] `ArticoliDeleteRecord` +- [ ] `ArticoliUpdateRecord` +- [ ] `ConfigResetCache` +- [ ] `DossiersDeleteRecord` +- [ ] `DossiersTakeParamsSnapshotLast` +- [ ] `IstKitDelete` +- [ ] `IstKitInsertByWKS` +- [ ] `IstKitUpsert` +- [ ] `PodlIstKitDelete` +- [ ] `POdlDoSetup` +- [ ] `POdlUpdateRecipe` +- [ ] `POdlUpdateRecord` +- [ ] `RecipeSetByPODL` +- [ ] `TemplateKitDelete` +- [ ] `TemplateKitUpsert` Fase 2: Refactoring Metodi di Lettura +- [x] `ActionGetReq` (Completato) +- [x] `TemplateKitFiltAsync` +- [x] `AnagTipoArtLvAsync` +- [x] `ElencoLinkAsync` +- [x] `ConfigGetAllAsync` +- [x] `DossiersGetLastFiltAsync` +- [x] `ElencoGruppiFaseAsync` +- [x] `IstKitFiltAsync` +- [x] `ListGiacenzeAsync` +- [x] `MacchineWithFluxAsync` +- [x] `POdlListGetFiltAsync` +- [x] `TksScoreAsync` +- [x] `WipKitFiltAsync` +- [x] `POdlGetByOdlAsync` +- [x] `FluxLogGetLastFiltAsync` +- [x] `FluxLogParetoAsync` - [ ] `AnagEventiGeneral` - [ ] `AnagEventiGetByMacch` - [ ] `AnagKeyValGetAll`