refactor: clean up whitespace and improve query filtering in PlanPercentageRepository
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user