cameraDirectLogin from admin - fix bug at GetWorkshopAbsentHistory
This commit is contained in:
@@ -377,8 +377,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
//roll calls for current workshop where shift start is in dateIndex date (filters today's shifts)
|
||||
var rollCallsQuery = _context.RollCalls
|
||||
.Where(x => x.WorkshopId == workshopId && x.StartDate.HasValue &&
|
||||
x.StartDate.Value.Date >= startSearch.Date && x.StartDate.Value.Date <= endSearch.Date && x.RollCallModifyType != RollCallModifyType.Undefined &&
|
||||
x.RollCallModifyType != RollCallModifyType.CutByBgService);
|
||||
x.StartDate.Value.Date >= startSearch.Date && x.StartDate.Value.Date <= endSearch.Date &&
|
||||
x.RollCallModifyType != RollCallModifyType.Undefined);
|
||||
|
||||
|
||||
|
||||
//get active employees of workshop in dateIndex date
|
||||
@@ -409,7 +410,6 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId
|
||||
|
||||
}),
|
||||
IsHoliday = _holidayItemApplication.IsHoliday(day),
|
||||
IsFriday = day.DayOfWeek == DayOfWeek.Friday
|
||||
@@ -419,6 +419,19 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<RollCallViewModel> GetEmployeeRollCallsHistoryAllByDate(long workshopId, long employeeId, DateTime start, DateTime end)
|
||||
{
|
||||
return _context.RollCalls.Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
x.EndDate.Value.Date >= start.Date && x.StartDate.Value.Date <= end.Date)
|
||||
.Select(x => new RollCallViewModel
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
StartDate = x.StartDate,
|
||||
EndDate = x.EndDate
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
//سوابق حضور غیاب کارگاه
|
||||
public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user