added breakTime to Official Chekout - filter rollcall history for personnel without personelCode

This commit is contained in:
SamSys
2024-12-22 20:34:21 +03:30
parent f53600a9d5
commit 2a47049bd4
14 changed files with 450 additions and 261 deletions

View File

@@ -14,31 +14,30 @@ namespace Company.Domain.RollCallAgg
EditRollCall GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId);
EditRollCall GetById(long id);
#region Pooya
List<OverlappedRollCallWithLeave> GetOverlappedRollCallsWithLeaveInDates(long workshopId, DateTime start,
DateTime end);
List<RollCallsByDateViewModel> GetWorkshopAbsentHistory(long workshopId, DateTime startSearch,
DateTime endSearch);
List<RollCallViewModel> GetEmployeeRollCallsHistoryAllByDate(long workshopId, long employeeId, DateTime start, DateTime end);
DateTime endSearch);
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
List<CheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startDate, DateTime endDate);
List<RollCallViewModel> GetEmployeeRollCallsHistoryAll(long workshopId, long employeeId, DateTime start, DateTime end);
EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId,
List<RollCallViewModel> GetEmployeeRollCallsHistoryAllInDates(long workshopId, long employeeId, DateTime start, DateTime end);
EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId,
DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? monthIndex);
void AddRange(List<RollCall> rollCalls);
void UpdateRange(List<RollCall> rollCalls);
List<RollCallViewModel> GetWorkshopEmployeeRollCallsForDate(long workshopId, long employeeId, DateTime date);
/// <summary>
/// این متد تمام حضور غیاب های کات شده توسط بک گراند سرویس را به صورت تعداد روزانه برمیگرداند
/// </summary>
@@ -48,22 +47,17 @@ namespace Company.Domain.RollCallAgg
/// <returns> لیستی از تعداد و روز آن</returns>
List<RollCallsByDateViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId, DateTime start, DateTime end);
/// <summary>
/// تمامی حضور غیاب های کات شده توسط بک گراند سرویس را برمیگرداند
/// </summary>
/// <param name="accId"></param>
/// <param name="workshopId"></param>
/// <returns></returns>
int GetCountCutRollCallByBgService(long accId, long workshopId);
IEnumerable<RollCallViewModel> GetNotSlicedRollCallsByWorkshopId(long workshopId, DateTime durationStart, DateTime durationEnd);
RollCallViewModel GetDetails(long rollCallId);
List<RollCallViewModel> GetRange(IEnumerable<long> rollCallIds);
List<RollCallsByDateViewModel> GetUndefinedRollCallWorkFlowsInDates(long workshopId, DateTime durationStart, DateTime durationEnd);
TimeSpan GetEmployeeRollCallTimeSpanForDuration(long employeeId, long workshopId, DateTime start, DateTime end);
#endregion
long Flag(long employeeId, long workshopId);
#endregion
long Flag(long employeeId, long workshopId);
/// <summary>
/// چک می کند که اگر کارگر به تازگی خروج یا ورود زده است اجازه ثبت مجدد ندهد
@@ -72,5 +66,7 @@ namespace Company.Domain.RollCallAgg
/// <param name="workshopId"></param>
/// <returns></returns>
string CheckRepeat(long employeeId, long workshopId);
RollCallViewModel GetDetails(long rollCallId);
}
}

View File

@@ -19,8 +19,10 @@ namespace CompanyManagment.App.Contracts.RollCall
public string TotalWorkingHours { get; set; }
public string DayOfWeek { get; set; }
public TimeSpan BreakTimeTimeSpan { get; set; }
public string BreakTimeString { get; set; }
}
}
#endregion
}

View File

@@ -17,7 +17,7 @@ namespace CompanyManagment.App.Contracts.RollCall
EditRollCall GetById(long id);
List<RollCallViewModel> Search(RollCallSearchModel searchModel);
@@ -94,14 +94,6 @@ namespace CompanyManagment.App.Contracts.RollCall
/// <returns> لیستی از تعداد و روز آن</returns>
List<RollCallsByDateViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId, DateTime start, DateTime end);
/// <summary>
/// تمامی حضور غیاب های کات شده توسط بک گراند سرویس را برمیگرداند
/// </summary>
/// <param name="accId"></param>
/// <param name="workshopId"></param>
/// <returns></returns>
int GetCountCutRollCallByBgService(long accId, long workshopId);
IEnumerable<RollCallViewModel> GetNotSlicedRollCallsByWorkshopId(long workshopId, DateTime durationStart, DateTime durationEnd);
RollCallViewModel GetDetails(long rollCallId);
#endregion

View File

