diff --git a/Company.Domain/LeftWorkInsuranceAgg/ILeftWorkInsuranceRepository.cs b/Company.Domain/LeftWorkInsuranceAgg/ILeftWorkInsuranceRepository.cs index 5bd39f8e..ef638a91 100644 --- a/Company.Domain/LeftWorkInsuranceAgg/ILeftWorkInsuranceRepository.cs +++ b/Company.Domain/LeftWorkInsuranceAgg/ILeftWorkInsuranceRepository.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using _0_Framework.Application; using _0_Framework.Domain; using CompanyManagment.App.Contracts.InsuranceList; +using CompanyManagment.App.Contracts.LeftWork; using CompanyManagment.App.Contracts.LeftWorkInsurance; using CompanyManagment.App.Contracts.PersonnleCode; @@ -40,5 +41,16 @@ public interface ILeftWorkInsuranceRepository : IRepository List GetEmployeeInsuranceLeftWorksAndInformation(long workshopId, DateTime startDate, DateTime endDate); - #endregion + #endregion + + #region Mahan + + /// + /// پرسنل هایی که در قرارداد ترک کار دارند ولی در بیمه ترک کاری برایشان نخورده + /// + /// + /// + List GetEmployeesWithContractExitOnly(long workshopId); + + #endregion } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/InsuranceList/EditInsuranceList.cs b/CompanyManagment.App.Contracts/InsuranceList/EditInsuranceList.cs index a9d86b20..9a45fa67 100644 --- a/CompanyManagment.App.Contracts/InsuranceList/EditInsuranceList.cs +++ b/CompanyManagment.App.Contracts/InsuranceList/EditInsuranceList.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using CompanyManagment.App.Contracts.LeftWork; namespace CompanyManagment.App.Contracts.InsuranceList; @@ -14,4 +15,8 @@ public class EditInsuranceList:CreateInsuranceList public string Population { get; set; } public long? InsuranceJobId { get; set; } + /// + /// پرسنل هایی که قرارداد ترک کار کرده اند ولی ترک کار بیمه ندارند + /// + public List LeftWorkEmployees { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index e05f2296..e75d1c7d 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -292,12 +292,12 @@ public class InsuranceListApplication: IInsuranceListApplication var consumableItems = new YearlysalaryItemViewModel(); if (yearSalaryObj != null) { - yearlysalaryItem = _yearlySalaryItemApplication.GetItemsByYearlySalaryId(yearSalaryObj.Id) - .Where(x => x.ItemName == "مزد روزانه").FirstOrDefault(); - housingAllowance = _yearlySalaryItemApplication.GetItemsByYearlySalaryId(yearSalaryObj.Id) - .Where(x => x.ItemName == "کمک هزینه مسکن").FirstOrDefault(); - consumableItems = _yearlySalaryItemApplication.GetItemsByYearlySalaryId(yearSalaryObj.Id) - .Where(x => x.ItemName == "کمک هزینه اقلام").FirstOrDefault(); + yearlysalaryItem = _yearlySalaryItemApplication + .GetItemsByYearlySalaryId(yearSalaryObj.Id).FirstOrDefault(x => x.ItemName == "مزد روزانه"); + housingAllowance = _yearlySalaryItemApplication + .GetItemsByYearlySalaryId(yearSalaryObj.Id).FirstOrDefault(x => x.ItemName == "کمک هزینه مسکن"); + consumableItems = _yearlySalaryItemApplication + .GetItemsByYearlySalaryId(yearSalaryObj.Id).FirstOrDefault(x => x.ItemName == "کمک هزینه اقلام"); } foreach (var item in insuranceListDetails.EmployeeDetailsForInsuranceList) @@ -341,6 +341,10 @@ public class InsuranceListApplication: IInsuranceListApplication insuranceListDetails.AllInsuredShare = insuranceListDetails.InsuredShare + insuranceListDetails.EmployerShare + insuranceListDetails.UnEmploymentInsurance; + + insuranceListDetails.LeftWorkEmployees = + _leftWorkInsuranceRepository.GetEmployeesWithContractExitOnly(insuranceListDetails.WorkshopId); + return insuranceListDetails; } diff --git a/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs b/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs index 4255f632..fdd2f89e 100644 --- a/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs +++ b/CompanyManagment.EFCore/Repository/LeftWorkInsuranceRepository.cs @@ -8,6 +8,7 @@ using Company.Domain.InsuranceListAgg; using Company.Domain.LeftWorkInsuranceAgg; using Company.Domain.PersonnelCodeAgg; using CompanyManagment.App.Contracts.InsuranceList; +using CompanyManagment.App.Contracts.LeftWork; using CompanyManagment.App.Contracts.LeftWorkInsurance; using CompanyManagment.App.Contracts.PersonnleCode; using Microsoft.EntityFrameworkCore; @@ -25,15 +26,15 @@ public class LeftWorkInsuranceRepository : RepositoryBase new EditLeftWorkInsurance() - { - Id = x.id, - LeftWorkDate = x.LeftWorkDate != null ? x.LeftWorkDate.ToFarsi() : "", - StartWorkDate = x.StartWorkDate.ToFarsi(), - EmployeeFullName = x.EmployeeFullName, - WorkshopName = x.WorkshopName, - WorkshopId = x.WorkshopId, - EmployeeId = x.EmployeeId - }) + { + Id = x.id, + LeftWorkDate = x.LeftWorkDate != null ? x.LeftWorkDate.ToFarsi() : "", + StartWorkDate = x.StartWorkDate.ToFarsi(), + EmployeeFullName = x.EmployeeFullName, + WorkshopName = x.WorkshopName, + WorkshopId = x.WorkshopId, + EmployeeId = x.EmployeeId + }) .FirstOrDefault(x => x.Id == id); } @@ -89,7 +90,7 @@ public class LeftWorkInsuranceRepository : RepositoryBasex.WorkshopId == workshopId); + }).Where(x => x.WorkshopId == workshopId); return query.ToList(); } @@ -108,10 +109,10 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.id == item.JobId).FirstOrDefault(); - var insuranceListIds = _context.EmployeeInsurancListDataSet.Where(x => x.EmployeeId == searchModel.EmployeeId && (x.StartWorkDate == item.StartWorkDate ||x.LeftWorkDate==item.LeftWorkDate)) - .Select(x=>x.InsuranceListId).ToList(); - var hasInsuranceList = _context.InsuranceListSet.Any(x => insuranceListIds.Contains(x.id) && x.WorkshopId==item.WorkshopId); - + var insuranceListIds = _context.EmployeeInsurancListDataSet.Where(x => x.EmployeeId == searchModel.EmployeeId && (x.StartWorkDate == item.StartWorkDate || x.LeftWorkDate == item.LeftWorkDate)) + .Select(x => x.InsuranceListId).ToList(); + var hasInsuranceList = _context.InsuranceListSet.Any(x => insuranceListIds.Contains(x.id) && x.WorkshopId == item.WorkshopId); + list.Add(new LeftWorkInsuranceViewModel() { Id = item.id, @@ -125,7 +126,7 @@ public class LeftWorkInsuranceRepository : RepositoryBasex.id==id); - if(item !=null) + var item = _context.LeftWorkInsuranceList.FirstOrDefault(x => x.id == id); + if (item != null) _context.LeftWorkInsuranceList.Remove(item); - + _context.SaveChanges(); return op.Succcedded(); } - public OperationResult RemoveAllLeftWorkInsurance(long workshopId, long employeeId) + public OperationResult RemoveAllLeftWorkInsurance(long workshopId, long employeeId) { var op = new OperationResult(); @@ -161,8 +162,8 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.WorkshopId == workshopId).ToList(); foreach (var item in insuranceList) { - hasInsurance =_context.EmployeeInsurancListDataSet.Any(x => x.EmployeeId == employeeId && x.InsuranceListId==item.id); - if(hasInsurance) + hasInsurance = _context.EmployeeInsurancListDataSet.Any(x => x.EmployeeId == employeeId && x.InsuranceListId == item.id); + if (hasInsurance) break; } //tempChange @@ -174,7 +175,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase 0) _context.LeftWorkInsuranceList.RemoveRange(list); - bool hasLeftWork = _context.LeftWorkList.Any(x => x.EmployeeId == employeeId && x.WorkshopId==workshopId); + bool hasLeftWork = _context.LeftWorkList.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId); if (!hasLeftWork) { var personelCodeList = _context.PersonnelCodeSet.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId).ToList(); @@ -186,8 +187,8 @@ public class LeftWorkInsuranceRepository : RepositoryBase" + "" +"کد پرسنلی این شخص در این کارگاه به دلیل استفاده در ترک کار قرارداد قابل حذف نمی باشد. " + ""; + { + op.Message = "حذف با موفقیت انجام شد." + "
" + "" + "کد پرسنلی این شخص در این کارگاه به دلیل استفاده در ترک کار قرارداد قابل حذف نمی باشد. " + ""; op.IsSuccedded = true; } else @@ -231,7 +232,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase SearchForCreateInsuranceList(EmployeeForCreateInsuranceListSearchModel searchModel) { - List listLeftWorkInsurance = new List(); + List listLeftWorkInsurance = new List(); // IQueryable query; //if (searchModel.WorkshopIds != null && searchModel.WorkshopIds.Count > 0) @@ -286,7 +287,7 @@ public class LeftWorkInsuranceRepository : RepositoryBasex.EmployeeId==employeeId && x.WorkshopId==workshopId).OrderByDescending(x=>x.id).FirstOrDefault(); + var leftWorkInsuranceObj = _context.LeftWorkInsuranceList.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId).OrderByDescending(x => x.id).FirstOrDefault(); if (leftWorkInsuranceObj != null) { @@ -327,7 +328,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId).FirstOrDefault(); if (personelcode != null) { - if(_context.PersonnelCodeSet.Any(x=> x.WorkshopId == command.WorkshopId && x.PersonnelCode == personelcode.PersonnelCode)) + if (_context.PersonnelCodeSet.Any(x => x.WorkshopId == command.WorkshopId && x.PersonnelCode == personelcode.PersonnelCode)) { op.Failed(" کد پرسنلی در کارگاه " + command.WorkshopName + " تکراری می باشد. "); } @@ -370,7 +371,7 @@ public class LeftWorkInsuranceRepository : RepositoryBasex.Id==removeItem.id)) + if (!item.LeftworkInsuranceViewModels.Any(x => x.Id == removeItem.id)) removeList.Add(removeItem); } foreach (var item2 in item.LeftworkInsuranceViewModels) - { + { DateTime? left = null; if (!string.IsNullOrWhiteSpace(item2.LeftWorkDate)) left = item2.LeftWorkDate.ToGeorgianDateTime(); @@ -469,7 +470,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.EmployeeId == item2.EmployeeId && x.WorkshopId == item2.WorkshopId && x.StartWorkDate == start); - + if (!check) { @@ -477,11 +478,11 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.id==item2.Id)?.FirstOrDefault(); + var leftworkInsurance = _context.LeftWorkInsuranceList.Where(x => x.id == item2.Id)?.FirstOrDefault(); leftworkInsurance.Edit(left, start, item2.WorkshopId, item2.EmployeeId, item2.JobId, item2.IncludeStatus); } } @@ -508,13 +509,13 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.WorkshopId == workshopId).ToList(); foreach (var item in insuranceList) { - if(type == 1) + if (type == 1) hasInsurance = _context.EmployeeInsurancListDataSet.Any(x => x.EmployeeId == employeeId && x.InsuranceListId == item.id && x.StartWorkDate.Date >= date.Date && item.ConfirmSentlist); else hasInsurance = _context.EmployeeInsurancListDataSet.Any(x => x.EmployeeId == employeeId && x.InsuranceListId == item.id && (x.LeftWorkDate != null && ((DateTime)x.LeftWorkDate).Date == date.Date)); @@ -555,7 +556,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.Year == year && x.Month == month && x.WorkshopId == workshopId).ToList(); if (insuranceList != null && insuranceList.Count > 0) - { + { foreach (var item in insuranceList) { if (type == 1) @@ -587,7 +588,7 @@ public class LeftWorkInsuranceRepository : RepositoryBase x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartWorkDate < startDate) - .OrderBy(x=>x.StartWorkDate) + .OrderBy(x => x.StartWorkDate) .ToList(); if (lefts.Count > 0) { @@ -689,74 +690,110 @@ public class LeftWorkInsuranceRepository : RepositoryBasex); + var sum = totalDays.Sum(x => x); return (sum / 365); } else { return 0; } - + } #region Insurance public List GetEmployeeInsuranceLeftWorksAndInformation(long workshopId, DateTime startDate, DateTime endDate) { - if (workshopId == 0) - return []; - var query = _context.LeftWorkInsuranceList.Include(x => x.Employee) - .Where(x => x.WorkshopId == workshopId) - .Where(x => - ((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) && - ((DateTime)x.LeftWorkDate >= startDate && - (DateTime)x.LeftWorkDate <= endDate)) || - ((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) && - (DateTime)x.LeftWorkDate >= endDate) || - (x.LeftWorkDate == null || x.LeftWorkDate == DateTime.MinValue)) - .Where(x => x.StartWorkDate <= endDate) - .Join(_context.Jobs, - left => left.JobId, - job => job.id, - (left, job) => new { left, job }) - .GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(), - result => result.left.EmployeeId, - employeeInfo => employeeInfo.EmployeeId, - (result, employeeInfo) => new - { - result.left, - result.job, - employeeInfo - }) - .SelectMany(x => x.employeeInfo.DefaultIfEmpty(), (x, employeeInfo) => new { x, employeeInfo }) - .Select(result => new EmployeeDetailsForInsuranceListViewModel - { - StartWorkDateGr = result.x.left.StartWorkDate, - LeftWorkDateGr = result.x.left.LeftWorkDate, - IncludeStatus = result.x.left.IncludeStatus, - JobId = result.x.left.JobId, - JobName = result.x.job != null ? result.x.job.JobName : string.Empty, - JobCode = result.x.job != null ? result.x.job.JobCode : string.Empty, - InsuranceEmployeeInformationId = result.employeeInfo != null ? result.employeeInfo.id : 0, - EmployeeId = result.x.left.EmployeeId, - - //اطلاعات هویتی - FName = result.employeeInfo != null ? result.employeeInfo.FName : result.x.left.Employee.FName, - LName = result.employeeInfo != null ? result.employeeInfo.LName : result.x.left.Employee.LName, - FatherName = result.employeeInfo != null ? result.employeeInfo.FatherName : result.x.left.Employee.FatherName, - DateOfBirthGr = result.employeeInfo != null ? result.employeeInfo.DateOfBirth : result.x.left.Employee.DateOfBirth, - DateOfIssueGr = result.employeeInfo != null ? result.employeeInfo.DateOfIssue : result.x.left.Employee.DateOfIssue, - PlaceOfIssue = result.employeeInfo != null ? result.employeeInfo.PlaceOfIssue : result.x.left.Employee.PlaceOfIssue, - IdNumber = result.employeeInfo != null ? result.employeeInfo.IdNumber : result.x.left.Employee.IdNumber, - Gender = result.employeeInfo != null ? result.employeeInfo.Gender : result.x.left.Employee.Gender, - NationalCode = result.x.left.Employee.NationalCode, - Nationality = result.x.left.Employee.Nationality, - InsuranceCode = result.x.left.Employee.InsuranceCode, - MaritalStatus = result.x.left.Employee.MaritalStatus, - IsMaritalStatusSet = !string.IsNullOrWhiteSpace(result.x.left.Employee.MaritalStatus) - }).ToList(); + if (workshopId == 0) + return []; + var query = _context.LeftWorkInsuranceList.Include(x => x.Employee) + .Where(x => x.WorkshopId == workshopId) + .Where(x => + ((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) && + ((DateTime)x.LeftWorkDate >= startDate && + (DateTime)x.LeftWorkDate <= endDate)) || + ((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) && + (DateTime)x.LeftWorkDate >= endDate) || + (x.LeftWorkDate == null || x.LeftWorkDate == DateTime.MinValue)) + .Where(x => x.StartWorkDate <= endDate) + .Join(_context.Jobs, + left => left.JobId, + job => job.id, + (left, job) => new { left, job }) + .GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(), + result => result.left.EmployeeId, + employeeInfo => employeeInfo.EmployeeId, + (result, employeeInfo) => new + { + result.left, + result.job, + employeeInfo + }) + .SelectMany(x => x.employeeInfo.DefaultIfEmpty(), (x, employeeInfo) => new { x, employeeInfo }) + .Select(result => new EmployeeDetailsForInsuranceListViewModel + { + StartWorkDateGr = result.x.left.StartWorkDate, + LeftWorkDateGr = result.x.left.LeftWorkDate, + IncludeStatus = result.x.left.IncludeStatus, + JobId = result.x.left.JobId, + JobName = result.x.job != null ? result.x.job.JobName : string.Empty, + JobCode = result.x.job != null ? result.x.job.JobCode : string.Empty, + InsuranceEmployeeInformationId = result.employeeInfo != null ? result.employeeInfo.id : 0, + EmployeeId = result.x.left.EmployeeId, - return query; + //اطلاعات هویتی + FName = result.employeeInfo != null ? result.employeeInfo.FName : result.x.left.Employee.FName, + LName = result.employeeInfo != null ? result.employeeInfo.LName : result.x.left.Employee.LName, + FatherName = result.employeeInfo != null ? result.employeeInfo.FatherName : result.x.left.Employee.FatherName, + DateOfBirthGr = result.employeeInfo != null ? result.employeeInfo.DateOfBirth : result.x.left.Employee.DateOfBirth, + DateOfIssueGr = result.employeeInfo != null ? result.employeeInfo.DateOfIssue : result.x.left.Employee.DateOfIssue, + PlaceOfIssue = result.employeeInfo != null ? result.employeeInfo.PlaceOfIssue : result.x.left.Employee.PlaceOfIssue, + IdNumber = result.employeeInfo != null ? result.employeeInfo.IdNumber : result.x.left.Employee.IdNumber, + Gender = result.employeeInfo != null ? result.employeeInfo.Gender : result.x.left.Employee.Gender, + NationalCode = result.x.left.Employee.NationalCode, + Nationality = result.x.left.Employee.Nationality, + InsuranceCode = result.x.left.Employee.InsuranceCode, + MaritalStatus = result.x.left.Employee.MaritalStatus, + IsMaritalStatusSet = !string.IsNullOrWhiteSpace(result.x.left.Employee.MaritalStatus) + }).ToList(); + + return query; + } + + #endregion + + #region Mahan + + public List GetEmployeesWithContractExitOnly(long workshopId) + { + var leftWorkedEmployees = _context.LeftWorkList + .Where(x => x.WorkshopId == workshopId) + .GroupBy(x => x.EmployeeId) + .Select(x => new + { + EmployeeId = x.Key, + x.OrderByDescending(s => s.StartWorkDate).FirstOrDefault().LeftWorkDate + }).Where(x => x.LeftWorkDate != new DateTime(2121, 3, 21)) + .ToList(); + + var leftWorkEmployeeIds = leftWorkedEmployees.Select(x => x.EmployeeId); + + var insuranceLeftWorkWithContractExitOnly = _context.LeftWorkInsuranceList.Where(x => + x.WorkshopId == workshopId && leftWorkEmployeeIds.Contains(x.EmployeeId) && x.LeftWorkDate == null).ToList() + .Select(x => + { + var employee = leftWorkedEmployees.First(l => l.EmployeeId == x.EmployeeId); + return new LeftWorkViewModel() + { + WorkshopId = x.WorkshopId, + EmployeeId = x.EmployeeId, + EmployeeFullName = x.EmployeeFullName, + LeftWorkDate = employee.LeftWorkDate.ToFarsi(), + LeftWorkDateGr = employee.LeftWorkDate + }; + }); + + return insuranceLeftWorkWithContractExitOnly.ToList(); } #endregion diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml index 9f2ca6b7..46b64a38 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/InsuranceConfirm.cshtml @@ -1,4 +1,5 @@ @using _0_Framework.Application +@using CompanyManagment.App.Contracts.LeftWork @model CompanyManagment.App.Contracts.InsuranceList.EditInsuranceList @@ -75,8 +76,17 @@ size: A4 landscape; } + .table-container-employee { + display: flex; + width: 100%; + justify-content: space-between; + } - + .trTable:nth-child(2n) { + background-color: #f1f1f1 !important; + -webkit-print-color-adjust: exact !important; + print-color-adjust: exact !important; + } #printThis .table-bordered .has-left-work p, #printThis .table-bordered .has-start-work p { margin: 0; @@ -279,8 +289,8 @@ .asignment-field { display: flex; justify-content: flex-end; - margin-bottom: 50px !important; - margin-top: 25px !important; + margin-bottom: 60px !important; + margin-top: 15px !important; } @@ -374,6 +384,15 @@ #printThis .colgp-16 { width: 60px; } + + .col-md-9, .col-sm-9, .col-lg-9 { + width: 75%; + float: right; + } + + .asignment { + width: 25%; + } } @@media screen { @@ -492,6 +511,13 @@ #printThis .table-bordered .has-start-work td { background: grey !important; } + + #printThis .trTable.new-leftwork td { + background-color: #333333 !important; + color: #ffffff !important; + -webkit-print-color-adjust: exact !important; + print-color-adjust: exact !important; + } } @@ -525,12 +551,24 @@
- -
-

