diff --git a/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs b/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs index a4364932..73a84c3c 100644 --- a/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs +++ b/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs @@ -129,7 +129,7 @@ namespace CompanyManagment.App.Contracts.RollCall public class WorkshopCurrentDayRollCallSearchModel { - public long WorkshopId { get; set; } + public long EmployeeId { get; set; } public int PersonnelCode { get; set; } } diff --git a/CompanyManagment.EFCore/Repository/RollCallRepository.cs b/CompanyManagment.EFCore/Repository/RollCallRepository.cs index 8ea9d9e7..67779433 100644 --- a/CompanyManagment.EFCore/Repository/RollCallRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallRepository.cs @@ -1088,12 +1088,12 @@ public class RollCallRepository : RepositoryBase, IRollCallRepos x.WorkshopId == workshopId && (x.ShiftDate.Date == date || x.EndDate == null) && x.RollCallModifyType != RollCallModifyType.Undefined); - if (searchModel.WorkshopId>0) + if (searchModel.EmployeeId>0) { - leaves = leaves.Where(x=>x.WorkshopId == searchModel.WorkshopId); - personnelCodes = personnelCodes.Where(x=>x.WorkshopId == searchModel.WorkshopId); - activeEmployees = activeEmployees.Where(x=>x.WorkshopId == searchModel.WorkshopId); - rollCallsQuery = rollCallsQuery.Where(x=>x.WorkshopId == searchModel.WorkshopId); + leaves = leaves.Where(x=>x.WorkshopId == searchModel.EmployeeId); + personnelCodes = personnelCodes.Where(x=>x.EmployeeId == searchModel.EmployeeId); + activeEmployees = activeEmployees.Where(x=>x.EmployeeId == searchModel.EmployeeId); + rollCallsQuery = rollCallsQuery.Where(x=>x.EmployeeId == searchModel.EmployeeId); }