Compare commits
51 Commits
Feature/Em
...
Fix/RollCa
| Author | SHA1 | Date | |
|---|---|---|---|
| 38171581d3 | |||
|
|
0d66a79d49 | ||
|
|
0ed24dff45 | ||
|
|
53061f29b7 | ||
|
|
861efc48e0 | ||
|
|
eb16bda0ae | ||
|
|
3285be107e | ||
|
|
4818fa32f4 | ||
|
|
79e5d98ac6 | ||
|
|
73732cfe67 | ||
|
|
f2580c8e28 | ||
|
|
b99c503b58 | ||
|
|
2fd1878126 | ||
|
|
a8c449c101 | ||
|
|
80c0ec28d5 | ||
|
|
b133aa67d2 | ||
|
|
8122c9d841 | ||
|
|
75e2a3c558 | ||
|
|
6942e55823 | ||
|
|
2314fd456c | ||
|
|
4415cb8128 | ||
|
|
f0547828a6 | ||
|
|
b5afc9eef0 | ||
|
|
83a17a7e86 | ||
|
|
8e3a5b46da | ||
|
|
b15c34373b | ||
|
|
fcfe7c7e58 | ||
|
|
9b28c63317 | ||
|
|
a861f9f21c | ||
|
|
8fd51f4e42 | ||
|
|
146ab74524 | ||
|
|
1d38420ddf | ||
|
|
fcad12d3ef | ||
|
|
285e56ce03 | ||
| 8afdf13863 | |||
| 524086129a | |||
| 53d44700b8 | |||
|
|
84ff2bc8f1 | ||
| 3a84c65ce1 | |||
|
|
c69cc41c93 | ||
| 423f14a348 | |||
| 1bb0f1f1b2 | |||
|
|
c80a5dbab7 | ||
|
|
256717c6f8 | ||
|
|
0d18d9aa1a | ||
|
|
14fbf309a7 | ||
|
|
e379727606 | ||
| fb1db062f3 | |||
| 9271cb5c66 | |||
| aee7e5ce82 | |||
| 97b4c7dc66 |
@@ -880,7 +880,15 @@ public static class Tools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
numbers = Convert.ToInt32(num);
|
numbers = Convert.ToInt32(num);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return numbers;
|
return numbers;
|
||||||
}
|
}
|
||||||
public static string ToFarsiMonthByNumber(this string value)
|
public static string ToFarsiMonthByNumber(this string value)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace _0_Framework.Application.UID;
|
|||||||
public class UidService : IUidService
|
public class UidService : IUidService
|
||||||
{
|
{
|
||||||
private readonly HttpClient _httpClient;
|
private readonly HttpClient _httpClient;
|
||||||
private const string BaseUrl= "https://json-api.uid.ir/api/inquiry/";
|
private const string BaseUrl = "https://json-api.uid.ir/api/inquiry/";
|
||||||
|
|
||||||
public UidService()
|
public UidService()
|
||||||
{
|
{
|
||||||
@@ -25,16 +25,16 @@ public class UidService : IUidService
|
|||||||
{
|
{
|
||||||
var request = new PersonalInfoRequest
|
var request = new PersonalInfoRequest
|
||||||
{
|
{
|
||||||
BirthDate = birthDate ,
|
BirthDate = birthDate,
|
||||||
NationalId = nationalCode,
|
NationalId = nationalCode,
|
||||||
RequestContext = new UidRequestContext()
|
RequestContext = new UidRequestContext()
|
||||||
};
|
};
|
||||||
var json = JsonConvert.SerializeObject(request);
|
var json = JsonConvert.SerializeObject(request);
|
||||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
var requestResult = await _httpClient.PostAsync("person/v2", contentType);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var requestResult = await _httpClient.PostAsync("person/v2", contentType);
|
||||||
if (!requestResult.IsSuccessStatusCode)
|
if (!requestResult.IsSuccessStatusCode)
|
||||||
return null;
|
return null;
|
||||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
|
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
|
||||||
@@ -50,8 +50,11 @@ public class UidService : IUidService
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return new PersonalInfoResponse(new UidBasicInformation(),
|
||||||
|
new IdentificationInformation(default, default, default, default, default), new RegistrationStatus(),
|
||||||
|
new ResponseContext(new UidStatus(14, "")));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
using Microsoft.EntityFrameworkCore.Design.Internal;
|
using Microsoft.EntityFrameworkCore.Design.Internal;
|
||||||
@@ -12,8 +14,7 @@ public class BaseCustomizeEntity : EntityBase
|
|||||||
}
|
}
|
||||||
public BaseCustomizeEntity(FridayPay fridayPay, OverTimePay overTimePay,
|
public BaseCustomizeEntity(FridayPay fridayPay, OverTimePay overTimePay,
|
||||||
BaseYearsPay baseYearsPay, BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
BaseYearsPay baseYearsPay, BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays,List<WeeklyOffDay> weeklyOffDays)
|
||||||
FridayWork fridayWork, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
FridayPay = fridayPay;
|
FridayPay = fridayPay;
|
||||||
@@ -29,10 +30,10 @@ public class BaseCustomizeEntity : EntityBase
|
|||||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||||
LateToWork = lateToWork;
|
LateToWork = lateToWork;
|
||||||
EarlyExit = earlyExit;
|
EarlyExit = earlyExit;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
BreakTime = breakTime;
|
BreakTime = breakTime;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
|
WeeklyOffDays = weeklyOffDays.Select(x=> new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -117,4 +118,28 @@ public class BaseCustomizeEntity : EntityBase
|
|||||||
|
|
||||||
|
|
||||||
public BreakTime BreakTime { get; protected set; }
|
public BreakTime BreakTime { get; protected set; }
|
||||||
|
|
||||||
|
public List<WeeklyOffDay> WeeklyOffDays { get; set; }
|
||||||
|
|
||||||
|
public void FridayWorkToWeeklyDayOfWeek()
|
||||||
|
{
|
||||||
|
if (FridayWork == FridayWork.Default && !WeeklyOffDays.Any(x => x.DayOfWeek == DayOfWeek.Friday))
|
||||||
|
{
|
||||||
|
WeeklyOffDays.Add(new WeeklyOffDay(DayOfWeek.Friday));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class WeeklyOffDay
|
||||||
|
{
|
||||||
|
public WeeklyOffDay(DayOfWeek dayOfWeek)
|
||||||
|
{
|
||||||
|
DayOfWeek = dayOfWeek;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Id { get; set; }
|
||||||
|
public DayOfWeek DayOfWeek { get; set; }
|
||||||
|
public long ParentId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -59,6 +59,16 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
|||||||
OperationResult DeleteAllCheckouts(List<long> ids);
|
OperationResult DeleteAllCheckouts(List<long> ids);
|
||||||
OperationResult DeleteCheckout(long id);
|
OperationResult DeleteCheckout(long id);
|
||||||
List<long> CheckHasSignature(List<long> ids);
|
List<long> CheckHasSignature(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست تصفیه حساب
|
||||||
|
/// جدید
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel);
|
||||||
|
|
||||||
Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel);
|
Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,13 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, long employeeId,
|
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, long employeeId,
|
||||||
long workshopId, double salary, long customizeWorkshopGroupSettingId,
|
long workshopId, double salary, long customizeWorkshopGroupSettingId,
|
||||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> customizeWorkshopEmployeeSettingsShifts,
|
ICollection<CustomizeWorkshopEmployeeSettingsShift> customizeWorkshopEmployeeSettingsShifts,
|
||||||
FridayWork fridayWork,
|
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime,
|
||||||
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts
|
||||||
|
, List<WeeklyOffDay> weeklyOffDays) :
|
||||||
base(fridayPay, overTimePay,
|
base(fridayPay, overTimePay,
|
||||||
baseYearsPay, bonusesPay, nightWorkPay,
|
baseYearsPay, bonusesPay, nightWorkPay,
|
||||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
earlyExit, holidayWork, breakTime, leavePermittedDays,weeklyOffDays)
|
||||||
{
|
{
|
||||||
CustomizeWorkshopGroupSettingId = customizeWorkshopGroupSettingId;
|
CustomizeWorkshopGroupSettingId = customizeWorkshopGroupSettingId;
|
||||||
IsSettingChanged = false;
|
IsSettingChanged = false;
|
||||||
@@ -82,7 +83,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
/// <param name="fineAbsenceDeduction">جریمه غیبت</param>
|
/// <param name="fineAbsenceDeduction">جریمه غیبت</param>
|
||||||
/// <param name="lateToWork">تاخیر در ورود</param>
|
/// <param name="lateToWork">تاخیر در ورود</param>
|
||||||
/// <param name="earlyExit">تعجیل درخروج</param>
|
/// <param name="earlyExit">تعجیل درخروج</param>
|
||||||
/// <param name="fridayWork">آیا در روز های جمعه موظف به کار است</param>
|
|
||||||
/// <param name="holidayWork">آیا در تعطیلات رسمی موظف به کار است</param>
|
/// <param name="holidayWork">آیا در تعطیلات رسمی موظف به کار است</param>
|
||||||
/// <param name="workshopIrregularShifts">نوع شیفت کاری </param>
|
/// <param name="workshopIrregularShifts">نوع شیفت کاری </param>
|
||||||
/// <param name="workshopShiftStatus">آیا شیفت منظم است یا نا منظم</param>
|
/// <param name="workshopShiftStatus">آیا شیفت منظم است یا نا منظم</param>
|
||||||
@@ -91,7 +91,7 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||||
FridayWork fridayWork, HolidayWork holidayWork, IrregularShift irregularShift, bool isSettingChange, int leavePermittedDays)
|
HolidayWork holidayWork, IrregularShift irregularShift, bool isSettingChange, int leavePermittedDays)
|
||||||
{
|
{
|
||||||
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
||||||
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
||||||
@@ -99,7 +99,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
Salary = salary;
|
Salary = salary;
|
||||||
IsSettingChanged = isSettingChange;
|
IsSettingChanged = isSettingChange;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
}
|
}
|
||||||
@@ -112,8 +111,8 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
public void SimpleEdit(
|
public void SimpleEdit(
|
||||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> employeeSettingsShift,
|
ICollection<CustomizeWorkshopEmployeeSettingsShift> employeeSettingsShift,
|
||||||
IrregularShift irregularShift,
|
IrregularShift irregularShift,
|
||||||
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange, FridayWork fridayWork, HolidayWork holidayWork,
|
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange,HolidayWork holidayWork,
|
||||||
ICollection<CustomizeRotatingShift> rotatingShifts)
|
ICollection<CustomizeRotatingShift> rotatingShifts,List<WeeklyOffDay> weeklyOffDays)
|
||||||
{
|
{
|
||||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||||
IsShiftChanged = isShiftChange;
|
IsShiftChanged = isShiftChange;
|
||||||
@@ -126,9 +125,8 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||||
|
|
||||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||||
|
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
|
WeeklyOffDays = weeklyOffDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -269,4 +267,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
IsShiftChanged = isShiftChange;
|
IsShiftChanged = isShiftChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -27,11 +27,12 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||||
BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork,
|
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||||
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays,
|
||||||
|
ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays) :
|
||||||
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
earlyExit, holidayWork, breakTime, leavePermittedDays, weeklyOffDays)
|
||||||
{
|
{
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
Salary = salary;
|
Salary = salary;
|
||||||
@@ -76,7 +77,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||||
LateToWork lateToWork, EarlyExit earlyExit,
|
LateToWork lateToWork, EarlyExit earlyExit,
|
||||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, FridayWork fridayWork,
|
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||||
HolidayWork holidayWork, IrregularShift irregularShift, ICollection<CustomizeRotatingShift> rotatingShifts,
|
HolidayWork holidayWork, IrregularShift irregularShift, ICollection<CustomizeRotatingShift> rotatingShifts,
|
||||||
WorkshopShiftStatus workshopShiftStatus, long customizeWorkshopSettingId, BreakTime breakTime, int leavePermittedDays)
|
WorkshopShiftStatus workshopShiftStatus, long customizeWorkshopSettingId, BreakTime breakTime, int leavePermittedDays)
|
||||||
{
|
{
|
||||||
@@ -96,7 +97,6 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||||
LateToWork = lateToWork;
|
LateToWork = lateToWork;
|
||||||
EarlyExit = earlyExit;
|
EarlyExit = earlyExit;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||||
@@ -123,7 +123,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||||
LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||||
{
|
{
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
Salary = salary;
|
Salary = salary;
|
||||||
@@ -140,7 +140,6 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||||
LateToWork = lateToWork;
|
LateToWork = lateToWork;
|
||||||
EarlyExit = earlyExit;
|
EarlyExit = earlyExit;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
IsSettingChange = isSettingChange;
|
IsSettingChange = isSettingChange;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
@@ -154,7 +153,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
{
|
{
|
||||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||||
LateToWork, EarlyExit, FridayWork, HolidayWork, IrregularShift, false, leavePermittedDays);
|
LateToWork, EarlyExit, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void EditAndOverwriteOnAllEmployees(string groupName, double salary,
|
public void EditAndOverwriteOnAllEmployees(string groupName, double salary,
|
||||||
@@ -162,14 +161,13 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||||
LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||||
{
|
{
|
||||||
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
||||||
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
||||||
lateToWork, earlyExit);
|
lateToWork, earlyExit);
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
Salary = salary;
|
Salary = salary;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
IsSettingChange = isSettingChange;
|
IsSettingChange = isSettingChange;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
@@ -182,7 +180,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
{
|
{
|
||||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||||
LateToWork, EarlyExit, FridayWork, HolidayWork, IrregularShift, false, leavePermittedDays);
|
LateToWork, EarlyExit, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +193,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
public void EditSimpleAndOverwriteOnEmployee(string groupName, IEnumerable<long> employeeIds,
|
public void EditSimpleAndOverwriteOnEmployee(string groupName, IEnumerable<long> employeeIds,
|
||||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, WorkshopShiftStatus workshopShiftStatus,
|
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, WorkshopShiftStatus workshopShiftStatus,
|
||||||
IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange, FridayWork fridayWork, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts)
|
IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays)
|
||||||
{
|
{
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||||
@@ -209,9 +207,11 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||||
IsShiftChange = isShiftChange;
|
IsShiftChange = isShiftChange;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
|
|
||||||
|
WeeklyOffDays = weeklyOffDays;
|
||||||
|
|
||||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||||
if (isShiftChange)
|
if (isShiftChange)
|
||||||
@@ -223,11 +223,12 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
foreach (var item in permittedToOverWrite)
|
foreach (var item in permittedToOverWrite)
|
||||||
{
|
{
|
||||||
|
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||||
.ToList();
|
.ToList();
|
||||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||||
IrregularShift, WorkshopShiftStatus, BreakTime, false, FridayWork, HolidayWork, newRotatingShifts);
|
IrregularShift, WorkshopShiftStatus, BreakTime, false, HolidayWork, newRotatingShifts, employeeWeeklyOffDays);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -235,7 +236,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
public void EditSimpleAndOverwriteOnAllEmployees(string groupName,
|
public void EditSimpleAndOverwriteOnAllEmployees(string groupName,
|
||||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||||
WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,
|
WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,
|
||||||
FridayWork fridayWork, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts)
|
HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays)
|
||||||
{
|
{
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||||
@@ -251,18 +252,20 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||||
IsShiftChange = isShiftChange;
|
IsShiftChange = isShiftChange;
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
FridayWork = fridayWork;
|
|
||||||
|
|
||||||
|
WeeklyOffDays = weeklyOffDays;
|
||||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
||||||
{
|
{
|
||||||
|
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||||
.ToList();
|
.ToList();
|
||||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||||
irregularShift, workshopShiftStatus, breakTime, false, FridayWork, HolidayWork, newRotatingShifts);
|
irregularShift, workshopShiftStatus, breakTime, false, HolidayWork, newRotatingShifts, employeeWeeklyOffDays);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -298,13 +301,14 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
|||||||
IrregularShift irregularShift = new(IrregularShift.StartTime, IrregularShift.EndTime,
|
IrregularShift irregularShift = new(IrregularShift.StartTime, IrregularShift.EndTime,
|
||||||
IrregularShift.WorkshopIrregularShifts);
|
IrregularShift.WorkshopIrregularShifts);
|
||||||
BreakTime breakTime = new(BreakTime.HasBreakTimeValue, BreakTime.BreakTimeValue);
|
BreakTime breakTime = new(BreakTime.HasBreakTimeValue, BreakTime.BreakTimeValue);
|
||||||
|
List<WeeklyOffDay> weeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
|
|
||||||
var rotatingShift = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList();
|
var rotatingShift = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList();
|
||||||
|
|
||||||
var customizeWorkshopEmployeeSettings = new CustomizeWorkshopEmployeeSettings(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
var customizeWorkshopEmployeeSettings = new CustomizeWorkshopEmployeeSettings(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||||
earlyExit, employeeId, workshopId, Salary, id, shifts, FridayWork, HolidayWork, irregularShift,
|
earlyExit, employeeId, workshopId, Salary, id, shifts, HolidayWork, irregularShift,
|
||||||
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift);
|
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift, weeklyOffDays);
|
||||||
|
|
||||||
CustomizeWorkshopEmployeeSettingsCollection.Add(customizeWorkshopEmployeeSettings);
|
CustomizeWorkshopEmployeeSettingsCollection.Add(customizeWorkshopEmployeeSettings);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
|||||||
|
|
||||||
public CustomizeWorkshopSettings(long workshopId,
|
public CustomizeWorkshopSettings(long workshopId,
|
||||||
ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts, int leavePermittedDays,
|
ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts, int leavePermittedDays,
|
||||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
WorkshopShiftStatus workshopShiftStatus,HolidayWork holidayWork, List<WeeklyOffDay> weeklyOffDays)
|
||||||
{
|
{
|
||||||
FridayPay = new FridayPay(FridayPayType.None, 0);
|
FridayPay = new FridayPay(FridayPayType.None, 0);
|
||||||
OverTimePay = new OverTimePay(OverTimePayType.None, 0);
|
OverTimePay = new OverTimePay(OverTimePayType.None, 0);
|
||||||
@@ -38,11 +38,10 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
|||||||
OverTimeThresholdMinute = 0;
|
OverTimeThresholdMinute = 0;
|
||||||
Currency = Currency.Rial;
|
Currency = Currency.Rial;
|
||||||
MaxMonthDays = MaxMonthDays.Default;
|
MaxMonthDays = MaxMonthDays.Default;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
|
||||||
BonusesPaysInEndOfMonth = BonusesPaysInEndOfYear.EndOfYear;
|
BonusesPaysInEndOfMonth = BonusesPaysInEndOfYear.EndOfYear;
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
|
WeeklyOffDays = weeklyOffDays;
|
||||||
|
HolidayWork = holidayWork;
|
||||||
if (workshopShiftStatus == WorkshopShiftStatus.Irregular)
|
if (workshopShiftStatus == WorkshopShiftStatus.Irregular)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -92,8 +91,7 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
|||||||
public void Edit(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay,
|
public void Edit(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay,
|
||||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, BonusesPaysInEndOfYear bonusesPaysInEndOfYear,
|
||||||
FridayWork fridayWork, HolidayWork holidayWork, BonusesPaysInEndOfYear bonusesPaysInEndOfYear,
|
|
||||||
int leavePermittedDays, BaseYearsPayInEndOfYear baseYearsPayInEndOfYear, int overTimeThresholdMinute)
|
int leavePermittedDays, BaseYearsPayInEndOfYear baseYearsPayInEndOfYear, int overTimeThresholdMinute)
|
||||||
{
|
{
|
||||||
FridayPay = fridayPay;
|
FridayPay = fridayPay;
|
||||||
@@ -109,7 +107,6 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
|||||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||||
LateToWork = lateToWork;
|
LateToWork = lateToWork;
|
||||||
EarlyExit = earlyExit;
|
EarlyExit = earlyExit;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
BonusesPaysInEndOfMonth = bonusesPaysInEndOfYear;
|
BonusesPaysInEndOfMonth = bonusesPaysInEndOfYear;
|
||||||
LeavePermittedDays = leavePermittedDays;
|
LeavePermittedDays = leavePermittedDays;
|
||||||
@@ -127,19 +124,18 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeWorkshopShifts(ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts,
|
public void ChangeWorkshopShifts(ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts,
|
||||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
WorkshopShiftStatus workshopShiftStatus,HolidayWork holidayWork, List<WeeklyOffDay> weeklyOffDays)
|
||||||
{
|
{
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
FridayWork = fridayWork;
|
|
||||||
CustomizeWorkshopSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopSettingsShifts : new List<CustomizeWorkshopSettingsShift>();
|
CustomizeWorkshopSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopSettingsShifts : new List<CustomizeWorkshopSettingsShift>();
|
||||||
|
WeeklyOffDays = weeklyOffDays;
|
||||||
|
|
||||||
if (workshopShiftStatus == WorkshopShiftStatus.Regular)
|
if (workshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||||
{
|
{
|
||||||
var date = new DateOnly();
|
var date = new DateOnly();
|
||||||
var firstStartShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MinBy(x => x.Placement).StartTime);
|
var firstStartShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MinBy(x => x.Placement).StartTime);
|
||||||
var lastEndShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MaxBy(x => x.Placement).EndTime);
|
var lastEndShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MaxBy(x => x.Placement).EndTime);
|
||||||
|
|
||||||
|
|
||||||
if (lastEndShift > firstStartShift)
|
if (lastEndShift > firstStartShift)
|
||||||
firstStartShift = firstStartShift.AddDays(1);
|
firstStartShift = firstStartShift.AddDays(1);
|
||||||
var offSet = (firstStartShift - lastEndShift).Divide(2);
|
var offSet = (firstStartShift - lastEndShift).Divide(2);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
namespace Company.Domain.EmployeeComputeOptionsAgg
|
namespace Company.Domain.EmployeeComputeOptionsAgg
|
||||||
@@ -10,13 +11,15 @@ namespace Company.Domain.EmployeeComputeOptionsAgg
|
|||||||
public class EmployeeComputeOptions : EntityBase
|
public class EmployeeComputeOptions : EntityBase
|
||||||
{
|
{
|
||||||
public EmployeeComputeOptions(long workshopId, long employeeId, string computeOptions, string bonusesOptions, string yearsOptions,
|
public EmployeeComputeOptions(long workshopId, long employeeId, string computeOptions, string bonusesOptions, string yearsOptions,
|
||||||
bool createContract, bool signContract, bool createCheckout, bool signCheckout)
|
bool createContract, bool signContract, bool createCheckout, bool signCheckout, string contractTerm, IsActive cutContractEndOfYear)
|
||||||
{
|
{
|
||||||
WorkshopId = workshopId;
|
WorkshopId = workshopId;
|
||||||
EmployeeId = employeeId;
|
EmployeeId = employeeId;
|
||||||
ComputeOptions = computeOptions;
|
ComputeOptions = computeOptions;
|
||||||
BonusesOptions = bonusesOptions;
|
BonusesOptions = bonusesOptions;
|
||||||
YearsOptions = yearsOptions;
|
YearsOptions = yearsOptions;
|
||||||
|
ContractTerm = contractTerm;
|
||||||
|
CutContractEndOfYear = contractTerm == "1" ? IsActive.None : cutContractEndOfYear;
|
||||||
|
|
||||||
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
||||||
}
|
}
|
||||||
@@ -51,12 +54,30 @@ namespace Company.Domain.EmployeeComputeOptionsAgg
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SignCheckout { get; private set; }
|
public bool SignCheckout { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مدت قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractTerm { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||||
|
/// این آیتم
|
||||||
|
/// True
|
||||||
|
/// است
|
||||||
|
/// </summary>
|
||||||
|
public IsActive CutContractEndOfYear { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
||||||
bool signCheckout)
|
bool signCheckout, string contractTerm, IsActive cutContractEndOfYear)
|
||||||
{
|
{
|
||||||
ComputeOptions = computeOptions;
|
ComputeOptions = computeOptions;
|
||||||
BonusesOptions = bonusesOptions;
|
BonusesOptions = bonusesOptions;
|
||||||
YearsOptions = yearsOptions;
|
YearsOptions = yearsOptions;
|
||||||
|
|
||||||
|
ContractTerm = contractTerm;
|
||||||
|
CutContractEndOfYear = contractTerm == "1" ? IsActive.None : cutContractEndOfYear;
|
||||||
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using _0_Framework.Application;
|
|||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.LeftWork;
|
using CompanyManagment.App.Contracts.LeftWork;
|
||||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
|
|
||||||
namespace Company.Domain.LeftWorkAgg;
|
namespace Company.Domain.LeftWorkAgg;
|
||||||
|
|
||||||
@@ -46,4 +47,11 @@ public interface ILeftWorkRepository : IRepository<long, LeftWork>
|
|||||||
|
|
||||||
Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId);
|
Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId);
|
||||||
List<LeftWorkViewModel> SearchCreateContract(LeftWorkSearchModel searchModel);
|
List<LeftWorkViewModel> SearchCreateContract(LeftWorkSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات کارگاه و پرسنل برای ایجاد قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
AutoExtensionDto AutoExtentionEmployees(long workshopId);
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace Company.Domain.RollCallAgg;
|
|||||||
|
|
||||||
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||||
{
|
{
|
||||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout);
|
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||||
|
|||||||
@@ -78,22 +78,12 @@ public class Workshop : EntityBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//public Workshop()
|
|
||||||
//{
|
|
||||||
// Contracts2 = new List<Contract>();
|
|
||||||
// WorkshopEmployers = new List<WorkshopEmployer>();
|
|
||||||
// LeftWorks = new List<LeftWork>();
|
|
||||||
// LeftWorkInsurances = new List<LeftWorkInsurance>();
|
|
||||||
// EmployersList = new List<Employer>();
|
|
||||||
// WorkshopEmployers = new List<WorkshopEmployer>();
|
|
||||||
// EmployersList = new List<Employer>();
|
|
||||||
// PersonnelCodeList = new List<PersonnelCodeDomain>();
|
|
||||||
//}
|
|
||||||
public Workshop(string workshopName,string workshopSureName, string insuranceCode, string typeOfOwnership, string archiveCode, string agentName, string agentPhone,
|
public Workshop(string workshopName,string workshopSureName, string insuranceCode, string typeOfOwnership, string archiveCode, string agentName, string agentPhone,
|
||||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||||
string agreementNumber, bool fixedSalary, string population,long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay, bool totalPaymentHide,
|
string agreementNumber, bool fixedSalary, string population,long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay, bool totalPaymentHide,
|
||||||
bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear)
|
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout)
|
||||||
{
|
{
|
||||||
WorkshopName = workshopName;
|
WorkshopName = workshopName;
|
||||||
WorkshopSureName = workshopSureName;
|
WorkshopSureName = workshopSureName;
|
||||||
@@ -142,6 +132,8 @@ public class Workshop : EntityBase
|
|||||||
CreateCheckout = createCheckout;
|
CreateCheckout = createCheckout;
|
||||||
SignCheckout = signCheckout;
|
SignCheckout = signCheckout;
|
||||||
CutContractEndOfYear = cutContractEndOfYear;
|
CutContractEndOfYear = cutContractEndOfYear;
|
||||||
|
RotatingShiftCompute = rotatingShiftCompute;
|
||||||
|
IsStaticCheckout = isStaticCheckout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -231,6 +223,16 @@ public class Workshop : EntityBase
|
|||||||
public IsActive CutContractEndOfYear { get; private set; }
|
public IsActive CutContractEndOfYear { get; private set; }
|
||||||
//public Employer Employer { get; private set; }
|
//public Employer Employer { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// محاسبه نوبت کاری در فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public bool RotatingShiftCompute { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تصفیه حساب بصورت استاتیک محاصبه شود
|
||||||
|
/// </summary>
|
||||||
|
public bool IsStaticCheckout { get; private set; }
|
||||||
|
|
||||||
public Workshop()
|
public Workshop()
|
||||||
{
|
{
|
||||||
RollCallServicesList = new List<RollCallService>();
|
RollCallServicesList = new List<RollCallService>();
|
||||||
@@ -262,7 +264,7 @@ public class Workshop : EntityBase
|
|||||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||||
string agreementNumber, bool fixedSalary, string population, long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay,
|
string agreementNumber, bool fixedSalary, string population, long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay,
|
||||||
bool totalPaymentHide, bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
bool totalPaymentHide, bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear)
|
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout)
|
||||||
{
|
{
|
||||||
WorkshopName = workshopName;
|
WorkshopName = workshopName;
|
||||||
WorkshopSureName = workshopSureName;
|
WorkshopSureName = workshopSureName;
|
||||||
@@ -308,6 +310,8 @@ public class Workshop : EntityBase
|
|||||||
CreateCheckout = createCheckout;
|
CreateCheckout = createCheckout;
|
||||||
SignCheckout = signCheckout;
|
SignCheckout = signCheckout;
|
||||||
CutContractEndOfYear = cutContractEndOfYear;
|
CutContractEndOfYear = cutContractEndOfYear;
|
||||||
|
RotatingShiftCompute = rotatingShiftCompute;
|
||||||
|
IsStaticCheckout = isStaticCheckout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -133,6 +133,9 @@ public class CheckoutViewModel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string TotalPaidLeave { get; set; }
|
public string TotalPaidLeave { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public bool HasSignCheckout { get; set; }
|
||||||
|
|
||||||
public TimeSpan TotalHourlyLeave { get; set; }
|
public TimeSpan TotalHourlyLeave { get; set; }
|
||||||
public List<CheckoutDailyRollCallViewModel> MonthlyRollCall { get; set; }
|
public List<CheckoutDailyRollCallViewModel> MonthlyRollCall { get; set; }
|
||||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ public class CreateCheckoutListViewModel
|
|||||||
|
|
||||||
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرسنل اجازه ایجاد قرارداد دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool EmployeeHasCreateCheckout { get; set; }
|
||||||
|
|
||||||
|
public bool HasWorkFlow { get; set; }
|
||||||
public List<CreateCheckoutListViewModel> CreateCheckoutList { get; set; }
|
public List<CreateCheckoutListViewModel> CreateCheckoutList { get; set; }
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,14 @@ public interface ICheckoutApplication
|
|||||||
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
|
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
|
||||||
string month,
|
string month,
|
||||||
string contractStart, string contractEnd);
|
string contractStart, string contractEnd);
|
||||||
|
/// <summary>
|
||||||
|
/// لیست تصفیه حساب
|
||||||
|
/// جدید
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel);
|
||||||
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
|
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
|
||||||
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);
|
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);
|
||||||
List<CheckoutViewModel> PrintAll(List<long> id);
|
List<CheckoutViewModel> PrintAll(List<long> id);
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ public class ContractViweModel
|
|||||||
public string EmployeeLName { get; set; }
|
public string EmployeeLName { get; set; }
|
||||||
|
|
||||||
public string IsBlockCantracingParty { get; set; }
|
public string IsBlockCantracingParty { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آیا مجاز به امضاء قرادا می باشد
|
||||||
|
/// </summary>
|
||||||
|
public bool HasSignContract { get; set; }
|
||||||
public IQueryable<WorkshopEmployerViewModel> WorkshopEmployerList { get; set; }
|
public IQueryable<WorkshopEmployerViewModel> WorkshopEmployerList { get; set; }
|
||||||
public List<EmployerViewModel> Employers { get; set; }
|
public List<EmployerViewModel> Employers { get; set; }
|
||||||
public List<WorkshopViewModel> Workshops { get; set; }
|
public List<WorkshopViewModel> Workshops { get; set; }
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
@@ -16,8 +17,9 @@ public class CreateCustomizeWorkshopGroupSettings
|
|||||||
public IrregularShift IrregularShift { get; set; }
|
public IrregularShift IrregularShift { get; set; }
|
||||||
public BreakTime BreakTime { get; set; }
|
public BreakTime BreakTime { get; set; }
|
||||||
public int LeavePermittedDays { get; set; }
|
public int LeavePermittedDays { get; set; }
|
||||||
public FridayWork FridayWork { get; set; }
|
//public FridayWork FridayWork { get; set; }
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
|
public List<DayOfWeek> OffDayOfWeeks { get; set; }
|
||||||
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShiftsViewModels { get; set; }
|
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShiftsViewModels { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using System;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
@@ -20,16 +21,18 @@ public class CreateCustomizeWorkshopSettings
|
|||||||
public BreakTime BreakTime { get; set; }
|
public BreakTime BreakTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// آیا جمعه کار میکند یا نه
|
///// آیا جمعه کار میکند یا نه
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public FridayWork FridayWork { get; set; }
|
//public FridayWork FridayWork { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آیا در روز های تعطیل کار میکند
|
/// آیا در روز های تعطیل کار میکند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
|
|
||||||
|
public List<DayOfWeek> OffDays { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using System;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -20,7 +21,8 @@ public class CustomizeWorkshopEmployeeSettingsViewModel
|
|||||||
public bool ChangeSettingEmployeeShiftIsChange { get; set; }
|
public bool ChangeSettingEmployeeShiftIsChange { get; set; }
|
||||||
public BreakTime BreakTime { get; set; }
|
public BreakTime BreakTime { get; set; }
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
public FridayWork FridayWork { get; set; }
|
//public FridayWork FridayWork { get; set; }
|
||||||
public int LeavePermittedDays { get; set; }
|
public int LeavePermittedDays { get; set; }
|
||||||
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShiftsViewModels { get; set; }
|
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShiftsViewModels { get; set; }
|
||||||
|
public List<DayOfWeek> WeeklyOffDays { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
|
|
||||||
@@ -18,4 +20,5 @@ public class CustomizeWorkshopGroupSettingsViewModel
|
|||||||
public BreakTime BreakTime { get; set; }
|
public BreakTime BreakTime { get; set; }
|
||||||
public FridayWork FridayWork { get; set; }
|
public FridayWork FridayWork { get; set; }
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
|
public List<DayOfWeek> OffDayOfWeeks { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using System;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
@@ -72,16 +73,18 @@ public class EditCustomizeEmployeeSettings:CreateCustomizeEmployeeSettings
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public EarlyExitViewModel EarlyExit { get; set; }
|
public EarlyExitViewModel EarlyExit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// آیا جمعه کار میکند یا نه
|
///// آیا جمعه کار میکند یا نه
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public FridayWork FridayWork { get; set; }
|
//public FridayWork FridayWork { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آیا در روز های تعطیل کار میکند
|
/// آیا در روز های تعطیل کار میکند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
|
|
||||||
|
public List<DayOfWeek> WeeklyOffDays { get; set; }
|
||||||
|
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
public string Salary { get; set; }
|
public string Salary { get; set; }
|
||||||
public string NameGroup { get; set; }
|
public string NameGroup { get; set; }
|
||||||
@@ -91,4 +94,5 @@ public class EditCustomizeEmployeeSettings:CreateCustomizeEmployeeSettings
|
|||||||
public IEnumerable<CustomizeWorkshopShiftViewModel> ShiftViewModel { get; set; }
|
public IEnumerable<CustomizeWorkshopShiftViewModel> ShiftViewModel { get; set; }
|
||||||
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShifts{ get; set; }
|
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShifts{ get; set; }
|
||||||
public BreakTime BreakTime { get; set; }
|
public BreakTime BreakTime { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using System;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
namespace CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||||
|
|
||||||
@@ -75,16 +77,18 @@ public class EditCustomizeWorkshopGroupSettings : CreateCustomizeWorkshopGroupSe
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public EarlyExitViewModel EarlyExit { get; set; }
|
public EarlyExitViewModel EarlyExit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// آیا جمعه کار میکند یا نه
|
///// آیا جمعه کار میکند یا نه
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public FridayWork FridayWork { get; set; }
|
//public FridayWork FridayWork { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آیا در روز های تعطیل کار میکند
|
/// آیا در روز های تعطیل کار میکند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public HolidayWork HolidayWork { get; set; }
|
public HolidayWork HolidayWork { get; set; }
|
||||||
|
|
||||||
|
//public List<DayOfWeek> WeeklyOffDays { get; set; }
|
||||||
|
|
||||||
public bool IsShiftChanged { get; set; }
|
public bool IsShiftChanged { get; set; }
|
||||||
public bool IsSettingChanged { get; set; }
|
public bool IsSettingChanged { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Application;
|
using System;
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||||
using CompanyManagment.App.Contracts.Employee;
|
using CompanyManagment.App.Contracts.Employee;
|
||||||
@@ -51,11 +52,14 @@ public interface ICustomizeWorkshopSettingsApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="shiftViewModels">شیفت هت</param>
|
/// <param name="shiftViewModels">شیفت هت</param>
|
||||||
/// <param name="customizeWorkshopSettingsId">آیدی تنظیمات کارگاه</param>
|
/// <param name="customizeWorkshopSettingsId">آیدی تنظیمات کارگاه</param>
|
||||||
/// <param name="replaceChangedGroups"></param>
|
|
||||||
/// <param name="workshopShiftStatus"></param>
|
/// <param name="workshopShiftStatus"></param>
|
||||||
|
/// <param name="holidayWork"></param>
|
||||||
|
/// <param name="weeklyOffDays"></param>
|
||||||
|
/// <param name="replaceChangedGroups"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
OperationResult EditWorkshopSettingShifts(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
OperationResult EditWorkshopSettingShifts(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
||||||
long customizeWorkshopSettingsId,WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork);
|
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus,
|
||||||
|
HolidayWork holidayWork, List<DayOfWeek> weeklyOffDays);
|
||||||
|
|
||||||
// It will Get the Workshop Settings with its groups and the employees of groups.
|
// It will Get the Workshop Settings with its groups and the employees of groups.
|
||||||
CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopId(long workshopId, AuthViewModel auth);
|
CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopId(long workshopId, AuthViewModel auth);
|
||||||
|
|||||||
@@ -26,4 +26,5 @@ public class EmployeeDataFromApiViewModel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string IdNumberSeri { get; set; }
|
public string IdNumberSeri { get; set; }
|
||||||
|
|
||||||
|
public bool AuthorizedCanceled { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using _0_Framework.Application;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -34,5 +35,18 @@ namespace CompanyManagment.App.Contracts.EmployeeComputeOptions
|
|||||||
/// امضای تصفیه
|
/// امضای تصفیه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SignCheckout { get; set; }
|
public bool SignCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مدت قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractTerm { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||||
|
/// این آیتم
|
||||||
|
/// True
|
||||||
|
/// است
|
||||||
|
/// </summary>
|
||||||
|
public IsActive CutContractEndOfYear { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
using _0_Framework.Application;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||||
|
|
||||||
public class EmployeeComputeOptionsViewModel
|
public class EmployeeComputeOptionsViewModel
|
||||||
{
|
{
|
||||||
@@ -28,4 +30,18 @@ public class EmployeeComputeOptionsViewModel
|
|||||||
/// امضای تصفیه
|
/// امضای تصفیه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SignCheckout { get; set; }
|
public bool SignCheckout { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مدت قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractTerm { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||||
|
/// این آیتم
|
||||||
|
/// True
|
||||||
|
/// است
|
||||||
|
/// </summary>
|
||||||
|
public IsActive CutContractEndOfYear { get; set; }
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.LeftWork;
|
namespace CompanyManagment.App.Contracts.LeftWork;
|
||||||
@@ -30,4 +31,10 @@ public interface ILeftWorkApplication
|
|||||||
OperationResult CreateLeftWorkByLeftWorkGroups(string employeeFullName, long commandEmployeeId, List<PersonnelCodeViewModel> commandPersonnelCode, List<LeftWorkGroup> leftWorkGroups);
|
OperationResult CreateLeftWorkByLeftWorkGroups(string employeeFullName, long commandEmployeeId, List<PersonnelCodeViewModel> commandPersonnelCode, List<LeftWorkGroup> leftWorkGroups);
|
||||||
OperationResult CheckDeleteLeftWork(long workshopId, long employeeId, string date, int type);
|
OperationResult CheckDeleteLeftWork(long workshopId, long employeeId, string date, int type);
|
||||||
OperationResult CheckEditLeftWork(long workshopId, long employeeId, string date, int type);
|
OperationResult CheckEditLeftWork(long workshopId, long employeeId, string date, int type);
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات کارگاه و پرسنل برای ایجاد قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
AutoExtensionDto AutoExtentionEmployees(long workshopId);
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace CompanyManagment.App.Contracts.RollCall;
|
|||||||
public interface IRollCallMandatoryApplication
|
public interface IRollCallMandatoryApplication
|
||||||
{
|
{
|
||||||
bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart);
|
bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart);
|
||||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout);
|
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// گزارش نوبت کاری حضور غیاب
|
/// گزارش نوبت کاری حضور غیاب
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using _0_Framework.Application;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -43,4 +44,17 @@ public class ConnectedPersonnelViewModel
|
|||||||
/// امضای تصفیه
|
/// امضای تصفیه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SignCheckout { get; set; }
|
public bool SignCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مدت قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractTerm { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||||
|
/// این آیتم
|
||||||
|
/// True
|
||||||
|
/// است
|
||||||
|
/// </summary>
|
||||||
|
public IsActive CutContractEndOfYear { get; set; }
|
||||||
}
|
}
|
||||||
@@ -142,4 +142,14 @@ public class CreateWorkshop
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IsActive CutContractEndOfYear { get; set; }
|
public IsActive CutContractEndOfYear { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// محاسبه نوبت کاری در فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public bool RotatingShiftCompute { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تصفیه حساب بصورت استاتیک محاصبه شود
|
||||||
|
/// </summary>
|
||||||
|
public bool IsStaticCheckout { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
|
|
||||||
|
public class AutoExtensionDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا کارفرما خطای اطلاعات هویتی دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool EmployerWarning { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پیام خطاهای کارفرما
|
||||||
|
/// </summary>
|
||||||
|
public string EmployerWarningMessage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا کارگاه پرسنل دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool HavingPersonel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد بایگانی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string ArchiveCode { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آدرس کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WAddress1 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارفرما
|
||||||
|
/// </summary>
|
||||||
|
public long EmployerId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سلکت لیست پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public SelectList EmployeeSelectList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public List<AutoExtensionEmployeeListDto> EmployeeList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا مجاز به ایجاد قراداد است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool CreateContract { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
|
|
||||||
|
public class AutoExtensionEmployeeListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public long PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سمت
|
||||||
|
/// </summary>
|
||||||
|
public string JobType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long JobTypeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرسنل اجازه ایجاد قرارداد دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool EmployeeHasCreateContract { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string ContarctStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -386,8 +386,16 @@ public class CheckoutApplication : ICheckoutApplication
|
|||||||
contractEnd);
|
contractEnd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel)
|
||||||
|
{
|
||||||
|
return _checkoutRepository.SearchCheckoutOptimized(searchModel);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
||||||
{
|
{
|
||||||
|
var watch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
|
watch.Start();
|
||||||
var result = new List<CheckoutViewModel>();
|
var result = new List<CheckoutViewModel>();
|
||||||
var query = await _checkoutRepository.SearchForMainCheckout(searchModel);
|
var query = await _checkoutRepository.SearchForMainCheckout(searchModel);
|
||||||
query = query.Select(x => new CheckoutViewModel()
|
query = query.Select(x => new CheckoutViewModel()
|
||||||
@@ -429,7 +437,7 @@ public class CheckoutApplication : ICheckoutApplication
|
|||||||
// // = employerName;
|
// // = employerName;
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
Console.WriteLine("old : " + watch.Elapsed);
|
||||||
return query;
|
return query;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using Company.Domain.YearlySalaryAgg;
|
|||||||
using Company.Domain.YearlySalaryItemsAgg;
|
using Company.Domain.YearlySalaryItemsAgg;
|
||||||
using CompanyManagment.App.Contracts.Contract;
|
using CompanyManagment.App.Contracts.Contract;
|
||||||
using CompanyManagment.App.Contracts.Employee;
|
using CompanyManagment.App.Contracts.Employee;
|
||||||
|
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||||
using CompanyManagment.App.Contracts.Employer;
|
using CompanyManagment.App.Contracts.Employer;
|
||||||
using CompanyManagment.App.Contracts.LeftWork;
|
using CompanyManagment.App.Contracts.LeftWork;
|
||||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||||
@@ -39,6 +40,7 @@ public class ContractApplication : IContractApplication
|
|||||||
private readonly IPersonnelCodeRepository _personnelCodeRepository;
|
private readonly IPersonnelCodeRepository _personnelCodeRepository;
|
||||||
private readonly IWorkingHoursTempApplication _workingHoursTempApplication;
|
private readonly IWorkingHoursTempApplication _workingHoursTempApplication;
|
||||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||||
|
private readonly IEmployeeComputeOptionsApplication _employeeComputeOptionsApplication;
|
||||||
|
|
||||||
public List<EmployerViewModel> EmpList;
|
public List<EmployerViewModel> EmpList;
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ public class ContractApplication : IContractApplication
|
|||||||
IYearlySalaryRepository yearlySalaryRepository,
|
IYearlySalaryRepository yearlySalaryRepository,
|
||||||
IYearlySalaryItemRepository yearlySalaryItemRepository
|
IYearlySalaryItemRepository yearlySalaryItemRepository
|
||||||
, IEmployeeApplication employeeApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication, IEmployerRepository employerRepository,
|
, IEmployeeApplication employeeApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication, IEmployerRepository employerRepository,
|
||||||
IWorkingHoursApplication workingHoursApplication, IWorkingHoursItemsApplication workingHoursItemsApplication, ILeftWorkRepository leftWorkRepository, IPersonnelCodeRepository personnelCodeRepository, IWorkingHoursTempApplication workingHoursTempApplication, IPersonalContractingPartyApp contractingPartyApp)
|
IWorkingHoursApplication workingHoursApplication, IWorkingHoursItemsApplication workingHoursItemsApplication, ILeftWorkRepository leftWorkRepository, IPersonnelCodeRepository personnelCodeRepository, IWorkingHoursTempApplication workingHoursTempApplication, IPersonalContractingPartyApp contractingPartyApp, IEmployeeComputeOptionsApplication employeeComputeOptionsApplication)
|
||||||
{
|
{
|
||||||
_contractRepository = contractRepository;
|
_contractRepository = contractRepository;
|
||||||
_holidayItemRepository = holidayItemRepository;
|
_holidayItemRepository = holidayItemRepository;
|
||||||
@@ -70,6 +72,7 @@ public class ContractApplication : IContractApplication
|
|||||||
_personnelCodeRepository = personnelCodeRepository;
|
_personnelCodeRepository = personnelCodeRepository;
|
||||||
_workingHoursTempApplication = workingHoursTempApplication;
|
_workingHoursTempApplication = workingHoursTempApplication;
|
||||||
_contractingPartyApp = contractingPartyApp;
|
_contractingPartyApp = contractingPartyApp;
|
||||||
|
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
||||||
|
|
||||||
//_leftWorkApplication = leftWorkApplication;
|
//_leftWorkApplication = leftWorkApplication;
|
||||||
}
|
}
|
||||||
@@ -3155,7 +3158,7 @@ public class ContractApplication : IContractApplication
|
|||||||
EmployeeFName = x.EmployeeFName,
|
EmployeeFName = x.EmployeeFName,
|
||||||
EmployeeLName = x.EmployeeLName,
|
EmployeeLName = x.EmployeeLName,
|
||||||
IsBlockCantracingParty = _contractingPartyApp.IsBlockByEmployerId(x.EmployerId),
|
IsBlockCantracingParty = _contractingPartyApp.IsBlockByEmployerId(x.EmployerId),
|
||||||
|
HasSignContract = _employeeComputeOptionsApplication.GetEmployeeOptions(x.WorkshopIds,x.EmployeeId).SignContract
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Transactions;
|
using System.Transactions;
|
||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||||
using CompanyManagment.App.Contracts.RollCall;
|
using CompanyManagment.App.Contracts.RollCall;
|
||||||
using Microsoft.EntityFrameworkCore.Query;
|
using Microsoft.EntityFrameworkCore.Query;
|
||||||
using Company.Domain.CheckoutAgg;
|
using Company.Domain.CheckoutAgg;
|
||||||
@@ -153,8 +154,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var offDays = command.OffDays.Select(x => new WeeklyOffDay(x)).ToList();
|
||||||
|
|
||||||
var record = new CustomizeWorkshopSettings(workshopId, shiftCollection, command.LeavePermittedDays,
|
var record = new CustomizeWorkshopSettings(workshopId, shiftCollection, command.LeavePermittedDays,
|
||||||
command.WorkshopShiftStatus, command.FridayWork, command.HolidayWork);
|
command.WorkshopShiftStatus, command.HolidayWork, offDays);
|
||||||
using (var transaction = new TransactionScope())
|
using (var transaction = new TransactionScope())
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -339,12 +342,13 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
double salary = command.Salary.MoneyToDouble();
|
double salary = command.Salary.MoneyToDouble();
|
||||||
|
|
||||||
|
var weeklyOffDays = command.OffDayOfWeeks?.Select(x => new WeeklyOffDay(x)).ToList()??[];
|
||||||
|
|
||||||
var entity = new CustomizeWorkshopGroupSettings(command.Name, salary, command.CustomizeWorkshopSettingId, shiftCollection, workshopSettings.FridayPay, workshopSettings.OverTimePay,
|
var entity = new CustomizeWorkshopGroupSettings(command.Name, salary, command.CustomizeWorkshopSettingId, shiftCollection, workshopSettings.FridayPay, workshopSettings.OverTimePay,
|
||||||
workshopSettings.BaseYearsPay, workshopSettings.BonusesPay, workshopSettings.NightWorkPay, workshopSettings.MarriedAllowance,
|
workshopSettings.BaseYearsPay, workshopSettings.BonusesPay, workshopSettings.NightWorkPay, workshopSettings.MarriedAllowance,
|
||||||
workshopSettings.ShiftPay, workshopSettings.FamilyAllowance, workshopSettings.LeavePay, workshopSettings.InsuranceDeduction, workshopSettings.FineAbsenceDeduction,
|
workshopSettings.ShiftPay, workshopSettings.FamilyAllowance, workshopSettings.LeavePay, workshopSettings.InsuranceDeduction, workshopSettings.FineAbsenceDeduction,
|
||||||
workshopSettings.LateToWork, workshopSettings.EarlyExit, command.FridayWork,
|
workshopSettings.LateToWork, workshopSettings.EarlyExit,
|
||||||
command.HolidayWork, breakTime, command.WorkshopShiftStatus, command.IrregularShift, command.LeavePermittedDays, customizeRotatingShifts);
|
command.HolidayWork, breakTime, command.WorkshopShiftStatus, command.IrregularShift, command.LeavePermittedDays, customizeRotatingShifts, weeklyOffDays);
|
||||||
|
|
||||||
_customizeWorkshopGroupSettingsRepository.Create(entity);
|
_customizeWorkshopGroupSettingsRepository.Create(entity);
|
||||||
|
|
||||||
@@ -383,6 +387,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
var isChanged = false;
|
var isChanged = false;
|
||||||
#region validation
|
#region validation
|
||||||
|
|
||||||
|
//var commandOffDayHashSet = command.WeeklyOffDays.ToHashSet();
|
||||||
|
var commandOffDayHashSet = command.WeeklyOffDays?.ToHashSet() ?? [];
|
||||||
|
|
||||||
|
var groupOffDayHashSet = customizeWorkshopGroupSettings.WeeklyOffDays.Select(x => x.DayOfWeek).ToHashSet();
|
||||||
|
|
||||||
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||||
{
|
{
|
||||||
@@ -468,9 +476,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (shiftCollection.All(x => customizeWorkshopGroupSettings.CustomizeWorkshopGroupSettingsShifts.Any(y => x.Equals(y)))
|
if (shiftCollection.All(x => customizeWorkshopGroupSettings.CustomizeWorkshopGroupSettingsShifts.Any(y => x.Equals(y)))
|
||||||
&& command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus && command.FridayWork == customizeWorkshopGroupSettings.FridayWork &&
|
&& command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus && command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork &&
|
||||||
command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork && command.BreakTime == customizeWorkshopGroupSettings.BreakTime)
|
command.BreakTime == customizeWorkshopGroupSettings.BreakTime &&commandOffDayHashSet.SetEquals(groupOffDayHashSet))
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
}
|
}
|
||||||
@@ -508,7 +517,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus && command.BreakTime == customizeWorkshopGroupSettings.BreakTime &&
|
if (command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus && command.BreakTime == customizeWorkshopGroupSettings.BreakTime &&
|
||||||
command.IrregularShift == customizeWorkshopGroupSettings.IrregularShift && command.FridayWork == customizeWorkshopGroupSettings.FridayWork &&
|
command.IrregularShift == customizeWorkshopGroupSettings.IrregularShift && commandOffDayHashSet.SetEquals(groupOffDayHashSet) &&
|
||||||
command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork)
|
command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -530,7 +539,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
if (rotatingShift.All(x => customizeWorkshopGroupSettings.CustomizeRotatingShifts.Any(y => x.Equals(y)))
|
if (rotatingShift.All(x => customizeWorkshopGroupSettings.CustomizeRotatingShifts.Any(y => x.Equals(y)))
|
||||||
&& command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus &&
|
&& command.WorkshopShiftStatus == customizeWorkshopGroupSettings.WorkshopShiftStatus &&
|
||||||
command.FridayWork == customizeWorkshopGroupSettings.FridayWork &&
|
commandOffDayHashSet.SetEquals(groupOffDayHashSet) &&
|
||||||
command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork && command.BreakTime == customizeWorkshopGroupSettings.BreakTime)
|
command.HolidayWork == customizeWorkshopGroupSettings.HolidayWork && command.BreakTime == customizeWorkshopGroupSettings.BreakTime)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -547,17 +556,17 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
var breakTime = new BreakTime(command.BreakTime.HasBreakTimeValue, command.BreakTime.BreakTimeValue);
|
var breakTime = new BreakTime(command.BreakTime.HasBreakTimeValue, command.BreakTime.BreakTimeValue);
|
||||||
|
|
||||||
|
|
||||||
|
var weeklyOffDays = command.WeeklyOffDays?.Select(x => new WeeklyOffDay(x)).ToList() ?? [];
|
||||||
|
|
||||||
var entity = new CustomizeWorkshopEmployeeSettings(customizeWorkshopGroupSettings.FridayPay, customizeWorkshopGroupSettings.OverTimePay,
|
var entity = new CustomizeWorkshopEmployeeSettings(customizeWorkshopGroupSettings.FridayPay, customizeWorkshopGroupSettings.OverTimePay,
|
||||||
customizeWorkshopGroupSettings.BaseYearsPay, customizeWorkshopGroupSettings.BonusesPay, customizeWorkshopGroupSettings.NightWorkPay, customizeWorkshopGroupSettings.MarriedAllowance,
|
customizeWorkshopGroupSettings.BaseYearsPay, customizeWorkshopGroupSettings.BonusesPay, customizeWorkshopGroupSettings.NightWorkPay, customizeWorkshopGroupSettings.MarriedAllowance,
|
||||||
customizeWorkshopGroupSettings.ShiftPay, customizeWorkshopGroupSettings.FamilyAllowance, customizeWorkshopGroupSettings.LeavePay, customizeWorkshopGroupSettings.InsuranceDeduction, customizeWorkshopGroupSettings.FineAbsenceDeduction,
|
customizeWorkshopGroupSettings.ShiftPay, customizeWorkshopGroupSettings.FamilyAllowance, customizeWorkshopGroupSettings.LeavePay, customizeWorkshopGroupSettings.InsuranceDeduction, customizeWorkshopGroupSettings.FineAbsenceDeduction,
|
||||||
customizeWorkshopGroupSettings.LateToWork, customizeWorkshopGroupSettings.EarlyExit, command.EmployeeIds.First(), command.WorkshopId, customizeWorkshopGroupSettings.Salary, command.GroupId,
|
customizeWorkshopGroupSettings.LateToWork, customizeWorkshopGroupSettings.EarlyExit, command.EmployeeIds.First(), command.WorkshopId, customizeWorkshopGroupSettings.Salary, command.GroupId,
|
||||||
shiftCollection, command.FridayWork, command.HolidayWork, command.IrregularShift, command.WorkshopShiftStatus, breakTime, command.LeavePermittedDays, rotatingShift);
|
shiftCollection, command.HolidayWork, command.IrregularShift, command.WorkshopShiftStatus, breakTime, command.LeavePermittedDays, rotatingShift, weeklyOffDays);
|
||||||
|
|
||||||
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
||||||
|
|
||||||
entity.SimpleEdit(shiftCollection, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, isChanged, command.FridayWork, command.HolidayWork, rotatingShift);
|
entity.SimpleEdit(shiftCollection, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, isChanged, command.HolidayWork, rotatingShift, customizeWorkshopGroupSettings.WeeklyOffDays.ToList());
|
||||||
|
|
||||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
@@ -568,7 +577,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
}
|
}
|
||||||
|
|
||||||
public OperationResult EditWorkshopSettingShifts(List<CustomizeWorkshopShiftViewModel> shiftViewModels, long customizeWorkshopSettingsId,
|
public OperationResult EditWorkshopSettingShifts(List<CustomizeWorkshopShiftViewModel> shiftViewModels, long customizeWorkshopSettingsId,
|
||||||
WorkshopShiftStatus workshopShiftStatus, FridayWork fridayWork, HolidayWork holidayWork)
|
WorkshopShiftStatus workshopShiftStatus, HolidayWork holidayWork, List<DayOfWeek> weeklyOffDays)
|
||||||
{
|
{
|
||||||
OperationResult op = new OperationResult();
|
OperationResult op = new OperationResult();
|
||||||
var entity = _customizeWorkshopSettingsRepository.Get(customizeWorkshopSettingsId);
|
var entity = _customizeWorkshopSettingsRepository.Get(customizeWorkshopSettingsId);
|
||||||
@@ -660,8 +669,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
var offDays = weeklyOffDays.Select(x => new WeeklyOffDay(x)).ToList();
|
||||||
|
|
||||||
using var transActionScope = new TransactionScope();
|
using var transActionScope = new TransactionScope();
|
||||||
entity.ChangeWorkshopShifts(shiftCollection, workshopShiftStatus, fridayWork, holidayWork);
|
entity.ChangeWorkshopShifts(shiftCollection, workshopShiftStatus, holidayWork, offDays);
|
||||||
|
|
||||||
|
|
||||||
//op = ChangeAllGroupsShiftsWithEmployees(entity, replaceChangedGroups);
|
//op = ChangeAllGroupsShiftsWithEmployees(entity, replaceChangedGroups);
|
||||||
@@ -708,6 +719,12 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
var groupSettingsShifts = new List<CustomizeWorkshopGroupSettingsShift>();
|
var groupSettingsShifts = new List<CustomizeWorkshopGroupSettingsShift>();
|
||||||
ICollection<CustomizeRotatingShift> rotatingShift = [];
|
ICollection<CustomizeRotatingShift> rotatingShift = [];
|
||||||
bool isChanged;
|
bool isChanged;
|
||||||
|
|
||||||
|
//var commandOffDayHashSet = command.OffDayOfWeeks.ToHashSet();
|
||||||
|
var commandOffDayHashSet = command.OffDayOfWeeks?.ToHashSet() ?? [];
|
||||||
|
|
||||||
|
var workshopOffDayHashSet = workshopSettings.WeeklyOffDays.Select(x => x.DayOfWeek).ToHashSet();
|
||||||
|
|
||||||
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -723,7 +740,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
if (groupSettingsShifts.All(x => workshopSettings.CustomizeWorkshopSettingsShifts.Any(y => x.Equals(y)))
|
if (groupSettingsShifts.All(x => workshopSettings.CustomizeWorkshopSettingsShifts.Any(y => x.Equals(y)))
|
||||||
&& command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.FridayWork == workshopSettings.FridayWork &&
|
&& command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && commandOffDayHashSet.SetEquals(workshopOffDayHashSet) &&
|
||||||
command.HolidayWork == workshopSettings.HolidayWork &&
|
command.HolidayWork == workshopSettings.HolidayWork &&
|
||||||
command.BreakTime == workshopSettings.BreakTime)
|
command.BreakTime == workshopSettings.BreakTime)
|
||||||
{
|
{
|
||||||
@@ -762,7 +779,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.BreakTime == workshopSettings.BreakTime
|
if (command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.BreakTime == workshopSettings.BreakTime
|
||||||
&& command.FridayWork == workshopSettings.FridayWork &&
|
&& commandOffDayHashSet.SetEquals(workshopOffDayHashSet) &&
|
||||||
command.HolidayWork == workshopSettings.HolidayWork)
|
command.HolidayWork == workshopSettings.HolidayWork)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -782,7 +799,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
rotatingShift = command.CustomizeRotatingShiftsViewModels
|
rotatingShift = command.CustomizeRotatingShiftsViewModels
|
||||||
.Select(x => new CustomizeRotatingShift(TimeOnly.Parse(x.StartTime), TimeOnly.Parse(x.EndTime))).ToList();
|
.Select(x => new CustomizeRotatingShift(TimeOnly.Parse(x.StartTime), TimeOnly.Parse(x.EndTime))).ToList();
|
||||||
if (command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.BreakTime == workshopSettings.BreakTime
|
if (command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.BreakTime == workshopSettings.BreakTime
|
||||||
&& command.FridayWork == workshopSettings.FridayWork &&
|
&& commandOffDayHashSet.SetEquals(workshopOffDayHashSet) &&
|
||||||
command.HolidayWork == workshopSettings.HolidayWork)
|
command.HolidayWork == workshopSettings.HolidayWork)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -805,10 +822,11 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
var notSelectedEmployeeSettings = employeeSettings.Where(x => !selectedEmployeesIds.Contains(x.EmployeeId));
|
var notSelectedEmployeeSettings = employeeSettings.Where(x => !selectedEmployeesIds.Contains(x.EmployeeId));
|
||||||
|
|
||||||
|
var weeklyOffDays = command.OffDayOfWeeks?.Select(x => new WeeklyOffDay(x)).ToList() ?? [];
|
||||||
using var transaction = new TransactionScope();
|
using var transaction = new TransactionScope();
|
||||||
|
|
||||||
entity.EditSimpleAndOverwriteOnEmployee(command.Name, selectedEmployeesIds, groupSettingsShifts, command.WorkshopShiftStatus,
|
entity.EditSimpleAndOverwriteOnEmployee(command.Name, selectedEmployeesIds, groupSettingsShifts, command.WorkshopShiftStatus,
|
||||||
command.IrregularShift, breakTime, isChanged, command.FridayWork, command.HolidayWork, rotatingShift);
|
command.IrregularShift, breakTime, isChanged, command.HolidayWork, rotatingShift, weeklyOffDays);
|
||||||
if (reCalculateCommand.Count > 0)
|
if (reCalculateCommand.Count > 0)
|
||||||
{
|
{
|
||||||
var result = _rollCallApplication.RecalculateValues(workshopSettings.WorkshopId, reCalculateCommand);
|
var result = _rollCallApplication.RecalculateValues(workshopSettings.WorkshopId, reCalculateCommand);
|
||||||
@@ -851,6 +869,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
ICollection<CustomizeRotatingShift> rotatingShift = [];
|
ICollection<CustomizeRotatingShift> rotatingShift = [];
|
||||||
bool isChanged = false;
|
bool isChanged = false;
|
||||||
|
|
||||||
|
var commandOffDayHashSet = command.WeeklyOffDays?.ToHashSet()??[];
|
||||||
|
var groupOffDayHashSet = groupSettings.WeeklyOffDays.Select(x => x.DayOfWeek).ToHashSet();
|
||||||
|
|
||||||
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -938,7 +960,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
|
|
||||||
if (employeesShifts.All(x => groupSettings.CustomizeWorkshopGroupSettingsShifts.Any(y => x.Equals(y)))
|
if (employeesShifts.All(x => groupSettings.CustomizeWorkshopGroupSettingsShifts.Any(y => x.Equals(y)))
|
||||||
&& command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.FridayWork == groupSettings.FridayWork &&
|
&& command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && commandOffDayHashSet.SetEquals(groupOffDayHashSet) &&
|
||||||
command.HolidayWork == groupSettings.HolidayWork && command.BreakTime == groupSettings.BreakTime)
|
command.HolidayWork == groupSettings.HolidayWork && command.BreakTime == groupSettings.BreakTime)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -978,7 +1000,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.BreakTime == groupSettings.BreakTime &&
|
if (command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.BreakTime == groupSettings.BreakTime &&
|
||||||
command.IrregularShift == groupSettings.IrregularShift && command.FridayWork == groupSettings.FridayWork &&
|
command.IrregularShift == groupSettings.IrregularShift && commandOffDayHashSet.SetEquals(groupOffDayHashSet) &&
|
||||||
command.HolidayWork == groupSettings.HolidayWork)
|
command.HolidayWork == groupSettings.HolidayWork)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -999,7 +1021,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
.Select(x => new CustomizeRotatingShift(TimeOnly.Parse(x.StartTime), TimeOnly.Parse(x.EndTime))).ToList();
|
.Select(x => new CustomizeRotatingShift(TimeOnly.Parse(x.StartTime), TimeOnly.Parse(x.EndTime))).ToList();
|
||||||
|
|
||||||
if (rotatingShift.All(x => groupSettings.CustomizeRotatingShifts.Any(y => x.Equals(y)))
|
if (rotatingShift.All(x => groupSettings.CustomizeRotatingShifts.Any(y => x.Equals(y)))
|
||||||
&& command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.FridayWork == groupSettings.FridayWork &&
|
&& command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && commandOffDayHashSet.SetEquals(groupOffDayHashSet) &&
|
||||||
command.HolidayWork == groupSettings.HolidayWork && command.BreakTime == groupSettings.BreakTime)
|
command.HolidayWork == groupSettings.HolidayWork && command.BreakTime == groupSettings.BreakTime)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -1012,10 +1034,11 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var weeklyOffDays = command.WeeklyOffDays.Select(x => new WeeklyOffDay(x)).ToList();
|
||||||
using var transaction = new TransactionScope();
|
using var transaction = new TransactionScope();
|
||||||
|
|
||||||
entity.SimpleEdit(employeesShifts, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime,
|
entity.SimpleEdit(employeesShifts, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime,
|
||||||
isChanged, command.FridayWork, command.HolidayWork, rotatingShift);
|
isChanged, command.HolidayWork, rotatingShift, weeklyOffDays);
|
||||||
|
|
||||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||||
if (reCalculateCommand.Count > 0)
|
if (reCalculateCommand.Count > 0)
|
||||||
@@ -1188,13 +1211,13 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
groupData.id,
|
groupData.id,
|
||||||
shifts.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement))
|
shifts.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement))
|
||||||
.ToList(),
|
.ToList(),
|
||||||
groupData.FridayWork,
|
|
||||||
groupData.HolidayWork,
|
groupData.HolidayWork,
|
||||||
groupData.IrregularShift,
|
groupData.IrregularShift,
|
||||||
groupData.WorkshopShiftStatus,
|
groupData.WorkshopShiftStatus,
|
||||||
new(groupData.BreakTime.HasBreakTimeValue, groupData.BreakTime.BreakTimeValue),
|
new(groupData.BreakTime.HasBreakTimeValue, groupData.BreakTime.BreakTimeValue),
|
||||||
command.LeavePermittedDays,
|
command.LeavePermittedDays,
|
||||||
groupData.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList()
|
groupData.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList(),
|
||||||
|
groupData.WeeklyOffDays
|
||||||
);
|
);
|
||||||
|
|
||||||
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
||||||
@@ -1260,7 +1283,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
{
|
{
|
||||||
entity.Edit(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay, marriedAllowance, shiftPay,
|
entity.Edit(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay, marriedAllowance, shiftPay,
|
||||||
familyAllowance, leavePay, insuranceDeduction,
|
familyAllowance, leavePay, insuranceDeduction,
|
||||||
fineAbsenceDeduction, lateToWork, earlyExit, command.FridayWork, command.HolidayWork,
|
fineAbsenceDeduction, lateToWork, earlyExit, command.HolidayWork,
|
||||||
command.BonusesPaysInEndOfMonth, command.LeavePermittedDays, command.BaseYearsPayInEndOfYear,
|
command.BonusesPaysInEndOfMonth, command.LeavePermittedDays, command.BaseYearsPayInEndOfYear,
|
||||||
command.OverTimeThresholdMinute);
|
command.OverTimeThresholdMinute);
|
||||||
|
|
||||||
@@ -1358,7 +1381,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
if (fridayPay == entity.FridayPay && overTimePay == entity.OverTimePay && baseYearsPay == entity.BaseYearsPay && bonusesPay == entity.BonusesPay
|
if (fridayPay == entity.FridayPay && overTimePay == entity.OverTimePay && baseYearsPay == entity.BaseYearsPay && bonusesPay == entity.BonusesPay
|
||||||
&& shiftPay == entity.ShiftPay && nightWorkPay == entity.NightWorkPay && marriedAllowance == entity.MarriedAllowance
|
&& shiftPay == entity.ShiftPay && nightWorkPay == entity.NightWorkPay && marriedAllowance == entity.MarriedAllowance
|
||||||
&& familyAllowance == entity.FamilyAllowance && leavePay == entity.LeavePay && insuranceDeduction == entity.InsuranceDeduction
|
&& familyAllowance == entity.FamilyAllowance && leavePay == entity.LeavePay && insuranceDeduction == entity.InsuranceDeduction
|
||||||
&& fineAbsenceDeduction == entity.FineAbsenceDeduction && lateToWork == entity.LateToWork && earlyExit == entity.EarlyExit && command.FridayWork == entity.FridayWork
|
&& fineAbsenceDeduction == entity.FineAbsenceDeduction && lateToWork == entity.LateToWork && earlyExit == entity.EarlyExit
|
||||||
&& command.HolidayWork == entity.HolidayWork && command.IrregularShift == entity.IrregularShift && command.WorkshopShiftStatus == entity.WorkshopShiftStatus)
|
&& command.HolidayWork == entity.HolidayWork && command.IrregularShift == entity.IrregularShift && command.WorkshopShiftStatus == entity.WorkshopShiftStatus)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -1369,8 +1392,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
}
|
}
|
||||||
entity.EditAndOverwriteOnEmployees(command.Name, salary, command.EmployeeIds, fridayPay, overTimePay,
|
entity.EditAndOverwriteOnEmployees(command.Name, salary, command.EmployeeIds, fridayPay, overTimePay,
|
||||||
baseYearsPay, bonusesPay, shiftPay, nightWorkPay, marriedAllowance, familyAllowance,
|
baseYearsPay, bonusesPay, shiftPay, nightWorkPay, marriedAllowance, familyAllowance,
|
||||||
leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork, earlyExit,
|
leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork, earlyExit, command.HolidayWork, isChanged, command.LeavePermittedDays);
|
||||||
command.FridayWork, command.HolidayWork, isChanged, command.LeavePermittedDays);
|
|
||||||
|
|
||||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||||
|
|
||||||
@@ -1418,12 +1440,15 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
|
|
||||||
double salary = command.Salary.MoneyToDouble();
|
double salary = command.Salary.MoneyToDouble();
|
||||||
|
|
||||||
|
var commandOffDayHashSet = command.WeeklyOffDays?.ToHashSet()??[];
|
||||||
|
|
||||||
|
var entityOffDayHashSet = entity.WeeklyOffDays.Select(x => x.DayOfWeek).ToHashSet();
|
||||||
|
|
||||||
bool isChanged;
|
bool isChanged;
|
||||||
if (fridayPay == entity.FridayPay && overTimePay == entity.OverTimePay && baseYearsPay == entity.BaseYearsPay && bonusesPay == entity.BonusesPay
|
if (fridayPay == entity.FridayPay && overTimePay == entity.OverTimePay && baseYearsPay == entity.BaseYearsPay && bonusesPay == entity.BonusesPay
|
||||||
&& shiftPay == entity.ShiftPay && nightWorkPay == entity.NightWorkPay && marriedAllowance == entity.MarriedAllowance
|
&& shiftPay == entity.ShiftPay && nightWorkPay == entity.NightWorkPay && marriedAllowance == entity.MarriedAllowance
|
||||||
&& familyAllowance == entity.FamilyAllowance && leavePay == entity.LeavePay && insuranceDeduction == entity.InsuranceDeduction
|
&& familyAllowance == entity.FamilyAllowance && leavePay == entity.LeavePay && insuranceDeduction == entity.InsuranceDeduction
|
||||||
&& fineAbsenceDeduction == entity.FineAbsenceDeduction && lateToWork == entity.LateToWork && earlyExit == entity.EarlyExit && command.FridayWork == entity.FridayWork
|
&& fineAbsenceDeduction == entity.FineAbsenceDeduction && lateToWork == entity.LateToWork && earlyExit == entity.EarlyExit && commandOffDayHashSet.SetEquals(entityOffDayHashSet)
|
||||||
&& command.HolidayWork == entity.HolidayWork)
|
&& command.HolidayWork == entity.HolidayWork)
|
||||||
{
|
{
|
||||||
isChanged = false;
|
isChanged = false;
|
||||||
@@ -1436,7 +1461,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
//change employee data manually. It changes the 'IsChanged' property to true.
|
//change employee data manually. It changes the 'IsChanged' property to true.
|
||||||
entity.EditEmployees(salary, fridayPay, overTimePay, baseYearsPay,
|
entity.EditEmployees(salary, fridayPay, overTimePay, baseYearsPay,
|
||||||
bonusesPay, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay,
|
bonusesPay, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay,
|
||||||
insuranceDeduction, fineAbsenceDeduction, lateToWork, earlyExit, command.FridayWork, command.HolidayWork, command.IrregularShift, isChanged, command.LeavePermittedDays);
|
insuranceDeduction, fineAbsenceDeduction, lateToWork, earlyExit, command.HolidayWork, command.IrregularShift, isChanged, command.LeavePermittedDays);
|
||||||
|
|
||||||
|
|
||||||
_customizeWorkshopEmployeeSettingsRepository.SaveChanges();
|
_customizeWorkshopEmployeeSettingsRepository.SaveChanges();
|
||||||
@@ -1509,8 +1534,9 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
Placement = x.Placement,
|
Placement = x.Placement,
|
||||||
StartTime = x.StartTime.ToString("HH:mm")
|
StartTime = x.StartTime.ToString("HH:mm")
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
FridayWork = entity.FridayWork,
|
//FridayWork = entity.FridayWork,
|
||||||
HolidayWork = entity.HolidayWork,
|
HolidayWork = entity.HolidayWork,
|
||||||
|
WeeklyOffDays = entity.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList(),
|
||||||
CustomizeRotatingShiftsViewModels = entity.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShiftsViewModel()
|
CustomizeRotatingShiftsViewModels = entity.CustomizeRotatingShifts.Select(x => new CustomizeRotatingShiftsViewModel()
|
||||||
{
|
{
|
||||||
StartTime = x.StartTime.ToString("HH:mm"),
|
StartTime = x.StartTime.ToString("HH:mm"),
|
||||||
@@ -1651,7 +1677,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
var customizeWorkshopGroupSettings = new CustomizeWorkshopGroupSettings().CreateMainGroup(entity.FridayPay, entity.OverTimePay,
|
var customizeWorkshopGroupSettings = new CustomizeWorkshopGroupSettings().CreateMainGroup(entity.FridayPay, entity.OverTimePay,
|
||||||
entity.BaseYearsPay, entity.BonusesPay, entity.ShiftPay, entity.NightWorkPay, entity.MarriedAllowance,
|
entity.BaseYearsPay, entity.BonusesPay, entity.ShiftPay, entity.NightWorkPay, entity.MarriedAllowance,
|
||||||
entity.FamilyAllowance, entity.LeavePay, entity.InsuranceDeduction, entity.FineAbsenceDeduction,
|
entity.FamilyAllowance, entity.LeavePay, entity.InsuranceDeduction, entity.FineAbsenceDeduction,
|
||||||
entity.LateToWork, entity.EarlyExit, shifts, entity.FridayWork, entity.HolidayWork,
|
entity.LateToWork, entity.EarlyExit, shifts, entity.HolidayWork,
|
||||||
irregularShift, [], entity.WorkshopShiftStatus, entity.id, new BreakTime(false, new TimeOnly()), entity.LeavePermittedDays);
|
irregularShift, [], entity.WorkshopShiftStatus, entity.id, new BreakTime(false, new TimeOnly()), entity.LeavePermittedDays);
|
||||||
|
|
||||||
_customizeWorkshopGroupSettingsRepository.Create(customizeWorkshopGroupSettings);
|
_customizeWorkshopGroupSettingsRepository.Create(customizeWorkshopGroupSettings);
|
||||||
@@ -1699,7 +1725,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
{
|
{
|
||||||
customizeWorkshopGroupSettings.EditSimpleAndOverwriteOnAllEmployees(customizeWorkshopGroupSettings.GroupName,
|
customizeWorkshopGroupSettings.EditSimpleAndOverwriteOnAllEmployees(customizeWorkshopGroupSettings.GroupName,
|
||||||
groupShifts, entity.WorkshopShiftStatus, irregularShift, new BreakTime(false, new TimeOnly()),
|
groupShifts, entity.WorkshopShiftStatus, irregularShift, new BreakTime(false, new TimeOnly()),
|
||||||
false, entity.FridayWork, entity.HolidayWork, []);
|
false, entity.HolidayWork, [], []);
|
||||||
}
|
}
|
||||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
@@ -1725,8 +1751,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
|||||||
customizeWorkshopSettings.NightWorkPay, customizeWorkshopSettings.MarriedAllowance,
|
customizeWorkshopSettings.NightWorkPay, customizeWorkshopSettings.MarriedAllowance,
|
||||||
customizeWorkshopSettings.FamilyAllowance, customizeWorkshopSettings.LeavePay,
|
customizeWorkshopSettings.FamilyAllowance, customizeWorkshopSettings.LeavePay,
|
||||||
customizeWorkshopSettings.InsuranceDeduction, customizeWorkshopSettings.FineAbsenceDeduction,
|
customizeWorkshopSettings.InsuranceDeduction, customizeWorkshopSettings.FineAbsenceDeduction,
|
||||||
customizeWorkshopSettings.LateToWork, customizeWorkshopSettings.EarlyExit,
|
customizeWorkshopSettings.LateToWork, customizeWorkshopSettings.EarlyExit, customizeWorkshopSettings.HolidayWork, replaceInAllGroups,
|
||||||
customizeWorkshopSettings.FridayWork, customizeWorkshopSettings.HolidayWork, replaceInAllGroups,
|
|
||||||
customizeWorkshopSettings.LeavePermittedDays);
|
customizeWorkshopSettings.LeavePermittedDays);
|
||||||
}
|
}
|
||||||
_customizeWorkshopSettingsRepository.SaveChanges();
|
_customizeWorkshopSettingsRepository.SaveChanges();
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string initial = "1300/10/11";
|
string initial = "1300/10/11";
|
||||||
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||||
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||||
@@ -1558,7 +1559,11 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|||||||
if (employee.IsAuthorized == false)
|
if (employee.IsAuthorized == false)
|
||||||
{
|
{
|
||||||
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
||||||
|
if (apiResult.ResponseContext.Status.Code == 14)
|
||||||
|
{
|
||||||
|
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
||||||
|
|
||||||
|
}
|
||||||
if (apiResult.ResponseContext.Status.Code != 0)
|
if (apiResult.ResponseContext.Status.Code != 0)
|
||||||
{
|
{
|
||||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||||
@@ -1614,7 +1619,16 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|||||||
return op.Succcedded(data);
|
return op.Succcedded(data);
|
||||||
}
|
}
|
||||||
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
||||||
|
if (apiResult.ResponseContext.Status.Code == 14)
|
||||||
|
{
|
||||||
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید", new EmployeeDataFromApiViewModel() { AuthorizedCanceled = true });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (apiResult.ResponseContext.Status.Code == 3)
|
||||||
|
{
|
||||||
|
return op.Failed("کد ملی نامعتبر است");
|
||||||
|
}
|
||||||
if (apiResult.ResponseContext.Status.Code != 0)
|
if (apiResult.ResponseContext.Status.Code != 0)
|
||||||
{
|
{
|
||||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||||
|
|||||||
@@ -21,7 +21,15 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
|||||||
|
|
||||||
public OperationResult Create(CreateEmployeeComputeOptions command)
|
public OperationResult Create(CreateEmployeeComputeOptions command)
|
||||||
{
|
{
|
||||||
|
|
||||||
var opration = new OperationResult();
|
var opration = new OperationResult();
|
||||||
|
if (command.CreateContract && command.ContractTerm != "1" && command.CutContractEndOfYear == IsActive.None)
|
||||||
|
return opration.Failed("لطفا تعیین کنید که قراداد منتهی به پایان سال یاشد یا نباشد");
|
||||||
|
|
||||||
|
if (command.ContractTerm == "1")
|
||||||
|
command.CutContractEndOfYear = IsActive.None;
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (_employeeComputeOptionsRepository.Exists(x =>
|
if (_employeeComputeOptionsRepository.Exists(x =>
|
||||||
@@ -31,7 +39,7 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
|||||||
var editOptions = _employeeComputeOptionsRepository.Get(query.Id);
|
var editOptions = _employeeComputeOptionsRepository.Get(query.Id);
|
||||||
|
|
||||||
editOptions.Edit(command.ComputeOptions, command.BonusesOptions, command.YearsOptions,
|
editOptions.Edit(command.ComputeOptions, command.BonusesOptions, command.YearsOptions,
|
||||||
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout);
|
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout, command.ContractTerm, command.CutContractEndOfYear);
|
||||||
|
|
||||||
_employeeComputeOptionsRepository.SaveChanges();
|
_employeeComputeOptionsRepository.SaveChanges();
|
||||||
return opration.Succcedded();
|
return opration.Succcedded();
|
||||||
@@ -40,7 +48,7 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
|||||||
{
|
{
|
||||||
var createOptions = new EmployeeComputeOptions(command.WorkshopId, command.EmployeeId,
|
var createOptions = new EmployeeComputeOptions(command.WorkshopId, command.EmployeeId,
|
||||||
command.ComputeOptions, command.BonusesOptions, command.YearsOptions, command.CreateContract,
|
command.ComputeOptions, command.BonusesOptions, command.YearsOptions, command.CreateContract,
|
||||||
command.SignContract, command.CreateCheckout, command.SignCheckout);
|
command.SignContract, command.CreateCheckout, command.SignCheckout, command.ContractTerm, command.CutContractEndOfYear);
|
||||||
|
|
||||||
_employeeComputeOptionsRepository.Create(createOptions);
|
_employeeComputeOptionsRepository.Create(createOptions);
|
||||||
_employeeComputeOptionsRepository.SaveChanges();
|
_employeeComputeOptionsRepository.SaveChanges();
|
||||||
|
|||||||
@@ -513,10 +513,10 @@ public class InsuranceListApplication : IInsuranceListApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
//سرای ملک
|
//سرای ملک
|
||||||
// نوشین خالی
|
// نرجس خالی
|
||||||
// 39692467
|
// 39692467
|
||||||
//if (employee.EmployeeId == 45280)
|
if (employee.EmployeeId == 45280)
|
||||||
// monthlyBenefits += 39692467;
|
monthlyBenefits += 39692467;
|
||||||
|
|
||||||
var marriedAllowanceCompute = MarriedAllowance(employee.MaritalStatus, employee.JobId, employee.IncludeStatus,
|
var marriedAllowanceCompute = MarriedAllowance(employee.MaritalStatus, employee.JobId, employee.IncludeStatus,
|
||||||
workingDays.countWorkingDays, yearlysaleries.MarriedAllowance, endOfMonth);
|
workingDays.countWorkingDays, yearlysaleries.MarriedAllowance, endOfMonth);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using CompanyManagment.App.Contracts.PersonnleCode;
|
|||||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||||
using CompanyManagment.App.Contracts.WorkingHours;
|
using CompanyManagment.App.Contracts.WorkingHours;
|
||||||
using CompanyManagment.App.Contracts.WorkingHoursItems;
|
using CompanyManagment.App.Contracts.WorkingHoursItems;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
using PersianTools.Core;
|
using PersianTools.Core;
|
||||||
|
|
||||||
namespace CompanyManagment.Application;
|
namespace CompanyManagment.Application;
|
||||||
@@ -600,6 +601,11 @@ public class LeftWorkApplication : ILeftWorkApplication
|
|||||||
return _leftWorkRepository.CheckEditLeftWork(workshopId, employeeId, date.ToGeorgianDateTime(), type);
|
return _leftWorkRepository.CheckEditLeftWork(workshopId, employeeId, date.ToGeorgianDateTime(), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AutoExtensionDto AutoExtentionEmployees(long workshopId)
|
||||||
|
{
|
||||||
|
return _leftWorkRepository.AutoExtentionEmployees(workshopId);
|
||||||
|
}
|
||||||
|
|
||||||
#region Pooya
|
#region Pooya
|
||||||
//این متد ترک کار های کارمند را با فعالیت حضور غیاب یکپارچه می کند
|
//این متد ترک کار های کارمند را با فعالیت حضور غیاب یکپارچه می کند
|
||||||
private void IfEmployeeHasNewLeftWorkDateAddEndDateToRollCallStatus(long employeeId)
|
private void IfEmployeeHasNewLeftWorkDateAddEndDateToRollCallStatus(long employeeId)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using CompanyManagment.App.Contracts.LeftWork;
|
|||||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||||
using CompanyManagment.App.Contracts.ReportClient;
|
using CompanyManagment.App.Contracts.ReportClient;
|
||||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||||
|
using CompanyManagment.EFCore.Migrations;
|
||||||
using OperationResult = _0_Framework.Application.OperationResult;
|
using OperationResult = _0_Framework.Application.OperationResult;
|
||||||
using Tools = _0_Framework.Application.Tools;
|
using Tools = _0_Framework.Application.Tools;
|
||||||
|
|
||||||
@@ -174,10 +175,19 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
|
|||||||
|
|
||||||
await _leftWorkRepository.CreateAsync(newLeftWork);
|
await _leftWorkRepository.CreateAsync(newLeftWork);
|
||||||
_leftWorkTempRepository.Remove(leftWorkTemp);
|
_leftWorkTempRepository.Remove(leftWorkTemp);
|
||||||
|
var rollCallEmployee = _rollCallEmployeeRepository.GetBy(leftWorkTemp.EmployeeId, leftWorkTemp.WorkshopId);
|
||||||
|
|
||||||
|
var rollCallStatus = rollCallEmployee?.EmployeesStatus.MaxBy(x => x.StartDate);
|
||||||
|
|
||||||
|
if (rollCallStatus != null)
|
||||||
|
{
|
||||||
|
var startWork = newLeftWork.StartWorkDate;
|
||||||
|
rollCallStatus.Edit(startWork, rollCallStatus.EndDate);
|
||||||
|
|
||||||
|
}
|
||||||
await _leftWorkRepository.SaveChangesAsync();
|
await _leftWorkRepository.SaveChangesAsync();
|
||||||
await _leftWorkTempRepository.SaveChangesAsync();
|
await _leftWorkTempRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ public class RollCallMandatoryApplication : IRollCallMandatoryApplication
|
|||||||
return _rollCallMandatoryRepository.Exists(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date);
|
return _rollCallMandatoryRepository.Exists(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout)
|
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute)
|
||||||
{
|
{
|
||||||
return _rollCallMandatoryRepository.MandatoryCompute(employeeId,workshopId, contractStart, contractEnd, command, holidayWorking, isStaticCheckout);
|
return _rollCallMandatoryRepository.MandatoryCompute(employeeId,workshopId, contractStart, contractEnd, command, holidayWorking, isStaticCheckout, rotatingShiftCompute);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd,
|
public async Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd,
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
|||||||
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
||||||
var account = new AccountViewModel();
|
var account = new AccountViewModel();
|
||||||
var institutionContract = new InstitutionContract();
|
var institutionContract = new InstitutionContract();
|
||||||
|
|
||||||
if (command.HasRollCallFreeVip == "true")
|
if (command.HasRollCallFreeVip == "true")
|
||||||
{
|
{
|
||||||
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
||||||
@@ -167,7 +168,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
|||||||
command.AddYearsPay,command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,command.ComputeOptions,
|
command.AddYearsPay,command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,command.ComputeOptions,
|
||||||
command.BonusesOptions,command.YearsOptions,command.HasRollCallFreeVip,command.WorkshopHolidayWorking,
|
command.BonusesOptions,command.YearsOptions,command.HasRollCallFreeVip,command.WorkshopHolidayWorking,
|
||||||
command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance, command.CreateContract, command.SignContract,
|
command.InsuranceCheckoutOvertime, command.InsuranceCheckoutFamilyAllowance, command.CreateContract, command.SignContract,
|
||||||
command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear);
|
command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear,command.RotatingShiftCompute, command.IsStaticCheckout);
|
||||||
_workshopRepository.Create(workshop);
|
_workshopRepository.Create(workshop);
|
||||||
_workshopRepository.SaveChanges();
|
_workshopRepository.SaveChanges();
|
||||||
|
|
||||||
@@ -281,6 +282,8 @@ public class WorkshopAppliction : IWorkshopApplication
|
|||||||
}
|
}
|
||||||
var account = new AccountViewModel();
|
var account = new AccountViewModel();
|
||||||
var institutionContract = new InstitutionContract();
|
var institutionContract = new InstitutionContract();
|
||||||
|
|
||||||
|
|
||||||
if (command.HasRollCallFreeVip == "true")
|
if (command.HasRollCallFreeVip == "true")
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -358,7 +361,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
|||||||
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay, command.TotalPaymentHide,command.IsClassified,
|
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay, command.TotalPaymentHide,command.IsClassified,
|
||||||
command.ComputeOptions,command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip,
|
command.ComputeOptions,command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip,
|
||||||
command.WorkshopHolidayWorking, command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance,
|
command.WorkshopHolidayWorking, command.InsuranceCheckoutOvertime,command.InsuranceCheckoutFamilyAllowance,
|
||||||
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear);
|
command.CreateContract, command.SignContract, command.CreateCheckout, command.SignCheckout, command.CutContractEndOfYear,command.RotatingShiftCompute, command.IsStaticCheckout);
|
||||||
_workshopRepository.SaveChanges();
|
_workshopRepository.SaveChanges();
|
||||||
|
|
||||||
_workshopRepository.RemoveOldRelation(command.Id);
|
_workshopRepository.RemoveOldRelation(command.Id);
|
||||||
|
|||||||
@@ -228,6 +228,13 @@ public class CustomizeWorkshopEmployeeSettingsMapping : IEntityTypeConfiguration
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||||
|
{
|
||||||
|
offDay.HasKey(x => x.Id);
|
||||||
|
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||||
|
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||||
|
});
|
||||||
|
|
||||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,6 +227,14 @@ public class CustomizeWorkshopGroupSettingsMapping : IEntityTypeConfiguration<Cu
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||||
|
{
|
||||||
|
offDay.HasKey(x => x.Id);
|
||||||
|
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||||
|
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||||
|
});
|
||||||
|
|
||||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,12 @@ public class CustomizeWorkshopSettingsMapping:IEntityTypeConfiguration<Customize
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
builder.OwnsMany(x => x.WeeklyOffDays, offDay =>
|
||||||
|
{
|
||||||
|
offDay.HasKey(x => x.Id);
|
||||||
|
offDay.Property(x => x.DayOfWeek).HasConversion<string>().HasMaxLength(15);
|
||||||
|
offDay.WithOwner().HasForeignKey(x => x.ParentId);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
builder.HasMany(x => x.CustomizeWorkshopGroupSettingsCollection).WithOne(x => x.CustomizeWorkshopSettings)
|
builder.HasMany(x => x.CustomizeWorkshopGroupSettingsCollection).WithOne(x => x.CustomizeWorkshopSettings)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
using System;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
@@ -16,6 +18,9 @@ public class EmployeeComputeOptionsMapping : IEntityTypeConfiguration<EmployeeCo
|
|||||||
builder.Property(x => x.ComputeOptions).HasMaxLength(50);
|
builder.Property(x => x.ComputeOptions).HasMaxLength(50);
|
||||||
builder.Property(x => x.YearsOptions).HasMaxLength(50);
|
builder.Property(x => x.YearsOptions).HasMaxLength(50);
|
||||||
builder.Property(x => x.BonusesOptions).HasMaxLength(50);
|
builder.Property(x => x.BonusesOptions).HasMaxLength(50);
|
||||||
|
builder.Property(x => x.ContractTerm).HasMaxLength(10);
|
||||||
|
builder.Property(x => x.CutContractEndOfYear).HasConversion(x => x.ToString()
|
||||||
|
, x => ((IsActive)Enum.Parse(typeof(IsActive), x))).HasMaxLength(5);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
9744
CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.Designer.cs
generated
Normal file
9744
CompanyManagment.EFCore/Migrations/20250602161025_add offDays to cws.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace CompanyManagment.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class addoffDaystocws : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||||
|
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_CustomizeWorkshopEmployeeSettings_ParentId",
|
||||||
|
column: x => x.ParentId,
|
||||||
|
principalTable: "CustomizeWorkshopEmployeeSettings",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "CustomizeWorkshopGroupSettings_WeeklyOffDays",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||||
|
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_CustomizeWorkshopGroupSettings_WeeklyOffDays", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_CustomizeWorkshopGroupSettings_WeeklyOffDays_CustomizeWorkshopGroupSettings_ParentId",
|
||||||
|
column: x => x.ParentId,
|
||||||
|
principalTable: "CustomizeWorkshopGroupSettings",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "CustomizeWorkshopSettings_WeeklyOffDays",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
DayOfWeek = table.Column<string>(type: "nvarchar(15)", maxLength: 15, nullable: false),
|
||||||
|
ParentId = table.Column<long>(type: "bigint", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_CustomizeWorkshopSettings_WeeklyOffDays", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_CustomizeWorkshopSettings_WeeklyOffDays_CustomizeWorkshopSettings_ParentId",
|
||||||
|
column: x => x.ParentId,
|
||||||
|
principalTable: "CustomizeWorkshopSettings",
|
||||||
|
principalColumn: "id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_CustomizeWorkshopEmployeeSettings_WeeklyOffDays_ParentId",
|
||||||
|
table: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays",
|
||||||
|
column: "ParentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_CustomizeWorkshopGroupSettings_WeeklyOffDays_ParentId",
|
||||||
|
table: "CustomizeWorkshopGroupSettings_WeeklyOffDays",
|
||||||
|
column: "ParentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_CustomizeWorkshopSettings_WeeklyOffDays_ParentId",
|
||||||
|
table: "CustomizeWorkshopSettings_WeeklyOffDays",
|
||||||
|
column: "ParentId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "CustomizeWorkshopEmployeeSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "CustomizeWorkshopGroupSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "CustomizeWorkshopSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9870
CompanyManagment.EFCore/Migrations/20250622193551_ContractTermAndCutOptionToEmployeeOptions.Designer.cs
generated
Normal file
9870
CompanyManagment.EFCore/Migrations/20250622193551_ContractTermAndCutOptionToEmployeeOptions.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace CompanyManagment.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ContractTermAndCutOptionToEmployeeOptions : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ContractTerm",
|
||||||
|
table: "EmployeeComputeOptions",
|
||||||
|
type: "nvarchar(10)",
|
||||||
|
maxLength: 10,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "CutContractEndOfYear",
|
||||||
|
table: "EmployeeComputeOptions",
|
||||||
|
type: "nvarchar(5)",
|
||||||
|
maxLength: 5,
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ContractTerm",
|
||||||
|
table: "EmployeeComputeOptions");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CutContractEndOfYear",
|
||||||
|
table: "EmployeeComputeOptions");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9960
CompanyManagment.EFCore/Migrations/20250701193647_NewOptionsToWorkshop.Designer.cs
generated
Normal file
9960
CompanyManagment.EFCore/Migrations/20250701193647_NewOptionsToWorkshop.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace CompanyManagment.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class NewOptionsToWorkshop : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsStaticCheckout",
|
||||||
|
table: "Workshops",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "RotatingShiftCompute",
|
||||||
|
table: "Workshops",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsStaticCheckout",
|
||||||
|
table: "Workshops");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "RotatingShiftCompute",
|
||||||
|
table: "Workshops");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1809,6 +1809,10 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<string>("ContractTerm")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("nvarchar(10)");
|
||||||
|
|
||||||
b.Property<bool>("CreateCheckout")
|
b.Property<bool>("CreateCheckout")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
@@ -1818,6 +1822,11 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
b.Property<DateTime>("CreationDate")
|
b.Property<DateTime>("CreationDate")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("CutContractEndOfYear")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(5)
|
||||||
|
.HasColumnType("nvarchar(5)");
|
||||||
|
|
||||||
b.Property<long>("EmployeeId")
|
b.Property<long>("EmployeeId")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
@@ -5705,10 +5714,16 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
b.Property<bool>("IsOldContract")
|
b.Property<bool>("IsOldContract")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsStaticCheckout")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("Population")
|
b.Property<string>("Population")
|
||||||
.HasMaxLength(25)
|
.HasMaxLength(25)
|
||||||
.HasColumnType("nvarchar(25)");
|
.HasColumnType("nvarchar(25)");
|
||||||
|
|
||||||
|
b.Property<bool>("RotatingShiftCompute")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<bool>("SignCheckout")
|
b.Property<bool>("SignCheckout")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
@@ -7634,6 +7649,32 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
.HasForeignKey("CustomizeWorkshopEmployeeSettingsid");
|
.HasForeignKey("CustomizeWorkshopEmployeeSettingsid");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||||
|
{
|
||||||
|
b1.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||||
|
|
||||||
|
b1.Property<string>("DayOfWeek")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(15)
|
||||||
|
.HasColumnType("nvarchar(15)");
|
||||||
|
|
||||||
|
b1.Property<long>("ParentId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b1.HasKey("Id");
|
||||||
|
|
||||||
|
b1.HasIndex("ParentId");
|
||||||
|
|
||||||
|
b1.ToTable("CustomizeWorkshopEmployeeSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
b1.WithOwner()
|
||||||
|
.HasForeignKey("ParentId");
|
||||||
|
});
|
||||||
|
|
||||||
b.Navigation("BaseYearsPay");
|
b.Navigation("BaseYearsPay");
|
||||||
|
|
||||||
b.Navigation("BonusesPay");
|
b.Navigation("BonusesPay");
|
||||||
@@ -7669,6 +7710,8 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
b.Navigation("OverTimePay");
|
b.Navigation("OverTimePay");
|
||||||
|
|
||||||
b.Navigation("ShiftPay");
|
b.Navigation("ShiftPay");
|
||||||
|
|
||||||
|
b.Navigation("WeeklyOffDays");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b =>
|
modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b =>
|
||||||
@@ -8192,6 +8235,32 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
.HasForeignKey("CustomizeWorkshopGroupSettingsid");
|
.HasForeignKey("CustomizeWorkshopGroupSettingsid");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||||
|
{
|
||||||
|
b1.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||||
|
|
||||||
|
b1.Property<string>("DayOfWeek")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(15)
|
||||||
|
.HasColumnType("nvarchar(15)");
|
||||||
|
|
||||||
|
b1.Property<long>("ParentId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b1.HasKey("Id");
|
||||||
|
|
||||||
|
b1.HasIndex("ParentId");
|
||||||
|
|
||||||
|
b1.ToTable("CustomizeWorkshopGroupSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
b1.WithOwner()
|
||||||
|
.HasForeignKey("ParentId");
|
||||||
|
});
|
||||||
|
|
||||||
b.Navigation("BaseYearsPay");
|
b.Navigation("BaseYearsPay");
|
||||||
|
|
||||||
b.Navigation("BonusesPay");
|
b.Navigation("BonusesPay");
|
||||||
@@ -8227,6 +8296,8 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
b.Navigation("OverTimePay");
|
b.Navigation("OverTimePay");
|
||||||
|
|
||||||
b.Navigation("ShiftPay");
|
b.Navigation("ShiftPay");
|
||||||
|
|
||||||
|
b.Navigation("WeeklyOffDays");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b =>
|
modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b =>
|
||||||
@@ -8677,6 +8748,32 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
.HasForeignKey("CustomizeWorkshopSettingsid");
|
.HasForeignKey("CustomizeWorkshopSettingsid");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
b.OwnsMany("_0_Framework.Domain.CustomizeCheckoutShared.Base.WeeklyOffDay", "WeeklyOffDays", b1 =>
|
||||||
|
{
|
||||||
|
b1.Property<long>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||||
|
|
||||||
|
b1.Property<string>("DayOfWeek")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(15)
|
||||||
|
.HasColumnType("nvarchar(15)");
|
||||||
|
|
||||||
|
b1.Property<long>("ParentId")
|
||||||
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
|
b1.HasKey("Id");
|
||||||
|
|
||||||
|
b1.HasIndex("ParentId");
|
||||||
|
|
||||||
|
b1.ToTable("CustomizeWorkshopSettings_WeeklyOffDays");
|
||||||
|
|
||||||
|
b1.WithOwner()
|
||||||
|
.HasForeignKey("ParentId");
|
||||||
|
});
|
||||||
|
|
||||||
b.Navigation("BaseYearsPay");
|
b.Navigation("BaseYearsPay");
|
||||||
|
|
||||||
b.Navigation("BonusesPay");
|
b.Navigation("BonusesPay");
|
||||||
@@ -8705,6 +8802,8 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
|
|
||||||
b.Navigation("ShiftPay");
|
b.Navigation("ShiftPay");
|
||||||
|
|
||||||
|
b.Navigation("WeeklyOffDays");
|
||||||
|
|
||||||
b.Navigation("Workshop");
|
b.Navigation("Workshop");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
|||||||
await CreateRangeAdminMonthlyOverview(notExistAdminMonthlyReviewsWorkshopIds, month, year);
|
await CreateRangeAdminMonthlyOverview(notExistAdminMonthlyReviewsWorkshopIds, month, year);
|
||||||
|
|
||||||
// بهروزرسانی وضعیتها
|
// بهروزرسانی وضعیتها
|
||||||
await UpdateAdminMonthlyOverviewStatus(year, month, workshopIds, targetStartDate,targetEndDate, nextFirstMonth,nextEndMonth);
|
await UpdateAdminMonthlyOverviewStatus(year, month, workshopIds, targetStartDate, targetEndDate, nextFirstMonth, nextEndMonth);
|
||||||
|
|
||||||
if (searchModel.ActivationStatus != IsActive.None)
|
if (searchModel.ActivationStatus != IsActive.None)
|
||||||
{
|
{
|
||||||
@@ -237,37 +237,58 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task UpdateAdminMonthlyOverviewStatus(int year, int month, List<long> workshopIds, DateTime targetStartDate,DateTime targetEndDate, DateTime nextStartMonth,DateTime nextEndMonth)
|
private async Task UpdateAdminMonthlyOverviewStatus(int year, int month, List<long> workshopIds, DateTime targetStartDate, DateTime targetEndDate, DateTime nextStartMonth, DateTime nextEndMonth)
|
||||||
{
|
{
|
||||||
var vipGroup = _companyContext.CustomizeWorkshopEmployeeSettings.Where(x => x.CustomizeWorkshopGroupSettingId == 117)
|
var vipGroup = _companyContext.CustomizeWorkshopEmployeeSettings.Where(x => x.CustomizeWorkshopGroupSettingId == 117)
|
||||||
.Select(x => x.EmployeeId)
|
.Select(x => x.EmployeeId)
|
||||||
.Except([5976]).ToList();
|
.Except([5976]).ToHashSet();
|
||||||
|
|
||||||
|
|
||||||
|
var workingCheckoutEmployeeIds = GetWorkingCheckoutEmployeeIds(workshopIds, targetStartDate, targetEndDate, vipGroup);
|
||||||
|
//var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
|
// .Join(
|
||||||
|
// _companyContext.Contracts.AsNoTracking(),
|
||||||
|
// leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
||||||
|
// contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
||||||
|
// (leftWork, contract) => new { leftWork, contract }
|
||||||
|
// )
|
||||||
|
// .Where(x =>
|
||||||
|
// workshopIds.Contains(x.leftWork.WorkshopId) &&
|
||||||
|
// x.leftWork.StartWorkDate <= targetEndDate &&
|
||||||
|
// x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||||
|
// x.contract.ContarctStart <= targetEndDate &&
|
||||||
|
// x.contract.ContractEnd >= targetStartDate &&
|
||||||
|
// !vipGroup.Contains(x.leftWork.EmployeeId) &&
|
||||||
|
// !_companyContext.EmployeeClientTemps
|
||||||
|
// .Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
||||||
|
// )
|
||||||
|
// .Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
||||||
|
|
||||||
|
|
||||||
var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
|
||||||
.Join(
|
|
||||||
_companyContext.Contracts.AsNoTracking(),
|
|
||||||
leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
|
||||||
contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
|
||||||
(leftWork, contract) => new { leftWork, contract }
|
|
||||||
)
|
|
||||||
.Where(x =>
|
|
||||||
workshopIds.Contains(x.leftWork.WorkshopId) &&
|
|
||||||
x.leftWork.StartWorkDate <= targetEndDate &&
|
|
||||||
x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
|
||||||
x.contract.ContarctStart <= targetEndDate &&
|
|
||||||
x.contract.ContractEnd >= targetStartDate &&
|
|
||||||
!vipGroup.Contains(x.leftWork.EmployeeId) &&
|
|
||||||
!_companyContext.EmployeeClientTemps
|
|
||||||
.Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
|
||||||
)
|
|
||||||
.Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
|
||||||
|
|
||||||
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||||
!vipGroup.Contains(x.EmployeeId) &&
|
!vipGroup.Contains(x.EmployeeId) &&
|
||||||
!_companyContext.EmployeeClientTemps
|
!_companyContext.EmployeeClientTemps
|
||||||
.Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId)
|
.Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId))
|
||||||
).Select(x => new { x.WorkshopId, x.EmployeeId });
|
.GroupJoin(_companyContext.EmployeeComputeOptionsSet.Where(o => workshopIds.Contains(o.WorkshopId)),
|
||||||
|
x => new { x.EmployeeId, x.WorkshopId },
|
||||||
|
option => new { option.EmployeeId, option.WorkshopId },
|
||||||
|
(x, options) => new { LeftWork = x, options })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.options.DefaultIfEmpty(),
|
||||||
|
(x, option) => new { x.LeftWork, option })
|
||||||
|
.Where(x => x.option != null ? x.option.CreateContract
|
||||||
|
: x.LeftWork.Workshop.CreateContract)
|
||||||
|
.Select(x => new { x.LeftWork.WorkshopId, x.LeftWork.EmployeeId });
|
||||||
|
|
||||||
|
|
||||||
|
//var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
|
// .Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||||
|
// !vipGroup.Contains(x.EmployeeId) &&
|
||||||
|
// !_companyContext.EmployeeClientTemps
|
||||||
|
// .Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId)
|
||||||
|
// ).Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||||
|
|
||||||
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
||||||
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
||||||
@@ -296,7 +317,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
|||||||
.Select(g => g.WorkshopId)
|
.Select(g => g.WorkshopId)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var list = workingContractEmployeeIds.ToList().Where(x=>!contractSet.Any(a=>a.EmployeeId== x.EmployeeId&&a.WorkshopIds == x.WorkshopId)).ToList();
|
var list = workingContractEmployeeIds.ToList().Where(x => !contractSet.Any(a => a.EmployeeId == x.EmployeeId && a.WorkshopIds == x.WorkshopId)).ToList();
|
||||||
|
|
||||||
var workshopsWithFullCheckout = workingCheckoutGrouping
|
var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||||
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||||
@@ -335,6 +356,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
|||||||
await _companyContext.SaveChangesAsync();
|
await _companyContext.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async Task CreateRangeAdminMonthlyOverview(List<long> workshopIds, int month, int year)
|
private async Task CreateRangeAdminMonthlyOverview(List<long> workshopIds, int month, int year)
|
||||||
{
|
{
|
||||||
foreach (var workshopId in workshopIds)
|
foreach (var workshopId in workshopIds)
|
||||||
@@ -346,4 +368,99 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
|||||||
|
|
||||||
await _companyContext.SaveChangesAsync();
|
await _companyContext.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
private List<(long WorkshopId,long EmployeeId)> GetWorkingCheckoutEmployeeIds(List<long> workshopIds, DateTime targetStartDate, DateTime targetEndDate,
|
||||||
|
HashSet<long> vipGroup)
|
||||||
|
{
|
||||||
|
//var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
|
// .Join(
|
||||||
|
// _companyContext.Contracts.AsNoTracking(),
|
||||||
|
// leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
||||||
|
// contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
||||||
|
// (leftWork, contract) => new { leftWork, contract }
|
||||||
|
// ).GroupJoin(_companyContext.EmployeeComputeOptionsSet.Where(o => workshopIds.Contains(o.WorkshopId)),
|
||||||
|
// x => new { x.leftWork.EmployeeId, x.leftWork.WorkshopId },
|
||||||
|
// option => new { option.EmployeeId, option.WorkshopId },
|
||||||
|
// (x, options) => new { x.leftWork, x.contract, options })
|
||||||
|
// .SelectMany(
|
||||||
|
// x => x.options.DefaultIfEmpty(),
|
||||||
|
// (x, option) => new { x.leftWork, x.contract, option })
|
||||||
|
// .Where(x =>
|
||||||
|
// workshopIds.Contains(x.leftWork.WorkshopId) &&
|
||||||
|
// x.leftWork.StartWorkDate <= targetEndDate &&
|
||||||
|
// x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||||
|
// x.contract.ContarctStart <= targetEndDate &&
|
||||||
|
// x.contract.ContractEnd >= targetStartDate &&
|
||||||
|
// !vipGroup.Contains(x.leftWork.EmployeeId) &&
|
||||||
|
// !_companyContext.EmployeeClientTemps
|
||||||
|
// .Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId) &&
|
||||||
|
// x.option != null
|
||||||
|
// ? x.option.CreateCheckout
|
||||||
|
// : x.leftWork.Workshop.CreateCheckout
|
||||||
|
// )
|
||||||
|
// .Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId }).AsEnumerable()
|
||||||
|
// .Select(x=>(x.WorkshopId,x.EmployeeId)).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var chcekoutLeftWorks = _companyContext.LeftWorkList
|
||||||
|
.AsNoTracking()
|
||||||
|
.Where(x =>
|
||||||
|
workshopIds.Contains(x.WorkshopId) &&
|
||||||
|
x.StartWorkDate <= targetEndDate &&
|
||||||
|
x.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||||
|
!vipGroup.Contains(x.EmployeeId))
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.EmployeeId,
|
||||||
|
x.WorkshopId,
|
||||||
|
x.StartWorkDate,
|
||||||
|
x.LeftWorkDate,
|
||||||
|
x.Workshop.CreateCheckout
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
var checkoutContracts = _companyContext.Contracts
|
||||||
|
.AsNoTracking()
|
||||||
|
.Where(x =>
|
||||||
|
workshopIds.Contains(x.WorkshopIds) &&
|
||||||
|
x.ContarctStart <= targetEndDate &&
|
||||||
|
x.ContractEnd >= targetStartDate)
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.EmployeeId,
|
||||||
|
WorkshopId = x.WorkshopIds,
|
||||||
|
x.ContarctStart,
|
||||||
|
x.ContractEnd
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
var computeOptionsDict = _companyContext.EmployeeComputeOptionsSet
|
||||||
|
.AsNoTracking()
|
||||||
|
.Where(o => workshopIds.Contains(o.WorkshopId))
|
||||||
|
.ToDictionary(
|
||||||
|
o => (o.EmployeeId, o.WorkshopId),
|
||||||
|
o => o.CreateCheckout
|
||||||
|
);
|
||||||
|
|
||||||
|
var clientTemps = _companyContext.EmployeeClientTemps
|
||||||
|
.AsNoTracking().AsEnumerable()
|
||||||
|
.Select(x => (x.EmployeeId, x.WorkshopId))
|
||||||
|
.ToHashSet();
|
||||||
|
|
||||||
|
var workingCheckoutEmployeeIds = chcekoutLeftWorks
|
||||||
|
.Join(
|
||||||
|
checkoutContracts,
|
||||||
|
left => new { left.EmployeeId, left.WorkshopId },
|
||||||
|
contract => new { contract.EmployeeId, contract.WorkshopId },
|
||||||
|
(left, contract) => new { left, contract })
|
||||||
|
.Where(x =>
|
||||||
|
!clientTemps.Contains((x.left.EmployeeId, x.left.WorkshopId)) &&
|
||||||
|
(computeOptionsDict.TryGetValue((x.left.EmployeeId, x.left.WorkshopId), out var createCheckout)
|
||||||
|
? createCheckout
|
||||||
|
: x.left.CreateCheckout))
|
||||||
|
.Select(x => (
|
||||||
|
x.left.WorkshopId,
|
||||||
|
x.left.EmployeeId
|
||||||
|
)).ToList();
|
||||||
|
return workingCheckoutEmployeeIds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ using Company.Domain.CheckoutAgg;
|
|||||||
using Company.Domain.LeftWorkAgg;
|
using Company.Domain.LeftWorkAgg;
|
||||||
using Company.Domain.RollCallAgg;
|
using Company.Domain.RollCallAgg;
|
||||||
using Company.Domain.RollCallEmployeeAgg;
|
using Company.Domain.RollCallEmployeeAgg;
|
||||||
|
using Company.Domain.WorkshopEmployerAgg;
|
||||||
using CompanyManagment.App.Contracts.Checkout;
|
using CompanyManagment.App.Contracts.Checkout;
|
||||||
using CompanyManagment.App.Contracts.Contract;
|
using CompanyManagment.App.Contracts.Contract;
|
||||||
using CompanyManagment.App.Contracts.Employee;
|
using CompanyManagment.App.Contracts.Employee;
|
||||||
@@ -30,6 +31,7 @@ using Microsoft.Data.SqlClient;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using PersianTools.Core;
|
using PersianTools.Core;
|
||||||
|
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||||
|
|
||||||
namespace CompanyManagment.EFCore.Repository;
|
namespace CompanyManagment.EFCore.Repository;
|
||||||
|
|
||||||
@@ -217,6 +219,14 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
checkout => checkout.ContractId,
|
checkout => checkout.ContractId,
|
||||||
(contractWorkshopEmployeeleftWorkPersonnelCode, checkout) =>
|
(contractWorkshopEmployeeleftWorkPersonnelCode, checkout) =>
|
||||||
new { contractWorkshopEmployeeleftWorkPersonnelCode, checkout })
|
new { contractWorkshopEmployeeleftWorkPersonnelCode, checkout })
|
||||||
|
|
||||||
|
.GroupJoin(_context.EmployeeComputeOptionsSet.Where(o => o.WorkshopId == workshopId),
|
||||||
|
x => x.contractWorkshopEmployeeleftWorkPersonnelCode.contractWorkshopEmployeeleftWork.leftwork.EmployeeId,
|
||||||
|
option => option.EmployeeId,
|
||||||
|
(x, options) => new { x.checkout, x.contractWorkshopEmployeeleftWorkPersonnelCode, options })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.options.DefaultIfEmpty(),
|
||||||
|
(x, option) => new { x.checkout, x.contractWorkshopEmployeeleftWorkPersonnelCode, option })
|
||||||
.ToList();
|
.ToList();
|
||||||
Console.WriteLine("query : " + timer.Elapsed);
|
Console.WriteLine("query : " + timer.Elapsed);
|
||||||
timer.Reset();
|
timer.Reset();
|
||||||
@@ -249,7 +259,8 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
LaterThanEnd = false,
|
LaterThanEnd = false,
|
||||||
Extension = false,
|
Extension = false,
|
||||||
Description = "دارای فیش حقوقی",
|
Description = "دارای فیش حقوقی",
|
||||||
HasCheckout = true
|
HasCheckout = true,
|
||||||
|
EmployeeHasCreateCheckout = true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var employeeJoin = result.contractWorkshopEmployeeleftWorkPersonnelCode.contractWorkshopEmployeeleftWork
|
var employeeJoin = result.contractWorkshopEmployeeleftWorkPersonnelCode.contractWorkshopEmployeeleftWork
|
||||||
@@ -469,10 +480,12 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
Description = description,
|
Description = description,
|
||||||
ContractStart = contractStart,
|
ContractStart = contractStart,
|
||||||
ContractEnd = contractEnd,
|
ContractEnd = contractEnd,
|
||||||
LeftWorkDate = leftWorkDate
|
LeftWorkDate = leftWorkDate,
|
||||||
|
EmployeeHasCreateCheckout = result.option != null ? result.option.CreateCheckout : result.contractWorkshopEmployeeleftWorkPersonnelCode.contractWorkshopEmployeeleftWork.contractWorkshopEmployee.contractWorkshop.workshop.CreateCheckout
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}).OrderByDescending(x => x.Extension).ToList();
|
}).Where(x => x.EmployeeHasCreateCheckout).OrderByDescending(x => x.Extension).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1910,9 +1923,482 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
return notRemoveList;
|
return notRemoveList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel)
|
||||||
|
{
|
||||||
|
bool hasSearch = false;
|
||||||
|
bool hasEmployeeOrWorkshpSearch = false;
|
||||||
|
|
||||||
|
//bool noHasSearch = searchModel.WorkshopId == 0 && searchModel.EmployerId == 0
|
||||||
|
// && searchModel.EmployeeId == 0
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.EmployeeName)
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.Year)
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.Month)
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.ContractStart)
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.ContractEnd)
|
||||||
|
// && string.IsNullOrWhiteSpace(searchModel.ContractNo);
|
||||||
|
var acountID = _authHelper.CurrentAccountId();
|
||||||
|
var workshopAcounts = _context.WorkshopAccounts.Where(x => x.AccountId == acountID)
|
||||||
|
.Select(x => x.WorkshopId);
|
||||||
|
|
||||||
|
//var checkouts =
|
||||||
|
// _context.CheckoutSet.Where(x => workshopAcounts.Contains(x.WorkshopId))
|
||||||
|
// .Join(_context.Workshops.AsSplitQuery(),
|
||||||
|
// ch => ch.WorkshopId,
|
||||||
|
// workshop => workshop.id,
|
||||||
|
// (ch, workshop) => new { ch, workshop })
|
||||||
|
// .GroupJoin(_context.EmployeeComputeOptionsSet.AsSplitQuery(),
|
||||||
|
// x => x.workshop.id,
|
||||||
|
// option => option.WorkshopId,
|
||||||
|
// (x, options) => new { x.ch, x.workshop, options })
|
||||||
|
// .SelectMany(
|
||||||
|
// x => x.options.DefaultIfEmpty(),
|
||||||
|
// (x, option) => new { x.ch, x.workshop, option })
|
||||||
|
// .GroupJoin(_context.WorkshopEmployers.AsSplitQuery().Include(we => we.Employer),
|
||||||
|
// result => result.workshop.id,
|
||||||
|
// workshopEmployer => workshopEmployer.WorkshopId,
|
||||||
|
// (result, workshopEmployer) => new { result.ch, result.workshop, result.option, workshopEmployer })
|
||||||
|
// .SelectMany(
|
||||||
|
// y => y.workshopEmployer.DefaultIfEmpty(),
|
||||||
|
// (y, workshopEmployer) => new { y.option, y.ch, y.workshop, workshopEmployer })
|
||||||
|
// .GroupJoin(
|
||||||
|
// _context.PersonalContractingParties.Include(p => p.Employers),
|
||||||
|
// secondResult => secondResult.workshopEmployer.Employer.id,
|
||||||
|
// contractingParty => contractingParty.Employers.FirstOrDefault().id, // یا راه بهتر پایین
|
||||||
|
// (secondResult, contractingParties) => new { secondResult, contractingParties }
|
||||||
|
// )
|
||||||
|
// .SelectMany(
|
||||||
|
// x => x.contractingParties.DefaultIfEmpty(),
|
||||||
|
// (x, contractingParty) => new
|
||||||
|
// {
|
||||||
|
// x.secondResult.workshopEmployer,
|
||||||
|
// x.secondResult.workshop,
|
||||||
|
// x.secondResult.option,
|
||||||
|
// x.secondResult.ch,
|
||||||
|
// contractingParty
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
var checkouts =
|
||||||
|
_context.CheckoutSet.Where(x => workshopAcounts.Contains(x.WorkshopId))
|
||||||
|
.Join(_context.Workshops.AsSplitQuery(),
|
||||||
|
ch => ch.WorkshopId,
|
||||||
|
workshop => workshop.id,
|
||||||
|
(ch, workshop) => new { ch, workshop })
|
||||||
|
.GroupJoin(_context.EmployeeComputeOptionsSet.AsSplitQuery(),
|
||||||
|
x => x.workshop.id,
|
||||||
|
option => option.WorkshopId,
|
||||||
|
(x, options) => new { x.ch, x.workshop, options })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.options.DefaultIfEmpty(),
|
||||||
|
(x, option) => new { x.ch, x.workshop, option })
|
||||||
|
.GroupJoin(_context.WorkshopEmployers.AsSplitQuery().Include(we => we.Employer),
|
||||||
|
result => result.workshop.id,
|
||||||
|
workshopEmployer => workshopEmployer.WorkshopId,
|
||||||
|
(result, workshopEmployer) => new { result.ch, result.workshop, result.option, workshopEmployer })
|
||||||
|
.SelectMany(
|
||||||
|
y => y.workshopEmployer.DefaultIfEmpty(),
|
||||||
|
(y, workshopEmployer) => new { y.option, y.ch, y.workshop, workshopEmployer })
|
||||||
|
.Select(res => new
|
||||||
|
{
|
||||||
|
res.ch,
|
||||||
|
res.workshop,
|
||||||
|
option = _context.EmployeeComputeOptionsSet.FirstOrDefault(x=>x.WorkshopId == res.ch.WorkshopId &&x.EmployeeId == res.ch.EmployeeId),
|
||||||
|
res.workshopEmployer,
|
||||||
|
contractingParty = _context.PersonalContractingParties
|
||||||
|
.Include(p => p.Employers)
|
||||||
|
.FirstOrDefault(p => p.Employers.Any(e => e.id == res.workshopEmployer.Employer.id))
|
||||||
|
});
|
||||||
|
|
||||||
|
#region SercheModel
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(searchModel.ContractNo) && searchModel.ContractId != 0)
|
||||||
|
checkouts = checkouts.Where(x =>
|
||||||
|
x.ch.ContractNo == searchModel.ContractNo && x.ch.ContractId == searchModel.ContractId);
|
||||||
|
if (searchModel.WorkshopId != 0)
|
||||||
|
{
|
||||||
|
hasEmployeeOrWorkshpSearch = true;
|
||||||
|
checkouts = checkouts.Where(x => x.ch.WorkshopId == searchModel.WorkshopId);
|
||||||
|
}
|
||||||
|
if (searchModel.EmployeeId != 0)
|
||||||
|
{
|
||||||
|
hasEmployeeOrWorkshpSearch = true;
|
||||||
|
checkouts = checkouts.Where(x => x.ch.EmployeeId == searchModel.EmployeeId);
|
||||||
|
}
|
||||||
|
if (searchModel.EmployerId != 0)
|
||||||
|
{
|
||||||
|
hasEmployeeOrWorkshpSearch = true;
|
||||||
|
checkouts = checkouts.Where(x => x.contractingParty.Employers.Select(c => c.id).Contains(searchModel.EmployerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(searchModel.ContractNo))
|
||||||
|
{
|
||||||
|
hasEmployeeOrWorkshpSearch = true;
|
||||||
|
checkouts = checkouts.Where(x => x.ch.ContractNo == searchModel.ContractNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//if (searchModel.IsActiveString == null)
|
||||||
|
//{
|
||||||
|
// checkouts = checkouts.Where(x => x.ch.IsActiveString == "true");
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (searchModel.IsActiveString == "false")
|
||||||
|
//{
|
||||||
|
// checkouts = checkouts.Where(x => x.ch.IsActiveString == "false");
|
||||||
|
//}
|
||||||
|
//else if (searchModel.IsActiveString == "both")
|
||||||
|
//{
|
||||||
|
// checkouts = checkouts.Where(x => x.ch.IsActiveString == "false" || x.ch.IsActiveString == "true");
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//سرچ سال
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(searchModel.Year) && string.IsNullOrWhiteSpace(searchModel.Month) &&
|
||||||
|
(string.IsNullOrWhiteSpace(searchModel.ContractStart) ||
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.ContractEnd)))
|
||||||
|
{
|
||||||
|
hasSearch = true;
|
||||||
|
var startYear = searchModel.Year + "/01/01";
|
||||||
|
var startyearGr = startYear.ToGeorgianDateTime();
|
||||||
|
var endYear = $"{searchModel.Year}/12/01".FindeEndOfMonth();
|
||||||
|
var endYearGr = endYear.ToGeorgianDateTime();
|
||||||
|
|
||||||
|
|
||||||
|
checkouts = checkouts.Where(x => x.ch.ContractStart >= startyearGr && x.ch.ContractEnd <= endYearGr);
|
||||||
|
if (searchModel.WorkshopId > 0 || searchModel.EmployeeId > 0 || searchModel.EmployerId > 0)
|
||||||
|
checkouts = checkouts.OrderByDescending(x => x.ch.ContractEnd);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrWhiteSpace(searchModel.Year) && !string.IsNullOrWhiteSpace(searchModel.Month) &&
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.ContractStart) &&
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.ContractEnd))
|
||||||
|
{
|
||||||
|
hasSearch = true;
|
||||||
|
//سرچ سال و ماه
|
||||||
|
string y1 = $"{searchModel.Year}/{searchModel.Month}/01";
|
||||||
|
var startDate = y1.ToGeorgianDateTime();
|
||||||
|
string y2 = string.Empty;
|
||||||
|
int month = Convert.ToInt32(searchModel.Month);
|
||||||
|
int year = Convert.ToInt32(searchModel.Year);
|
||||||
|
|
||||||
|
if (month <= 6)
|
||||||
|
{
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/31";
|
||||||
|
}
|
||||||
|
else if (month > 6 && month < 12)
|
||||||
|
{
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
}
|
||||||
|
else if (month == 12)
|
||||||
|
{
|
||||||
|
switch (year)
|
||||||
|
{
|
||||||
|
case 1346:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1350:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1354:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1358:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1362:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1366:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1370:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1375:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1379:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1383:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1387:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1391:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1395:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1399:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1403:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1408:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1412:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1416:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1420:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1424:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1428:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1432:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1436:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1441:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
case 1445:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/30";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
y2 = $"{searchModel.Year}/{searchModel.Month}/29";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var endDate = y2.ToGeorgianDateTime();
|
||||||
|
|
||||||
|
//checkouts = checkouts.Where(x => x.ContractEndGr >= start && x.ContractEndGr <= end).ToList();
|
||||||
|
checkouts = checkouts.Where(x =>
|
||||||
|
x.ch.ContractStart >= startDate && x.ch.ContractStart < endDate && x.ch.ContractEnd > startDate &&
|
||||||
|
x.ch.ContractEnd <= endDate ||
|
||||||
|
x.ch.ContractStart <= startDate && x.ch.ContractEnd >= endDate ||
|
||||||
|
startDate <= x.ch.ContractStart && endDate > x.ch.ContractStart ||
|
||||||
|
endDate >= x.ch.ContractEnd && startDate < x.ch.ContractEnd);
|
||||||
|
//if (searchModel.WorkshopId > 0 || searchModel.EmployeeId > 0 || searchModel.EmployerId > 0)
|
||||||
|
// checkouts = checkouts.OrderBy(x => x.ch.PersonnelCodeInt);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrWhiteSpace(searchModel.ContractStart) &&
|
||||||
|
!string.IsNullOrWhiteSpace(searchModel.ContractEnd) &&
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.Year) && string.IsNullOrWhiteSpace(searchModel.Month))
|
||||||
|
{
|
||||||
|
hasSearch = true;
|
||||||
|
//سرچ تاریخ
|
||||||
|
var start = searchModel.ContractStart.ToGeorgianDateTime();
|
||||||
|
var endd = searchModel.ContractEnd.ToGeorgianDateTime();
|
||||||
|
checkouts = checkouts.Where(x =>
|
||||||
|
x.ch.ContractStart >= start && x.ch.ContractStart <= endd);
|
||||||
|
|
||||||
|
//if (searchModel.WorkshopId > 0 || searchModel.EmployeeId > 0 || searchModel.EmployerId > 0)
|
||||||
|
// checkouts = checkouts.OrderByDescending(x => x.ch.ContractEnd).ThenBy(x => x.ch.PersonnelCodeInt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(searchModel.EmployeeName))
|
||||||
|
{
|
||||||
|
hasSearch = true;
|
||||||
|
var employeeList = _context.Employees.Where(x => (!string.IsNullOrEmpty(x.FName) && x.FName.StartsWith(searchModel.EmployeeName)) ||
|
||||||
|
(!string.IsNullOrEmpty(x.LName) && x.LName.StartsWith(searchModel.EmployeeName))).Select(x => x.id).ToList();
|
||||||
|
checkouts = checkouts.Where(x => employeeList.Contains(x.ch.EmployeeId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
if (!hasSearch && !hasEmployeeOrWorkshpSearch)
|
||||||
|
{
|
||||||
|
|
||||||
|
return checkouts.Select(x => new CheckoutViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
Id = x.ch.id,
|
||||||
|
EmployeeFullName = x.ch.EmployeeFullName,
|
||||||
|
ContractStart = x.ch.ContractStart.ToFarsi(),
|
||||||
|
ContractEnd = x.ch.ContractEnd.ToFarsi(),
|
||||||
|
ContractStartGr = x.ch.ContractStart,
|
||||||
|
ContractEndGr = x.ch.ContractEnd,
|
||||||
|
PersonnelCode = x.ch.PersonnelCode,
|
||||||
|
PersonnelCodeInt = Convert.ToInt32(x.ch.PersonnelCode),
|
||||||
|
ArchiveCode = x.workshop.ArchiveCode,
|
||||||
|
SumOfWorkingDays = x.ch.SumOfWorkingDays,
|
||||||
|
WorkshopName = x.workshop.WorkshopName,
|
||||||
|
Month = x.ch.Month,
|
||||||
|
Year = x.ch.Year,
|
||||||
|
ContractNo = x.ch.ContractNo,
|
||||||
|
ContractId = x.ch.ContractId,
|
||||||
|
WorkshopId = x.ch.WorkshopId,
|
||||||
|
EmployeeId = x.ch.EmployeeId,
|
||||||
|
EmployerId = x.workshopEmployer.EmployerId,
|
||||||
|
IsActiveString = x.ch.IsActiveString,
|
||||||
|
Signature = x.ch.Signature,
|
||||||
|
CreationDate = x.ch.CreationDate,
|
||||||
|
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
|
||||||
|
IsBlockCantracingParty = x.contractingParty.IsBlock,
|
||||||
|
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
|
||||||
|
|
||||||
|
|
||||||
|
}).OrderByDescending(x => x.Id).ThenByDescending(x => x.Year).ThenBy(x => x.PersonnelCodeInt).Take(200)
|
||||||
|
.GroupBy(x => x.Id)
|
||||||
|
.Select(x => x.First()).ToList()
|
||||||
|
.OrderByDescending(x => x.Id).ThenByDescending(x => x.Year).ThenBy(x => x.PersonnelCodeInt).Take(50).ToList();
|
||||||
|
}
|
||||||
|
else if (hasSearch && !hasEmployeeOrWorkshpSearch)
|
||||||
|
{
|
||||||
|
|
||||||
|
var result = checkouts.Select(x => new CheckoutViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
Id = x.ch.id,
|
||||||
|
EmployeeFullName = x.ch.EmployeeFullName,
|
||||||
|
ContractStart = x.ch.ContractStart.ToFarsi(),
|
||||||
|
ContractEnd = x.ch.ContractEnd.ToFarsi(),
|
||||||
|
ContractStartGr = x.ch.ContractStart,
|
||||||
|
ContractEndGr = x.ch.ContractEnd,
|
||||||
|
PersonnelCode = x.ch.PersonnelCode,
|
||||||
|
PersonnelCodeInt = Convert.ToInt32(x.ch.PersonnelCode),
|
||||||
|
ArchiveCode = x.workshop.ArchiveCode,
|
||||||
|
SumOfWorkingDays = x.ch.SumOfWorkingDays,
|
||||||
|
WorkshopName = x.workshop.WorkshopName,
|
||||||
|
Month = x.ch.Month,
|
||||||
|
Year = x.ch.Year,
|
||||||
|
ContractNo = x.ch.ContractNo,
|
||||||
|
ContractId = x.ch.ContractId,
|
||||||
|
WorkshopId = x.ch.WorkshopId,
|
||||||
|
EmployeeId = x.ch.EmployeeId,
|
||||||
|
EmployerId = x.workshopEmployer.EmployerId,
|
||||||
|
IsActiveString = x.ch.IsActiveString,
|
||||||
|
Signature = x.ch.Signature,
|
||||||
|
CreationDate = x.ch.CreationDate,
|
||||||
|
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
|
||||||
|
IsBlockCantracingParty = x.contractingParty.IsBlock,
|
||||||
|
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
|
||||||
|
|
||||||
|
}).OrderByDescending(x => x.Id)
|
||||||
|
.GroupBy(x => x.Id)
|
||||||
|
.Select(x => x.First());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((string.IsNullOrWhiteSpace(searchModel.ContractStart) ||
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.ContractEnd)) && string.IsNullOrWhiteSpace(searchModel.Month))
|
||||||
|
{
|
||||||
|
//اگر فقط سال رو سرچ کرد
|
||||||
|
return result.Take(300)
|
||||||
|
.ToList()
|
||||||
|
.OrderByDescending(x => x.ContractStartGr).ToList();
|
||||||
|
}
|
||||||
|
else if ((string.IsNullOrWhiteSpace(searchModel.ContractStart) ||
|
||||||
|
string.IsNullOrWhiteSpace(searchModel.ContractEnd)) && !string.IsNullOrWhiteSpace(searchModel.Month) && !string.IsNullOrWhiteSpace(searchModel.Year))
|
||||||
|
{
|
||||||
|
//اگر فقط سال و ماه رو سرچ کرد
|
||||||
|
return result.Take(300)
|
||||||
|
.ToList()
|
||||||
|
.OrderByDescending(x => x.ContractStartGr).ToList();
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrWhiteSpace(searchModel.ContractStart) &&
|
||||||
|
!string.IsNullOrWhiteSpace(searchModel.ContractEnd))
|
||||||
|
{
|
||||||
|
//اگر فقط سال و ماه رو سرچ کرد
|
||||||
|
return result.Take(300)
|
||||||
|
.ToList()
|
||||||
|
.OrderByDescending(x => x.ContractStartGr).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.ToList().OrderByDescending(x => x.Id)
|
||||||
|
.ThenByDescending(x => x.Year).ThenBy(x => x.PersonnelCodeInt).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (hasEmployeeOrWorkshpSearch && !hasSearch)
|
||||||
|
{
|
||||||
|
|
||||||
|
return checkouts.Select(x => new CheckoutViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
Id = x.ch.id,
|
||||||
|
EmployeeFullName = x.ch.EmployeeFullName,
|
||||||
|
ContractStart = x.ch.ContractStart.ToFarsi(),
|
||||||
|
ContractEnd = x.ch.ContractEnd.ToFarsi(),
|
||||||
|
ContractStartGr = x.ch.ContractStart,
|
||||||
|
ContractEndGr = x.ch.ContractEnd,
|
||||||
|
PersonnelCode = x.ch.PersonnelCode,
|
||||||
|
PersonnelCodeInt = Convert.ToInt32(x.ch.PersonnelCode),
|
||||||
|
ArchiveCode = x.workshop.ArchiveCode,
|
||||||
|
SumOfWorkingDays = x.ch.SumOfWorkingDays,
|
||||||
|
WorkshopName = x.workshop.WorkshopName,
|
||||||
|
Month = x.ch.Month,
|
||||||
|
Year = x.ch.Year,
|
||||||
|
ContractNo = x.ch.ContractNo,
|
||||||
|
ContractId = x.ch.ContractId,
|
||||||
|
WorkshopId = x.ch.WorkshopId,
|
||||||
|
EmployeeId = x.ch.EmployeeId,
|
||||||
|
EmployerId = x.workshopEmployer.EmployerId,
|
||||||
|
IsActiveString = x.ch.IsActiveString,
|
||||||
|
Signature = x.ch.Signature,
|
||||||
|
CreationDate = x.ch.CreationDate,
|
||||||
|
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
|
||||||
|
IsBlockCantracingParty = x.contractingParty.IsBlock,
|
||||||
|
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
|
||||||
|
|
||||||
|
}).GroupBy(x => x.Id).Select(x => x.First()).ToList()
|
||||||
|
.OrderByDescending(x => x.ContractStartGr).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return checkouts.Select(x => new CheckoutViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
Id = x.ch.id,
|
||||||
|
EmployeeFullName = x.ch.EmployeeFullName,
|
||||||
|
ContractStart = x.ch.ContractStart.ToFarsi(),
|
||||||
|
ContractEnd = x.ch.ContractEnd.ToFarsi(),
|
||||||
|
ContractStartGr = x.ch.ContractStart,
|
||||||
|
ContractEndGr = x.ch.ContractEnd,
|
||||||
|
PersonnelCode = x.ch.PersonnelCode,
|
||||||
|
PersonnelCodeInt = Convert.ToInt32(x.ch.PersonnelCode),
|
||||||
|
ArchiveCode = x.workshop.ArchiveCode,
|
||||||
|
SumOfWorkingDays = x.ch.SumOfWorkingDays,
|
||||||
|
WorkshopName = x.workshop.WorkshopName,
|
||||||
|
Month = x.ch.Month,
|
||||||
|
Year = x.ch.Year,
|
||||||
|
ContractNo = x.ch.ContractNo,
|
||||||
|
ContractId = x.ch.ContractId,
|
||||||
|
WorkshopId = x.ch.WorkshopId,
|
||||||
|
EmployeeId = x.ch.EmployeeId,
|
||||||
|
EmployerId = x.workshopEmployer.EmployerId,
|
||||||
|
IsActiveString = x.ch.IsActiveString,
|
||||||
|
Signature = x.ch.Signature,
|
||||||
|
CreationDate = x.ch.CreationDate,
|
||||||
|
EmployerName = $"{x.workshopEmployer.Employer.FName} {x.workshopEmployer.Employer.LName}",
|
||||||
|
IsBlockCantracingParty = x.contractingParty.IsBlock,
|
||||||
|
HasSignCheckout = x.option != null ? x.option.SignCheckout : x.workshop.SignCheckout
|
||||||
|
|
||||||
|
}).GroupBy(x => x.Id)
|
||||||
|
.Select(x => x.First()).ToList()
|
||||||
|
.OrderByDescending(x => x.Id)
|
||||||
|
.ThenByDescending(x => x.Year).ThenBy(x => x.PersonnelCodeInt).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
public async Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel)
|
public async Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
bool hasSearch = false;
|
bool hasSearch = false;
|
||||||
bool hasEmployeeOrWorkshpSearch = false;
|
bool hasEmployeeOrWorkshpSearch = false;
|
||||||
//List<CheckoutViewModel> query = null;
|
//List<CheckoutViewModel> query = null;
|
||||||
@@ -1929,11 +2415,12 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
var emp2 = _context.WorkshopEmployers.Where(x => x.EmployerId == searchModel.EmployerId)
|
var emp2 = _context.WorkshopEmployers.Where(x => x.EmployerId == searchModel.EmployerId)
|
||||||
.Select(x => x.WorkshopId).ToList();
|
.Select(x => x.WorkshopId).ToList();
|
||||||
|
|
||||||
var watch = System.Diagnostics.Stopwatch.StartNew();
|
|
||||||
|
|
||||||
|
|
||||||
var query = _context.CheckoutSet.Select(x => new CheckoutViewModel()
|
var query = _context.CheckoutSet.Select(x => new CheckoutViewModel()
|
||||||
{
|
{
|
||||||
|
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
EmployeeFullName = x.EmployeeFullName,
|
EmployeeFullName = x.EmployeeFullName,
|
||||||
//var start = ;
|
//var start = ;
|
||||||
@@ -1961,7 +2448,7 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Console.WriteLine("storedProc" + watch.Elapsed);
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(searchModel.ContractNo) && searchModel.ContractId != 0)
|
if (!string.IsNullOrWhiteSpace(searchModel.ContractNo) && searchModel.ContractId != 0)
|
||||||
query = query.Where(x =>
|
query = query.Where(x =>
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ public class CustomizeWorkshopEmployeeSettingsRepository(CompanyContext companyC
|
|||||||
return new();
|
return new();
|
||||||
return new EditCustomizeEmployeeSettings()
|
return new EditCustomizeEmployeeSettings()
|
||||||
{
|
{
|
||||||
FridayWork = entity.FridayWork,
|
|
||||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||||
LateToWork = new()
|
LateToWork = new()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ public class CustomizeWorkshopGroupSettingsRepository(CompanyContext companyCont
|
|||||||
var entity = _companyContext.CustomizeWorkshopGroupSettings.AsSplitQuery().FirstOrDefault(x => x.id == groupId);
|
var entity = _companyContext.CustomizeWorkshopGroupSettings.AsSplitQuery().FirstOrDefault(x => x.id == groupId);
|
||||||
return new EditCustomizeWorkshopGroupSettings()
|
return new EditCustomizeWorkshopGroupSettings()
|
||||||
{
|
{
|
||||||
FridayWork = entity.FridayWork,
|
//FridayWork = entity.FridayWork,
|
||||||
FridayPay = new (){ FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
FridayPay = new (){ FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||||
LateToWork = new()
|
LateToWork = new()
|
||||||
{
|
{
|
||||||
@@ -338,8 +338,8 @@ public class CustomizeWorkshopGroupSettingsRepository(CompanyContext companyCont
|
|||||||
{
|
{
|
||||||
EndTime = x.EndTime.ToString("HH:mm"),
|
EndTime = x.EndTime.ToString("HH:mm"),
|
||||||
StartTime = x.StartTime.ToString("HH:mm")
|
StartTime = x.StartTime.ToString("HH:mm")
|
||||||
}).ToList()
|
}).ToList(),
|
||||||
|
OffDayOfWeeks = entity.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
|||||||
return new();
|
return new();
|
||||||
var viewModel = new EditCustomizeWorkshopSettings()
|
var viewModel = new EditCustomizeWorkshopSettings()
|
||||||
{
|
{
|
||||||
FridayWork = entity.FridayWork,
|
|
||||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||||
LateToWork = new()
|
LateToWork = new()
|
||||||
{
|
{
|
||||||
@@ -234,7 +233,8 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
|||||||
LeavePermittedDays = entity.LeavePermittedDays,
|
LeavePermittedDays = entity.LeavePermittedDays,
|
||||||
BaseYearsPayInEndOfYear = entity.BaseYearsPayInEndOfYear,
|
BaseYearsPayInEndOfYear = entity.BaseYearsPayInEndOfYear,
|
||||||
WorkshopId = entity.WorkshopId,
|
WorkshopId = entity.WorkshopId,
|
||||||
WorkshopShiftStatus = entity.WorkshopShiftStatus
|
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||||
|
OffDays = entity.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||||
|
|
||||||
};
|
};
|
||||||
return viewModel;
|
return viewModel;
|
||||||
@@ -261,8 +261,8 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
|||||||
Id = entity.id,
|
Id = entity.id,
|
||||||
WorkshopId = entity.WorkshopId,
|
WorkshopId = entity.WorkshopId,
|
||||||
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||||
FridayWork = entity.FridayWork,
|
HolidayWork = entity.HolidayWork,
|
||||||
HolidayWork = entity.HolidayWork
|
OffDays = entity.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,8 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
|||||||
{
|
{
|
||||||
EndTime = r.EndTime.ToString("HH:mm"),
|
EndTime = r.EndTime.ToString("HH:mm"),
|
||||||
StartTime = r.StartTime.ToString("HH:mm")
|
StartTime = r.StartTime.ToString("HH:mm")
|
||||||
}).ToList()
|
}).ToList(),
|
||||||
|
OffDayOfWeeks = g.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||||
|
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
|||||||
CreateCheckout = x.CreateCheckout,
|
CreateCheckout = x.CreateCheckout,
|
||||||
CreateContract = x.CreateContract,
|
CreateContract = x.CreateContract,
|
||||||
SignContract = x.SignContract,
|
SignContract = x.SignContract,
|
||||||
|
ContractTerm = x.ContractTerm,
|
||||||
|
CutContractEndOfYear = x.CutContractEndOfYear
|
||||||
|
|
||||||
}).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
}).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||||
|
|
||||||
@@ -49,10 +51,12 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
|||||||
ComputeOptions = getFromWorkshop.ComputeOptions,
|
ComputeOptions = getFromWorkshop.ComputeOptions,
|
||||||
YearsOptions = getFromWorkshop.YearsOptions,
|
YearsOptions = getFromWorkshop.YearsOptions,
|
||||||
BonusesOptions= getFromWorkshop.BonusesOptions,
|
BonusesOptions= getFromWorkshop.BonusesOptions,
|
||||||
CreateCheckout = true,
|
CreateCheckout = getFromWorkshop.CreateCheckout,
|
||||||
CreateContract = true,
|
CreateContract = getFromWorkshop.CreateContract,
|
||||||
SignCheckout = true,
|
SignCheckout = getFromWorkshop.SignCheckout,
|
||||||
SignContract = true
|
SignContract = getFromWorkshop.SignContract,
|
||||||
|
ContractTerm = getFromWorkshop.ContractTerm,
|
||||||
|
CutContractEndOfYear = getFromWorkshop.CutContractEndOfYear
|
||||||
};
|
};
|
||||||
|
|
||||||
result = fromWorkshop;
|
result = fromWorkshop;
|
||||||
|
|||||||
@@ -6,8 +6,11 @@ using _0_Framework.Application;
|
|||||||
using _0_Framework.InfraStructure;
|
using _0_Framework.InfraStructure;
|
||||||
using Company.Domain.LeftWorkAgg;
|
using Company.Domain.LeftWorkAgg;
|
||||||
using Company.Domain.PersonnelCodeAgg;
|
using Company.Domain.PersonnelCodeAgg;
|
||||||
|
using CompanyManagment.App.Contracts.InsuranceList;
|
||||||
using CompanyManagment.App.Contracts.LeftWork;
|
using CompanyManagment.App.Contracts.LeftWork;
|
||||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace CompanyManagment.EFCore.Repository;
|
namespace CompanyManagment.EFCore.Repository;
|
||||||
@@ -95,7 +98,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}).Where(x=>x.WorkshopId == workshopId);
|
}).Where(x => x.WorkshopId == workshopId);
|
||||||
|
|
||||||
return query.ToList();
|
return query.ToList();
|
||||||
}
|
}
|
||||||
@@ -369,7 +372,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
_context.LeftWorkList.RemoveRange(LeftWork);
|
_context.LeftWorkList.RemoveRange(LeftWork);
|
||||||
DateTime left = item2.LeftWorkDate.ToGeorgianDateTime();
|
DateTime left = item2.LeftWorkDate.ToGeorgianDateTime();
|
||||||
var start = item2.StartWorkDate.ToGeorgianDateTime();
|
var start = item2.StartWorkDate.ToGeorgianDateTime();
|
||||||
var leftwork = new LeftWork(left, start, item2.WorkshopId, item2.EmployeeId, command.EmployeeFullName, item2.WorkshopName, item2.JobId, item2.IncludeStatus,item2.AddBonusesPay,item2.AddYearsPay,item2.AddLeavePay, workshopComputeOptions, workshopBonusesOptions);
|
var leftwork = new LeftWork(left, start, item2.WorkshopId, item2.EmployeeId, command.EmployeeFullName, item2.WorkshopName, item2.JobId, item2.IncludeStatus, item2.AddBonusesPay, item2.AddYearsPay, item2.AddLeavePay, workshopComputeOptions, workshopBonusesOptions);
|
||||||
Create(leftwork);
|
Create(leftwork);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,7 +404,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
if (commandPersonnelCode != null && commandPersonnelCode.Count > 0)
|
if (commandPersonnelCode != null && commandPersonnelCode.Count > 0)
|
||||||
{
|
{
|
||||||
var personelcode = commandPersonnelCode.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).FirstOrDefault();
|
var personelcode = commandPersonnelCode.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).FirstOrDefault();
|
||||||
if (personelcode != null && personelcode.HasPersonelCode==false)
|
if (personelcode != null && personelcode.HasPersonelCode == false)
|
||||||
{
|
{
|
||||||
if (_context.PersonnelCodeSet.Any(x => x.WorkshopId == item.WorkshopId && x.PersonnelCode == personelcode.PersonnelCode))
|
if (_context.PersonnelCodeSet.Any(x => x.WorkshopId == item.WorkshopId && x.PersonnelCode == personelcode.PersonnelCode))
|
||||||
{
|
{
|
||||||
@@ -497,8 +500,8 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
var op = new OperationResult();
|
var op = new OperationResult();
|
||||||
bool hasContracts = false;
|
bool hasContracts = false;
|
||||||
var endDateSend = date.Date.AddDays(-1);
|
var endDateSend = date.Date.AddDays(-1);
|
||||||
if (type==1)
|
if (type == 1)
|
||||||
hasContracts= _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= endDateSend) && x.IsActiveString == "true");
|
hasContracts = _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= endDateSend) && x.IsActiveString == "true");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
endDateSend = date.Date;
|
endDateSend = date.Date;
|
||||||
@@ -526,8 +529,8 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
hasContracts= _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date>= date) && x.IsActiveString == "true");
|
hasContracts = _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= date) && x.IsActiveString == "true");
|
||||||
if(hasContracts)
|
if (hasContracts)
|
||||||
return op.Failed("لطفا ابتدا تصفیه حساب های آتی را حذف نمایید");
|
return op.Failed("لطفا ابتدا تصفیه حساب های آتی را حذف نمایید");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -553,7 +556,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
var LastDayContract = _context.CheckoutSet.Any(x =>
|
var LastDayContract = _context.CheckoutSet.Any(x =>
|
||||||
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.IsActiveString == "true" &&
|
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.IsActiveString == "true" &&
|
||||||
x.ContractEnd.Date > lastDay.Date);
|
x.ContractEnd.Date > lastDay.Date);
|
||||||
if(LastDayContract)
|
if (LastDayContract)
|
||||||
return op.Failed("AfterContracts");
|
return op.Failed("AfterContracts");
|
||||||
// var contract = _context.Contracts.Where(x => x.EmployeeId == employeeId && x.WorkshopIds == workshopId && x.IsActiveString == "true").OrderByDescending(x=>x.ContarctStart).FirstOrDefault();
|
// var contract = _context.Contracts.Where(x => x.EmployeeId == employeeId && x.WorkshopIds == workshopId && x.IsActiveString == "true").OrderByDescending(x=>x.ContarctStart).FirstOrDefault();
|
||||||
|
|
||||||
@@ -644,7 +647,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
public async Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId)
|
public async Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId)
|
||||||
{
|
{
|
||||||
var leftWork =await _context.LeftWorkList.Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId)
|
var leftWork = await _context.LeftWorkList.Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId)
|
||||||
.OrderByDescending(x => x.StartWorkDate).FirstOrDefaultAsync();
|
.OrderByDescending(x => x.StartWorkDate).FirstOrDefaultAsync();
|
||||||
return leftWork;
|
return leftWork;
|
||||||
}
|
}
|
||||||
@@ -675,7 +678,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
JobName = _context.Jobs.FirstOrDefault(j => j.id == x.JobId).JobName
|
JobName = _context.Jobs.FirstOrDefault(j => j.id == x.JobId).JobName
|
||||||
|
|
||||||
|
|
||||||
}).Where(x=> !vipGroup.Contains(x.EmployeeId) && !clientTemps.Contains(x.EmployeeId));
|
}).Where(x => !vipGroup.Contains(x.EmployeeId) && !clientTemps.Contains(x.EmployeeId));
|
||||||
if (searchModel.WorkshopId != 0 && searchModel.EmployeeId != 0)
|
if (searchModel.WorkshopId != 0 && searchModel.EmployeeId != 0)
|
||||||
query = query.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeeId == searchModel.EmployeeId);
|
query = query.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeeId == searchModel.EmployeeId);
|
||||||
if (searchModel.EmployeeId != 0 && searchModel.WorkshopId == 0)
|
if (searchModel.EmployeeId != 0 && searchModel.WorkshopId == 0)
|
||||||
@@ -695,7 +698,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
}
|
}
|
||||||
private void RemoveEmployeeRollCallStatus(long workshopId, long employeeId)
|
private void RemoveEmployeeRollCallStatus(long workshopId, long employeeId)
|
||||||
{
|
{
|
||||||
var entity = _context.RollCallEmployees.Include(x=>x.EmployeesStatus).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
var entity = _context.RollCallEmployees.Include(x => x.EmployeesStatus).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||||
|
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
return;
|
return;
|
||||||
@@ -728,4 +731,163 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region AutoExtentionEmployees
|
||||||
|
|
||||||
|
public AutoExtensionDto AutoExtentionEmployees(long workshopId)
|
||||||
|
{
|
||||||
|
if (workshopId == 0)
|
||||||
|
return new AutoExtensionDto();
|
||||||
|
var query = _context.LeftWorkList
|
||||||
|
.Include(x => x.Employee)
|
||||||
|
.Include(x => x.Workshop)
|
||||||
|
.Where(x => x.WorkshopId == workshopId)
|
||||||
|
|
||||||
|
// Left Join با PersonnelCodeSet
|
||||||
|
.GroupJoin(_context.PersonnelCodeSet.Where(p => p.WorkshopId == workshopId),
|
||||||
|
leftList => leftList.EmployeeId,
|
||||||
|
personnelCode => personnelCode.EmployeeId,
|
||||||
|
(leftList, personnelCodes) => new { leftList, personnelCodes })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.personnelCodes.DefaultIfEmpty(),
|
||||||
|
(x, personnelCode) => new { x.leftList, personnelCode })
|
||||||
|
|
||||||
|
// Left Join با Jobs
|
||||||
|
.GroupJoin(_context.Jobs,
|
||||||
|
x => x.leftList.JobId,
|
||||||
|
job => job.id,
|
||||||
|
(x, jobs) => new { x.leftList, x.personnelCode, jobs })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.jobs.DefaultIfEmpty(),
|
||||||
|
(x, job) => new { x.leftList, x.personnelCode, job })
|
||||||
|
|
||||||
|
// Left Join با EmployeeComputeOptionsSet
|
||||||
|
.GroupJoin(_context.EmployeeComputeOptionsSet.Where(o => o.WorkshopId == workshopId),
|
||||||
|
x => x.leftList.EmployeeId,
|
||||||
|
option => option.EmployeeId,
|
||||||
|
(x, options) => new { x.leftList, x.personnelCode, x.job, options })
|
||||||
|
.SelectMany(
|
||||||
|
x => x.options.DefaultIfEmpty(),
|
||||||
|
(x, option) => new { x.leftList, x.personnelCode, x.job, option })
|
||||||
|
|
||||||
|
.Select(result => new AutoExtensionEmployeeListDto
|
||||||
|
{
|
||||||
|
EmployeeId = result.leftList.EmployeeId,
|
||||||
|
EmployeeName = result.leftList.EmployeeFullName,
|
||||||
|
PersonnelCode = result.personnelCode != null ? result.personnelCode.PersonnelCode : 0,
|
||||||
|
JobType = result.job != null ? result.job.JobName : "نامشخص",
|
||||||
|
JobTypeId = result.job != null ? result.job.id : 0,
|
||||||
|
EmployeeHasCreateContract = result.option != null
|
||||||
|
? result.option.CreateContract
|
||||||
|
: result.leftList.Workshop.CreateContract
|
||||||
|
}).GroupBy(x => x.EmployeeId)
|
||||||
|
.Select(g => g.First())
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//var query = _context.LeftWorkList.Include(x => x.Employee).Include(w => w.Workshop)
|
||||||
|
// .Where(x => x.WorkshopId == workshopId)
|
||||||
|
// .Join(_context.PersonnelCodeSet.AsSplitQuery().Where(p => p.WorkshopId == workshopId),
|
||||||
|
// leftList => leftList.EmployeeId,
|
||||||
|
// personnelCode => personnelCode.EmployeeId,
|
||||||
|
// (leftList, personnelCode) =>
|
||||||
|
// new { leftList, personnelCode })
|
||||||
|
// .Join(_context.Jobs,
|
||||||
|
// left => left.leftList.JobId,
|
||||||
|
// job => job.id,
|
||||||
|
// (left, job) => new { left, job })
|
||||||
|
// .Join(_context.EmployeeComputeOptionsSet.Where(o => o.WorkshopId == workshopId),
|
||||||
|
// leftResult => leftResult.left.leftList.EmployeeId,
|
||||||
|
// options => options.EmployeeId,
|
||||||
|
// (leftResult, options) => new { leftResult, options })
|
||||||
|
// .Select(result => new AutoExtensionEmployeeListDto()
|
||||||
|
// {
|
||||||
|
|
||||||
|
|
||||||
|
// EmployeeId = result.leftResult.left.leftList.EmployeeId,
|
||||||
|
// EmployeeName = result.leftResult.left.leftList.EmployeeFullName,
|
||||||
|
// PersonnelCode = result.leftResult.left.personnelCode == null ? 0 : result.leftResult.left.personnelCode.PersonnelCode,
|
||||||
|
|
||||||
|
// JobType = result.leftResult.job.JobName,
|
||||||
|
// JobTypeId = result.leftResult.job.id,
|
||||||
|
// EmployeeHasCreateContract = result.options == null ? result.leftResult.left.leftList.Workshop.CreateContract : result.options.CreateContract
|
||||||
|
|
||||||
|
|
||||||
|
// }).ToList();
|
||||||
|
var result = new AutoExtensionDto();
|
||||||
|
var workshop = _context.Workshops.FirstOrDefault(x => x.id == workshopId);
|
||||||
|
var employerId = _context.WorkshopEmployers.FirstOrDefault(x => x.WorkshopId == workshopId)!.EmployerId;
|
||||||
|
|
||||||
|
var employer = _context.Employers.FirstOrDefault(x => x.id == employerId);
|
||||||
|
var employerWarning = false;
|
||||||
|
var employerWarningMessage = "";
|
||||||
|
|
||||||
|
|
||||||
|
if (employer != null && employer.IsLegal == "حقوقی")
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(employer.NationalId) || string.IsNullOrWhiteSpace(employer.RegisterId))
|
||||||
|
{
|
||||||
|
employerWarning = true;
|
||||||
|
employerWarningMessage = "شناسه ملی ، شماره ثبت کارفرمای این کارگاه را بررسی کنید";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(employer.Nationalcode) || string.IsNullOrWhiteSpace(employer.Gender))
|
||||||
|
{
|
||||||
|
employerWarning = true;
|
||||||
|
employerWarningMessage = "کد ملی ، جنسیت کارفرمای این کارگاه را بررسی گنید";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (query.Any() && workshop != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
result = new AutoExtensionDto()
|
||||||
|
{
|
||||||
|
WorkshopId = workshopId,
|
||||||
|
HavingPersonel = true,
|
||||||
|
WorkshopName = workshop.WorkshopFullName,
|
||||||
|
ArchiveCode = workshop.ArchiveCode,
|
||||||
|
WAddress1 = workshop.Address,
|
||||||
|
CreateContract = workshop.CreateContract,
|
||||||
|
EmployerId = employerId,
|
||||||
|
EmployerWarning = employerWarning,
|
||||||
|
EmployerWarningMessage = employerWarningMessage,
|
||||||
|
EmployeeList = query.Select(x => new AutoExtensionEmployeeListDto()
|
||||||
|
{
|
||||||
|
EmployeeId = x.EmployeeId,
|
||||||
|
EmployeeName = x.EmployeeName,
|
||||||
|
PersonnelCode = x.PersonnelCode,
|
||||||
|
JobType = x.JobType,
|
||||||
|
JobTypeId = x.JobTypeId,
|
||||||
|
EmployeeHasCreateContract = x.EmployeeHasCreateContract
|
||||||
|
|
||||||
|
}).ToList(),
|
||||||
|
EmployeeSelectList = new SelectList(query.Where(x => x.EmployeeHasCreateContract), "EmployeeId", "EmployeeName ")
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = new AutoExtensionDto()
|
||||||
|
{
|
||||||
|
WorkshopId = workshopId,
|
||||||
|
HavingPersonel = false,
|
||||||
|
WorkshopName = workshop.WorkshopFullName,
|
||||||
|
ArchiveCode = workshop.ArchiveCode,
|
||||||
|
WAddress1 = workshop.Address,
|
||||||
|
CreateContract = workshop.CreateContract
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
skipRollCallByWorkshopId = workshopId is 368 or 367 or 585 or 610;
|
skipRollCallByWorkshopId = workshopId is 368 or 367 or 610;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -476,7 +476,7 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
|
|||||||
|
|
||||||
public RollCallEmployee GetBy(long employeeId, long workshopId)
|
public RollCallEmployee GetBy(long employeeId, long workshopId)
|
||||||
{
|
{
|
||||||
return _context.RollCallEmployees.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
return _context.RollCallEmployees.Include(x=>x.EmployeesStatus).FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
#region OfficialChckout
|
#region OfficialChckout
|
||||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
|
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
|
||||||
DateTime contractEnd,
|
DateTime contractEnd,
|
||||||
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout)
|
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute)
|
||||||
{
|
{
|
||||||
#region Entities
|
#region Entities
|
||||||
|
|
||||||
@@ -270,14 +270,16 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
{
|
{
|
||||||
|
|
||||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||||
|
totalLeaveSpan = starndardHoursesPerTotalDaysSapn;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sumSpans = sumSpans.Add(totalLeave);
|
sumSpans = sumSpans.Add(totalLeave);
|
||||||
|
totalLeaveSpan = totalLeave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
totalLeaveSpan = totalLeave;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -315,7 +317,11 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sumLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
var dayLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
||||||
|
|
||||||
|
sumLeave = dayLeave.Add(hoursesleaveTimeSpans);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -334,17 +340,17 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
|
|
||||||
}
|
}
|
||||||
//اگر مرخصی روزانه نداشت و فقط مرخصی ساعتی داشت
|
//اگر مرخصی روزانه نداشت و فقط مرخصی ساعتی داشت
|
||||||
if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
//if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
||||||
{
|
//{
|
||||||
if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
// if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
||||||
{
|
// {
|
||||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
// sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
// sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
Console.WriteLine(sumSpans);
|
Console.WriteLine(sumSpans);
|
||||||
#endregion
|
#endregion
|
||||||
//***********************************//
|
//***********************************//
|
||||||
@@ -365,7 +371,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
//TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
|
//TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
|
||||||
//TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
|
//TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
|
||||||
|
|
||||||
double mandatoryWorkWithOutleaves = (sumSpansWhitOutleaves.TotalMinutes) / 60;
|
double mandatoryWorkWithOutleaves = (sumSpans.TotalMinutes) / 60;
|
||||||
double overTimeWork = 0;
|
double overTimeWork = 0;
|
||||||
if (mandatoryWorkWithOutleaves > mandatoryHours)
|
if (mandatoryWorkWithOutleaves > mandatoryHours)
|
||||||
{
|
{
|
||||||
@@ -676,7 +682,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var rotatingFaResult = "";
|
var rotatingFaResult = "";
|
||||||
if (countOutOfRange >= validCount)
|
if (countOutOfRange >= validCount && rotatingShiftCompute)
|
||||||
{
|
{
|
||||||
shiftOver22Hours = "0";
|
shiftOver22Hours = "0";
|
||||||
shiftOver22Minuts = "0";
|
shiftOver22Minuts = "0";
|
||||||
@@ -1722,6 +1728,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
EndDate = endComplex,
|
EndDate = endComplex,
|
||||||
ShiftSpan = (endComplex - startComplex),
|
ShiftSpan = (endComplex - startComplex),
|
||||||
ShiftDate = currentDateGr,
|
ShiftDate = currentDateGr,
|
||||||
|
ShiftEndWithoutRest = endComplex
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -969,7 +969,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
|||||||
var activatedEmployeesList = activeEmployeesQuery.ToList();
|
var activatedEmployeesList = activeEmployeesQuery.ToList();
|
||||||
var leavesList = leavesQuery.ToList();
|
var leavesList = leavesQuery.ToList();
|
||||||
|
|
||||||
//start search year may be in another year
|
//start of search year may be different to end of search year
|
||||||
var holidays1 = _holidayItemApplication.Search(new HolidayItemSearchModel()
|
var holidays1 = _holidayItemApplication.Search(new HolidayItemSearchModel()
|
||||||
{
|
{
|
||||||
HolidayYear = startSearch.ToFarsiYear()
|
HolidayYear = startSearch.ToFarsiYear()
|
||||||
@@ -984,33 +984,46 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
|||||||
List<RollCallsByDateViewModel> result = new();
|
List<RollCallsByDateViewModel> result = new();
|
||||||
foreach (var day in days)
|
foreach (var day in days)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<RollCallEmployee> activatedEmployeesListInDay = new();
|
|
||||||
bool isHoliday = totalHolidays.Any(x => x.HolidaydateGr == day);
|
bool isHoliday = totalHolidays.Any(x => x.HolidaydateGr == day);
|
||||||
|
|
||||||
//in working days everyone should be present
|
List<RollCallEmployee> activatedEmployeesListInDay = new();
|
||||||
if (day.DayOfWeek != DayOfWeek.Friday && !isHoliday)
|
|
||||||
|
activatedEmployeesListInDay = activatedEmployeesList
|
||||||
|
.Join(employeeSettingsList.Where(x => x.WeeklyOffDays == null || !x.WeeklyOffDays.Select(w => w.DayOfWeek).Contains(day.DayOfWeek))
|
||||||
|
, x => x.EmployeeId, y => y.EmployeeId,
|
||||||
|
(x, _) => x).ToList();
|
||||||
|
|
||||||
|
if (isHoliday)
|
||||||
{
|
{
|
||||||
activatedEmployeesListInDay = activatedEmployeesList;
|
activatedEmployeesListInDay = activatedEmployeesListInDay
|
||||||
|
.Join(employeeSettingsList.Where(x => x.WeeklyOffDays == null || x.HolidayWork != HolidayWork.Default)
|
||||||
|
, x => x.EmployeeId, y => y.EmployeeId,
|
||||||
|
(x, _) => x).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
//in fridays, friday workers should be present
|
////in working days everyone should be present
|
||||||
else if (day.DayOfWeek == DayOfWeek.Friday)
|
//if (day.DayOfWeek != DayOfWeek.Friday && isHoliday == false)
|
||||||
{
|
//{
|
||||||
activatedEmployeesListInDay = activatedEmployeesList
|
// activatedEmployeesListInDay = activatedEmployeesList;
|
||||||
.Join(employeeSettingsList.Where(x => x.FridayWork != FridayWork.Default)
|
//}
|
||||||
, x => x.EmployeeId, y => y.EmployeeId,
|
|
||||||
(x, y) => x).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
//in holidays holiday worksers should be present
|
////in fridays, friday workers should be present
|
||||||
else
|
//else if (day.DayOfWeek == DayOfWeek.Friday)
|
||||||
{
|
//{
|
||||||
activatedEmployeesListInDay = activatedEmployeesList
|
// activatedEmployeesListInDay = activatedEmployeesList
|
||||||
.Join(employeeSettingsList.Where(x => x.HolidayWork != HolidayWork.Default)
|
// .Join(employeeSettingsList.Where(x => x.FridayWork != FridayWork.Default)
|
||||||
, x => x.EmployeeId, y => y.EmployeeId,
|
// , x => x.EmployeeId, y => y.EmployeeId,
|
||||||
(x, y) => x).ToList();
|
// (x, y) => x).ToList();
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
////in holidays holiday workers should be present
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// activatedEmployeesListInDay = activatedEmployeesList
|
||||||
|
// .Join(employeeSettingsList.Where(x => x.HolidayWork != HolidayWork.Default)
|
||||||
|
// , x => x.EmployeeId, y => y.EmployeeId,
|
||||||
|
// (x, y) => x).ToList();
|
||||||
|
//}
|
||||||
var item = new RollCallsByDateViewModel()
|
var item = new RollCallsByDateViewModel()
|
||||||
{
|
{
|
||||||
DateGr = day,
|
DateGr = day,
|
||||||
@@ -1037,6 +1050,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//گزارش آنلاین حضور غیاب کارگاه
|
//گزارش آنلاین حضور غیاب کارگاه
|
||||||
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
|
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -203,6 +203,8 @@ public class WorkshopRepository : RepositoryBase<long, Company.Domain.WorkshopAg
|
|||||||
SignContract = x.SignContract,
|
SignContract = x.SignContract,
|
||||||
CreateCheckout = x.CreateCheckout,
|
CreateCheckout = x.CreateCheckout,
|
||||||
SignCheckout = x.SignCheckout,
|
SignCheckout = x.SignCheckout,
|
||||||
|
RotatingShiftCompute = x.RotatingShiftCompute,
|
||||||
|
IsStaticCheckout = x.IsStaticCheckout,
|
||||||
|
|
||||||
}).FirstOrDefault(x => x.Id == id);
|
}).FirstOrDefault(x => x.Id == id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2739,6 +2739,9 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
periodOfAbsence = usedLeaves - canToLeave;
|
periodOfAbsence = usedLeaves - canToLeave;
|
||||||
|
if (workingHoursePerDay >= 7.33)
|
||||||
|
periodOfAbsence = 0;
|
||||||
|
|
||||||
|
|
||||||
#region AbsenceItemsCompute
|
#region AbsenceItemsCompute
|
||||||
|
|
||||||
@@ -3314,6 +3317,7 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
|||||||
|
|
||||||
periodOfAbsence = usedLeaves;
|
periodOfAbsence = usedLeaves;
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
contactCanToleaveList.Add(new ContractsCanToLeave()
|
contactCanToleaveList.Add(new ContractsCanToLeave()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@model CompanyManagment.App.Contracts.Checkout.CreateCheckoutListViewModel
|
@using Microsoft.CodeAnalysis.CSharp.Syntax
|
||||||
|
@model CompanyManagment.App.Contracts.Checkout.CreateCheckoutListViewModel
|
||||||
@{
|
@{
|
||||||
var i = 1;
|
var i = 1;
|
||||||
var b = 0;
|
var b = 0;
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@if (Model.CreateCheckoutList.Count > 0)
|
@if (Model.CreateCheckoutList.Count > 0 && !Model.HasWorkFlow)
|
||||||
{
|
{
|
||||||
@foreach (var item in Model.CreateCheckoutList)
|
@foreach (var item in Model.CreateCheckoutList)
|
||||||
{
|
{
|
||||||
@@ -151,6 +152,22 @@
|
|||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (@Model.HasWorkFlow)
|
||||||
|
{
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="3"></div>
|
||||||
|
<div class="6">
|
||||||
|
<h4 style="color: red">این کارگاه به دلیل داشتن کارپوشه مجاز به ایجاد تصفیه حساب نمی باشد</h4>
|
||||||
|
</div>
|
||||||
|
<div class="3"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -743,7 +743,7 @@
|
|||||||
<th style="width: 12%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> مقطع اول کار </th>
|
<th style="width: 12%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> مقطع اول کار </th>
|
||||||
<th style="width: 12%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> مقطع دوم کار </th>
|
<th style="width: 12%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> مقطع دوم کار </th>
|
||||||
<th style="width: 7%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> استراحت </th>
|
<th style="width: 7%; text-align: center; border-bottom: 1px solid #000; border-left: 1px solid #000; font-size: 10px"> استراحت </th>
|
||||||
<th style="width: 7%; text-align: center; border-bottom: 1px solid #000; font-size: 10px"> جمع </th>
|
<th style="width: 7%; text-align: center; border-bottom: 1px solid #000; font-size: 10px"> کارکرد </th>
|
||||||
</tr>
|
</tr>
|
||||||
@for (int i = 0; i < 16; i++)
|
@for (int i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
@@ -849,18 +849,18 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استحقاقی <span>:</span> @Model.TotalPaidLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr </td>
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10" style="padding: 0;">
|
<td colspan="10" style="padding: 0;">
|
||||||
<table style="width: 100%; table-layout: fixed;">
|
<table style="width: 100%; table-layout: fixed;">
|
||||||
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year <span>:</span> @Model.TotalMandatoryTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور <span>:</span> @Model.TotalPresentTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ using Microsoft.AspNetCore.SignalR;
|
|||||||
using PersianTools.Core;
|
using PersianTools.Core;
|
||||||
using ServiceHost.Hubs;
|
using ServiceHost.Hubs;
|
||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.Contracts;
|
||||||
|
using WorkFlow.Application.Contracts.WorkFlow;
|
||||||
|
|
||||||
namespace ServiceHost.Areas.Admin.Pages.Company.Checkouts;
|
namespace ServiceHost.Areas.Admin.Pages.Company.Checkouts;
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ public class IndexModel : PageModel
|
|||||||
private readonly IWorkshopApplication _workshopApplication;
|
private readonly IWorkshopApplication _workshopApplication;
|
||||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||||
|
private readonly IWorkFlowApplication _workFlowApplication;
|
||||||
|
|
||||||
|
|
||||||
public List<CheckoutViewModel> chekoutlist;
|
public List<CheckoutViewModel> chekoutlist;
|
||||||
@@ -97,7 +99,7 @@ public class IndexModel : PageModel
|
|||||||
ILeaveApplication leaveApplication, IHubContext<CheckoutHub> hubContext,
|
ILeaveApplication leaveApplication, IHubContext<CheckoutHub> hubContext,
|
||||||
IEmployeeComputeOptionsApplication employeeComputeOptionsApplication,
|
IEmployeeComputeOptionsApplication employeeComputeOptionsApplication,
|
||||||
IRollCallMandatoryApplication rollCallMandatoryApplication,
|
IRollCallMandatoryApplication rollCallMandatoryApplication,
|
||||||
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApp)
|
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApp, IWorkFlowApplication workFlowApplication)
|
||||||
{
|
{
|
||||||
_contractApplication = contractApplication;
|
_contractApplication = contractApplication;
|
||||||
_workshopApplication = workshopApplication;
|
_workshopApplication = workshopApplication;
|
||||||
@@ -120,6 +122,7 @@ public class IndexModel : PageModel
|
|||||||
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
||||||
_rollCallMandatoryApplication = rollCallMandatoryApplication;
|
_rollCallMandatoryApplication = rollCallMandatoryApplication;
|
||||||
_rollCallEmployeeStatusApp = rollCallEmployeeStatusApp;
|
_rollCallEmployeeStatusApp = rollCallEmployeeStatusApp;
|
||||||
|
_workFlowApplication = workFlowApplication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
@@ -156,7 +159,11 @@ public class IndexModel : PageModel
|
|||||||
{
|
{
|
||||||
var accountId = _authHelper.CurrentAccountId();
|
var accountId = _authHelper.CurrentAccountId();
|
||||||
|
|
||||||
var searchResult = await _checkoutApplication.Search(searchModel);
|
|
||||||
|
//var oldSearch = await _checkoutApplication.Search(searchModel);
|
||||||
|
|
||||||
|
var searchResult = await _checkoutApplication.SearchCheckoutOptimized(searchModel);
|
||||||
|
|
||||||
var result = new MainViewModel();
|
var result = new MainViewModel();
|
||||||
result.IsSysManager = accountId is 2 or 3;
|
result.IsSysManager = accountId is 2 or 3;
|
||||||
result.MainList = searchResult;
|
result.MainList = searchResult;
|
||||||
@@ -187,7 +194,7 @@ public class IndexModel : PageModel
|
|||||||
var workingHours = _workingHoursTempApplication.GetByContractIdConvertToShiftwork4(checkout.ContractId);
|
var workingHours = _workingHoursTempApplication.GetByContractIdConvertToShiftwork4(checkout.ContractId);
|
||||||
if (checkout.HasRollCall)
|
if (checkout.HasRollCall)
|
||||||
{
|
{
|
||||||
result = await _rollCallMandatoryApplication.RotatingShiftReport(checkout.WorkshopId, checkout.EmployeeId,checkout.ContractStartGr, checkout.ContractEndGr, workingHours.ShiftWork,true,workingHours,false);
|
result = await _rollCallMandatoryApplication.RotatingShiftReport(checkout.WorkshopId, checkout.EmployeeId, checkout.ContractStartGr, checkout.ContractEndGr, workingHours.ShiftWork, true, workingHours, false);
|
||||||
result.HasRollCall = true;
|
result.HasRollCall = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -413,7 +420,7 @@ public class IndexModel : PageModel
|
|||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
|
|
||||||
|
|
||||||
var mandatoryCompute = MandatoryHours(workingHours,false, 0);
|
var mandatoryCompute = MandatoryHours(workingHours, false, 0);
|
||||||
if (contract.EmployeeId == 9659)
|
if (contract.EmployeeId == 9659)
|
||||||
mandatoryCompute.SumTime44 = "48 - 24";
|
mandatoryCompute.SumTime44 = "48 - 24";
|
||||||
|
|
||||||
@@ -539,9 +546,9 @@ public class IndexModel : PageModel
|
|||||||
{
|
{
|
||||||
|
|
||||||
var result = await _checkoutApplication.GetContractResultToCreateCheckout(WorkshopId, EmployeeId, Year, Month, ContractStart,
|
var result = await _checkoutApplication.GetContractResultToCreateCheckout(WorkshopId, EmployeeId, Year, Month, ContractStart,
|
||||||
ContractEnd );
|
ContractEnd);
|
||||||
|
|
||||||
|
|
||||||
|
var workshop = _workshopApplication.GetDetails(WorkshopId);
|
||||||
#region Old
|
#region Old
|
||||||
//var today = DateTime.Now;
|
//var today = DateTime.Now;
|
||||||
// var GrogorianEnd = new DateTime();
|
// var GrogorianEnd = new DateTime();
|
||||||
@@ -655,9 +662,61 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
bool hasWorkFlow = false;
|
||||||
|
var skipRollCallByWorkshopId = WorkshopId is 368 or 367 or 610;
|
||||||
|
if (result.CreateCheckoutList.Count > 0 && workshop.HasRollCallFreeVip == "true" && !skipRollCallByWorkshopId)
|
||||||
|
{
|
||||||
|
DateTime startSreach;
|
||||||
|
DateTime endSearch;
|
||||||
|
|
||||||
|
if (Month == "0" && Year == "0")
|
||||||
|
{
|
||||||
|
DateTime now = DateTime.Now;
|
||||||
|
string startStr = $"{now.ToFarsi().Substring(0, 8)}01";
|
||||||
|
startSreach = startStr.ToGeorgianDateTime();
|
||||||
|
endSearch = (startStr.FindeEndOfMonth()).ToGeorgianDateTime();
|
||||||
|
}
|
||||||
|
else if (Month == "0" && Year != "0")
|
||||||
|
{
|
||||||
|
DateTime now = DateTime.Now;
|
||||||
|
|
||||||
|
string startStr = $"{Year}/{now.ToFarsi().Substring(5, 2)}/01";
|
||||||
|
startSreach = startStr.ToGeorgianDateTime();
|
||||||
|
endSearch = (startStr.FindeEndOfMonth()).ToGeorgianDateTime();
|
||||||
|
}
|
||||||
|
else if (Month != "0" && Year == "0")
|
||||||
|
{
|
||||||
|
DateTime now = DateTime.Now;
|
||||||
|
|
||||||
|
string startStr = $"{now.ToFarsi().Substring(0, 4)}/{Month}/01";
|
||||||
|
startSreach = startStr.ToGeorgianDateTime();
|
||||||
|
endSearch = (startStr.FindeEndOfMonth()).ToGeorgianDateTime();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string startStr = $"{Year}/{Month}/01";
|
||||||
|
startSreach = startStr.ToGeorgianDateTime();
|
||||||
|
endSearch = (startStr.FindeEndOfMonth()).ToGeorgianDateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DateTime lastMonthEnd = ($"{DateTime.Now.ToFarsi().Substring(0, 8)}01").ToGeorgianDateTime().AddDays(-1);
|
||||||
|
if (lastMonthEnd == endSearch)
|
||||||
|
{
|
||||||
|
var countWorkFlowCut = await _workFlowApplication.CountCutByBgServiceLastMonth(WorkshopId);
|
||||||
|
var countWorkFlowAbsent = await _workFlowApplication.CountAbsentRollCallLastMonth(WorkshopId);
|
||||||
|
var countWorkFlowLunchBreak = await _workFlowApplication.CountEmployeesWithoutLunchBreakLastMonth(WorkshopId);
|
||||||
|
var countUndefinedRollCalls = await _workFlowApplication.CountUndefinedLastMonth(WorkshopId);
|
||||||
|
|
||||||
|
hasWorkFlow = countWorkFlowCut > 0 || countWorkFlowAbsent > 0 || countWorkFlowLunchBreak > 0 ||
|
||||||
|
countUndefinedRollCalls > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var command = new CreateCheckoutListViewModel
|
var command = new CreateCheckoutListViewModel
|
||||||
{
|
{
|
||||||
|
HasWorkFlow = hasWorkFlow,
|
||||||
CreateCheckoutList = result.CreateCheckoutList
|
CreateCheckoutList = result.CreateCheckoutList
|
||||||
};
|
};
|
||||||
return Partial("./CreateLoadList", command);
|
return Partial("./CreateLoadList", command);
|
||||||
@@ -721,21 +780,23 @@ public class IndexModel : PageModel
|
|||||||
//workshopInfo
|
//workshopInfo
|
||||||
var workshop = _workshopApplication.GetDetails(contract.WorkshopIds);
|
var workshop = _workshopApplication.GetDetails(contract.WorkshopIds);
|
||||||
var mandatoryCompute = new ComputingViewModel();
|
var mandatoryCompute = new ComputingViewModel();
|
||||||
|
|
||||||
var hasRollCall = _rollCallEmployeeStatusApp.HasRollCallRecord(contract.EmployeeId,
|
var hasRollCall = _rollCallEmployeeStatusApp.HasRollCallRecord(contract.EmployeeId,
|
||||||
contract.WorkshopIds,
|
contract.WorkshopIds,
|
||||||
separation.ContractStartGr, separation.ContractEndGr);
|
separation.ContractStartGr, separation.ContractEndGr);
|
||||||
|
if (workshop.IsStaticCheckout)
|
||||||
|
hasRollCall = false;
|
||||||
if (hasRollCall)
|
if (hasRollCall)
|
||||||
{
|
{
|
||||||
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||||
contract.WorkshopIds,
|
contract.WorkshopIds,
|
||||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking,false);
|
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, false,workshop.RotatingShiftCompute);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||||
contract.WorkshopIds,
|
contract.WorkshopIds,
|
||||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, true);
|
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, true,workshop.RotatingShiftCompute);
|
||||||
//var hasLeave = _leaveApplication.LeavOnChekout(separation.ContractStartGr,
|
//var hasLeave = _leaveApplication.LeavOnChekout(separation.ContractStartGr,
|
||||||
// separation.ContractEndGr, contract.EmployeeId, contract.WorkshopIds);
|
// separation.ContractEndGr, contract.EmployeeId, contract.WorkshopIds);
|
||||||
//if (hasLeave != null)
|
//if (hasLeave != null)
|
||||||
@@ -813,7 +874,7 @@ public class IndexModel : PageModel
|
|||||||
List<BunosesAndYearsPayStatus> lostCheckoutsDates = new List<BunosesAndYearsPayStatus>();
|
List<BunosesAndYearsPayStatus> lostCheckoutsDates = new List<BunosesAndYearsPayStatus>();
|
||||||
if ((bunosesPay.NotCompleted && yearsPay.NotCompleted) || (bunosesPay.NotCompleted && !yearsPay.NotCompleted))
|
if ((bunosesPay.NotCompleted && yearsPay.NotCompleted) || (bunosesPay.NotCompleted && !yearsPay.NotCompleted))
|
||||||
lostCheckoutsDates = bunosesPay.BunosesStatusList;
|
lostCheckoutsDates = bunosesPay.BunosesStatusList;
|
||||||
if(!bunosesPay.NotCompleted && yearsPay.NotCompleted)
|
if (!bunosesPay.NotCompleted && yearsPay.NotCompleted)
|
||||||
lostCheckoutsDates = yearsPay.BunosesStatusList;
|
lostCheckoutsDates = yearsPay.BunosesStatusList;
|
||||||
|
|
||||||
foreach (var found in lostCheckoutsDates)
|
foreach (var found in lostCheckoutsDates)
|
||||||
@@ -837,12 +898,13 @@ public class IndexModel : PageModel
|
|||||||
bool foundHasRollCall = _rollCallEmployeeStatusApp.HasRollCallRecord(contract.EmployeeId,
|
bool foundHasRollCall = _rollCallEmployeeStatusApp.HasRollCallRecord(contract.EmployeeId,
|
||||||
contract.WorkshopIds,
|
contract.WorkshopIds,
|
||||||
found.ContractStart, found.ContractEnd);
|
found.ContractStart, found.ContractEnd);
|
||||||
|
if (workshop.IsStaticCheckout)
|
||||||
|
foundHasRollCall = false;
|
||||||
if (foundHasRollCall)
|
if (foundHasRollCall)
|
||||||
{
|
{
|
||||||
foundMandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
foundMandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||||
contract.WorkshopIds,
|
contract.WorkshopIds,
|
||||||
found.ContractStart, found.ContractEnd, foundWorkingHours, workshop.WorkshopHolidayWorking,false);
|
found.ContractStart, found.ContractEnd, foundWorkingHours, workshop.WorkshopHolidayWorking, false, workshop.RotatingShiftCompute);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -967,15 +1029,15 @@ public class IndexModel : PageModel
|
|||||||
HolidayWorking = workshop.WorkshopHolidayWorking,
|
HolidayWorking = workshop.WorkshopHolidayWorking,
|
||||||
ShiftWork = workingHours.ShiftWork,
|
ShiftWork = workingHours.ShiftWork,
|
||||||
|
|
||||||
TotalWorkingTimeSpan=mandatoryCompute.TotalWorkingTimeSpan,
|
TotalWorkingTimeSpan = mandatoryCompute.TotalWorkingTimeSpan,
|
||||||
|
|
||||||
TotalBreakTimeSpan=mandatoryCompute.TotalBreakTimeSpan,
|
TotalBreakTimeSpan = mandatoryCompute.TotalBreakTimeSpan,
|
||||||
|
|
||||||
TotalPresentTimeSpan=mandatoryCompute.TotalPresentTimeSpan,
|
TotalPresentTimeSpan = mandatoryCompute.TotalPresentTimeSpan,
|
||||||
|
|
||||||
TotalPaidLeave=mandatoryCompute.TotalPaidLeave,
|
TotalPaidLeave = mandatoryCompute.TotalPaidLeave,
|
||||||
|
|
||||||
TotalSickLeave=mandatoryCompute.TotalSickLeave,
|
TotalSickLeave = mandatoryCompute.TotalSickLeave,
|
||||||
GroupedRollCalls = mandatoryCompute.GroupedRollCalls,
|
GroupedRollCalls = mandatoryCompute.GroupedRollCalls,
|
||||||
|
|
||||||
HasInsuranceChekoutOverTime = workshop.InsuranceCheckoutOvertime
|
HasInsuranceChekoutOverTime = workshop.InsuranceCheckoutOvertime
|
||||||
@@ -1070,11 +1132,13 @@ public class IndexModel : PageModel
|
|||||||
if (result.IsSuccedded)
|
if (result.IsSuccedded)
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
IsSuccedded = true, id
|
IsSuccedded = true,
|
||||||
|
id
|
||||||
});
|
});
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
IsSuccedded = false, id
|
IsSuccedded = false,
|
||||||
|
id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1089,17 +1153,20 @@ public class IndexModel : PageModel
|
|||||||
if (result.IsSuccedded)
|
if (result.IsSuccedded)
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
IsSuccedded = true, id
|
IsSuccedded = true,
|
||||||
|
id
|
||||||
});
|
});
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
IsSuccedded = false, id
|
IsSuccedded = false,
|
||||||
|
id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
IsSuccedded = false, id
|
IsSuccedded = false,
|
||||||
|
id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1216,7 +1283,7 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
#region MandatoryCompute
|
#region MandatoryCompute
|
||||||
|
|
||||||
public ComputingViewModel MandatoryHours(CreateWorkingHoursTemp command,bool workshopHolidyWorking, long leavId)
|
public ComputingViewModel MandatoryHours(CreateWorkingHoursTemp command, bool workshopHolidyWorking, long leavId)
|
||||||
{
|
{
|
||||||
var serachModel = new LeaveSearchModel
|
var serachModel = new LeaveSearchModel
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -170,21 +170,33 @@
|
|||||||
@item.PersonnelCode
|
@item.PersonnelCode
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-xs" id="td_@item.Id" class="signSize" style="font-size: 12px !important; text-align: center;">
|
<td class="hidden-xs" id="td_@item.Id" class="signSize" style="font-size: 12px !important; text-align: center;">
|
||||||
|
@if (item.HasSignCheckout)
|
||||||
|
{
|
||||||
@if (item.Signature == "1")
|
@if (item.Signature == "1")
|
||||||
{
|
{
|
||||||
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
||||||
|
|
||||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
||||||
<input type="hidden" value="@item.Id" name="signed" />
|
<input type="hidden" value="@item.Id" name="signed"/>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<a permission="20216" class="myLinkSign " name="foo2" value="@item.Id" style="font-size: 20px">
|
<a permission="20216" class="myLinkSign " name="foo2" value="@item.Id" style="font-size: 20px">
|
||||||
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
||||||
<input type="hidden" value="@item.Id" name="unsigned" />
|
<input type="hidden" value="@item.Id" name="unsigned"/>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<a class="myLinkSign" style="font-size: 20px">
|
||||||
|
|
||||||
|
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row m-t-20">
|
<div class="row " style="margin-top: 8px;">
|
||||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||||
<table style="/* table-layout: fixed; */ width: 100%">
|
<table style="/* table-layout: fixed; */ width: 100%">
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="">
|
<div style="">
|
||||||
<div class="" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
<div class="" style="margin-top: 4px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
||||||
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
@@ -557,23 +557,29 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<table style="width: 100%;">
|
<thead>
|
||||||
<tbody>
|
<tr>
|
||||||
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 6px 6px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr</td>
|
</th>
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور : @Model.TotalPresentTimeStr</td>
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 0px;border-color: #D9D9D9;border-style: solid; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات کارکرد : @Model.TotalWorkingTimeStr</td>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -513,18 +513,19 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استحقاقی <span>:</span> @Model.TotalPaidLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr</td>
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10" style="padding: 0;">
|
<td colspan="10" style="padding: 0;">
|
||||||
<table style="width: 100%; table-layout: fixed;">
|
<table style="width: 100%; table-layout: fixed;">
|
||||||
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year <span>:</span> @Model.TotalMandatoryTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور <span>:</span> @Model.TotalPresentTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row m-t-20">
|
<div class="row " style="margin-top: 8px;">
|
||||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||||
<table style="/* table-layout: fixed; */ width: 100%">
|
<table style="/* table-layout: fixed; */ width: 100%">
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="">
|
<div style="">
|
||||||
<div class="" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
<div class="" style="margin-top: 4px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
||||||
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
@@ -538,24 +538,29 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<table style="width: 100%;">
|
<thead>
|
||||||
<tbody>
|
<tr>
|
||||||
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 6px 6px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr</td>
|
</th>
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور : @Model.TotalPresentTimeStr</td>
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 0px;border-color: #D9D9D9;border-style: solid; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات کارکرد : @Model.TotalWorkingTimeStr</td>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="" style="margin: 10px 0 0 0;display: flex;gap: 40px;">
|
<div class="" style="margin: 10px 0 0 0;display: flex;gap: 40px;">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
@page
|
@page
|
||||||
|
@using _0_Framework.Application
|
||||||
@model ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels.IndexModel
|
@model ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels.IndexModel
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -14,6 +15,11 @@
|
|||||||
<link href="~/admintheme/assets/datatables-new/css/dataTables.bootstrap4.min.css" rel="stylesheet" />
|
<link href="~/admintheme/assets/datatables-new/css/dataTables.bootstrap4.min.css" rel="stylesheet" />
|
||||||
<link href="~/admintheme/assets/datatables-new/css/responsive.bootstrap4.min.css" rel="stylesheet" />
|
<link href="~/admintheme/assets/datatables-new/css/responsive.bootstrap4.min.css" rel="stylesheet" />
|
||||||
<link href="~/assetsadmin/page/connectedpersonnels/css/index.css?ver=@adminVersion" rel="stylesheet" />
|
<link href="~/assetsadmin/page/connectedpersonnels/css/index.css?ver=@adminVersion" rel="stylesheet" />
|
||||||
|
<style>
|
||||||
|
.table > tbody > tr > td{
|
||||||
|
padding: 3px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
}
|
}
|
||||||
<input type="hidden" asp-for="@Model.workshopId" value="@Model.workshopId" id="workshopId" />
|
<input type="hidden" asp-for="@Model.workshopId" value="@Model.workshopId" id="workshopId" />
|
||||||
|
|
||||||
@@ -32,14 +38,14 @@
|
|||||||
<th>ردیف</th>
|
<th>ردیف</th>
|
||||||
<th>نام و نام خانوادگی</th>
|
<th>نام و نام خانوادگی</th>
|
||||||
<th>کد پرسنلی</th>
|
<th>کد پرسنلی</th>
|
||||||
<th>دارای قرارداد</th>
|
<th>مدت قراداد</th>
|
||||||
<th>دارای بیمه</th>
|
<th> منتهی به پایان سال</th>
|
||||||
<th>انتخاب نوع محاسبه طلب مرخصی</th>
|
<th> طلب مرخصی</th>
|
||||||
<th>انتخاب نوع محاسبه سنوات</th>
|
<th> سنوات</th>
|
||||||
<th>انتخاب نوع محاسبه عیدی و پاداش</th>
|
<th> عیدی و پاداش</th>
|
||||||
|
|
||||||
<th>عدم قرارداد</th>
|
<th>ایجاد قرارداد</th>
|
||||||
<th>عدم تصفیه حساب</th>
|
<th>ایجاد تصفیه حساب</th>
|
||||||
|
|
||||||
|
|
||||||
<th>عملیات</th>
|
<th>عملیات</th>
|
||||||
@@ -56,12 +62,32 @@
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
<td>
|
<td>
|
||||||
<h6>@item.PersonName</h6>
|
<span style="font-size:10px">@item.PersonName</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<h6>@item.PersonelCode</h6>
|
<span style="font-size:10px">@item.PersonelCode</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
|
@if (@item.ContractPerson)
|
||||||
|
{
|
||||||
|
<select class="form-control" data-ContractTerm="@item.EmployeeId" asp-for="@item.ContractTerm" style="width: 75px;font-size: 10px;">
|
||||||
|
<option value="1"> <span>1 ماهه</span> </option>
|
||||||
|
<option value="2"> <span>2 ماهه</span> </option>
|
||||||
|
<option value="3"> <span>3 ماهه</span> </option>
|
||||||
|
<option value="6"> <span>6 ماهه</span> </option>
|
||||||
|
<option value="12"> <span>1 ساله</span> </option>
|
||||||
|
</select>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<select class="form-control" data-CutContractEndOfYear="@item.EmployeeId" asp-for="@item.CutContractEndOfYear" style="width: 100px;font-size: 10px;">
|
||||||
|
<option value="@IsActive.None"> <span></span> </option>
|
||||||
|
<option value="@IsActive.True"> <span>منتهی باشد</span> </option>
|
||||||
|
<option value="@IsActive.False"> <span>منتهی نباشد</span> </option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
@* <td class="text-center">
|
||||||
@if (@item.ContractPerson && !@item.ContractLeft)
|
@if (@item.ContractPerson && !@item.ContractLeft)
|
||||||
{
|
{
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
@@ -96,11 +122,11 @@
|
|||||||
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
<path d="M8 12H16" stroke="#B91C1C" stroke-width="1.2" stroke-linecap="round" />
|
||||||
</svg>
|
</svg>
|
||||||
}
|
}
|
||||||
</td>
|
</td> *@
|
||||||
<td>
|
<td>
|
||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<select class="form-control" data-ComputeOptions="@item.EmployeeId" id="ComputeOptionsSelect" asp-for="@item.ComputeOptions" style="width: 170px;font-size: 12px;">
|
<select class="form-control" data-ComputeOptions="@item.EmployeeId" id="ComputeOptionsSelect" asp-for="@item.ComputeOptions" style="width: 140px;font-size: 10px;">
|
||||||
<option value="OnEndOfContract">محاسبه در پایان قرارداد</option>
|
<option value="OnEndOfContract">محاسبه در پایان قرارداد</option>
|
||||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||||
@@ -110,7 +136,7 @@
|
|||||||
<td>
|
<td>
|
||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<select class="form-control" data-YearsOptions="@item.EmployeeId" asp-for="@item.YearsOptions" style="width: 170px;font-size: 12px;">
|
<select class="form-control" data-YearsOptions="@item.EmployeeId" asp-for="@item.YearsOptions" style="width: 140px;font-size: 10px;">
|
||||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||||
@@ -121,7 +147,7 @@
|
|||||||
<td>
|
<td>
|
||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<select class="form-control" data-BonusesOptions="@item.EmployeeId" asp-for="@item.BonusesOptions" style="width: 170px;font-size: 12px;">
|
<select class="form-control" data-BonusesOptions="@item.EmployeeId" asp-for="@item.BonusesOptions" style="width: 140px;font-size: 10px;">
|
||||||
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
<option value="OnCheckoutOfMonth"> محاسبه در فیش حقوقی ماهیانه </option>
|
||||||
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
<option value="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||||
<option value="OnEndOfYear"> محاسبه در پایان سال </option>
|
<option value="OnEndOfYear"> محاسبه در پایان سال </option>
|
||||||
@@ -134,14 +160,14 @@
|
|||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<label for="FailureCreateContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
<label for="FailureCreateContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||||
<input type="checkbox" id="FailureCreateContract_@item.EmployeeId" @(!item.CreateContract ? "checked" : "") />
|
<input class="real-checkbox" type="checkbox" data-employeeId="@item.EmployeeId" id="FailureCreateContract_@item.EmployeeId" @(item.CreateContract ? "checked" : "") />
|
||||||
عدم ایجاد قرارداد
|
ایجاد قرارداد
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="FailureSignContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
<label for="FailureSignContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||||
<input type="checkbox" id="FailureSignContract_@item.EmployeeId" @(!item.SignContract ? "checked" : "") />
|
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureSignContract_@item.EmployeeId" @(item.SignContract ? "checked" : "") />
|
||||||
عدم امضا قرارداد
|
امضا قرارداد
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -152,14 +178,14 @@
|
|||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<label for="FailureCreateCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
<label for="FailureCreateCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||||
<input type="checkbox" id="FailureCreateCheckout_@item.EmployeeId" @(!item.CreateCheckout ? "checked" : "") />
|
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureCreateCheckout_@item.EmployeeId" @(item.CreateCheckout ? "checked" : "") />
|
||||||
عدم ایجاد تصفیه حساب
|
ایجاد تصفیه حساب
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="FailureSignCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
<label for="FailureSignCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||||
<input type="checkbox" id="FailureSignCheckout_@item.EmployeeId" @(!item.SignCheckout ? "checked" : "") />
|
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureSignCheckout_@item.EmployeeId" @(item.SignCheckout ? "checked" : "") />
|
||||||
عدم امضا تصفیه حساب
|
امضا تصفیه حساب
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -168,12 +194,12 @@
|
|||||||
<td>
|
<td>
|
||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<button onclick="save(@item.EmployeeId)" class="btn btn-success save" data-save="@item.EmployeeId" disabled="disabled">ذخیره</button>
|
<button onclick="save(@item.EmployeeId)" style="font-size:8px" class="btn btn-success save" data-save="@item.EmployeeId" disabled="disabled">ذخیره</button>
|
||||||
}
|
}
|
||||||
<a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
@* <a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
||||||
href="#showmodal=@Url.Page("./Index", "TakePicture", new { employeeId = item.EmployeeId, workshopId = item.WorkshopId})">
|
href="#showmodal=@Url.Page("./Index", "TakePicture", new { employeeId = item.EmployeeId, workshopId = item.WorkshopId})">
|
||||||
<i class="ion-information-circled ionSize"></i>
|
<i class="ion-information-circled ionSize"></i>
|
||||||
</a>
|
</a> *@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -49,10 +49,9 @@ namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels
|
|||||||
foreach (var item in result)
|
foreach (var item in result)
|
||||||
{
|
{
|
||||||
var option = new EmployeeComputeOptionsViewModel();
|
var option = new EmployeeComputeOptionsViewModel();
|
||||||
if (item.ContractPerson)
|
|
||||||
{
|
|
||||||
option = _employeeComputeOptionsApplication.GetEmployeeOptions(workshopID, item.EmployeeId);
|
option = _employeeComputeOptionsApplication.GetEmployeeOptions(workshopID, item.EmployeeId);
|
||||||
}
|
|
||||||
|
|
||||||
var finalResult = new ConnectedPersonnelViewModel()
|
var finalResult = new ConnectedPersonnelViewModel()
|
||||||
{
|
{
|
||||||
@@ -66,13 +65,15 @@ namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels
|
|||||||
InsurancetLeft = item.InsurancetLeft,
|
InsurancetLeft = item.InsurancetLeft,
|
||||||
Black = item.Black,
|
Black = item.Black,
|
||||||
StartWork = item.StartWork,
|
StartWork = item.StartWork,
|
||||||
BonusesOptions = item.ContractPerson ? option.BonusesOptions : "null",
|
BonusesOptions = option.BonusesOptions,
|
||||||
ComputeOptions = item.ContractPerson ? option.ComputeOptions : "null",
|
ComputeOptions = option.ComputeOptions,
|
||||||
YearsOptions = item.ContractPerson ? option.YearsOptions : "null",
|
YearsOptions = option.YearsOptions,
|
||||||
CreateContract = item.ContractPerson ? option.CreateContract :false,
|
CreateContract = option.CreateContract,
|
||||||
CreateCheckout = item.ContractPerson ? option.CreateCheckout : false,
|
CreateCheckout = option.CreateCheckout,
|
||||||
SignContract = item.ContractPerson ? option.SignContract : false,
|
SignContract = option.SignContract,
|
||||||
SignCheckout = item.ContractPerson ? option.SignCheckout : false
|
SignCheckout = option.SignCheckout,
|
||||||
|
ContractTerm = option.ContractTerm,
|
||||||
|
CutContractEndOfYear = option.CutContractEndOfYear
|
||||||
};
|
};
|
||||||
|
|
||||||
final.Add(finalResult);
|
final.Add(finalResult);
|
||||||
|
|||||||
@@ -748,30 +748,35 @@
|
|||||||
@item.PersonnelCode
|
@item.PersonnelCode
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden-xs" id="td_@item.Id" style="font-size: 12px !important; text-align: center; max-width: 60px; width: 65px;">
|
<td class="hidden-xs" id="td_@item.Id" style="font-size: 12px !important; text-align: center; max-width: 60px; width: 65px;">
|
||||||
|
@if (@item.HasSignContract)
|
||||||
|
{
|
||||||
@if (item.Signature == "1")
|
@if (item.Signature == "1")
|
||||||
{
|
{
|
||||||
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
||||||
|
|
||||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
||||||
<input type="hidden" value="@item.Id" name="signed" />
|
<input type="hidden" value="@item.Id" name="signed"/>
|
||||||
</a>
|
</a>
|
||||||
@* <a class="myLinkSign @(item.IsBlockCantracingParty=="true"?"disabled":"")" name="foo1" value="@item.Id" style="font-size: 20px">
|
|
||||||
|
|
||||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
|
||||||
<input type="hidden" value="@item.Id" name="signed" />
|
|
||||||
</a> *@
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<a permission="20117" class="myLinkSign" name="foo2" value="@item.Id" style="font-size: 20px">
|
<a permission="20117" class="myLinkSign" name="foo2" value="@item.Id" style="font-size: 20px">
|
||||||
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
||||||
<input type="hidden" value="@item.Id" name="unsigned" />
|
<input type="hidden" value="@item.Id" name="unsigned"/>
|
||||||
</a>
|
</a>
|
||||||
@* <a permission="20117" class="myLinkSign @(item.IsBlockCantracingParty=="true"?"disabled":"")" name="foo2" value="@item.Id" style="font-size: 20px">
|
|
||||||
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
|
||||||
<input type="hidden" value="@item.Id" name="unsigned" />
|
|
||||||
</a> *@
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<a class="myLinkSign" style="font-size: 20px">
|
||||||
|
|
||||||
|
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|||||||
@@ -548,13 +548,13 @@
|
|||||||
var codeMelli = $('#iniCodeMelli').val();
|
var codeMelli = $('#iniCodeMelli').val();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await $.ajax({
|
const response = $.ajax({
|
||||||
url: loadUidInfo,
|
url: loadUidInfo,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: { nationalCode: codeMelli, birthDate: birthday },
|
data: { nationalCode: codeMelli, birthDate: birthday },
|
||||||
headers: { "RequestVerificationToken": antiForgeryToken }
|
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||||
});
|
success: function(response) {
|
||||||
|
debugger;
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
$('#IsAuthorized').val(true);
|
$('#IsAuthorized').val(true);
|
||||||
$('#name').val(response.data.fName);
|
$('#name').val(response.data.fName);
|
||||||
@@ -572,13 +572,81 @@
|
|||||||
$('#GenderFemale').prop('checked', true);
|
$('#GenderFemale').prop('checked', true);
|
||||||
$('#soldier').prop('disabled', true);
|
$('#soldier').prop('disabled', true);
|
||||||
}
|
}
|
||||||
} else {
|
currentStep++;
|
||||||
|
showStep(currentStep);
|
||||||
|
}
|
||||||
|
else if (response.data?.authorizedCanceled) {
|
||||||
|
|
||||||
|
$('#name').removeClass("disable");
|
||||||
|
$('#family').removeClass("disable");
|
||||||
|
$('#FatherName').removeClass("disable");
|
||||||
|
$('#DateOfBirth').removeClass("disable");
|
||||||
|
$('#code-melli').removeClass("disable");
|
||||||
|
$('#IdNumber').removeClass("disable");
|
||||||
|
$('#IdNumberSerial').removeClass("disable");
|
||||||
|
$('#IdNumberSeri').removeClass("disable");
|
||||||
|
$('#GenderMale').removeClass("disable");
|
||||||
|
$('#GenderFemale').removeClass("disable");
|
||||||
|
$('#divGender .radio-box').removeClass('disable');
|
||||||
|
currentStep++;
|
||||||
|
showStep(currentStep);
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(error) {
|
||||||
|
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// debugger;
|
||||||
|
// if (response.success) {
|
||||||
|
// $('#IsAuthorized').val(true);
|
||||||
|
// $('#name').val(response.data.fName);
|
||||||
|
// $('#family').val(response.data.lName);
|
||||||
|
// $('#FatherName').val(response.data.fatherName);
|
||||||
|
// $('#DateOfBirth').val(response.data.birthDate);
|
||||||
|
// $('#code-melli').val(response.data.nationalCode);
|
||||||
|
// $('#IdNumber').val(response.data.idNumber);
|
||||||
|
// $('#IdNumberSerial').val(response.data.idNumberSerial);
|
||||||
|
// $('#IdNumberSeri').val(response.data.idNumberSeri);
|
||||||
|
// if (response.data.gender === 0) {
|
||||||
|
// $('#GenderMale').prop('checked', true);
|
||||||
|
// $('#soldier').prop('disabled', false);
|
||||||
|
// } else if (response.data.gender === 1) {
|
||||||
|
// $('#GenderFemale').prop('checked', true);
|
||||||
|
// $('#soldier').prop('disabled', true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else if (response.data.authorizedCanceled) {
|
||||||
|
|
||||||
currentStep++;
|
// $('#name').removeClass("disable");
|
||||||
showStep(currentStep);
|
// $('#family').removeClass("disable");
|
||||||
|
// $('#FatherName').removeClass("disable");
|
||||||
|
// $('#DateOfBirth').removeClass("disable");
|
||||||
|
// $('#code-melli').removeClass("disable");
|
||||||
|
// $('#IdNumber').removeClass("disable");
|
||||||
|
// $('#IdNumberSerial').removeClass("disable");
|
||||||
|
// $('#IdNumberSeri').removeClass("disable");
|
||||||
|
// $('#GenderMale').removeClass("disable");
|
||||||
|
// $('#GenderFemale').removeClass("disable");
|
||||||
|
// $('#divGender .radio-box').removeClass('disable');
|
||||||
|
// currentStep++;
|
||||||
|
// showStep(currentStep);
|
||||||
|
// $.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// $.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// currentStep++;
|
||||||
|
// showStep(currentStep);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'خطا', "ارسال اطلاعات با مشکل مواجه شد.");
|
$.Notification.autoHideNotify('error', 'top right', 'خطا', "ارسال اطلاعات با مشکل مواجه شد.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -320,7 +320,7 @@
|
|||||||
<div id="my_camera"></div>
|
<div id="my_camera"></div>
|
||||||
<div class="col-md-12 m-r-10 top-btns">
|
<div class="col-md-12 m-r-10 top-btns">
|
||||||
<p class="pull-right">
|
<p class="pull-right">
|
||||||
<a permission="10410" id="btnPopModal" href="#showmodal=@Url.Page("/Company/Employees/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style="background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important;"> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important"></i> ایجاد پرسنل جدید </a>
|
<a permission="10410" id="btnPopModal" href="#showmodal=@Url.Page("/Company/Employees/Index", "CreateEmployee")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style="background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important;"> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important"></i> ایجاد پرسنل جدید </a>
|
||||||
</p>
|
</p>
|
||||||
<p class="pull-right">
|
<p class="pull-right">
|
||||||
<a permission="10444" id="btnPopModal" href="#showmodal=@Url.Page("/Company/Employees/Index", "ChangeCode")" class="btn btn-warning btn-rounded waves-effect waves-light m-b-5" style="background-color: #f5f5f5; border-color: #c78c04; font-family: 'Web_Yekan' !important; color: #c78c04 !important; margin-right: 10px"> <i class="fa fa-user-plus" style="padding-left: 7px; font-size: 14px; color: #ffb301 !important"></i>ویرایش گروهی کد پرسنلی </a>
|
<a permission="10444" id="btnPopModal" href="#showmodal=@Url.Page("/Company/Employees/Index", "ChangeCode")" class="btn btn-warning btn-rounded waves-effect waves-light m-b-5" style="background-color: #f5f5f5; border-color: #c78c04; font-family: 'Web_Yekan' !important; color: #c78c04 !important; margin-right: 10px"> <i class="fa fa-user-plus" style="padding-left: 7px; font-size: 14px; color: #ffb301 !important"></i>ویرایش گروهی کد پرسنلی </a>
|
||||||
|
|||||||
@@ -161,11 +161,16 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Create Employee File پرونده
|
||||||
public IActionResult OnGetCreate()
|
public IActionResult OnGetCreate()
|
||||||
{
|
{
|
||||||
return Partial("./Create");
|
return Partial("./Create");
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد پرسنل پرونده
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public IActionResult OnPostCreate(CreateEmployee command)
|
public IActionResult OnPostCreate(CreateEmployee command)
|
||||||
{
|
{
|
||||||
var children = command.CreateEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
var children = command.CreateEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
||||||
@@ -189,6 +194,71 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
return new JsonResult(result);
|
return new JsonResult(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Create admin Employee
|
||||||
|
public IActionResult OnGetCreateEmployee()
|
||||||
|
{
|
||||||
|
return Partial("./CreateEmployee");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد پرسنل در ادمین
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public IActionResult OnPostCreateEmployee(CreateEmployee command)
|
||||||
|
{
|
||||||
|
|
||||||
|
var children = command.CreateEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
||||||
|
command.NumberOfChildren = children.ToString();
|
||||||
|
var result = new OperationResult();
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(command.NationalCode))
|
||||||
|
return new JsonResult(result.Failed("لطفا کد ملی را وارد نمایید"));
|
||||||
|
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(command.MaritalStatus))
|
||||||
|
return new JsonResult(result.Failed("لطفا وضعیت تاهل را مشخص نمایید"));
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(command.InsuranceHistoryByYear) || string.IsNullOrWhiteSpace(command.InsuranceHistoryByMonth))
|
||||||
|
return new JsonResult(result.Failed("لطفا سابقه بیمه را مشخص نمایید"));
|
||||||
|
if (command.InsuranceHistoryByYear != "0")
|
||||||
|
{
|
||||||
|
var insuranceYear = command.InsuranceHistoryByYear.ExtractIntNumbers();
|
||||||
|
if(insuranceYear == 0)
|
||||||
|
return new JsonResult(result.Failed("لطفا سال را به عدد وارد کنید"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (command.InsuranceHistoryByMonth != "0")
|
||||||
|
{
|
||||||
|
var insuranceMonth = command.InsuranceHistoryByMonth.ExtractIntNumbers();
|
||||||
|
if (insuranceMonth == 0)
|
||||||
|
return new JsonResult(result.Failed("لطفا ماه را به عدد وارد کنید"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
result = _employeeApplication.Create(command);
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
|
if (result.IsSuccedded)
|
||||||
|
for (var i = 0; i <= children - 1; i++)
|
||||||
|
if (command.CreateEmployeChildrenList[i].DateOfBirth != null)
|
||||||
|
{
|
||||||
|
var child = new CreateEmployeChildren
|
||||||
|
{
|
||||||
|
ParentNationalCode = command.NationalCode,
|
||||||
|
DateOfBirth = command.CreateEmployeChildrenList[i].DateOfBirth,
|
||||||
|
FName = command.CreateEmployeChildrenList[i].FName,
|
||||||
|
EmployeeId = result.SendId
|
||||||
|
};
|
||||||
|
_employeeChildrenApplication.Create(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new JsonResult(result);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
public IActionResult OnGetEdit(long id)
|
public IActionResult OnGetEdit(long id)
|
||||||
@@ -201,6 +271,7 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
public JsonResult OnPostEdit(EditEmployee command)
|
public JsonResult OnPostEdit(EditEmployee command)
|
||||||
{
|
{
|
||||||
|
var op = new OperationResult();
|
||||||
var childrenEdit = 0;
|
var childrenEdit = 0;
|
||||||
var children = 0;
|
var children = 0;
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
@@ -219,7 +290,21 @@ public class IndexModel : PageModel
|
|||||||
// var sumChildren = oldChildrenNumber + children;
|
// var sumChildren = oldChildrenNumber + children;
|
||||||
// command.NumberOfChildren = sumChildren.ToString();
|
// command.NumberOfChildren = sumChildren.ToString();
|
||||||
//}
|
//}
|
||||||
|
if (string.IsNullOrWhiteSpace(command.InsuranceHistoryByYear) || string.IsNullOrWhiteSpace(command.InsuranceHistoryByMonth))
|
||||||
|
return new JsonResult(op.Failed("لطفا سابقه بیمه را مشخص نمایید"));
|
||||||
|
if (command.InsuranceHistoryByYear != "0")
|
||||||
|
{
|
||||||
|
var insuranceYear = command.InsuranceHistoryByYear.ExtractIntNumbers();
|
||||||
|
if (insuranceYear == 0)
|
||||||
|
return new JsonResult(op.Failed("لطفا سال را به عدد وارد کنید"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (command.InsuranceHistoryByMonth != "0")
|
||||||
|
{
|
||||||
|
var insuranceMonth = command.InsuranceHistoryByMonth.ExtractIntNumbers();
|
||||||
|
if (insuranceMonth == 0)
|
||||||
|
return new JsonResult(op.Failed("لطفا ماه را به عدد وارد کنید"));
|
||||||
|
}
|
||||||
|
|
||||||
var result = _employeeApplication.Edit(command);
|
var result = _employeeApplication.Edit(command);
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
|||||||
@@ -776,15 +776,15 @@
|
|||||||
<td class="iconSize">
|
<td class="iconSize">
|
||||||
|
|
||||||
|
|
||||||
<a class="btn btn-danger pull-left rad" style="margin-left: 5px" onclick="clockModal(@item.EmployeeId, @item.WorkshopIds, @item.PersonnelCode, @item.JobTypeId)"
|
<a class="btn btn-danger pull-left rad" style="margin-left: 5px" onclick="clockModal(@item.EmployeeId, @Model.WorkshopId, @item.PersonnelCode, @item.JobTypeId)"
|
||||||
href="#">
|
href="#">
|
||||||
<i class="ion-android-clock ionSize"></i>
|
<i class="ion-android-clock ionSize"></i>
|
||||||
|
|
||||||
<input type="hidden" name="workshopAddress" value="@item.WorkshopAddress1"/>
|
<input type="hidden" name="workshopAddress" value="@Model.WAddress1"/>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
<a class="btn btn-success pull-left rad" style="margin-left: 5px"
|
||||||
href="#showmodal=@Url.Page("./AutoExtension", "ContractStatus", new { employeeId = item.EmployeeId, workshopId = item.WorkshopIds, employeeName = item.EmployeeName, workshopname = Model.workshopName })">
|
href="#showmodal=@Url.Page("./AutoExtension", "ContractStatus", new { employeeId = item.EmployeeId, workshopId = @Model.WorkshopId, employeeName = item.EmployeeName, workshopname = Model.workshopName })">
|
||||||
<i class="ion-information-circled ionSize"></i>
|
<i class="ion-information-circled ionSize"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
using Company.Domain.ContractAgg;
|
using Company.Domain.ContractAgg;
|
||||||
@@ -12,6 +13,7 @@ using CompanyManagment.App.Contracts.PersonnleCode;
|
|||||||
using CompanyManagment.App.Contracts.WorkingHours;
|
using CompanyManagment.App.Contracts.WorkingHours;
|
||||||
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||||
using CompanyManagment.App.Contracts.Workshop;
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||||
using CompanyManagment.App.Contracts.YearlySalary;
|
using CompanyManagment.App.Contracts.YearlySalary;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||||
@@ -38,7 +40,7 @@ public class AutoExtensionModel : PageModel
|
|||||||
private readonly IWorkshopApplication _workshopApplication;
|
private readonly IWorkshopApplication _workshopApplication;
|
||||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||||
public List<ContractViweModel> EmployeeList;
|
public List<AutoExtensionEmployeeListDto> EmployeeList;
|
||||||
public SelectList EmployeeSelectList { get; set; }
|
public SelectList EmployeeSelectList { get; set; }
|
||||||
private string InterferenceMessage = string.Empty;
|
private string InterferenceMessage = string.Empty;
|
||||||
public List<string> YearlyList;
|
public List<string> YearlyList;
|
||||||
@@ -82,42 +84,23 @@ public class AutoExtensionModel : PageModel
|
|||||||
|
|
||||||
public void OnGet(long id)
|
public void OnGet(long id)
|
||||||
{
|
{
|
||||||
var selctedWorkshop = _workshopApplication.GetDetails(id);
|
var watch = new Stopwatch();
|
||||||
workshopName = selctedWorkshop?.WorkshopFullName;
|
watch.Start();
|
||||||
|
var res = _leftWorkApplication.AutoExtentionEmployees(id);
|
||||||
YearlyList =
|
YearlyList =
|
||||||
_yearlySalaryApplication.GetYears();
|
_yearlySalaryApplication.GetYears();
|
||||||
var employerId = selctedWorkshop.EmployerIdList.FirstOrDefault()!;
|
|
||||||
var employer = _employerApplication.GetDetails(employerId);
|
|
||||||
if (employer.IsLegal == "حقوقی")
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(employer.NationalId) || string.IsNullOrWhiteSpace(employer.RegisterId))
|
|
||||||
{
|
|
||||||
EmployerWarning = true;
|
|
||||||
EmployerWarningMessage = "شناسه ملی ، شماره ثبت کارفرمای این کارگاه را بررسی کنید";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(employer.Nationalcode) || string.IsNullOrWhiteSpace(employer.Gender))
|
|
||||||
{
|
|
||||||
EmployerWarning = true;
|
|
||||||
EmployerWarningMessage = "کد ملی ، جنسیت کارفرمای این کارگاه را بررسی گنید";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var LeftWorkSerchModel = new LeftWorkSearchModel
|
workshopName = res.WorkshopName;
|
||||||
|
WorkshopId = res.WorkshopId;
|
||||||
|
ArchiveCode = res.ArchiveCode;
|
||||||
|
WAddress1 = res.WAddress1;
|
||||||
|
EmployerId = res.EmployerId;
|
||||||
|
EmployerWarning = res.EmployerWarning;
|
||||||
|
if (res.EmployeeList != null)
|
||||||
{
|
{
|
||||||
WorkshopId = id
|
if (res.EmployeeList.Any(x => x.PersonnelCode > 0))
|
||||||
};
|
|
||||||
var LeftWorkList = _leftWorkApplication.SearchCreateContract(LeftWorkSerchModel);
|
|
||||||
var personnelCodeSearch = new PersonnelCodeSearchModel
|
|
||||||
{
|
{
|
||||||
WorkshopId = id
|
MaxPersonnelCode = res.EmployeeList.Select(x => x.PersonnelCode).Max();
|
||||||
};
|
|
||||||
var pcodes = _personnelCodeApplication.Search(personnelCodeSearch);
|
|
||||||
if (pcodes.Any(x => x.PersonnelCode > 0))
|
|
||||||
{
|
|
||||||
MaxPersonnelCode = pcodes.Select(x => x.PersonnelCode).Max();
|
|
||||||
MaxPersonnelCode += 1;
|
MaxPersonnelCode += 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -125,45 +108,106 @@ public class AutoExtensionModel : PageModel
|
|||||||
MaxPersonnelCode = 1;
|
MaxPersonnelCode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EmployeeList = res.EmployeeList.Where(x => x.EmployeeHasCreateContract).ToList();
|
||||||
if (LeftWorkList.Count > 0)
|
EmployeeSelectList = new SelectList(res.EmployeeList, "EmployeeId", "EmployeeName");
|
||||||
{
|
HavingPersonel = !res.EmployeeList.Any(x => x.EmployeeHasCreateContract) ? false : res.HavingPersonel;
|
||||||
HavingPersonel = true;
|
|
||||||
var firstStartWork = LeftWorkList.OrderBy(x => x.StartWorkDateGr).FirstOrDefault();
|
|
||||||
var personelList = LeftWorkList.GroupBy(x => x.EmployeeId).Select(x => x.First()).ToList();
|
|
||||||
//FirstPersonStartWork = firstStartWork.StartWorkDateGr.ToFarsi();
|
|
||||||
//End = DateTime.Now.ToFarsi();
|
|
||||||
personelList = personelList.OrderBy(x => x.StartWorkDateGr).ToList();
|
|
||||||
if (!string.IsNullOrWhiteSpace(selctedWorkshop.Address))
|
|
||||||
selctedWorkshop.Address =
|
|
||||||
$"{selctedWorkshop.State} - {selctedWorkshop.City} - {selctedWorkshop.Address}";
|
|
||||||
|
|
||||||
WorkshopId = id;
|
|
||||||
ArchiveCode = selctedWorkshop.ArchiveCode;
|
|
||||||
WAddress1 = selctedWorkshop.Address;
|
|
||||||
EmployerId = selctedWorkshop.EmployerIdList.FirstOrDefault();
|
|
||||||
EmployeeList = personelList.Select(x => new ContractViweModel
|
|
||||||
{
|
|
||||||
EmployeeId = x.EmployeeId,
|
|
||||||
EmployeeName = x.EmployeeFullName,
|
|
||||||
ContarctStart = FirstPersonStartWork,
|
|
||||||
ContractEnd = End,
|
|
||||||
WorkshopIds = id,
|
|
||||||
PersonnelCode = pcodes.Any(p => p.EmployeeId == x.EmployeeId)
|
|
||||||
? pcodes.FirstOrDefault(p => p.EmployeeId == x.EmployeeId)!.PersonnelCode
|
|
||||||
: 0,
|
|
||||||
JobType = x.JobName,
|
|
||||||
JobTypeId = x.JobId,
|
|
||||||
EmployerId = employerId,
|
|
||||||
ArchiveCode = selctedWorkshop.ArchiveCode,
|
|
||||||
WorkshopAddress1 = selctedWorkshop.Address
|
|
||||||
}).OrderBy(x => x.PersonnelCode).ToList();
|
|
||||||
EmployeeSelectList = new SelectList(personelList, "EmployeeId", "EmployeeFullName");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
MaxPersonnelCode = 1;
|
||||||
HavingPersonel = false;
|
HavingPersonel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region Old
|
||||||
|
|
||||||
|
//var selctedWorkshop = _workshopApplication.GetDetails(id);
|
||||||
|
//workshopName = selctedWorkshop?.WorkshopFullName;
|
||||||
|
|
||||||
|
//var employerId = selctedWorkshop.EmployerIdList.FirstOrDefault()!;
|
||||||
|
//var employer = _employerApplication.GetDetails(employerId);
|
||||||
|
//if (employer.IsLegal == "حقوقی")
|
||||||
|
//{
|
||||||
|
// if (string.IsNullOrWhiteSpace(employer.NationalId) || string.IsNullOrWhiteSpace(employer.RegisterId))
|
||||||
|
// {
|
||||||
|
// EmployerWarning = true;
|
||||||
|
// EmployerWarningMessage = "شناسه ملی ، شماره ثبت کارفرمای این کارگاه را بررسی کنید";
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// if (string.IsNullOrWhiteSpace(employer.Nationalcode) || string.IsNullOrWhiteSpace(employer.Gender))
|
||||||
|
// {
|
||||||
|
// EmployerWarning = true;
|
||||||
|
// EmployerWarningMessage = "کد ملی ، جنسیت کارفرمای این کارگاه را بررسی گنید";
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//var LeftWorkSerchModel = new LeftWorkSearchModel
|
||||||
|
//{
|
||||||
|
// WorkshopId = id
|
||||||
|
//};
|
||||||
|
//var LeftWorkList = _leftWorkApplication.SearchCreateContract(LeftWorkSerchModel);
|
||||||
|
//var personnelCodeSearch = new PersonnelCodeSearchModel
|
||||||
|
//{
|
||||||
|
// WorkshopId = id
|
||||||
|
//};
|
||||||
|
//var pcodes = _personnelCodeApplication.Search(personnelCodeSearch);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//if (LeftWorkList.Count > 0)
|
||||||
|
//{
|
||||||
|
// HavingPersonel = true;
|
||||||
|
// var firstStartWork = LeftWorkList.OrderBy(x => x.StartWorkDateGr).FirstOrDefault();
|
||||||
|
// var personelList = LeftWorkList.GroupBy(x => x.EmployeeId).Select(x => x.First()).ToList();
|
||||||
|
// //FirstPersonStartWork = firstStartWork.StartWorkDateGr.ToFarsi();
|
||||||
|
// //End = DateTime.Now.ToFarsi();
|
||||||
|
// personelList = personelList.OrderBy(x => x.StartWorkDateGr).ToList();
|
||||||
|
// if (!string.IsNullOrWhiteSpace(selctedWorkshop.Address))
|
||||||
|
// selctedWorkshop.Address =
|
||||||
|
// $"{selctedWorkshop.State} - {selctedWorkshop.City} - {selctedWorkshop.Address}";
|
||||||
|
|
||||||
|
// WorkshopId = id;
|
||||||
|
// ArchiveCode = selctedWorkshop.ArchiveCode;
|
||||||
|
// WAddress1 = selctedWorkshop.Address;
|
||||||
|
// EmployerId = selctedWorkshop.EmployerIdList.FirstOrDefault();
|
||||||
|
// EmployeeList = personelList.Select(x => new ContractViweModel
|
||||||
|
// {
|
||||||
|
// EmployeeId = x.EmployeeId,
|
||||||
|
// EmployeeName = x.EmployeeFullName,
|
||||||
|
// ContarctStart = FirstPersonStartWork,
|
||||||
|
// ContractEnd = End,
|
||||||
|
// WorkshopIds = id,
|
||||||
|
// PersonnelCode = pcodes.Any(p => p.EmployeeId == x.EmployeeId)
|
||||||
|
// ? pcodes.FirstOrDefault(p => p.EmployeeId == x.EmployeeId)!.PersonnelCode
|
||||||
|
// : 0,
|
||||||
|
// JobType = x.JobName,
|
||||||
|
// JobTypeId = x.JobId,
|
||||||
|
// EmployerId = employerId,
|
||||||
|
// ArchiveCode = selctedWorkshop.ArchiveCode,
|
||||||
|
// WorkshopAddress1 = selctedWorkshop.Address
|
||||||
|
// }).OrderBy(x => x.PersonnelCode).ToList();
|
||||||
|
// EmployeeSelectList = new SelectList(personelList, "EmployeeId", "EmployeeFullName");
|
||||||
|
|
||||||
|
// Console.WriteLine(" old : " + watch.Elapsed);
|
||||||
|
// watch.Reset();
|
||||||
|
// watch.Start();
|
||||||
|
|
||||||
|
// Console.WriteLine(" new : " + watch.Elapsed);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// HavingPersonel = false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
//Correction();
|
//Correction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,17 +308,21 @@
|
|||||||
@if (Model.Command.PermissionIds != null && Model.Command.PermissionIds.Contains(10323))
|
@if (Model.Command.PermissionIds != null && Model.Command.PermissionIds.Contains(10323))
|
||||||
{
|
{
|
||||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||||
@* <div class="" style="margin-top: 5px;">
|
|
||||||
<label>تعیین سطح دسترسی برای قرارداد </label>
|
|
||||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
|
||||||
</select>
|
|
||||||
</div> *@
|
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||||
<div class="" style="display: flex; align-items: center;">
|
<div class="" style="display: flex; align-items: center;">
|
||||||
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-8" style="position: relative;top: 12px;background-color: aliceblue;" >
|
||||||
|
<div class="" style="display: flex; align-items: center;">
|
||||||
|
<input type="checkbox" asp-for="Command.RotatingShiftCompute" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
|
<label asp-for="Command.RotatingShiftCompute" style="margin: 0;"> محاسبه نوبت کاری در تصفیه حساب </label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="col-xs-12 area-workshop">
|
<div class="col-xs-12 area-workshop">
|
||||||
@* <div class="form-group">
|
@* <div class="form-group">
|
||||||
<label class="input-label">محاسبه عیدی و پاداش، مزد مرخصی و سنوات </label>
|
<label class="input-label">محاسبه عیدی و پاداش، مزد مرخصی و سنوات </label>
|
||||||
@@ -578,16 +582,24 @@
|
|||||||
<input id="hasRollCall" type="checkbox" name="Command.HasRollCallFreeVip" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
<input id="hasRollCall" type="checkbox" name="Command.HasRollCallFreeVip" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="" style="display: flex; align-items: center;">
|
<div class="" style="display: flex; align-items: center;">
|
||||||
<input id="hasChekoutService" disabled="disabled" type="checkbox" name="Command.HasCustomizeCheckoutService" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
<input id="hasChekoutService" disabled="disabled" type="checkbox" name="Command.HasCustomizeCheckoutService" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="" style="display: flex; align-items: center; margin-top:5px">
|
||||||
|
<input id="isStaticCheckout" type="checkbox" asp-for="Command.IsStaticCheckout" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
|
<label asp-for="Command.IsStaticCheckout" style="margin: 0;">تصفیه حساب های این کارگاه بدون حضور غیاب محاسبه گردد</label>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$("#hasRollCall").on("click", function () {
|
$("#hasRollCall").on("click", function () {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$("#hasChekoutService").removeAttr("disabled");
|
$("#hasChekoutService").removeAttr("disabled");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$("#hasChekoutService").attr("disabled", "disabled");
|
$("#hasChekoutService").attr("disabled", "disabled");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
|||||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||||
CutContractEndOfYear = IsActive.None
|
CutContractEndOfYear = IsActive.None,
|
||||||
|
RotatingShiftCompute = true
|
||||||
};
|
};
|
||||||
|
|
||||||
var res = _workshopApplication.GetWorkshop();
|
var res = _workshopApplication.GetWorkshop();
|
||||||
@@ -185,6 +186,7 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
|||||||
command.HasRollCallFreeVip = "true";
|
command.HasRollCallFreeVip = "true";
|
||||||
if (command.HasCustomizeCheckoutService == "on")
|
if (command.HasCustomizeCheckoutService == "on")
|
||||||
command.HasCustomizeCheckoutService = "true";
|
command.HasCustomizeCheckoutService = "true";
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -323,10 +323,23 @@
|
|||||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
||||||
</select>
|
</select>
|
||||||
</div> *@
|
</div> *@
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||||
<div class="" style="display: flex; align-items: center;">
|
<div class="" style="display: flex; align-items: center;">
|
||||||
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-8" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||||
|
<div class="" style="display: flex; align-items: center;">
|
||||||
|
<input type="checkbox" asp-for="Command.RotatingShiftCompute" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
|
<label asp-for="Command.RotatingShiftCompute" style="margin: 0;"> محاسبه نوبت کاری در تصفیه حساب </label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 area-workshop">
|
<div class="col-xs-12 area-workshop">
|
||||||
<div id="radio2" class="card">
|
<div id="radio2" class="card">
|
||||||
@@ -470,11 +483,11 @@
|
|||||||
آیا قراردادهای بالای یک ماه منتهی به پایان سال باشد یا نباشد؟
|
آیا قراردادهای بالای یک ماه منتهی به پایان سال باشد یا نباشد؟
|
||||||
<div style="display: flex; align-items: center; gap: 15px;">
|
<div style="display: flex; align-items: center; gap: 15px;">
|
||||||
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
||||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.True" @(Model.Command.CutContractEndOfYear == IsActive.True ? "checked" : "")/>
|
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.True" @(Model.Command.CutContractEndOfYear == IsActive.True ? "checked" : "") />
|
||||||
باشد
|
باشد
|
||||||
</label>
|
</label>
|
||||||
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
<label class="@(Model.Command.CutContractEndOfYear == IsActive.None ? "disable" : "")" style="display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; margin: 0;">
|
||||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.False" @(Model.Command.CutContractEndOfYear == IsActive.False ? "checked" : "")/>
|
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.False" @(Model.Command.CutContractEndOfYear == IsActive.False ? "checked" : "") />
|
||||||
نباشد
|
نباشد
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -607,6 +620,7 @@
|
|||||||
<input id="hasRollCall" type="checkbox" name="Command.HasRollCallFreeVip" class="form-control" style="width: 15px;margin: 0 0 0 10px;" @(Model.Command.HasRollCallFreeVip == "true" ? "checked" : "") />
|
<input id="hasRollCall" type="checkbox" name="Command.HasRollCallFreeVip" class="form-control" style="width: 15px;margin: 0 0 0 10px;" @(Model.Command.HasRollCallFreeVip == "true" ? "checked" : "") />
|
||||||
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="" style="display: flex; align-items: center;">
|
<div class="" style="display: flex; align-items: center;">
|
||||||
@{
|
@{
|
||||||
if (Model.Command.HasRollCallFreeVip == "true")
|
if (Model.Command.HasRollCallFreeVip == "true")
|
||||||
@@ -622,12 +636,20 @@
|
|||||||
}
|
}
|
||||||
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="" style="display: flex; align-items: center; margin-top:5px">
|
||||||
|
|
||||||
|
<input id="isStaticCheckout" type="checkbox" asp-for="Command.IsStaticCheckout" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
|
<label asp-for="Command.IsStaticCheckout" style="margin: 0;">تصفیه حساب های این کارگاه بدون حضور غیاب [استاتیک] محاسبه گردد</label>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$("#hasRollCall").on("click", function () {
|
$("#hasRollCall").on("click", function () {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$("#hasChekoutService").removeAttr("disabled");
|
$("#hasChekoutService").removeAttr("disabled");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$("#hasChekoutService").attr("disabled", "disabled");
|
$("#hasChekoutService").attr("disabled", "disabled");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
|||||||
command.HasCustomizeCheckoutService = "false";
|
command.HasCustomizeCheckoutService = "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
|||||||
//Console.WriteLine("endStep 1 ============");
|
//Console.WriteLine("endStep 1 ============");
|
||||||
//SetRollCall(r1);
|
//SetRollCall(r1);
|
||||||
|
|
||||||
await SetWorkshopRoleSubAccount();
|
await ChangeFridayWorkToWeeklyDayOfWeek();
|
||||||
ViewData["message"] = "تومام دو";
|
ViewData["message"] = "تومام دو";
|
||||||
return Page();
|
return Page();
|
||||||
}
|
}
|
||||||
@@ -534,5 +534,32 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
|||||||
// ViewData["message"] = "تومام";
|
// ViewData["message"] = "تومام";
|
||||||
// return Page();
|
// return Page();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
private async System.Threading.Tasks.Task ChangeFridayWorkToWeeklyDayOfWeek()
|
||||||
|
{
|
||||||
|
var employeeSettingsEnumerable = await _context.CustomizeWorkshopEmployeeSettings.Where(x => x.FridayWork == FridayWork.Default).ToListAsync();
|
||||||
|
foreach (var employeeSetting in employeeSettingsEnumerable)
|
||||||
|
{
|
||||||
|
employeeSetting.FridayWorkToWeeklyDayOfWeek();
|
||||||
|
}
|
||||||
|
|
||||||
|
var groupSettings = await _context.CustomizeWorkshopGroupSettings
|
||||||
|
.Where(x => x.FridayWork == FridayWork.Default).ToListAsync();
|
||||||
|
|
||||||
|
foreach (var groupSetting in groupSettings)
|
||||||
|
{
|
||||||
|
groupSetting.FridayWorkToWeeklyDayOfWeek();
|
||||||
|
}
|
||||||
|
|
||||||
|
var workshopSettings = await _context.CustomizeWorkshopSettings
|
||||||
|
.Where(x => x.FridayWork == FridayWork.Default).ToListAsync();
|
||||||
|
foreach (var workshopSetting in workshopSettings)
|
||||||
|
{
|
||||||
|
workshopSetting.FridayWorkToWeeklyDayOfWeek();
|
||||||
|
}
|
||||||
|
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -412,7 +412,7 @@
|
|||||||
var nextPermission = @(hasNextPermission ? "false" : "true");
|
var nextPermission = @(hasNextPermission ? "false" : "true");
|
||||||
var prevPermission = @(hasPrevPermission ? "false" : "true");
|
var prevPermission = @(hasPrevPermission ? "false" : "true");
|
||||||
|
|
||||||
var accessAccountToSearchAccounts = [2, 3,423,392];
|
var accessAccountToSearchAccounts = [2, 3,392,434];
|
||||||
</script>
|
</script>
|
||||||
<script src="~/AssetsAdminNew/monthlyoverview/js/Index.js?ver=@adminVersion"></script>
|
<script src="~/AssetsAdminNew/monthlyoverview/js/Index.js?ver=@adminVersion"></script>
|
||||||
}
|
}
|
||||||
@@ -228,7 +228,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult OnPostEditSettingWorkTime(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
public IActionResult OnPostEditSettingWorkTime(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
||||||
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus, long workshopId,FridayWork fridayWork,HolidayWork holidayWork)
|
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus, long workshopId,FridayWork fridayWork,HolidayWork holidayWork,List<DayOfWeek> offDayOfWeeks)
|
||||||
{
|
{
|
||||||
if (workshopId < 1)
|
if (workshopId < 1)
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
@@ -240,7 +240,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
|||||||
//Todo:Vafa!!
|
//Todo:Vafa!!
|
||||||
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
||||||
var result = _customizeWorkshopSettingsApplication
|
var result = _customizeWorkshopSettingsApplication
|
||||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, fridayWork, holidayWork);
|
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, holidayWork, offDayOfWeeks);
|
||||||
|
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
<div class="row" style="margin-top: 6px; padding: 0 12px;">
|
||||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0;">
|
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0;">
|
||||||
<table style="/* table-layout: fixed; */width: 100%">
|
<table style="/* table-layout: fixed; */width: 100%">
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
<div class="row" style="margin-top: 6px; padding: 0 12px;">
|
||||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 100%;">
|
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 100%;">
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
@@ -520,18 +520,18 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استحقاقی <span>:</span> @Model.TotalPaidLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr </td>
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10" style="padding: 0;">
|
<td colspan="10" style="padding: 0;">
|
||||||
<table style="width: 100%; table-layout: fixed;">
|
<table style="width: 100%; table-layout: fixed;">
|
||||||
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year <span>:</span> @Model.TotalMandatoryTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور <span>:</span> @Model.TotalPresentTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -382,7 +382,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding: 0 12px;">
|
<div style="padding: 0 12px;">
|
||||||
<div class="row" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));">
|
<div class="row" style="margin-top: 4px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC; border-radius: 7px; padding: 7px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC; border-radius: 7px; padding: 7px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
@@ -718,25 +718,31 @@
|
|||||||
</div>
|
</div>
|
||||||
*@
|
*@
|
||||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<table style="width: 100%;">
|
<thead>
|
||||||
<tbody>
|
<tr>
|
||||||
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 6px 6px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">موظفی @Model.Month @Model.Year <span>:</span> @Model.TotalMandatoryTimeStr</td>
|
</th>
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور <span>:</span> @Model.TotalPresentTimeStr</td>
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 0px;border-color: #D9D9D9;border-style: solid; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات کارکرد <span>:</span> @Model.TotalWorkingTimeStr</td>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 4px;">
|
||||||
<div style="width: 65%;">
|
<div style="width: 65%;">
|
||||||
<div style="display: flex; gap: 10px;">
|
<div style="display: flex; gap: 10px;">
|
||||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
|
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
<div class="row" style="margin-top: 6px; padding: 0 12px;">
|
||||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0;">
|
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0;">
|
||||||
<table style="/* table-layout: fixed; */width: 100%">
|
<table style="/* table-layout: fixed; */width: 100%">
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px; padding: 0 12px;">
|
<div class="row" style="margin-top: 6px; padding: 0 12px;">
|
||||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 100%;">
|
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 100%;">
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
@@ -514,18 +514,18 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; border-bottom: 1px solid; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استحقاقی <span>:</span> @Model.TotalPaidLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr </td>
|
||||||
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
<td colspan="5" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10" style="padding: 0;">
|
<td colspan="10" style="padding: 0;">
|
||||||
<table style="width: 100%; table-layout: fixed;">
|
<table style="width: 100%; table-layout: fixed;">
|
||||||
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<tr style="height: 20px; color:#ffffff !important; background-color: #575656 !important; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> موظفی @Model.Month @Model.Year <span>:</span> @Model.TotalMandatoryTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور <span>:</span> @Model.TotalPresentTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px;padding: 0 12px;">
|
<div class="row" style="margin-top: 4px;padding: 0 12px;">
|
||||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
|
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden;padding: 0;">
|
||||||
<table style="/* table-layout: fixed; */ width: 100%">
|
<table style="/* table-layout: fixed; */ width: 100%">
|
||||||
|
|
||||||
@@ -372,7 +372,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding: 0 12px;">
|
<div style="padding: 0 12px;">
|
||||||
<div class="row" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));">
|
<div class="row" style="margin-top: 4px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));">
|
||||||
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<div class="col-6 w-100" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||||
@@ -539,24 +539,31 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<table style="width: 100%;">
|
<thead>
|
||||||
<tbody>
|
<tr>
|
||||||
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 6px 6px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr</td>
|
</th>
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور : @Model.TotalPresentTimeStr</td>
|
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 0px;border-color: #D9D9D9;border-style: solid; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات کارکرد : @Model.TotalWorkingTimeStr</td>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 10px;">
|
||||||
<div style="width: 65%;">
|
<div style="width: 65%;">
|
||||||
|
|||||||
@@ -58,14 +58,14 @@
|
|||||||
|
|
||||||
<div class="col-12 group-container">
|
<div class="col-12 group-container">
|
||||||
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
||||||
<div class="form-group my-1 group">
|
@* <div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
||||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group my-1 group">
|
<div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
||||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||||
</div>
|
</div> *@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|||||||
@@ -56,14 +56,14 @@
|
|||||||
|
|
||||||
<div class="col-12 group-container">
|
<div class="col-12 group-container">
|
||||||
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
||||||
<div class="form-group my-1 group">
|
@* <div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
||||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group my-1 group">
|
<div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
||||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||||
</div>
|
</div> *@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|||||||
@@ -29,14 +29,14 @@
|
|||||||
|
|
||||||
<div class="col-12 group-container">
|
<div class="col-12 group-container">
|
||||||
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
<div class="titleSettingRollCall">وضعیت فعالیت مجموعه در روز های جمعه</div>
|
||||||
<div class="form-group my-1 group">
|
@* <div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
||||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group my-1 group">
|
<div class="form-group my-1 group">
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
||||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||||
</div>
|
</div> *@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="container my-3" id="footer-section">
|
<div class="container my-3" id="footer-section">
|
||||||
<div class="row breack-time">
|
<div class="row breack-time mb-2">
|
||||||
<div>
|
<div>
|
||||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||||
<input type="checkbox" id="BreakTimeFirst" class="form-check-input">
|
<input type="checkbox" id="BreakTimeFirst" class="form-check-input">
|
||||||
@@ -226,47 +226,109 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mt-2">
|
<div class="day-off-parent">
|
||||||
<div class="col-12">
|
<div class="day-off-title mb-2">
|
||||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
روزهای تعطیل هفته
|
||||||
<div class="row extraOptionBorder">
|
</div>
|
||||||
|
|
||||||
|
<div class="day-off-button-container mb-3">
|
||||||
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
|
class="day-off-button text-center day-off-button__active ">
|
||||||
|
شنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Sunday" value="@((int)(DayOfWeek.Sunday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
یکشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Monday" value="@((int)(DayOfWeek.Monday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
دوشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Tuesday" value="@((int)(DayOfWeek.Tuesday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
سهشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Wednesday" value="@((int)(DayOfWeek.Wednesday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
چهارشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Thursday" value="@((int)(DayOfWeek.Thursday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
پنجشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Friday" value="@((int)(DayOfWeek.Friday))"
|
||||||
|
class="day-off-button text-center ">
|
||||||
|
جمعه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SaturdayInput"
|
||||||
|
value="@((int)(DayOfWeek.Saturday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SundayInput" value="@((int)(DayOfWeek.Sunday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="MondayInput" value="@((int)(DayOfWeek.Monday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="TuesdayInput" value="@((int)(DayOfWeek.Tuesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="WednesdayInput"
|
||||||
|
|
||||||
|
value="@((int)(DayOfWeek.Wednesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="ThursdayInput"
|
||||||
|
value="@((int)(DayOfWeek.Thursday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="FridayInput" value="@((int)(DayOfWeek.Friday))" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="FridayWork1" id="Friday1" class="form-check-input Main-Radio" value="@((int)(FridayWork.Default))" />
|
|
||||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex form-group my-1 group">
|
<div class="day-off-title mb-2">
|
||||||
<input type="radio" name="FridayWork1" id="Friday2" class="form-check-input Main-Radio" value="@((int)(FridayWork.WorkInFriday))" />
|
وضعیت فعالیت مجموعه در روزهای جمعه و تعطیلات رسمی
|
||||||
<label for="Friday2" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار میکند.</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="day-off-status-person mb-3">
|
||||||
|
<div class="d-flex align-items-center gap-3">
|
||||||
|
<span class="day-off-status-person__item">وضعیت پرسنل در روز های تعطیل رسمی : </span>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" class="custom-checkbox" name="Command.CreateCustomizeEmployeeSettings.HolidayWork" id="OffDays2"
|
||||||
|
|
||||||
|
value="@((int)(HolidayWork.WorkInHolidays))" />
|
||||||
|
<label class="text-nowrap day-off-status-person__item--label" for="OffDays2">
|
||||||
|
اشتغال دارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" name="Command.CreateCustomizeEmployeeSettings.HolidayWork" id="OffDays1" class="custom-checkbox"
|
||||||
|
|
||||||
|
value="@((int)(HolidayWork.Default))" />
|
||||||
|
<label for="OffDays1" class="text-nowrap day-off-status-person__item--label">
|
||||||
|
اشتغال ندارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="HolidayWork1" id="HolidayWork1" class="form-check-input Main-Radio" value="@HolidayWork.Default" />
|
|
||||||
<label for="HolidayWork1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="HolidayWork1" id="HolidayWork2" class="form-check-input Main-Radio" value="@HolidayWork.WorkInHolidays" />
|
|
||||||
<label for="HolidayWork2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" id="GroupId" name="Command.CreateCustomizeEmployeeSettings.GroupId" value="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="~/assetsclient/pages/employees/js/WorkshopSettingGrouping.js?ver=@clientVersion"></script>
|
<script src="~/assetsclient/pages/employees/js/WorkshopSettingGrouping.js?ver=@clientVersion"></script>
|
||||||
@@ -295,7 +295,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
|||||||
HasUploadedImage = rollCallEmployee?.HasUploadedImage == "true"
|
HasUploadedImage = rollCallEmployee?.HasUploadedImage == "true"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (res.HasUploadedImage)
|
if (res.HasUploadedImage && res.EmployeeSettings != null)
|
||||||
{
|
{
|
||||||
return Partial("ModalTakeImagesEdit", res);
|
return Partial("ModalTakeImagesEdit", res);
|
||||||
}
|
}
|
||||||
@@ -467,7 +467,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
|||||||
var employeeSettings =
|
var employeeSettings =
|
||||||
_customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
|
_customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
|
||||||
_workshopId, hasRollCallEmployee.EmployeeId);
|
_workshopId, hasRollCallEmployee.EmployeeId);
|
||||||
if (employeeSettings.Id == 0)
|
if (employeeSettings == null || employeeSettings.Id == 0)
|
||||||
{
|
{
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -240,9 +240,10 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
|||||||
BreakTime = employee.BreakTime,
|
BreakTime = employee.BreakTime,
|
||||||
WorkshopShiftStatus = employee.WorkshopShiftStatus,
|
WorkshopShiftStatus = employee.WorkshopShiftStatus,
|
||||||
IrregularShift = employee.IrregularShift,
|
IrregularShift = employee.IrregularShift,
|
||||||
FridayWork = employee.FridayWork,
|
//FridayWork = employee.FridayWork,
|
||||||
HolidayWork = employee.HolidayWork,
|
HolidayWork = employee.HolidayWork,
|
||||||
CustomizeRotatingShifts = employee.CustomizeRotatingShiftsViewModels
|
CustomizeRotatingShifts = employee.CustomizeRotatingShiftsViewModels,
|
||||||
|
WeeklyOffDays = employee.WeeklyOffDays
|
||||||
};
|
};
|
||||||
return Partial("ModalEditEmployeeFromGroup", command);
|
return Partial("ModalEditEmployeeFromGroup", command);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult OnPostEditSettingWorkTime(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
public IActionResult OnPostEditSettingWorkTime(List<CustomizeWorkshopShiftViewModel> shiftViewModels,
|
||||||
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
long customizeWorkshopSettingsId, WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork,List<DayOfWeek> offDayOfWeeks)
|
||||||
{
|
{
|
||||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||||
@@ -324,7 +324,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
|||||||
//Todo:Vafa!!
|
//Todo:Vafa!!
|
||||||
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
||||||
var result = _customizeWorkshopSettingsApplication
|
var result = _customizeWorkshopSettingsApplication
|
||||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus,fridayWork, holidayWork);
|
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, holidayWork, offDayOfWeeks);
|
||||||
|
|
||||||
return new JsonResult(new
|
return new JsonResult(new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -221,45 +221,114 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="day-off-parent">
|
||||||
<div class="row mt-2">
|
<div class="day-off-title mb-2">
|
||||||
<div class="col-12">
|
روزهای تعطیل هفته
|
||||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
|
||||||
<div class="row extraOptionBorder">
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))"/>
|
|
||||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="Command.FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))"/>
|
<div class="day-off-button-container mb-3">
|
||||||
<label for="Friday2" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار میکند.</label>
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
شنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<button type="button" name="Sunday" value="@((int)(DayOfWeek.Sunday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
یکشنبه
|
||||||
|
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<button type="button" name="Monday" value="@((int)(DayOfWeek.Monday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
دوشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Tuesday" value="@((int)(DayOfWeek.Tuesday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
سهشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Wednesday" value="@((int)(DayOfWeek.Wednesday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
چهارشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Thursday" value="@((int)(DayOfWeek.Thursday))"
|
||||||
|
class="day-off-button text-center day-off-button__active">
|
||||||
|
پنجشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Friday" value="@((int)(DayOfWeek.Friday))"
|
||||||
|
class="day-off-button text-center day-off-button__diactive">
|
||||||
|
جمعه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="SaturdayInput"
|
||||||
|
value="@((int)(DayOfWeek.Saturday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="SundayInput" value="@((int)(DayOfWeek.Sunday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="MondayInput" value="@((int)(DayOfWeek.Monday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="TuesdayInput" value="@((int)(DayOfWeek.Tuesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="WednesdayInput"
|
||||||
|
value="@((int)(DayOfWeek.Wednesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__active"
|
||||||
|
name="Command.WeeklyOffDays" id="ThursdayInput"
|
||||||
|
value="@((int)(DayOfWeek.Thursday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input day-off-button__diactive"
|
||||||
|
name="Command.WeeklyOffDays" id="FridayInput" value="@((int)(DayOfWeek.Friday))" checked="checked" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="day-off-title mb-2">
|
||||||
|
وضعیت فعالیت مجموعه در روزهای جمعه و تعطیلات رسمی
|
||||||
|
</div>
|
||||||
|
<div class="day-off-status-person mb-3">
|
||||||
|
<div class="d-flex align-items-center gap-3">
|
||||||
|
<span class="day-off-status-person__item">وضعیت پرسنل در روز های تعطیل رسمی : </span>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" class="custom-checkbox" name="command.HolidayWork" id="OffDays2"
|
||||||
|
@(Model.HolidayWork == HolidayWork.WorkInHolidays ? "checked" : "")
|
||||||
|
value="@((int)(HolidayWork.WorkInHolidays))" />
|
||||||
|
<label class="text-nowrap day-off-status-person__item--label" for="OffDays2">
|
||||||
|
اشتغال دارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" name="command.HolidayWork" id="OffDays1" class="custom-checkbox"
|
||||||
|
@(Model.HolidayWork == HolidayWork.Default ? "checked" : "")
|
||||||
|
value="@((int)(HolidayWork.Default))" />
|
||||||
|
<label for="OffDays1" class="text-nowrap day-off-status-person__item--label">
|
||||||
|
اشتغال ندارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="Command.HolidayWork" id="OffDays1" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.Default ? "checked" : "") value="@((int)(HolidayWork.Default))"/>
|
|
||||||
<label for="OffDays1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="Command.HolidayWork" id="OffDays2" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.WorkInHolidays ? "checked" : "") value="@((int)(HolidayWork.WorkInHolidays))"/>
|
|
||||||
<label for="OffDays2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -381,43 +381,115 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row mt-2">
|
<div class="day-off-parent">
|
||||||
<div class="col-12">
|
<div class="day-off-title mb-2">
|
||||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
روزهای تعطیل هفته
|
||||||
<div class="row extraOptionBorder">
|
</div>
|
||||||
|
|
||||||
|
<div class="day-off-button-container mb-3">
|
||||||
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Saturday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
شنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<button type="button" name="Sunday" value="@((int)(DayOfWeek.Sunday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Sunday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
یکشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Monday" value="@((int)(DayOfWeek.Monday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Monday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
دوشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Tuesday" value="@((int)(DayOfWeek.Tuesday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Tuesday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
سهشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Wednesday" value="@((int)(DayOfWeek.Wednesday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Wednesday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
چهارشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Thursday" value="@((int)(DayOfWeek.Thursday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Thursday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
پنجشنبه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button" name="Friday" value="@((int)(DayOfWeek.Friday))"
|
||||||
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Friday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
|
جمعه
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="SaturdayInput"
|
||||||
|
@(Model.WeeklyOffDays.Contains(DayOfWeek.Saturday) ? "checked" : "")
|
||||||
|
value="@((int)(DayOfWeek.Saturday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="SundayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Sunday) ?
|
||||||
|
"checked" : "") value="@((int)(DayOfWeek.Sunday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="MondayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Monday) ?
|
||||||
|
"checked" : "") value="@((int)(DayOfWeek.Monday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="TuesdayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Tuesday)
|
||||||
|
? "checked" : "") value="@((int)(DayOfWeek.Tuesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="WednesdayInput"
|
||||||
|
@(Model.WeeklyOffDays.Contains(DayOfWeek.Wednesday) ? "checked" : "")
|
||||||
|
value="@((int)(DayOfWeek.Wednesday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="ThursdayInput"
|
||||||
|
@(Model.WeeklyOffDays.Contains(DayOfWeek.Thursday) ? "checked" : "")
|
||||||
|
value="@((int)(DayOfWeek.Thursday))" />
|
||||||
|
|
||||||
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
|
name="Command.WeeklyOffDays" id="FridayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Friday) ?
|
||||||
|
"checked" : "") value="@((int)(DayOfWeek.Friday))" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
|
||||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex form-group my-1 group">
|
<div class="day-off-title mb-2">
|
||||||
<input type="radio" name="FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
وضعیت فعالیت مجموعه در روزهای جمعه و تعطیلات رسمی
|
||||||
<label for="Friday2" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار میکند.</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="day-off-status-person mb-3">
|
||||||
|
<div class="d-flex align-items-center gap-3">
|
||||||
|
<span class="day-off-status-person__item">وضعیت پرسنل در روز های تعطیل رسمی : </span>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" class="custom-checkbox" name="command.HolidayWork" id="OffDays2"
|
||||||
|
@(Model.HolidayWork == HolidayWork.WorkInHolidays ? "checked" : "")
|
||||||
|
value="@((int)(HolidayWork.WorkInHolidays))" />
|
||||||
|
<label class="text-nowrap day-off-status-person__item--label" for="OffDays2">
|
||||||
|
اشتغال دارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
|
<input type="radio" name="command.HolidayWork" id="OffDays1" class="custom-checkbox"
|
||||||
|
@(Model.HolidayWork == HolidayWork.Default ? "checked" : "")
|
||||||
|
value="@((int)(HolidayWork.Default))" />
|
||||||
|
<label for="OffDays1" class="text-nowrap day-off-status-person__item--label">
|
||||||
|
اشتغال ندارد
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
|
||||||
<div class="group-container">
|
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="HolidayWork" id="OffDays1" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.Default ? "checked" : "") value="@((int)(HolidayWork.Default))" />
|
|
||||||
<label for="OffDays1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<input type="radio" name="HolidayWork" id="OffDays2" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.WorkInHolidays ? "checked" : "") value="@((int)(HolidayWork.WorkInHolidays))" />
|
|
||||||
<label for="OffDays2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user