diff --git a/MP.Data/Repository/Production/IProductionRepository.cs b/MP.Data/Repository/Production/IProductionRepository.cs index 7089a4de..bd63f48b 100644 --- a/MP.Data/Repository/Production/IProductionRepository.cs +++ b/MP.Data/Repository/Production/IProductionRepository.cs @@ -31,7 +31,7 @@ namespace MP.Data.Repository.Production Task> ListPODL_ByKitParentAsync(int IdxPodlParent); - Task> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate); + Task> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive); Task PODL_getByKeyAsync(int idxPODL); diff --git a/MP.Data/Repository/Production/ProductionRepository.cs b/MP.Data/Repository/Production/ProductionRepository.cs index ec051504..af6ce0d3 100644 --- a/MP.Data/Repository/Production/ProductionRepository.cs +++ b/MP.Data/Repository/Production/ProductionRepository.cs @@ -187,7 +187,7 @@ namespace MP.Data.Repository.Production } /// - public async Task> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate) + public async Task> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive) { await using var dbCtx = await GetMoonProContextAsync(); var Lanc = new SqlParameter("@Lanciato", lanciato); @@ -196,10 +196,12 @@ namespace MP.Data.Repository.Production var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina); var DateFrom = new SqlParameter("@DtInizio", startDate); var DateTo = new SqlParameter("@DtFine", endDate); + // chiede tutte (NON solo attive) + var pFlagAtt = new SqlParameter("@flgAttive", flagAttive); return await dbCtx .DbSetPODLExp - .FromSqlRaw("EXEC stp_PODL_getByFiltSpecKit @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo) + .FromSqlRaw("EXEC stp_PODL_getByFiltSpecKit @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine, @flgAttive", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo, pFlagAtt) .AsNoTracking() .ToListAsync(); } diff --git a/MP.IOC/Data/MpDataService.cs b/MP.IOC/Data/MpDataService.cs index e8cde00d..603f52a0 100644 --- a/MP.IOC/Data/MpDataService.cs +++ b/MP.IOC/Data/MpDataService.cs @@ -79,10 +79,6 @@ namespace MP.IOC.Data } else { -#if false - SpecDbController = new MpSpecController(configuration); - IocDbController = new MpIocController(configuration); -#endif Log.Info("DbControllers INIT OK"); } @@ -108,9 +104,6 @@ namespace MP.IOC.Data public static MpMongoController mongoController { get; set; } = null!; public static MpIocController IocDbController { get; set; } = null!; -#if false - public static MpSpecController SpecDbController { get; set; } = null!; -#endif public MessagePipe BroadastMsgPipe { get; set; } = null!; /// @@ -567,15 +560,6 @@ namespace MP.IOC.Data updDict.Add(taskType.setArt, setArtVal); updDict.Add(taskType.setComm, setCommVal); updDict.Add(taskType.setPzComm, setPzCommVal); -#if false - addTask4Machine(idxMacchina, taskType.setArt, setArtVal); - addTask4Machine(idxMacchina, taskType.setComm, setCommVal); - addTask4Machine(idxMacchina, taskType.setPzComm, setPzCommVal); - - updateMachineParameter(idxMacchina, "setArt", setArtVal); - updateMachineParameter(idxMacchina, "setComm", setCommVal); - updateMachineParameter(idxMacchina, "setPzComm", setPzCommVal); -#endif // recupero set attuale parametri var currMachPar = await MachineParamListAsync(idxMacchina); List list2upd = new(); @@ -620,20 +604,6 @@ namespace MP.IOC.Data updDict.Add(taskType.setArt, setArtVal); updDict.Add(taskType.setComm, setCommVal); updDict.Add(taskType.setPzComm, setPzCommVal); - -#if false - addTask4Machine(machine.IdxMacchinaSlave, taskType.fixStopSetup, outData); - addTask4Machine(machine.IdxMacchinaSlave, taskType.forceResetPzCount, outData); - // invio task caricamento dati ODL - addTask4Machine(machine.IdxMacchinaSlave, taskType.setArt, setArtVal); - addTask4Machine(machine.IdxMacchinaSlave, taskType.setComm, setCommVal); - addTask4Machine(machine.IdxMacchinaSlave, taskType.setPzComm, setPzCommVal); - - updateMachineParameter(machine.IdxMacchinaSlave, "setArt", setArtVal); - updateMachineParameter(machine.IdxMacchinaSlave, "setComm", setCommVal); - updateMachineParameter(machine.IdxMacchinaSlave, "setPzComm", setPzCommVal); -#endif - // recupero set attuale parametri var currMachPar = await MachineParamListAsync(machine.IdxMacchinaSlave); List list2upd = new(); @@ -1847,18 +1817,6 @@ namespace MP.IOC.Data public bool RedisDelKey(string keyVal) { bool answ = redisDb.KeyDelete((RedisKey)keyVal); -#if false - var listEndpoints = redisConnAdmin.GetEndPoints(); - foreach (var endPoint in listEndpoints) - { - var server = redisConnAdmin.GetServer(endPoint); - if (server != null) - { - redisDb.KeyDelete((RedisKey)keyVal); - answ = true; - } - } -#endif return answ; } @@ -2468,32 +2426,22 @@ namespace MP.IOC.Data public List Macchine2SlaveGetAll() { List? result = new List(); - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - string readType = "DB"; string currKey = $"{Utils.redisBaseAddr}:M2STab"; - // cerco in redis dato valore sel macchina... RedisValue rawData = redisDb.StringGet(currKey); if (rawData.HasValue) { - result = JsonConvert.DeserializeObject>($"{rawData}"); - readType = "REDIS"; + result = JsonConvert.DeserializeObject>(rawData); } else { +#if false result = IocDbController.Macchine2Slave(); - // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache)); - } - if (result == null) - { +#endif result = new List(); } - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"Macchine2SlaveGetAll | Read from {readType}: {ts.TotalMilliseconds}ms"); - return result; + return result ?? new List(); } #endif private readonly IServiceScopeFactory _scopeFactory; diff --git a/MP.IOC/MP.IOC.csproj b/MP.IOC/MP.IOC.csproj index 7d6ad91d..cb98ffff 100644 --- a/MP.IOC/MP.IOC.csproj +++ b/MP.IOC/MP.IOC.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 8.16.2606.418 + 8.16.2606.814 diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html index 15b8247b..15b937b4 100644 --- a/MP.IOC/Resources/ChangeLog.html +++ b/MP.IOC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MP-IOC -

