diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index b1ceb191..894d9fc3 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -620,8 +620,11 @@ public class InsuranceListApplication: IInsuranceListApplication { employeeDetailsForInsuranceObj.MonthlyBenefits = 0; } + //farokhiChanges + if (item.EmployeeId == 42783) + employeeDetailsForInsuranceObj.MonthlyBenefits = 88000000; - employeeDetailsForInsuranceObj.BenefitsIncludedContinuous =employeeDetailsForInsuranceObj.MonthlyBenefits + employeeDetailsForInsuranceObj.MonthlySalary; + employeeDetailsForInsuranceObj.BenefitsIncludedContinuous =employeeDetailsForInsuranceObj.MonthlyBenefits + employeeDetailsForInsuranceObj.MonthlySalary; //if ((!item.IncludeStatus &&(item.JobId == 10 || item.JobId == 17 || item.JobId == 18 || item.JobId == 16)) ||(item.IncludeStatus && item.JobId == 10)) // 10 --> karfarma //{ @@ -661,7 +664,8 @@ public class InsuranceListApplication: IInsuranceListApplication employeeDetailsForInsuranceObj.LeftWorkDateGr = item.LeftWorkDateGr; employeeDetailsForInsuranceObj.StartWorkDateGr = item.StartWorkDateGr; - if (item.EmployeeId == 42783) + //farokhiChanges + if (item.EmployeeId == 42783) employeeDetailsForInsuranceObj.MonthlyBenefits = 88000000; list.Add(employeeDetailsForInsuranceObj); diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs index 227ff41d..6a5a8d4a 100644 --- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs @@ -340,14 +340,15 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll } #endregion - //******نوبت کاری**** - #region RotatingShiftCheck + //****** نوبت کاری و شب کاری **** + #region RotatingShiftCheckAndNightWorkOver22 List rotatingResultList = RotatingShiftCheck(groupedRollCall); var moriningCount = rotatingResultList.Count(x => x.IsMorningShift); var eveningCount = rotatingResultList.Count(x => x.IsEveningShift); var nightCount = rotatingResultList.Count(x => x.IsNightShift); - + // شبکاری + TimeSpan over22 = new TimeSpan(rotatingResultList.Sum(x => x.NightWorkSpan.Ticks)); var RotatingfaName = new List(); if (moriningCount > 0) RotatingfaName.Add("صبح"); @@ -373,6 +374,12 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll else if (RotatingfaName.Count <= 1) { rotatingFaResult = "نوبت کاری ندارد"; + + var over22Hours = (int)over22.TotalHours; + var over22Minuts = (int)(over22.TotalMinutes % 60); + shiftOver22Hours = over22Hours.ToString(); + shiftOver22Minuts = over22Minuts.ToString(); + } #endregion #region ShiftPayPercent @@ -583,17 +590,17 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll #region fix 24 Hourse - if (shift.End.Date >= shift.Start.Date && shift.End.TimeOfDay >= shift.Start.TimeOfDay) - { - nightWorkingTime = new TimeSpan(8, 0, 0); - morningWorkingTime = new TimeSpan(8, 0, 0); - eveningWorkingTime = new TimeSpan(8, 0, 0); - } + //if (shift.End.Date >= shift.Start.Date && shift.End.TimeOfDay >= shift.Start.TimeOfDay) + //{ + // nightWorkingTime = new TimeSpan(8, 0, 0); + // morningWorkingTime = new TimeSpan(8, 0, 0); + // eveningWorkingTime = new TimeSpan(8, 0, 0); + //} #endregion #region morning enter 14 <- 6 - else if (shift.Start >= morningStart // 14<---<6 + if (shift.Start >= morningStart // 14<---<6 && shift.End <= morningEnd) { morningWorkingTime = (shift.End - shift.Start); @@ -653,7 +660,7 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll { eveningWorkingTime = (eveningEnd - shift.Start); nightWorkingTime = new TimeSpan(8, 0, 0); - morningWorkingTime = (shift.End - morningEndNextday); + morningWorkingTime = (shift.End - nightEndNextday); } else if (shift.Start >= eveningStart // 22<---14<---6---22---14 && shift.Start < eveningEnd diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml index 5cd3ac53..c8b06c30 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/Index.cshtml @@ -485,22 +485,31 @@ j++; } - - + + ورود به کلاینت - تغییر گذرواژه + href="#showmodal=@Url.Page("./Index", "ChangePassword", new { item.Id })"> + + + + + @if (item.IsActiveString == "true" && item.Role != "مدیر سیستم") { - + + + } else if (item.IsActiveString == "false") { - + + + } + @@ -548,9 +557,29 @@ }); }); + function directLogin(id) { + + + $.ajax({ + async: false, + dataType: 'json', + type: 'POST', + url: '@Url.Page("./Index", "LoginToClient")', + headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() }, + data: { "id": id }, + success: function (response) { + if (response.isSuccess) { + window.location.href = "/Client"; + } else { + $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "خطا در ورود به اکانت"); + } + } + }); + } +