refactor: clean up whitespace and improve query filtering in PlanPercentageRepository

This commit is contained in:
2025-12-23 11:32:46 +03:30
parent f17b566957
commit 223c2bde21
2 changed files with 4 additions and 4 deletions

View File

@@ -1570,9 +1570,7 @@ public class InstitutionContractApplication : IInstitutionContractApplication
createdWorkshop.InstitutionContractWorkshopGroupId,createdWorkshop.WorkshopGroup,
createdWorkshop.WorkshopId!.Value, createdWorkshop.id);
institutionContract.WorkshopGroup.AddCurrentWorkshop(currentWorkshop);
}
if (institutionContract.WorkshopGroup.InitialWorkshops.All(x => x.WorkshopCreated && x.WorkshopId is > 0))

View File

@@ -342,10 +342,12 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
.Select(x => x.ItemValue).FirstOrDefault();
var plans = _context.InstitutionPlans.AsQueryable();
if (searchModel.CountPeron > 0)
plans = plans.Where(x => x.CountPerson == searchModel.CountPeron);
var count = await plans.CountAsync();
var planQueryFilter =await plans.ApplyPagination(searchModel.PageIndex, searchModel.PageSize).ToListAsync();
var planResult = planQueryFilter.Select(plan =>
new InstitutionPlanViewModel