@@ -0,0 +1,17 @@
using System;
namespace CompanyManagment.App.Contracts.RollCall;
public class OverlappedRollCallWithLeave
{
public long RollCallId { get; set; }
public long EmployeeId { get; set; }
public long LeaveId { get; set; }
public string EmployeeFullName { get; set; }
public DateTime StartOfOverlapDateTime { get; set; }
public DateTime EndOfOverlapDateTime { get; set; }
public string StartOfOverlapDateFa { get; set; }
public string EndOfOverlapDateFa { get; set; }
public string StartOfOverlapTime { get; set; }
public string EndOfOverlapTime { get; set; }
}

View File

@@ -13,7 +13,9 @@ public class RollCallViewModel
public string EmployeeFullName { get; set; }
public string DateFa { get; set; }
public DateTime DateGr { get; set; }
public DateTime? StartDate { get; set; }
public string StartDayOfWeekFa { get; set; }
public string EndDayOfWeekFa { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public TimeSpan ShiftSpan { get; set; }
public DateTime CreationDate { get; set; }

View File

@@ -8,7 +8,8 @@ namespace CompanyManagment.App.Contracts.RollCall
public string DateFa { get; set; }
public DateTime DateGr { get; set; }
public IEnumerable<RollCallViewModel> ActiveEmployees { get; set; }
public string DayOfWeekFa { get; set; }
public int ActiveEmployeesCount { get; set; }
public string DayOfWeekFa { get; set; }
public bool IsHoliday { get; set; }
public bool IsFriday { get; set; }
}

View File

@@ -396,7 +396,7 @@ public class LeaveApplication : ILeaveApplication
public OperationResult ValidateNewLeaveWithExistingRollCalls(long workshopId, long employeeId, string paidLeaveType, DateTime start, DateTime end)
{
OperationResult op = new();
var rollCallsInDate = _rollCallRepository.GetEmployeeRollCallsHistoryAllByDate(workshopId, employeeId, start, end);
var rollCallsInDate = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(workshopId, employeeId, start, end);
if (paidLeaveType == "ساعتی")
{
if (rollCallsInDate.Any(x => x.EndDate >= start && x.StartDate <= end))

View File

@@ -70,10 +70,7 @@ public class RollCallApplication : IRollCallApplication
return _rollCallRepository.GetById(id);
}
public List<RollCallViewModel> Search(RollCallSearchModel searchModel)
{
return _rollCallRepository.Search(searchModel);
}
#region Pooya
@@ -353,13 +350,9 @@ public class RollCallApplication : IRollCallApplication
public List<RollCallsByDateViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId, DateTime start, DateTime end)
{
return _rollCallRepository.GetRollCallWorkFlowsCutByBgService(workshopId, start, end);
}
public int GetCountCutRollCallByBgService(long accId, long workshopId)
{
return _rollCallRepository.GetCountCutRollCallByBgService(accId, workshopId);
}
public RollCallViewModel GetDetails(long rollCallId)

View File

@@ -505,17 +505,18 @@ CreateWorkingHoursTemp command, long leavId)
return res;
}
private TimeSpan CalculateBreakTime(BreakTime breakTime, TimeSpan sumOneDaySpan)
public static TimeSpan CalculateBreakTime(BreakTime breakTime, TimeSpan sumOneDaySpan)
{
if (breakTime.BreakTimeType != BreakTimeType.WithTime)
return TimeSpan.Zero;
return new TimeSpan();
var breakTimeSpan = breakTime.BreakTimeValue.ToTimeSpan();
if (breakTimeSpan * 2 >= sumOneDaySpan)
return TimeSpan.Zero;
return new TimeSpan();
return breakTimeSpan; ;
}
public TimeSpan AfterSubtract(CreateWorkingHoursTemp command, TimeSpan sumOneDaySpan, DateTime creationDate)

View File

