fix admin monthly overview bug
This commit is contained in:
@@ -359,19 +359,33 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
||||
|
||||
var notValidWorkshops = workshopIds.Except(validWorkshops).ToList();
|
||||
|
||||
var workshopsWithFullContracts = workingContractGrouping
|
||||
.Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.WorkshopId)
|
||||
// var workshopsWithFullContracts = workingContractGrouping
|
||||
// .Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
// .Select(g => g.WorkshopId)
|
||||
// .ToList();
|
||||
|
||||
var workshopsWithFullContracts = workshopIds
|
||||
.Where(workshopId =>
|
||||
{
|
||||
var group = workingContractGrouping.FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
return group == null || group.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId)));
|
||||
})
|
||||
.ToList();
|
||||
|
||||
var list = workingContractEmployeeIds.ToList().Where(x => !contractSet.Any(a => a.EmployeeId == x.EmployeeId && a.WorkshopIds == x.WorkshopId)).ToList();
|
||||
|
||||
var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.Key)
|
||||
// var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||
// .Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
// .Select(g => g.Key)
|
||||
// .ToList();
|
||||
var workshopsWithFullCheckout = workshopIds
|
||||
.Where(workshopId =>
|
||||
{
|
||||
var group = workingCheckoutGrouping.FirstOrDefault(x => x.Key == workshopId);
|
||||
return group == null || group.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId)));
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
||||
var fullyCoveredWorkshops = workshopsWithFullContracts.Intersect(workshopsWithFullCheckout).ToList();
|
||||
|
||||
//var notFullyCoveredWorkshops = groupedCheckout
|
||||
|
||||
Reference in New Issue
Block a user