Merge branch 'Feature/roll-call/current-day-api' into Main
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1088,12 +1088,12 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user