@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using _0_Framework.Application;
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
using _0_Framework.InfraStructure;
using Company.Domain.RollCallAgg;
using CompanyManagment.App.Contracts.HolidayItem;
@@ -32,15 +34,19 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
throw new NotImplementedException();
}
#region Pooya
public List<RollCallsByDateViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId, DateTime start, DateTime end)
{
var personnelCode = _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId);
var rollCalls = _context.RollCalls
.Where(x => x.RollCallModifyType == RollCallModifyType.CutByBgService && x.WorkshopId == workshopId &&
.Where(x => personnelCode.Any(y => y.EmployeeId == x.EmployeeId) && x.RollCallModifyType == RollCallModifyType.CutByBgService && x.WorkshopId == workshopId &&
x.StartDate.Value.Date >= start.Date && x.StartDate.Value.Date <= end.Date).ToList();
var names = _context.RollCallEmployees.Where(x => x.WorkshopId == workshopId)
@@ -65,45 +71,19 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
.ToList();
}
public int GetCountCutRollCallByBgService(long accId, long workshopId)
{
return _context.RollCalls.Where(x =>
x.WorkshopId == workshopId && x.RollCallModifyType == RollCallModifyType.CutByBgService)
.GroupBy(x => x.StartDate!.Value.Date)
.Count();
}
public IEnumerable<RollCallViewModel> GetNotSlicedRollCallsByWorkshopId(long workshopId, DateTime durationStart, DateTime durationEnd)
{
if (durationEnd.Date >= DateTime.Now.Date)
durationEnd = DateTime.Now.AddDays(-1).Date;
var names = _context.RollCallEmployees.Where(x => x.WorkshopId == workshopId).ToList();
var rollCalls = _context.RollCalls.Where(x => x.WorkshopId == workshopId &&
x.StartDate.Value.Date >= durationStart && x.StartDate.Value.Date <= durationEnd && x.EndDate.HasValue).ToList();
if (rollCalls == null || !rollCalls.Any())
return new List<RollCallViewModel>();
return rollCalls.GroupBy(x => x.StartDate.Value.Date).SelectMany(x =>
x.GroupBy(y => y.EmployeeId).Where(y => y.Count() == 1)
.SelectMany(y => y)).Select(x => new RollCallViewModel
{
Id = x.id,
StartDate = x.StartDate.Value,
EndDate = x.EndDate.Value,
EmployeeId = x.EmployeeId,
DateGr = x.StartDate.Value.Date,
EmployeeFullName = names.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.EmployeeFullName ?? ""
});
}
//حضور غیاب فیش حقوقی
//حضور غیاب در پرینت فیش حقوقی رسمی
public List<CheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startMonthDay, DateTime endMonthDay)
{
//گرفتن ساعت استراحت پرسنل از تنظیمات
#region breakTime
BaseCustomizeEntity settings = _context.CustomizeWorkshopEmployeeSettings.AsSplitQuery().FirstOrDefault(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
//اگر ساعت استراحت پرسنل وجود نداشت صفر است
var breakTime = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
#endregion
var rollCalls = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&
x.StartDate.Value.Date >= startMonthDay && x.StartDate.Value.Date <= endMonthDay).ToList();
@@ -144,7 +124,13 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
var presentDays = rollCalls.GroupBy(x => x.StartDate!.Value.Date).Select(x =>
{
var orderedRollcalls = x.OrderBy(y => y.StartDate!.Value);
var rollCallTimeSpanPerDay =
new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks));
var breakTimePerDay = RollCallMandatoryRepository.CalculateBreakTime(breakTime, rollCallTimeSpanPerDay);
return new CheckoutDailyRollCallViewModel()
{
StartDate1 = orderedRollcalls.FirstOrDefault().StartDate.Value.ToString("HH:mm"),
@@ -153,8 +139,10 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
StartDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.StartDate?.ToString("HH:mm") ?? "",
EndDate2 = orderedRollcalls.Skip(1).FirstOrDefault()?.EndDate?.ToString("HH:mm") ?? "",
TotalhourseSpan =
new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks)),
TotalhourseSpan = rollCallTimeSpanPerDay - breakTimePerDay,
BreakTimeTimeSpan = breakTimePerDay,
DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(),
RollCallDateFa = x.Key.Date.ToFarsi(),
DateTimeGr = x.Key.Date,
@@ -170,6 +158,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
EndDate2 = x.EndDate2,
StartDate2 = x.StartDate2,
TotalWorkingHours = $"{(int)(x.TotalhourseSpan.TotalHours)}:{x.TotalhourseSpan.Minutes.ToString("00")}",
BreakTimeString = $"{(int)(x.BreakTimeTimeSpan.TotalHours)}:{x.BreakTimeTimeSpan.Minutes.ToString("00")}",
DayOfWeek = x.DayOfWeek,
RollCallDateFa = x.RollCallDateFa,
DateTimeGr = x.DateTimeGr,
@@ -180,46 +169,37 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
return presentDays.Concat(absentRecords).OrderBy(x => x.DateTimeGr).ToList();
}
public List<RollCallViewModel> GetEmployeeRollCallsHistoryAll(long workshopId, long employeeId, DateTime start, DateTime end)
{
return _context.RollCalls.Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId && x.EndDate.Value >= start &&
x.StartDate.Value <= end)
.Select(x => new RollCallViewModel
{
EmployeeId = employeeId,
WorkshopId = workshopId,
StartDate = x.StartDate,
EndDate = x.EndDate
}).ToList();
}
//محاسبه کارکرد پرسنل در هنگام جستجو
public TimeSpan GetEmployeeRollCallTimeSpanForDuration(long employeeId, long workshopId, DateTime start, DateTime end)
{
var rollCalls = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&
x.StartDate.Value.Date >= start && x.StartDate.Value.Date <= end).ToList();
var rollCalls = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && x.RollCallModifyType != RollCallModifyType.Undefined &&
x.StartDate.Value.Date >= start && x.StartDate.Value.Date <= end).ToList();
return new TimeSpan(rollCalls.Sum(x => (x.EndDate - x.StartDate).Value.Ticks));
return new TimeSpan(rollCalls.Sum(x => (x.EndDate - x.StartDate).Value.Ticks));
}
//جستجوی سوابق حضور غیاب بر اساس کارمند
public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId,
//جستجوی سوابق حضور غیاب بر اساس کارمند
public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId,
DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? dateIndex)
{
if (!_context.PersonnelCodeSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId))
return null;
//get RollCallEmployee and RollCallEmployeeStatus for that employee in that workshop
var employeeRollCallStatuses = _context.RollCallEmployees.Include(x => x.EmployeesStatus)
.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
//if none was found return empty
if (employeeRollCallStatuses == null)
return new();
if (employeeRollCallStatuses == null || employeeRollCallStatuses.EmployeesStatus == null || !employeeRollCallStatuses.EmployeesStatus.Any())
return null;
//this list will have all the months which employee was active in
var activeMonths = new List<PersianDateTime>();
@@ -286,7 +266,8 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
var leavesQuery =
_context.LeaveList.Where(x => (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) &&
x.IsAccepted &&
x.EndLeave >= selectedMonthFirstDay && x.StartLeave < nextMonthFirstDay && x.WorkshopId == workshopId && x.EmployeeId == employeeId);
x.EndLeave >= selectedMonthFirstDay && x.StartLeave < nextMonthFirstDay &&
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
var rollCalls = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && !leavesQuery.Any(y =>
@@ -295,11 +276,11 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
//changeByfarrokhi
//#region changeByfarrokhi
//var rollCalls = _context.RollCalls.Where(x =>
//x.EmployeeId == employeeId &&
//x.WorkshopId == workshopId && x.StartDate != null &&
//x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
// #region changeByfarrokhi
// var rollCalls = _context.RollCalls.Where(x =>
// x.EmployeeId == employeeId &&
// x.WorkshopId == workshopId && x.StartDate != null &&
// x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay && x.RollCallModifyType != RollCallModifyType.Undefined);
//#endregion
var personnelCode =
@@ -322,7 +303,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
if (exactDateTime.HasValue || (startDateTime.HasValue && endDateTime.HasValue))
completeDaysList = completeDaysList.Where(x => x.Date >= startSearch.Date && x.Date <= endSearch.Date);
var result = completeDaysList.Where(x => !rollCallsList.Any(y => y.StartDate.Value.Date == x.Date && y.EndDate == null) &&
var result = completeDaysList.Where(x => !rollCallsList.Any(y => y.StartDate.Value.Date == x.Date.Date && y.EndDate == null) &&
statusesOfMonth.Any(y => x >= y.StartDate.Date && x <= y.EndDate.Date))
.Select(x =>
{
@@ -353,9 +334,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
DayOfWeekFa = x.DateGr.DayOfWeek.DayOfWeeKToPersian(),
IsHoliday = _holidayItemApplication.IsHoliday(x.DateGr),
IsAbsent = !x.RollCallTimesList.Any(),
HasLeave = x.HasLeave,
RollCallTimesList = x.RollCallTimesList,
TotalWorkingHours = $"{(int)x.TotalWorkingHoursSpan.TotalHours}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
HasLeave = x.HasLeave,
TotalWorkingHours = $"{(int)x.TotalWorkingHoursSpan.TotalHours}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}"
}).ToList();
return new EmployeeRollCallsByMonthViewModel()
{
@@ -368,70 +349,14 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
};
}
public void AddRange(List<RollCall> rollCalls)
//Without Paginate
public List<RollCallViewModel> GetEmployeeRollCallsHistoryAllInDates(long workshopId, long employeeId, DateTime start, DateTime end)
{
_context.RollCalls.AddRange(rollCalls);
}
var withPersonnelCode = _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId);
//سوابق غیبت
public List<RollCallsByDateViewModel> GetWorkshopAbsentHistory(long workshopId, DateTime startSearch, DateTime endSearch)
{
if (endSearch.Date == DateTime.Now.Date)
endSearch = endSearch.AddDays(-1);
//get leaves for workshop that have been activated in dateIndex date
var leavesQuery = _context.LeaveList.Where(x => x.WorkshopId == workshopId &&
x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) &&
x.EndLeave.Date >= startSearch.Date && x.StartLeave.Date <= endSearch.Date);
//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);
//get active employees of workshop in dateIndex date
var activeEmployeesQuery =
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
.Where(x => x.WorkshopId == workshopId && x.EmployeesStatus.Any(y => y.EndDate.Date >= startSearch && y.StartDate.Date <= endSearch));
var rollCallsList = rollCallsQuery.ToList();
var activatedEmployeesList = activeEmployeesQuery.ToList();
var leavesList = leavesQuery.ToList();
int daysCount = (int)((endSearch.Date - startSearch.Date).TotalDays + 1);
List<DateTime> days = Enumerable.Range(0, daysCount).Select(x => startSearch.Date.AddDays(x)).ToList();
List<RollCallsByDateViewModel> result = new();
foreach (var day in days)
{
var item = new RollCallsByDateViewModel()
{
DateGr = day,
DateFa = day.ToFarsi(),
ActiveEmployees = activatedEmployeesList.Where(x => x.EmployeesStatus.Any(y => y.StartDate.Date <= day && y.EndDate.Date >= day) &&
!leavesList.Any(y => y.EmployeeId == x.EmployeeId && y.StartLeave.Date <= day && y.EndLeave.Date >= day) &&
!rollCallsList.Any(rc => rc.EmployeeId == x.EmployeeId && rc.StartDate.Value.Date == day.Date))
.Select(x => new RollCallViewModel()
{
EmployeeId = x.EmployeeId,
EmployeeFullName = x.EmployeeFullName,
Id = x.id,
WorkshopId = x.WorkshopId
}),
IsHoliday = _holidayItemApplication.IsHoliday(day),
IsFriday = day.DayOfWeek == DayOfWeek.Friday
};
result.Add(item);
}
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)
withPersonnelCode.Any(y => y.EmployeeId == x.EmployeeId) &&
(x.EndDate == null || x.EndDate.Value.Date >= start.Date) && x.StartDate.Value.Date <= end.Date)
.Select(x => new RollCallViewModel
{
EmployeeId = employeeId,
@@ -441,6 +366,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
}).ToList();
}
//سوابق حضور غیاب کارگاه
public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel)
{
@@ -487,20 +413,18 @@ 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 == searchModel.WorkshopId && x.StartDate.HasValue && x.StartDate < DateTime.Now.Date &&
.Where(x => x.WorkshopId == searchModel.WorkshopId && x.StartDate.HasValue && x.RollCallModifyType != RollCallModifyType.Undefined && x.StartDate < DateTime.Now.Date &&
x.StartDate.Value.Date == dateIndex.Date);
var personnelCodeQuery = _context.PersonnelCodeSet.Where(x => x.WorkshopId == searchModel.WorkshopId);
//get active employees of workshop in dateIndex date
var activeEmployeesQuery =
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeesStatus.Any(y => y.EndDate.Date >= dateIndex && y.StartDate.Date <= dateIndex)
.Where(x => x.WorkshopId == searchModel.WorkshopId && personnelCodeQuery.Any(y => y.EmployeeId == x.EmployeeId) &&
x.EmployeesStatus.Any(y => y.EndDate.Date >= dateIndex && y.StartDate.Date <= dateIndex)
&& !rollCallsQuery.Any(rc => rc.EmployeeId == x.EmployeeId && !rc.EndDate.HasValue));
if (searchModel.EmployeeId > 0)
{
rollCallsQuery = rollCallsQuery.Where(x => x.EmployeeId == searchModel.EmployeeId);
@@ -509,8 +433,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
}
var personnelCodeList =
_context.PersonnelCodeSet.Where(x => activeEmployeesQuery.Any(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == x.WorkshopId));
var personnelCodeList = personnelCodeQuery.ToList();
var activatedEmployeesList = activeEmployeesQuery.ToList();
rollCallsQuery = rollCallsQuery.Where(x => x.EndDate.HasValue);
var rollCallsList = rollCallsQuery.ToList();
@@ -554,11 +477,124 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
HasLeave = x.HasLeave,
IsAbsent = x.IsAbsent,
PersonnelCode = x.PersonnelCode,
TotalWorkingHours = $"{(int)x.TotalWorkingHoursSpan.TotalHours}:{(x.TotalWorkingHoursSpan.Minutes):00}"
TotalWorkingHours = $"{(int)x.TotalWorkingHoursSpan.TotalHours}:{(x.TotalWorkingHoursSpan.Minutes).ToString("00")}"
});
return result;
}
public RollCallsByDateViewModel GetWorkshopRollCallHistoryCollapsed(RollCallSearchModel searchModel)
{
//initialize
DateTime searchDurationEnd = DateTime.Now.AddDays(-1).Date;
DateTime searchDurationStart = searchDurationEnd.AddDays(-16);
//override if user has entered inputs (dates must be validated in the application layer)
if (!string.IsNullOrWhiteSpace(searchModel.StarDateFa) && !string.IsNullOrWhiteSpace(searchModel.StarDateFa))
{
searchDurationEnd = searchModel.EndDateFa.ToGeorgianDateTime().Date;
searchDurationStart = searchModel.StarDateFa.ToGeorgianDateTime().AddDays(-1).Date;
}
else
if (!string.IsNullOrWhiteSpace(searchModel.ExactDateFa))
{
searchDurationEnd = searchModel.ExactDateFa.ToGeorgianDateTime().Date;
searchDurationStart = searchModel.ExactDateFa.ToGeorgianDateTime().AddDays(-1).Date;
}
if (searchDurationEnd < searchDurationStart)
return new();
DateTime dateIndex = searchDurationEnd.AddDays(-1 * (searchModel.DateIndex)).Date;
if (dateIndex <= searchDurationStart)
return new();
var activeEmployeesList =
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
.Where(x => x.WorkshopId == searchModel.WorkshopId &&
x.EmployeesStatus.Any(y => y.EndDate.Date >= dateIndex && y.StartDate.Date <= dateIndex)).ToList();
var result = new RollCallsByDateViewModel()
{
DateGr = dateIndex,
DayOfWeekFa = dateIndex.DayOfWeek.DayOfWeeKToPersian(),
IsHoliday = _holidayItemApplication.IsHoliday(dateIndex),
DateFa = dateIndex.ToFarsi(),
ActiveEmployeesCount = activeEmployeesList.Count()
};
return result;
}
//سوابق غیبت
public List<RollCallsByDateViewModel> GetWorkshopAbsentHistory(long workshopId, DateTime startSearch, DateTime endSearch)
{
if (endSearch.Date == DateTime.Now.Date)
endSearch = endSearch.AddDays(-1);
//get leaves for workshop that have been activated in dateIndex date
var leavesQuery = _context.LeaveList.Where(x => x.WorkshopId == workshopId &&
x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) &&
x.EndLeave.Date >= startSearch.Date && x.StartLeave.Date <= endSearch.Date);
//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);
var withPersonnelCode = _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId);
//get active employees of workshop in dateIndex date
var activeEmployeesQuery =
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
.Where(x => x.WorkshopId == workshopId &&
x.EmployeesStatus.Any(y => y.EndDate.Date >= startSearch && y.StartDate.Date <= endSearch) &&
withPersonnelCode.Any(y => y.EmployeeId == x.EmployeeId));
var rollCallsList = rollCallsQuery.ToList();
var activatedEmployeesList = activeEmployeesQuery.ToList();
var leavesList = leavesQuery.ToList();
int daysCount = (int)((endSearch.Date - startSearch.Date).TotalDays + 1);
List<DateTime> days = Enumerable.Range(0, daysCount).Select(x => startSearch.Date.AddDays(x)).ToList();
List<RollCallsByDateViewModel> result = new();
foreach (var day in days)
{
var item = new RollCallsByDateViewModel()
{
DateGr = day,
DateFa = day.ToFarsi(),
ActiveEmployees = activatedEmployeesList.Where(x => x.EmployeesStatus.Any(y => y.StartDate.Date <= day && y.EndDate.Date >= day) &&
!leavesList.Any(y => y.EmployeeId == x.EmployeeId && y.StartLeave.Date <= day && y.EndLeave.Date >= day) &&
!rollCallsList.Any(rc => rc.EmployeeId == x.EmployeeId && rc.StartDate.Value.Date == day.Date))
.Select(x => new RollCallViewModel()
{
EmployeeId = x.EmployeeId,
EmployeeFullName = x.EmployeeFullName,
Id = x.id,
WorkshopId = x.WorkshopId
}),
IsHoliday = _holidayItemApplication.IsHoliday(day),
IsFriday = day.DayOfWeek == DayOfWeek.Friday
};
result.Add(item);
}
return result;
}
//گزارش آنلاین حضور غیاب کارگاه
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
{
@@ -583,14 +619,13 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
//get activated employees
var activeEmployees =
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
.Where(x => x.WorkshopId == workshopId && x.IsActiveString == "true" && x.EmployeesStatus.Any(y =>
y.StartDate.Date <= date &&
y.EndDate.Date >= date));
.Where(x => x.WorkshopId == workshopId && personnelCodes.Any(y => y.EmployeeId == x.EmployeeId) &&
x.EmployeesStatus.Any(y => y.StartDate.Date <= date && y.EndDate.Date >= date));
//get today's roll calls
var rollCallsQuery = _context.RollCalls.Where(x =>
x.WorkshopId == workshopId && (x.StartDate.Value.Date == date || x.EndDate == null));
x.WorkshopId == workshopId && (x.StartDate.Value.Date == date || x.EndDate == null) && x.RollCallModifyType != RollCallModifyType.Undefined);
@@ -663,6 +698,67 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
.ThenByDescending(x => x.RollCallTimesList.Max(y => y.StartDate)).ToList()
};
}
public void AddRange(List<RollCall> rollCalls)
{
_context.RollCalls.AddRange(rollCalls);
}
//تداخل مرخصی در کارپوشه
public List<OverlappedRollCallWithLeave> GetOverlappedRollCallsWithLeaveInDates(long workshopId, DateTime start,
DateTime end)
{
var rollCalls = _context.RollCalls.Where(x => x.WorkshopId == workshopId && x.EndDate.Value.Date >= start.Date &&
x.StartDate.Value.Date <= end).ToList();
var leaves =
_context.LeaveList.Where(x => x.WorkshopId == workshopId && x.EndLeave >= start && x.StartLeave <= end).ToList();
var overlappedRollCalls = rollCalls.Where(x => leaves.Any(y => x.EmployeeId == y.EmployeeId &&
x.EndDate.Value >= y.StartLeave &&
x.StartDate.Value <= y.EndLeave));
var result = overlappedRollCalls.Select(x =>
{
var leave = leaves.FirstOrDefault(y => x.EmployeeId == y.EmployeeId &&
x.EndDate.Value >= y.StartLeave &&
x.StartDate.Value <= y.EndLeave);
return new OverlappedRollCallWithLeave()
{
RollCallId = x.id,
LeaveId = leave.id,
StartOfOverlapDateTime = leave.StartLeave > x.StartDate.Value ? leave.StartLeave : x.StartDate.Value,
EndOfOverlapDateTime = leave.EndLeave < x.EndDate ? leave.EndLeave : x.EndDate.Value,
EmployeeFullName = x.EmployeeFullName,
EmployeeId = x.EmployeeId
};
}).ToList();
return result.Select(x => new OverlappedRollCallWithLeave()
{
RollCallId = x.RollCallId,
LeaveId = x.LeaveId,
StartOfOverlapDateTime = x.StartOfOverlapDateTime,
EndOfOverlapDateTime = x.EndOfOverlapDateTime,
StartOfOverlapDateFa = x.StartOfOverlapDateTime.ToFarsi(),
EndOfOverlapDateFa = x.EndOfOverlapDateTime.ToFarsi(),
EndOfOverlapTime = x.EndOfOverlapDateTime.ToString("HH:mm"),
StartOfOverlapTime = x.StartOfOverlapDateTime.ToString("HH:mm"),
EmployeeFullName = x.EmployeeFullName,
EmployeeId = x.EmployeeId
}).ToList();
}
public void UpdateRange(List<RollCall> rollCalls)
{
_context.RollCalls.UpdateRange(rollCalls);
}
public void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date)
{
@@ -699,29 +795,83 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
DateFa = x.DateFa,
StartDateFa = x.StartDateFa,
EndDateFa = x.EndDateFa,
EmployeeId = names.FirstOrDefault(e => e.EmployeeId == employeeId)!.EmployeeId,
EmployeeFullName = names.FirstOrDefault(e => e.EmployeeId == employeeId)!.EmployeeFullName
EmployeeId = employeeId,
EmployeeFullName = names.FirstOrDefault(e => e.EmployeeId == employeeId)!.EmployeeFullName,
DayOfWeekFa = x.StartDate.Value.DayOfWeek.DayOfWeeKToPersian(),
StartDayOfWeekFa = x.StartDate.Value.DayOfWeek.DayOfWeeKToPersian(),
EndDayOfWeekFa = x.EndDate.Value.DayOfWeek.DayOfWeeKToPersian(),
TotalWorkingHoursSpan = x.EndDate.Value - x.StartDate.Value
}).ToList();
}
public RollCallViewModel GetDetails(long rollCallId)
public IEnumerable<RollCallViewModel> GetNotSlicedRollCallsByWorkshopId(long workshopId, DateTime durationStart, DateTime durationEnd)
{
var entity = _context.RollCalls.FirstOrDefault(x => x.id == rollCallId);
if (entity == null)
return null;
var name = _context.RollCallEmployees.FirstOrDefault(x => x.WorkshopId == entity.WorkshopId && x.EmployeeId == entity.EmployeeId).EmployeeFullName;
return new RollCallViewModel
{
WorkshopId = entity.WorkshopId,
EmployeeId = entity.EmployeeId,
StartDate = entity.StartDate.Value,
EndDate = entity.EndDate.Value,
EmployeeFullName = name,
Id = entity.id,
DateGr = entity.StartDate.Value.Date
};
}
if (durationEnd.Date >= DateTime.Now.Date)
durationEnd = DateTime.Now.AddDays(-1).Date;
var names = _context.RollCallEmployees.Where(x => x.WorkshopId == workshopId).ToList();
var rollCalls = _context.RollCalls.Where(x => x.WorkshopId == workshopId &&
x.StartDate.Value.Date >= durationStart && x.StartDate.Value.Date <= durationEnd && x.EndDate.HasValue).ToList();
if (rollCalls == null || !rollCalls.Any())
return new List<RollCallViewModel>();
return rollCalls.GroupBy(x => x.StartDate.Value.Date).SelectMany(x =>
x.GroupBy(y => y.EmployeeId).Where(y => y.Count() == 1)
.SelectMany(y => y)).Select(x => new RollCallViewModel
{
Id = x.id,
StartDate = x.StartDate.Value,
EndDate = x.EndDate.Value,
EmployeeId = x.EmployeeId,
DateGr = x.StartDate.Value.Date,
EmployeeFullName = names.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.EmployeeFullName ?? ""
});
}
public List<RollCallViewModel> GetRange(IEnumerable<long> rollCallIds)
{
var query = _context.RollCalls.Where(x => rollCallIds.Contains(x.id));
var names = _context.RollCallEmployees.Where(x => query.Any(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == x.WorkshopId)).ToList();
return query.Select(x => new RollCallViewModel
{
StartDate = x.StartDate.Value,
EndDate = x.EndDate.Value,
Id = x.id,
EmployeeFullName = names.FirstOrDefault(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == x.WorkshopId).EmployeeFullName
}).ToList();
}
public List<RollCallsByDateViewModel> GetUndefinedRollCallWorkFlowsInDates(long workshopId, DateTime start, DateTime end)
{
{
var rollCalls = _context.RollCalls.IgnoreQueryFilters()
.Where(x => x.RollCallModifyType == RollCallModifyType.Undefined && x.WorkshopId == workshopId &&
x.StartDate.Value.Date >= start.Date && x.StartDate.Value.Date <= end.Date).ToList();
var names = _context.RollCallEmployees.Where(x => x.WorkshopId == workshopId)
.Select(x => new { x.EmployeeId, x.WorkshopId, x.EmployeeFullName }).ToList();
var result = rollCalls.GroupBy(x => x.StartDate!.Value.Date)
.Select(g => new RollCallsByDateViewModel()
{
DateGr = g.Key,
DateFa = g.Key.ToFarsi(),
DayOfWeekFa = g.Key.DayOfWeek.DayOfWeeKToPersian(),
ActiveEmployees = g.Select(x => new RollCallViewModel()
{
EmployeeId = x.EmployeeId,
EmployeeFullName = names.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.EmployeeFullName ?? "",
WorkshopId = x.WorkshopId,
Id = x.id,
StartDate = x.StartDate,
EndDate = x.EndDate
})
})
.ToList();
return result;
}
}
#endregion
public long Flag(long employeeId, long workshopId)
{
@@ -777,4 +927,23 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
}
}
public RollCallViewModel GetDetails(long rollCallId)
{
var entity = _context.RollCalls.FirstOrDefault(x => x.id == rollCallId);
if (entity == null)
return null;
var name = _context.RollCallEmployees.FirstOrDefault(x => x.WorkshopId == entity.WorkshopId && x.EmployeeId == entity.EmployeeId).EmployeeFullName;
return new RollCallViewModel
{
WorkshopId = entity.WorkshopId,
EmployeeId = entity.EmployeeId,
StartDate = entity.StartDate.Value,
EndDate = entity.EndDate.Value,
EmployeeFullName = name,
Id = entity.id,
DateGr = entity.StartDate.Value.Date
};
}
}

