SPEC:
- aggiunta pagina operatori - completato fix
This commit is contained in:
@@ -702,6 +702,20 @@ 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)
|
||||
@@ -1408,6 +1422,25 @@ namespace MP.SPEC.Data
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiornamento operatori su DB + invalidata cache
|
||||
/// </summary>
|
||||
/// <param name="updRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OperatoriUpsertAsync(AnagOperatoriModel updRec)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("OperatoriUpsertAsync");
|
||||
string source = "DB";
|
||||
bool fatto = false;
|
||||
// salvo
|
||||
fatto = await _productionRepository.OperatoriUpsertAsync(updRec);
|
||||
await FlushFusionCacheAsync(Utils.redisOprList);
|
||||
activity?.SetTag("data.source", source);
|
||||
activity?.Stop();
|
||||
LogTrace($"OperatoriUpsertAsync | {source} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco di tutti i parametri filtrati x idxMaccSel
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user