تایید کارفرما جهت تنظیم لیست بیمه پرسنل

+ @* *@ +
+

+ * سطر به رنگ + به معنای ترک کار پرسنل می باشد. +

+

+ * سطر به رنگ به معنای شروع بکار پرسنل می باشد. +

+
-
- +
+

تایید کارفرما جهت تنظیم لیست بیمه پرسنل

+
+ +
+ +
@@ -788,8 +826,101 @@
-
-
+
+ +
+ @{ + var pageStartIndex = i * 12; + var pageEndIndex = (i == q - 1) ? ((i * 12) + r) : ((i + 1) * 12); + + var pageEmployees = Model.EmployeeDetailsForInsuranceList + .Skip(pageStartIndex) + .Take(pageEndIndex - pageStartIndex) + .ToList(); + var pageEmployeeIds = pageEmployees.Select(x => x.EmployeeId).ToHashSet(); + + var leftWorkList = Model.LeftWorkEmployees + .Where(x => pageEmployeeIds.Contains(x.EmployeeId)) + .Select(x => new LeftWorkViewModel { + EmployeeFullName = x.EmployeeFullName ?? "-", + LeftWorkDate = x.LeftWorkDate ?? "-" + }) + .ToList(); + + while (leftWorkList.Count < 12) + { + leftWorkList.Add(new LeftWorkViewModel { EmployeeFullName = "-", LeftWorkDate = "-" }); + } + + var tables = new List>(); + for (int t = 0; t < 3; t++) + { + tables.Add(leftWorkList.Skip(t * 4).Take(4).ToList()); + } + } + +

هشدار پرسنل ذیل با توجه به تاریخ مندرج با مجموعه شما هیچگونه قرارداد کاری ندارند.

+
+
+ + @for (int t = 0; t < tables.Count; t++) + { + var table = tables[t]; + + + + + + + + + + + + @foreach (var item in table) + { + + + + + } +
تاریخنام پرسنل
+ @item.LeftWorkDate + + @item.EmployeeFullName +
+ } + + + + + + @* + + + + + + + + + + + + + + +
تاریخنام پرسنل
+ - + + - +
*@ +
+
+
+ + @*

* سطر به رنگ به معنای ترک کار پرسنل می باشد. @@ -797,10 +928,10 @@

* سطر به رنگ به معنای شروع بکار پرسنل می باشد.

-
-

صفحه @(i + 1) از @((r>0 && r <= 8 )?q:q+1)

-
-
+
*@ +

صفحه @(i + 1) از @((r > 0 && r <= 8) ? q : q + 1)

+
+ @*
*@
امضا و تایید کارفرما
@@ -816,12 +947,12 @@
- + @* *@

تایید کارفرما جهت تنظیم لیست بیمه پرسنل

- + @* *@