Fix ricerca PODL x KIT e Attivi

This commit is contained in:
Samuele Locatelli
2026-06-11 17:27:26 +02:00
parent 61b590d4fa
commit 3989fa5659
50 changed files with 619 additions and 631 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, bool flagAttive);
Task<List<PODLExpModel>> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive, bool flagKitChild);
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, bool flagAttive)
public async Task<List<PODLExpModel>> ListPODL_KitFiltAsync(bool lanciato, string keyRichPart, string idxMacchina, string codGruppo, DateTime startDate, DateTime endDate, bool flagAttive, bool flagKitChild)
{
await using var dbCtx = await GetMoonProContextAsync();
var Lanc = new SqlParameter("@Lanciato", lanciato);
@@ -196,12 +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);
var pFlagKChild = new SqlParameter("@flgPodChild", flagKitChild);
return await dbCtx
.DbSetPODLExp
.FromSqlRaw("EXEC stp_PODL_getByFiltSpecKit @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine, @flgAttive", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo, pFlagAtt)
.FromSqlRaw("EXEC stp_PODL_getByFiltSpecKit @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine, @flgAttive, @flgPodChild", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo, pFlagAtt, pFlagKChild)
.AsNoTracking()
.ToListAsync();
}