Rotating RollCall and night work completed - directLogin on accountManager ReFine - InsuranceList a personel with id 42738 change compute

This commit is contained in:
SamSys
2024-08-19 17:11:33 +03:30
parent 658f01e92d
commit a1ea0d73e2
6 changed files with 61 additions and 20 deletions

View File

@@ -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);

View File

@@ -340,14 +340,15 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
}
#endregion
//******نوبت کاری****
#region RotatingShiftCheck
//****** نوبت کاری و شب کاری ****
#region RotatingShiftCheckAndNightWorkOver22
List<RotatingShiftViewModel> 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<string>();
if (moriningCount > 0)
RotatingfaName.Add("صبح");
@@ -373,6 +374,12 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, 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<long, RollCall>, 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<long, RollCall>, 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

View File

@@ -485,22 +485,31 @@
j++;
}
<td>
<a class="btn btn-warning pull-right m-rl-5 red"
href="#showmodal=@Url.Page("./Index", "Edit", new { Id = item.Id })">
<i class="fa fa-edit faSize"></i>
<a class="btn btn-success pull-right m-rl-5 red" onclick="directLogin(@item.Id)">
<i class="fa fa-sign-in faSize"></i><span style="position: relative;bottom: 3px;">ورود به کلاینت</span>
</a>
<a class="btn btn-info pull-right m-rl-5 red"
href="#showmodal=@Url.Page("./Index", "ChangePassword", new { Id = item.Id })">
<i class="fa fa-key faSize"></i> تغییر گذرواژه
href="#showmodal=@Url.Page("./Index", "ChangePassword", new { item.Id })">
<i class="fa fa-key faSize"></i>
</a>
<a class="btn btn-warning pull-right m-rl-5 red"
href="#showmodal=@Url.Page("./Index", "Edit", new { item.Id })">
<i class="fa fa-edit faSize"></i>
</a>
@if (item.IsActiveString == "true" && item.Role != "مدیر سیستم")
{
<a onclick="deActive(@item.Id, '@item.Fullname')" class="btn btn-danger pull-right m-rl-5 red"> <i class="fa faSize fa-trash"></i></a>
<a onclick="deActive(@item.Id, '@item.Fullname')" class="btn btn-danger pull-right m-rl-5 red">
<i class="fa faSize fa-trash"></i>
</a>
}
else if (item.IsActiveString == "false")
{
<a onclick="Active(@item.Id, '@item.Fullname')" class=" btn btn-success pull-right m-rl-5 red"> <i class="fa faSize fa-rotate-left"></i></a>
<a onclick="Active(@item.Id, '@item.Fullname')" class=" btn btn-success pull-right m-rl-5 red">
<i class="fa faSize fa-rotate-left"></i>
</a>
}
</td>
</tr>
@@ -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', 'پیام سیستم ', "خطا در ورود به اکانت");
}
}
});
}
</script>
<script>
$(document).ready(function() {
$('#datatable2').dataTable(

View File

@@ -842,6 +842,7 @@ public class IndexModel : PageModel
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
//farokhiChanges
if (employeeId == 42783)
benefitsIncludedContinuousL = 88000000;
if (workingDaysL < endMonthCurrentDayL)

Binary file not shown.

Binary file not shown.