Versione: 8.16.2606.418

+

Versione: 8.16.2606.814


Note di rilascio:
  • diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt index 6f29df3a..52c9da08 100644 --- a/MP.IOC/Resources/VersNum.txt +++ b/MP.IOC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.418 +8.16.2606.814 diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml index 9befa85e..2df78cf9 100644 --- a/MP.IOC/Resources/manifest.xml +++ b/MP.IOC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.418 + 8.16.2606.814 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.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs index f65ba554..c3bc9616 100644 --- a/MP.SPEC/Components/ListPARAMS.razor.cs +++ b/MP.SPEC/Components/ListPARAMS.razor.cs @@ -160,7 +160,6 @@ namespace MP.SPEC.Components protected override async Task OnParametersSetAsync() { - await Task.Delay(1); // se sono cambiati --> rileggo... if (!lastFilter.Equals(SelFilter)) { diff --git a/MP.SPEC/Components/ListPODL.razor.cs b/MP.SPEC/Components/ListPODL.razor.cs index 0dca5e88..0fca285a 100644 --- a/MP.SPEC/Components/ListPODL.razor.cs +++ b/MP.SPEC/Components/ListPODL.razor.cs @@ -91,7 +91,7 @@ namespace MP.SPEC.Components ///
/// /// - protected bool CheckIsKit(string CodArticolo) + private bool CheckIsKit(string CodArticolo) { bool answ = false; if (ListArtKit != null && ListArtKit.Count > 0) @@ -101,7 +101,7 @@ namespace MP.SPEC.Components return answ; } - protected async Task cloneRecord(PODLExpModel selRec) + private async Task cloneRecord(PODLExpModel selRec) { currRecord = null; // clono resettando ODL @@ -116,7 +116,7 @@ namespace MP.SPEC.Components /// /// /// - protected async Task deleteRecord(PODLExpModel selRec) + private async Task deleteRecord(PODLExpModel selRec) { if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Record: sei sicuro di voler procedere?")) return; @@ -128,7 +128,7 @@ namespace MP.SPEC.Components await Task.Delay(1); } - protected async Task doShowRecipeArch(PODLExpModel selRec) + private async Task doShowRecipeArch(PODLExpModel selRec) { currRecord = selRec; currRecipeArchPath = await MDService.MacchineRecipeArchiveAsync(selRec.IdxMacchina); @@ -136,7 +136,7 @@ namespace MP.SPEC.Components showRecipeConf = false; } - protected async Task doShowRecipeConf(PODLExpModel selRec) + private async Task doShowRecipeConf(PODLExpModel selRec) { currRecord = selRec; currRecipePath = await MDService.MacchineRecipeConfAsync(selRec.IdxMacchina); @@ -144,14 +144,14 @@ namespace MP.SPEC.Components showRecipeConf = true; } - protected async Task editRecord(PODLExpModel? selRec) + private async Task editRecord(PODLExpModel? selRec) { currRecord = selRec; header = "Modifica PODL"; await RecordEdit.InvokeAsync(selRec); } - protected async Task KitToggleDetailAsync(PODLExpModel? recSel) + private async Task KitToggleDetailAsync(PODLExpModel? recSel) { if (recSel != null) { @@ -270,7 +270,7 @@ namespace MP.SPEC.Components } else { - searchTask = MDService.POdlToKitListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd); + searchTask = MDService.POdlToKitListGetFiltAsync(hasOdl, StatoSel, macchina, reparto, selDtStart, selDtEnd, false); } // ✅ aspetta tutto insieme diff --git a/MP.SPEC/Components/ParamsFilter.razor b/MP.SPEC/Components/ParamsFilter.razor index 60bfd4ab..aeb5bbf9 100644 --- a/MP.SPEC/Components/ParamsFilter.razor +++ b/MP.SPEC/Components/ParamsFilter.razor @@ -70,7 +70,7 @@
- @if (ListMacchine != null) { @@ -102,21 +102,21 @@
- +
- +
- @@ -129,7 +129,7 @@
- diff --git a/MP.SPEC/Components/ParamsFilter.razor.cs b/MP.SPEC/Components/ParamsFilter.razor.cs index 8b3c784d..0d1f6db4 100644 --- a/MP.SPEC/Components/ParamsFilter.razor.cs +++ b/MP.SPEC/Components/ParamsFilter.razor.cs @@ -40,7 +40,7 @@ namespace MP.SPEC.Components snapshotDone = false; aTimer.Stop(); aTimer.Enabled = false; - //reportChange(); + //ReportChangeAsync(); var pUpd = Task.Run(async () => { await Task.Delay(1); @@ -71,7 +71,7 @@ namespace MP.SPEC.Components { SelFilter.CurrPage = 0; } - reportChange(); + //ReportChangeAsync(); } } } @@ -91,12 +91,13 @@ namespace MP.SPEC.Components { SelFilter.CurrPage = 1; SelFilter.CodFlux = value; - StateHasChanged(); - Task.Delay(1); - reportChange(); + //StateHasChanged(); + //Task.Delay(1); + //ReportChangeAsync(); } } } + protected bool showParam { get; set; } = false; protected bool selDt { get; set; } = false; protected string selMacchina @@ -109,14 +110,19 @@ namespace MP.SPEC.Components SelFilter.CurrPage = 1; SelFilter.IdxMacchina = value; SelFilter.CodFlux = "*"; - ListFlux = MDService.ParametriGetFiltAsync(selMacchina).Result; - StateHasChanged(); - Task.Delay(1); - reportChange(); + //StateHasChanged(); + //Task.Delay(1); + //ReportChangeAsync(); } } } + private async Task ReportChangeMacc() + { + ListFlux = await MDService.ParametriGetFiltAsync(selMacchina); + await ReportChangeAsync(); + } + protected int selMaxRecord { get @@ -129,7 +135,7 @@ namespace MP.SPEC.Components if (!SelFilter.MaxRecord.Equals(value)) { SelFilter.MaxRecord = value; - reportChange(); + //ReportChangeAsync(); } } } @@ -147,7 +153,7 @@ namespace MP.SPEC.Components if (!SelFilter.TempoAgg.Equals(tempoMS)) { SelFilter.TempoAgg = tempoMS; - reportChange(); + //ReportChangeAsync(); } } } @@ -181,7 +187,8 @@ namespace MP.SPEC.Components setDtSnap(); DateTime dtStart = SelFilter.dtMin != null ? (DateTime)SelFilter.dtMin : DateTime.Now.AddMonths(-1); DateTime dtEnd = SelFilter.dtMax != null ? (DateTime)SelFilter.dtMax : DateTime.Today.AddDays(1); - ListMacchine = await MDService.MacchineWithFluxAsync(dtStart, dtEnd); + var rawListMacc = await MDService.MacchineWithFluxAsync(dtStart, dtEnd); + ListMacchine = rawListMacc.OrderBy(x => x).ToList(); ListFlux = await MDService.ParametriGetFiltAsync(selMacchina); var configData = await MDService.ConfigGetAllAsync(); @@ -295,7 +302,7 @@ namespace MP.SPEC.Components currFilt.lastUpdate = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}"; currFilt.dtMax = value; SelFilter = currFilt; - reportChange(); + //ReportChangeAsync(); } } } @@ -315,7 +322,7 @@ namespace MP.SPEC.Components currFilt.lastUpdate = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}"; currFilt.dtMin = value; SelFilter = currFilt; - reportChange(); + //ReportChangeAsync(); } } } @@ -328,7 +335,7 @@ namespace MP.SPEC.Components if (SelFilter.dtSnapMin != value) { SelFilter.dtSnapMin = value; - reportChange(); + //ReportChangeAsync(); } } } @@ -344,9 +351,9 @@ namespace MP.SPEC.Components #region Private Methods - private void reportChange() + private async Task ReportChangeAsync() { - FilterChanged.InvokeAsync(SelFilter); + await FilterChanged.InvokeAsync(SelFilter); } #endregion Private Methods diff --git a/MP.SPEC/Components/ProdKit/Manager.razor.cs b/MP.SPEC/Components/ProdKit/Manager.razor.cs index f42c073f..a53d97d8 100644 --- a/MP.SPEC/Components/ProdKit/Manager.razor.cs +++ b/MP.SPEC/Components/ProdKit/Manager.razor.cs @@ -188,7 +188,7 @@ namespace MP.SPEC.Components.ProdKit { listPOdlCheck = new List(); listPOdlAct = await MDService.POdlListGetFiltAsync(ActFilt.HasOdl, ActFilt.CodFase, ActFilt.IdxMacchina, ActFilt.CodReparto, ActFilt.DtStart, ActFilt.DtEnd); - listPOdl2Kit = await MDService.POdlToKitListGetFiltAsync(ActFilt.HasOdl, ActFilt.CodFase, ActFilt.IdxMacchina, ActFilt.CodReparto, ActFilt.DtStart, ActFilt.DtEnd); + listPOdl2Kit = await MDService.POdlToKitListGetFiltAsync(ActFilt.HasOdl, ActFilt.CodFase, ActFilt.IdxMacchina, ActFilt.CodReparto, ActFilt.DtStart, ActFilt.DtEnd, true); listWSM = await MDService.WipKitFiltAsync(keyFilt); listTSM = await MDService.TksScoreAsync(keyFilt, 1000, true); listIKP = await MDService.IstKitFiltAsync("", ""); diff --git a/MP.SPEC/Components/Reparti/ListOperatori.razor.cs b/MP.SPEC/Components/Reparti/ListOperatori.razor.cs index 73f18c0b..a2e49169 100644 --- a/MP.SPEC/Components/Reparti/ListOperatori.razor.cs +++ b/MP.SPEC/Components/Reparti/ListOperatori.razor.cs @@ -155,8 +155,8 @@ namespace MP.SPEC.Components.Reparti } private async Task DoReset() { - selRec = null; - await EC_RecSel.InvokeAsync(null); + selRec = null; + await EC_RecChange.InvokeAsync(false); } private async Task ReportUpdate(bool force) diff --git a/MP.SPEC/Components/Reparti/ListReparti.razor.cs b/MP.SPEC/Components/Reparti/ListReparti.razor.cs index 3f65ced9..92985e12 100644 --- a/MP.SPEC/Components/Reparti/ListReparti.razor.cs +++ b/MP.SPEC/Components/Reparti/ListReparti.razor.cs @@ -205,6 +205,7 @@ namespace MP.SPEC.Components.Reparti EditRec = null; UpdateTable(); await EC_RecordSel.InvokeAsync(""); + await EC_RecordUpdated.InvokeAsync(true); } private void ToggleAddNew() diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index f16851c8..c66cb59d 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -25,12 +25,6 @@ namespace MP.SPEC.Data { #region Public Constructors - private readonly IAnagRepository _anagRepository; - private readonly ISystemRepository _systemRepository; - private readonly IDossierRepository _dossierRepository; - private readonly IFluxLogRepository _fluxLogRepository; - private readonly IProductionRepository _productionRepository; - public MpDataService( IConnectionMultiplexer connMPlex, IConfiguration configuration, @@ -704,20 +698,6 @@ namespace MP.SPEC.Data tagList: [Utils.redisAnagGruppi] ); } - /// - /// Restitusice elenco Reparti - /// - /// - public async Task> GruppiRepartoDtoByOperAsync(int matrOpr) - { - return await GetOrFetchAsync( - operationName: "ElencoRepartiDtoAsync", - cacheKey: $"{Utils.redisAnagGruppiOpr}:{matrOpr}", - expiration: GetRandTOut(redisLongTimeCache), - fetchFunc: async () => await _anagRepository.GruppiRepartoDtoByOperAsync(matrOpr) ?? new(), - tagList: [Utils.redisAnagGruppiOpr] - ); - } /// /// Caricamento asincrono della cache degli articoli (Used/Unused) @@ -774,6 +754,17 @@ namespace MP.SPEC.Data return result; } + public async Task FlushFusionCacheArticoli() + { + using var activity = ActivitySource.StartActivity("FlushFusionCacheArticoli"); + string source = "FUSION"; + bool answ = await FlushFusionCacheAsync(new List() { Utils.redisArtList, Utils.redisArtByDossier }); + activity?.SetTag("data.source", source); + activity?.Stop(); + LogTrace($"FlushFusionCacheArticoli | {source} | {activity?.Duration.TotalMilliseconds}ms"); + return answ; + } + /// /// Flush cache relativa a MP-IO x dati ODL /// @@ -946,6 +937,7 @@ namespace MP.SPEC.Data result = await _productionRepository.Grp2MaccDeleteAsync(rec2del); // elimino cache redis... await FlushFusionCacheMacGrp(); + await FlushFusionCacheOprGrp(); activity?.SetTag("data.source", "DB"); activity?.Stop(); LogTrace($"Grp2MaccDeleteAsync | CodGruppo {rec2del.CodGruppo} | IdxMacc {rec2del.IdxMacchina} | {activity?.Duration.TotalMilliseconds}ms"); @@ -964,6 +956,7 @@ namespace MP.SPEC.Data result = await _productionRepository.Grp2MaccInsertAsync(upsRec); // elimino cache redis... await FlushFusionCacheMacGrp(); + await FlushFusionCacheOprGrp(); activity?.SetTag("data.source", "DB"); activity?.Stop(); LogTrace($"Grp2MaccInsertAsync | CodGruppo {upsRec.CodGruppo} | IdxMacc {upsRec.IdxMacchina} | {activity?.Duration.TotalMilliseconds}ms"); @@ -981,6 +974,7 @@ namespace MP.SPEC.Data bool result = false; result = await _productionRepository.Grp2OperDeleteAsync(rec2del); // elimino cache redis... + await FlushFusionCacheMacGrp(); await FlushFusionCacheOprGrp(); activity?.SetTag("data.source", "DB"); activity?.Stop(); @@ -999,6 +993,7 @@ namespace MP.SPEC.Data bool result = false; result = await _productionRepository.Grp2OperInsertAsync(upsRec); // elimino cache redis... + await FlushFusionCacheMacGrp(); await FlushFusionCacheOprGrp(); activity?.SetTag("data.source", "DB"); activity?.Stop(); @@ -1006,6 +1001,21 @@ namespace MP.SPEC.Data return result; } + /// + /// Restitusice elenco Reparti + /// + /// + public async Task> GruppiRepartoDtoByOperAsync(int matrOpr) + { + return await GetOrFetchAsync( + operationName: "ElencoRepartiDtoAsync", + cacheKey: $"{Utils.redisAnagGruppiOpr}:{matrOpr}", + expiration: GetRandTOut(redisLongTimeCache), + fetchFunc: async () => await _anagRepository.GruppiRepartoDtoByOperAsync(matrOpr) ?? new(), + tagList: [Utils.redisAnagGruppiOpr] + ); + } + /// /// Init ricetta /// @@ -1436,7 +1446,8 @@ namespace MP.SPEC.Data bool fatto = false; // salvo fatto = await _productionRepository.OperatoriUpsertAsync(updRec); - await FlushFusionCacheAsync(Utils.redisOprList); + await FlushFusionCacheMacGrp(); + await FlushFusionCacheOprGrp(); activity?.SetTag("data.source", source); activity?.Stop(); LogTrace($"OperatoriUpsertAsync | {source} | {activity?.Duration.TotalMilliseconds}ms"); @@ -1663,10 +1674,12 @@ namespace MP.SPEC.Data /// Gruppo /// Data inizio /// Data fine + /// se true =?solo attive /// - public async Task> POdlToKitListGetFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate) + public async Task> POdlToKitListGetFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive) { - string redisKey = $"{Utils.redisPOdlList}_kit:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}"; + string codFlagAtt = flagAttive ? "ACT" : "ALL"; + string redisKey = $"{Utils.redisPOdlList}_kit:{codGruppo}:{idxMacchina}:{keyRichPart}:{lanciato}:{codFlagAtt}:{startDate:yyyyMMdd_HHmmss}:{endDate:yyyyMMdd_HHmmss}"; return await GetOrFetchAsync( operationName: "POdlToKitListGetFiltAsync", @@ -1679,7 +1692,8 @@ namespace MP.SPEC.Data idxMacchina, codGruppo, startDate, - endDate + endDate, + flagAttive ) ?? new List(), tagList: [Utils.redisPOdlList, $"{Utils.redisPOdlList}_kit"] ); @@ -2028,11 +2042,13 @@ namespace MP.SPEC.Data private static readonly ActivitySource ActivitySource = new ActivitySource("MP.DATA.Tracer"); private static IConfiguration _configuration = null!; - private static Logger Log = LogManager.GetCurrentClassLogger(); - + private readonly IAnagRepository _anagRepository; private readonly IFusionCache _cache; - + private readonly IDossierRepository _dossierRepository; + private readonly IFluxLogRepository _fluxLogRepository; + private readonly IProductionRepository _productionRepository; + private readonly ISystemRepository _systemRepository; private DateTime _artCacheExpiry = DateTime.MinValue; private Dictionary _configData = new(); @@ -2162,17 +2178,6 @@ namespace MP.SPEC.Data return answ; } - private async Task FlushFusionCacheArticoli() - { - using var activity = ActivitySource.StartActivity("FlushFusionCacheArticoli"); - string source = "FUSION"; - bool answ = await FlushFusionCacheAsync(new List() { Utils.redisArtList, Utils.redisArtByDossier }); - activity?.SetTag("data.source", source); - activity?.Stop(); - LogTrace($"FlushFusionCacheArticoli | {source} | {activity?.Duration.TotalMilliseconds}ms"); - return answ; - } - /// /// Cancellazione FusionCache (totale) /// @@ -2271,7 +2276,7 @@ namespace MP.SPEC.Data { using var activity = ActivitySource.StartActivity("FlushFusionCacheOprGrp"); string source = "FUSION"; - bool answ = await FlushFusionCacheAsync(new List { Utils.redisAnagGruppi, Utils.redisOprList }); + bool answ = await FlushFusionCacheAsync(new List { Utils.redisAnagGruppi, Utils.redisOprList, Utils.redisAnagGruppiOpr }); activity?.SetTag("data.source", source); activity?.Stop(); LogTrace($"FlushFusionCacheOprGrp | {source} | {activity?.Duration.TotalMilliseconds}ms"); @@ -2291,7 +2296,7 @@ namespace MP.SPEC.Data /// /// Implementa gestione FusionCache+ tracking attività - /// - recupero cache da memoria o da obj esterno + cache memoria + /// - recupero cache da memoria o da obj esterno + cache memoria /// - recupero da fetchFunc se mancasse + store in cache L1/L2 /// /// diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 96043f0a..26870041 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 8.16.2606.811 + 8.16.2606.816 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/Articoli.razor.cs b/MP.SPEC/Pages/Articoli.razor.cs index 47ac03bc..2981dbed 100644 --- a/MP.SPEC/Pages/Articoli.razor.cs +++ b/MP.SPEC/Pages/Articoli.razor.cs @@ -153,7 +153,7 @@ namespace MP.SPEC.Pages { isNewArt = false; currRecord = null; - await Task.Delay(1); + await ResetDataAsync(); } protected async Task selRecord(AnagArticoliModel selRec) @@ -176,6 +176,7 @@ namespace MP.SPEC.Pages { currPage = 1; currRecord = null; + await MDService.FlushFusionCacheArticoli(); await ReloadDataAsync(); } diff --git a/MP.SPEC/Pages/PARAMS.razor.cs b/MP.SPEC/Pages/PARAMS.razor.cs index 3d8b689a..d68bc545 100644 --- a/MP.SPEC/Pages/PARAMS.razor.cs +++ b/MP.SPEC/Pages/PARAMS.razor.cs @@ -224,7 +224,7 @@ namespace MP.SPEC.Pages { newParams.CurrPage = 1; } - await InvokeAsync(() => StateHasChanged()); + await InvokeAsync(StateHasChanged); currFilter = newParams; isLoading = false; } diff --git a/MP.SPEC/Pages/RepOper.razor.cs b/MP.SPEC/Pages/RepOper.razor.cs index 0f3ec8fa..54cd46d7 100644 --- a/MP.SPEC/Pages/RepOper.razor.cs +++ b/MP.SPEC/Pages/RepOper.razor.cs @@ -86,8 +86,7 @@ namespace MP.SPEC.Pages private async Task ReloadDataAsync() { isLoading = true; - //ListMacchine?.Clear(); - if (string.IsNullOrEmpty(CodGruppo) || true) + if (string.IsNullOrEmpty(CodGruppo)) { ListReparti?.Clear(); var rawList = await MDService.ElencoRepartiDtoAsync(); diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 38cd6371..2bb05146 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 8.16.2606.811

+

Versione: 8.16.2606.816


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 1ee643ed..1f704ea3 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -8.16.2606.811 +8.16.2606.816 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 27714b35..6eed7967 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 8.16.2606.811 + 8.16.2606.816 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