View File

@@ -309,12 +309,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -326,6 +327,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].BreakTimeString</td>
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (@Model.MonthlyRollCall[i].IsSliced)
{
@@ -350,12 +352,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -370,6 +373,7 @@
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.BreakTimeString</td>
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (day.IsSliced)
{

View File

@@ -306,12 +306,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -323,6 +324,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].BreakTimeString</td>
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (@Model.MonthlyRollCall[i].IsSliced)
{
@@ -347,12 +349,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -367,6 +370,7 @@
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.BreakTimeString</td>
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (day.IsSliced)
{

View File

@@ -309,12 +309,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -326,6 +327,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].BreakTimeString</td>
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (@Model.MonthlyRollCall[i].IsSliced)
{
@@ -350,12 +352,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -370,6 +373,7 @@
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.BreakTimeString</td>
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (day.IsSliced)
{

View File

@@ -296,12 +296,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -313,6 +314,7 @@
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].BreakTimeString</td>
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (@Model.MonthlyRollCall[i].IsSliced)
{
@@ -337,12 +339,13 @@
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 17%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
<th style="font-size: 8px;text-align: center;width: 8%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
<th style="font-size: 8px;text-align: center;width: 14%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
<th style="font-size: 8px;text-align: center;width: 16%;padding: 0 0 0 5px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
</tr>
</thead>
<tbody>
@@ -357,6 +360,7 @@
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.BreakTimeString</td>
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
@if (day.IsSliced)
{