Fix correzioni viste con Gian

This commit is contained in:
Samuele Locatelli
2026-06-08 16:59:53 +02:00
parent e6df6a5e18
commit 1eaedba6cd
22 changed files with 107 additions and 145 deletions
@@ -31,7 +31,7 @@ namespace MP.Data.Repository.Production
Task<List<PODLExpModel>> ListPODL_ByKitParentAsync(int IdxPodlParent);
Task<List<PODLExpModel>> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate);
Task<List<PODLExpModel>> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive);
Task<PODLModel> PODL_getByKeyAsync(int idxPODL);
@@ -187,7 +187,7 @@ namespace MP.Data.Repository.Production
}
/// <inheritdoc />
public async Task<List<PODLExpModel>> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate)
public async Task<List<PODLExpModel>> 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();
}
+4 -56
View File
@@ -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!;
/// <summary>
@@ -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<ObjItemDTO> 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<ObjItemDTO> 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<Macchine2SlaveModel> Macchine2SlaveGetAll()
{
List<Macchine2SlaveModel>? result = new List<Macchine2SlaveModel>();
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<List<Macchine2SlaveModel>>($"{rawData}");
readType = "REDIS";
result = JsonConvert.DeserializeObject<List<Macchine2SlaveModel>>(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<Macchine2SlaveModel>();
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Debug($"Macchine2SlaveGetAll | Read from {readType}: {ts.TotalMilliseconds}ms");
return result;
return result ?? new List<Macchine2SlaveModel>();
}
#endif
private readonly IServiceScopeFactory _scopeFactory;
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>8.16.2606.418</Version>
<Version>8.16.2606.814</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-IOC </i>
<h4>Versione: 8.16.2606.418</h4>
<h4>Versione: 8.16.2606.814</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.418
8.16.2606.814
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.418</version>
<version>8.16.2606.814</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
View File
@@ -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))
{
+8 -8
View File
@@ -91,7 +91,7 @@ namespace MP.SPEC.Components
/// </summary>
/// <param name="CodArticolo"></param>
/// <returns></returns>
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
/// </summary>
/// <param name="selRec"></param>
/// <returns></returns>
protected async Task deleteRecord(PODLExpModel selRec)
private async Task deleteRecord(PODLExpModel selRec)
{
if (!await JSRuntime.InvokeAsync<bool>("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
+5 -5
View File
@@ -70,7 +70,7 @@
</div>
<div class="px-2 input-group">
<label class="input-group-text" for="macchina" title="Selezionare impianto"><i class="fa-solid fa-hard-drive"></i></label>
<select @bind="@selMacchina" class="form-select" id="macchina" title="Selezionare impianto">
<select @bind="@selMacchina" @bind:after="ReportChangeMacc" class="form-select" id="macchina" title="Selezionare impianto">
<option value="*">--- Tutti ---</option>
@if (ListMacchine != null)
{
@@ -102,21 +102,21 @@
</div>
<div class="px-2 input-group">
<label class="input-group-text" for="dtMin" title="Selezionare inizio periodo"><i class="fa-regular fa-calendar-minus"></i></label>
<input class="form-control" @bind="@selDtMin" id="dtMin" type="datetime-local" title="Data minima eventi da visualizzare">
<input class="form-control" @bind="@selDtMin" @bind:after="ReportChangeAsync" id="dtMin" type="datetime-local" title="Data minima eventi da visualizzare">
</div>
<div class="small mt-2">
<label class="px-2" for="dtMax" title="Selezionare fine periodo">Fine Periodo</label>
</div>
<div class="px-2 input-group">
<label class="input-group-text" for="dtMax" title="Selezionare fine periodo"><i class="fa-regular fa-calendar-plus"></i></label>
<input class="form-control" @bind="@selDtMax" id="dtMax" type="datetime-local" title="Selezionare fine periodo">
<input class="form-control" @bind="@selDtMax" @bind:after="ReportChangeAsync" id="dtMax" type="datetime-local" title="Selezionare fine periodo">
</div>
<div class="small mt-2">
<label class="px-2" for="tempoAgg" title="Selezionare refresh rate (sec) periodo">Refresh rate (sec)</label>
</div>
<div class="px-2 input-group">
<label class="input-group-text" for="tempoAgg" title="Selezionare refresh rate (sec)"><i class="fa-solid fa-clock"></i></label>
<select @bind="@selTempoAgg" class="form-select" id="tempoAgg" title="Selezionare refresh rate (sec)" style="width: 3em;">
<select @bind="@selTempoAgg" @bind:after="ReportChangeAsync" class="form-select" id="tempoAgg" title="Selezionare refresh rate (sec)" style="width: 3em;">
<option value="2">2</option>
<option value="5">5</option>
<option value="10">10</option>
@@ -129,7 +129,7 @@
</div>
<div class="px-2 input-group">
<label class="input-group-text" for="maxRecord" title="Numero massimo record da mostrare"><i class="fa-solid fa-list-ol"></i></label>
<select @bind="@selMaxRecord" class="form-select" id="maxRecord" title="Numero massimo record da mostrare">
<select @bind="@selMaxRecord" @bind:after="ReportChangeAsync" class="form-select" id="maxRecord" title="Numero massimo record da mostrare">
<option value="50">50</option>
<option value="100">100</option>
<option value="250">250</option>
+24 -17
View File
@@ -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
+1 -1
View File
@@ -188,7 +188,7 @@ namespace MP.SPEC.Components.ProdKit
{
listPOdlCheck = new List<PODLExpModel>();
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("", "");
@@ -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)
@@ -205,6 +205,7 @@ namespace MP.SPEC.Components.Reparti
EditRec = null;
UpdateTable();
await EC_RecordSel.InvokeAsync("");
await EC_RecordUpdated.InvokeAsync(true);
}
private void ToggleAddNew()
+45 -40
View File
@@ -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]
);
}
/// <summary>
/// Restitusice elenco Reparti
/// </summary>
/// <returns></returns>
public async Task<List<RepartiDTO>> 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]
);
}
/// <summary>
/// Caricamento asincrono della cache degli articoli (Used/Unused)
@@ -774,6 +754,17 @@ namespace MP.SPEC.Data
return result;
}
public async Task<bool> FlushFusionCacheArticoli()
{
using var activity = ActivitySource.StartActivity("FlushFusionCacheArticoli");
string source = "FUSION";
bool answ = await FlushFusionCacheAsync(new List<string>() { Utils.redisArtList, Utils.redisArtByDossier });
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"FlushFusionCacheArticoli | {source} | {activity?.Duration.TotalMilliseconds}ms");
return answ;
}
/// <summary>
/// Flush cache relativa a MP-IO x dati ODL
/// </summary>
@@ -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;
}
/// <summary>
/// Restitusice elenco Reparti
/// </summary>
/// <returns></returns>
public async Task<List<RepartiDTO>> 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]
);
}
/// <summary>
/// Init ricetta
/// </summary>
@@ -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
/// <param name="codGruppo">Gruppo</param>
/// <param name="startDate">Data inizio</param>
/// <param name="endDate">Data fine</param>
/// <param name="flagAttive">se true =?solo attive</param>
/// <returns></returns>
public async Task<List<PODLExpModel>> POdlToKitListGetFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate)
public async Task<List<PODLExpModel>> 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<PODLExpModel>(),
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<string, string> _configData = new();
@@ -2162,17 +2178,6 @@ namespace MP.SPEC.Data
return answ;
}
private async Task<bool> FlushFusionCacheArticoli()
{
using var activity = ActivitySource.StartActivity("FlushFusionCacheArticoli");
string source = "FUSION";
bool answ = await FlushFusionCacheAsync(new List<string>() { Utils.redisArtList, Utils.redisArtByDossier });
activity?.SetTag("data.source", source);
activity?.Stop();
LogTrace($"FlushFusionCacheArticoli | {source} | {activity?.Duration.TotalMilliseconds}ms");
return answ;
}
/// <summary>
/// Cancellazione FusionCache (totale)
/// </summary>
@@ -2271,7 +2276,7 @@ namespace MP.SPEC.Data
{
using var activity = ActivitySource.StartActivity("FlushFusionCacheOprGrp");
string source = "FUSION";
bool answ = await FlushFusionCacheAsync(new List<string> { Utils.redisAnagGruppi, Utils.redisOprList });
bool answ = await FlushFusionCacheAsync(new List<string> { 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
/// <summary>
/// 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
/// </summary>
/// <typeparam name="T"></typeparam>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>8.16.2606.811</Version>
<Version>8.16.2606.816</Version>
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+2 -1
View File
@@ -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();
}
+1 -1
View File
@@ -224,7 +224,7 @@ namespace MP.SPEC.Pages
{
newParams.CurrPage = 1;
}
await InvokeAsync(() => StateHasChanged());
await InvokeAsync(StateHasChanged);
currFilter = newParams;
isLoading = false;
}
+1 -2
View File
@@ -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();
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2606.811</h4>
<h4>Versione: 8.16.2606.816</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.811
8.16.2606.816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.811</version>
<version>8.16.2606.816</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>