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
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
numbers = Convert.ToInt32(num);
|
try
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
|||||||
@@ -10,67 +10,70 @@ 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()
|
||||||
{
|
{
|
||||||
_httpClient = new HttpClient()
|
_httpClient = new HttpClient()
|
||||||
{
|
{
|
||||||
BaseAddress = new Uri(BaseUrl)
|
BaseAddress = new Uri(BaseUrl)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode, string birthDate)
|
public async Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode, string birthDate)
|
||||||
{
|
{
|
||||||
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>();
|
||||||
if (responseResult.BasicInformation != null)
|
if (responseResult.BasicInformation != null)
|
||||||
{
|
{
|
||||||
responseResult.BasicInformation.FirstName = responseResult.BasicInformation.FirstName?.ToPersian();
|
responseResult.BasicInformation.FirstName = responseResult.BasicInformation.FirstName?.ToPersian();
|
||||||
responseResult.BasicInformation.LastName = responseResult.BasicInformation.LastName?.ToPersian();
|
responseResult.BasicInformation.LastName = responseResult.BasicInformation.LastName?.ToPersian();
|
||||||
responseResult.BasicInformation.FatherName = responseResult.BasicInformation.FatherName?.ToPersian();
|
responseResult.BasicInformation.FatherName = responseResult.BasicInformation.FatherName?.ToPersian();
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseResult;
|
return responseResult;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
||||||
return null;
|
return new PersonalInfoResponse(new UidBasicInformation(),
|
||||||
}
|
new IdentificationInformation(default, default, default, default, default), new RegistrationStatus(),
|
||||||
}
|
new ResponseContext(new UidStatus(14, "")));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode, string phoneNumber)
|
public async Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode, string phoneNumber)
|
||||||
{
|
{
|
||||||
var request = new PersonalInfoRequest
|
var request = new PersonalInfoRequest
|
||||||
{
|
{
|
||||||
MobileNumber = phoneNumber,
|
MobileNumber = phoneNumber,
|
||||||
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("mobile/owner/v2", contentType);
|
var requestResult = await _httpClient.PostAsync("mobile/owner/v2", contentType);
|
||||||
if (!requestResult.IsSuccessStatusCode)
|
if (!requestResult.IsSuccessStatusCode)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<MatchMobileWithNationalCodeResponse>();
|
var responseResult = await requestResult.Content.ReadFromJsonAsync<MatchMobileWithNationalCodeResponse>();
|
||||||
return responseResult;
|
return responseResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -17,340 +17,344 @@ namespace Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities;
|
|||||||
|
|
||||||
public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||||
{
|
{
|
||||||
public CustomizeWorkshopGroupSettings()
|
public CustomizeWorkshopGroupSettings()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CustomizeWorkshopGroupSettings(string groupName, double salary,
|
public CustomizeWorkshopGroupSettings(string groupName, double salary,
|
||||||
long customizeWorkshopSettingId, ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
long customizeWorkshopSettingId, ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||||
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,
|
||||||
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays) :
|
||||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||||
{
|
earlyExit, holidayWork, breakTime, leavePermittedDays, weeklyOffDays)
|
||||||
GroupName = groupName;
|
{
|
||||||
Salary = salary;
|
GroupName = groupName;
|
||||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
Salary = salary;
|
||||||
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
||||||
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
|
|
||||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||||
|
|
||||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||||
|
|
||||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GuardGroupShifts(ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts)
|
private void GuardGroupShifts(ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts)
|
||||||
{
|
{
|
||||||
if (customizeWorkshopGroupSettingsShifts.Count >= 4)
|
if (customizeWorkshopGroupSettingsShifts.Count >= 4)
|
||||||
{
|
{
|
||||||
throw new InvalidDataException("شما نمیتوانید بیشتر از سه ساعت کاری در کارگاه بگذارید");
|
throw new InvalidDataException("شما نمیتوانید بیشتر از سه ساعت کاری در کارگاه بگذارید");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GroupName { get; private set; }
|
public string GroupName { get; private set; }
|
||||||
public double Salary { get; private set; }
|
public double Salary { get; private set; }
|
||||||
public long CustomizeWorkshopSettingId { get; private set; }
|
public long CustomizeWorkshopSettingId { get; private set; }
|
||||||
public WorkshopShiftStatus WorkshopShiftStatus { get; private set; }
|
public WorkshopShiftStatus WorkshopShiftStatus { get; private set; }
|
||||||
public bool MainGroup { get; private set; }
|
public bool MainGroup { get; private set; }
|
||||||
public bool IsShiftChange { get; private set; }
|
public bool IsShiftChange { get; private set; }
|
||||||
public bool IsSettingChange { get; private set; }
|
public bool IsSettingChange { get; private set; }
|
||||||
public IrregularShift IrregularShift { get; set; }
|
public IrregularShift IrregularShift { get; set; }
|
||||||
public ICollection<CustomizeWorkshopGroupSettingsShift> CustomizeWorkshopGroupSettingsShifts { get; set; }
|
public ICollection<CustomizeWorkshopGroupSettingsShift> CustomizeWorkshopGroupSettingsShifts { get; set; }
|
||||||
public ICollection<CustomizeWorkshopEmployeeSettings> CustomizeWorkshopEmployeeSettingsCollection { get; set; }
|
public ICollection<CustomizeWorkshopEmployeeSettings> CustomizeWorkshopEmployeeSettingsCollection { get; set; }
|
||||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||||
public CustomizeWorkshopSettings CustomizeWorkshopSettings { get; set; }
|
public CustomizeWorkshopSettings CustomizeWorkshopSettings { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public CustomizeWorkshopGroupSettings CreateMainGroup(FridayPay fridayPay,
|
public CustomizeWorkshopGroupSettings CreateMainGroup(FridayPay fridayPay,
|
||||||
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,
|
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)
|
||||||
{
|
{
|
||||||
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
||||||
GroupName = "اصلی";
|
GroupName = "اصلی";
|
||||||
Salary = 0;
|
Salary = 0;
|
||||||
FridayPay = fridayPay;
|
FridayPay = fridayPay;
|
||||||
OverTimePay = overTimePay;
|
OverTimePay = overTimePay;
|
||||||
BaseYearsPay = baseYearsPay;
|
BaseYearsPay = baseYearsPay;
|
||||||
BonusesPay = bonusesPay;
|
BonusesPay = bonusesPay;
|
||||||
NightWorkPay = nightWorkPay;
|
NightWorkPay = nightWorkPay;
|
||||||
MarriedAllowance = marriedAllowance;
|
MarriedAllowance = marriedAllowance;
|
||||||
ShiftPay = shiftPay;
|
ShiftPay = shiftPay;
|
||||||
FamilyAllowance = familyAllowance;
|
FamilyAllowance = familyAllowance;
|
||||||
LeavePay = leavePay;
|
LeavePay = leavePay;
|
||||||
InsuranceDeduction = insuranceDeduction;
|
InsuranceDeduction = insuranceDeduction;
|
||||||
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 : [];
|
|
||||||
|
|
||||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||||
|
|
||||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||||
MainGroup = true;
|
MainGroup = true;
|
||||||
BreakTime = breakTime;
|
BreakTime = breakTime;
|
||||||
CustomizeWorkshopEmployeeSettingsCollection = [];
|
CustomizeWorkshopEmployeeSettingsCollection = [];
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void EditAndOverwriteOnEmployees(string groupName, double salary, IEnumerable<long> employeeIds,
|
public void EditAndOverwriteOnEmployees(string groupName, double salary, IEnumerable<long> employeeIds,
|
||||||
FridayPay fridayPay,
|
FridayPay fridayPay,
|
||||||
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;
|
||||||
FridayPay = fridayPay;
|
FridayPay = fridayPay;
|
||||||
OverTimePay = overTimePay;
|
OverTimePay = overTimePay;
|
||||||
BaseYearsPay = baseYearsPay;
|
BaseYearsPay = baseYearsPay;
|
||||||
BonusesPay = bonusesPay;
|
BonusesPay = bonusesPay;
|
||||||
NightWorkPay = nightWorkPay;
|
NightWorkPay = nightWorkPay;
|
||||||
MarriedAllowance = marriedAllowance;
|
MarriedAllowance = marriedAllowance;
|
||||||
ShiftPay = shiftPay;
|
ShiftPay = shiftPay;
|
||||||
FamilyAllowance = familyAllowance;
|
FamilyAllowance = familyAllowance;
|
||||||
LeavePay = leavePay;
|
LeavePay = leavePay;
|
||||||
InsuranceDeduction = insuranceDeduction;
|
InsuranceDeduction = insuranceDeduction;
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
||||||
foreach (var item in permittedToOverWrite)
|
foreach (var item in permittedToOverWrite)
|
||||||
{
|
{
|
||||||
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,
|
||||||
FridayPay fridayPay,
|
FridayPay fridayPay,
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
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 RemoveEmployeeFromGroup(long employeeId)
|
public void RemoveEmployeeFromGroup(long employeeId)
|
||||||
{
|
{
|
||||||
var currentItem = CustomizeWorkshopEmployeeSettingsCollection.FirstOrDefault(x => x.EmployeeId == employeeId);
|
var currentItem = CustomizeWorkshopEmployeeSettingsCollection.FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||||
if (currentItem != null)
|
if (currentItem != null)
|
||||||
CustomizeWorkshopEmployeeSettingsCollection.Remove(currentItem);
|
CustomizeWorkshopEmployeeSettingsCollection.Remove(currentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 : [];
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
|
|
||||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||||
: 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 : [];
|
||||||
|
|
||||||
|
|
||||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||||
IsShiftChange = isShiftChange;
|
IsShiftChange = isShiftChange;
|
||||||
FridayWork = fridayWork;
|
|
||||||
HolidayWork = holidayWork;
|
|
||||||
|
|
||||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
HolidayWork = holidayWork;
|
||||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
|
||||||
if (isShiftChange)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
WeeklyOffDays = weeklyOffDays;
|
||||||
|
|
||||||
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||||
|
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||||
|
if (isShiftChange)
|
||||||
|
{
|
||||||
|
|
||||||
foreach (var item in permittedToOverWrite)
|
}
|
||||||
{
|
|
||||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
|
||||||
.ToList();
|
|
||||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
|
||||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
|
||||||
IrregularShift, WorkshopShiftStatus, BreakTime, false, FridayWork, HolidayWork, newRotatingShifts);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
||||||
|
|
||||||
public void EditSimpleAndOverwriteOnAllEmployees(string groupName,
|
foreach (var item in permittedToOverWrite)
|
||||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
{
|
||||||
WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,
|
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
FridayWork fridayWork, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts)
|
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||||
{
|
.ToList();
|
||||||
GroupName = groupName;
|
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||||
WorkshopShiftStatus = workshopShiftStatus;
|
IrregularShift, WorkshopShiftStatus, BreakTime, false, HolidayWork, newRotatingShifts, employeeWeeklyOffDays);
|
||||||
|
}
|
||||||
|
|
||||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
}
|
||||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
|
||||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
|
||||||
|
|
||||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
public void EditSimpleAndOverwriteOnAllEmployees(string groupName,
|
||||||
|
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||||
|
WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,
|
||||||
|
HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays)
|
||||||
|
{
|
||||||
|
GroupName = groupName;
|
||||||
|
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||||
|
WorkshopShiftStatus = workshopShiftStatus;
|
||||||
|
|
||||||
|
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||||
|
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||||
|
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||||
|
|
||||||
|
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||||
|
|
||||||
|
|
||||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||||
IsShiftChange = isShiftChange;
|
IsShiftChange = isShiftChange;
|
||||||
HolidayWork = holidayWork;
|
HolidayWork = holidayWork;
|
||||||
FridayWork = fridayWork;
|
|
||||||
|
|
||||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
WeeklyOffDays = weeklyOffDays;
|
||||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||||
|
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||||
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
|
||||||
{
|
|
||||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
|
||||||
.ToList();
|
|
||||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
|
||||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
|
||||||
irregularShift, workshopShiftStatus, breakTime, false, FridayWork, HolidayWork, newRotatingShifts);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddEmployeeSettingToGroupWithGroupData(long employeeId, long workshopId)
|
|
||||||
{
|
|
||||||
var shifts = CustomizeWorkshopGroupSettingsShifts
|
|
||||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
|
||||||
|
|
||||||
FridayPay fridayPay = new(FridayPay.FridayPayType, FridayPay.Value);
|
|
||||||
OverTimePay overTimePay = new(OverTimePay.OverTimePayType, OverTimePay.Value);
|
|
||||||
BaseYearsPay baseYearsPay = new(BaseYearsPay.BaseYearsPayType, BaseYearsPay.Value, BaseYearsPay.PaymentType);
|
|
||||||
BonusesPay bonusesPay = new(BonusesPay.BonusesPayType, BonusesPay.Value, BonusesPay.PaymentType);
|
|
||||||
NightWorkPay nightWorkPay = new(NightWorkPay.NightWorkingType, NightWorkPay.Value);
|
|
||||||
MarriedAllowance marriedAllowance = new(MarriedAllowance.MarriedAllowanceType, MarriedAllowance.Value);
|
|
||||||
ShiftPay shiftPay = new(ShiftType.None, ShiftPayType.None, 0);
|
|
||||||
FamilyAllowance familyAllowance = new(FamilyAllowance.FamilyAllowanceType, FamilyAllowance.Value);
|
|
||||||
LeavePay leavePay = new(LeavePay.LeavePayType, LeavePay.Value);
|
|
||||||
InsuranceDeduction insuranceDeduction = new(InsuranceDeduction.InsuranceDeductionType, InsuranceDeduction.Value);
|
|
||||||
FineAbsenceDeduction fineAbsenceDeduction = new(
|
|
||||||
FineAbsenceDeduction.FineAbsenceDeductionType, FineAbsenceDeduction.Value,
|
|
||||||
FineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
|
||||||
.Select(x => new FineAbsenceDayOfWeek(x.DayOfWeek)).ToList()
|
|
||||||
);
|
|
||||||
LateToWork lateToWork = new(
|
|
||||||
LateToWork.LateToWorkType,
|
|
||||||
LateToWork.LateToWorkTimeFines.Select(x => new LateToWorkTimeFine(x.Minute, x.FineMoney))
|
|
||||||
.ToList(), LateToWork.Value
|
|
||||||
);
|
|
||||||
EarlyExit earlyExit = new(EarlyExit.EarlyExitType,
|
|
||||||
EarlyExit.EarlyExitTimeFines.Select(x => new EarlyExitTimeFine(x.Minute, x.FineMoney))
|
|
||||||
.ToList(), EarlyExit.Value);
|
|
||||||
IrregularShift irregularShift = new(IrregularShift.StartTime, IrregularShift.EndTime,
|
|
||||||
IrregularShift.WorkshopIrregularShifts);
|
|
||||||
BreakTime breakTime = new(BreakTime.HasBreakTimeValue, BreakTime.BreakTimeValue);
|
|
||||||
|
|
||||||
var rotatingShift = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime)).ToList();
|
|
||||||
|
|
||||||
var customizeWorkshopEmployeeSettings = new CustomizeWorkshopEmployeeSettings(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
|
||||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
|
||||||
earlyExit, employeeId, workshopId, Salary, id, shifts, FridayWork, HolidayWork, irregularShift,
|
|
||||||
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift);
|
|
||||||
|
|
||||||
CustomizeWorkshopEmployeeSettingsCollection.Add(customizeWorkshopEmployeeSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void SetValueObjects(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
||||||
BonusesPay bonusesPay
|
{
|
||||||
, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||||
FineAbsenceDeduction fineAbsenceDeduction,
|
.ToList();
|
||||||
LateToWork lateToWork, EarlyExit earlyExit)
|
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||||
{
|
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||||
FridayPay = new(fridayPay.FridayPayType, fridayPay.Value);
|
irregularShift, workshopShiftStatus, breakTime, false, HolidayWork, newRotatingShifts, employeeWeeklyOffDays);
|
||||||
OverTimePay = new(overTimePay.OverTimePayType, overTimePay.Value);
|
}
|
||||||
BaseYearsPay = new(baseYearsPay.BaseYearsPayType, baseYearsPay.Value, baseYearsPay.PaymentType);
|
|
||||||
BonusesPay = new(bonusesPay.BonusesPayType, bonusesPay.Value, bonusesPay.PaymentType);
|
}
|
||||||
NightWorkPay = new(nightWorkPay.NightWorkingType, nightWorkPay.Value);
|
|
||||||
MarriedAllowance = new(marriedAllowance.MarriedAllowanceType, marriedAllowance.Value);
|
public void AddEmployeeSettingToGroupWithGroupData(long employeeId, long workshopId)
|
||||||
ShiftPay = new(shiftPay.ShiftType, shiftPay.ShiftPayType, shiftPay.Value);
|
{
|
||||||
FamilyAllowance = new(familyAllowance.FamilyAllowanceType, familyAllowance.Value);
|
var shifts = CustomizeWorkshopGroupSettingsShifts
|
||||||
LeavePay = new(leavePay.LeavePayType, leavePay.Value);
|
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||||
InsuranceDeduction = new(insuranceDeduction.InsuranceDeductionType, insuranceDeduction.Value);
|
|
||||||
FineAbsenceDeduction = new(
|
FridayPay fridayPay = new(FridayPay.FridayPayType, FridayPay.Value);
|
||||||
fineAbsenceDeduction.FineAbsenceDeductionType, fineAbsenceDeduction.Value,
|
OverTimePay overTimePay = new(OverTimePay.OverTimePayType, OverTimePay.Value);
|
||||||
fineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
BaseYearsPay baseYearsPay = new(BaseYearsPay.BaseYearsPayType, BaseYearsPay.Value, BaseYearsPay.PaymentType);
|
||||||
.Select(x => new FineAbsenceDayOfWeek(x.DayOfWeek)).ToList()
|
BonusesPay bonusesPay = new(BonusesPay.BonusesPayType, BonusesPay.Value, BonusesPay.PaymentType);
|
||||||
);
|
NightWorkPay nightWorkPay = new(NightWorkPay.NightWorkingType, NightWorkPay.Value);
|
||||||
LateToWork = new(
|
MarriedAllowance marriedAllowance = new(MarriedAllowance.MarriedAllowanceType, MarriedAllowance.Value);
|
||||||
lateToWork.LateToWorkType,
|
ShiftPay shiftPay = new(ShiftType.None, ShiftPayType.None, 0);
|
||||||
lateToWork.LateToWorkTimeFines.Select(x => new LateToWorkTimeFine(x.Minute, x.FineMoney))
|
FamilyAllowance familyAllowance = new(FamilyAllowance.FamilyAllowanceType, FamilyAllowance.Value);
|
||||||
.ToList(), lateToWork.Value
|
LeavePay leavePay = new(LeavePay.LeavePayType, LeavePay.Value);
|
||||||
);
|
InsuranceDeduction insuranceDeduction = new(InsuranceDeduction.InsuranceDeductionType, InsuranceDeduction.Value);
|
||||||
EarlyExit = new(earlyExit.EarlyExitType,
|
FineAbsenceDeduction fineAbsenceDeduction = new(
|
||||||
earlyExit.EarlyExitTimeFines.Select(x => new EarlyExitTimeFine(x.Minute, x.FineMoney))
|
FineAbsenceDeduction.FineAbsenceDeductionType, FineAbsenceDeduction.Value,
|
||||||
.ToList(), earlyExit.Value);
|
FineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
||||||
}
|
.Select(x => new FineAbsenceDayOfWeek(x.DayOfWeek)).ToList()
|
||||||
|
);
|
||||||
|
LateToWork lateToWork = new(
|
||||||
|
LateToWork.LateToWorkType,
|
||||||
|
LateToWork.LateToWorkTimeFines.Select(x => new LateToWorkTimeFine(x.Minute, x.FineMoney))
|
||||||
|
.ToList(), LateToWork.Value
|
||||||
|
);
|
||||||
|
EarlyExit earlyExit = new(EarlyExit.EarlyExitType,
|
||||||
|
EarlyExit.EarlyExitTimeFines.Select(x => new EarlyExitTimeFine(x.Minute, x.FineMoney))
|
||||||
|
.ToList(), EarlyExit.Value);
|
||||||
|
IrregularShift irregularShift = new(IrregularShift.StartTime, IrregularShift.EndTime,
|
||||||
|
IrregularShift.WorkshopIrregularShifts);
|
||||||
|
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 customizeWorkshopEmployeeSettings = new CustomizeWorkshopEmployeeSettings(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||||
|
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||||
|
earlyExit, employeeId, workshopId, Salary, id, shifts, HolidayWork, irregularShift,
|
||||||
|
WorkshopShiftStatus, breakTime, LeavePermittedDays, rotatingShift, weeklyOffDays);
|
||||||
|
|
||||||
|
CustomizeWorkshopEmployeeSettingsCollection.Add(customizeWorkshopEmployeeSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//public void OverWriteEmployeesShiftAndSalary(IEnumerable<long> ids,ICollection<RollCallWorkshopEmployeeSettingsShift> employeeSettingsShifts,double salary)
|
private void SetValueObjects(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||||
//{
|
BonusesPay bonusesPay
|
||||||
// var permittedToOverWrite= RollCallWorkshopEmployeeSettingsCollection.Where(x => ids.Contains(x.id));
|
, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||||
// foreach (var item in permittedToOverWrite)
|
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||||
// {
|
FineAbsenceDeduction fineAbsenceDeduction,
|
||||||
// item.OverWriteSalaryAndShift(employeeSettingsShifts, salary);
|
LateToWork lateToWork, EarlyExit earlyExit)
|
||||||
// }
|
{
|
||||||
//}
|
FridayPay = new(fridayPay.FridayPayType, fridayPay.Value);
|
||||||
|
OverTimePay = new(overTimePay.OverTimePayType, overTimePay.Value);
|
||||||
|
BaseYearsPay = new(baseYearsPay.BaseYearsPayType, baseYearsPay.Value, baseYearsPay.PaymentType);
|
||||||
|
BonusesPay = new(bonusesPay.BonusesPayType, bonusesPay.Value, bonusesPay.PaymentType);
|
||||||
|
NightWorkPay = new(nightWorkPay.NightWorkingType, nightWorkPay.Value);
|
||||||
|
MarriedAllowance = new(marriedAllowance.MarriedAllowanceType, marriedAllowance.Value);
|
||||||
|
ShiftPay = new(shiftPay.ShiftType, shiftPay.ShiftPayType, shiftPay.Value);
|
||||||
|
FamilyAllowance = new(familyAllowance.FamilyAllowanceType, familyAllowance.Value);
|
||||||
|
LeavePay = new(leavePay.LeavePayType, leavePay.Value);
|
||||||
|
InsuranceDeduction = new(insuranceDeduction.InsuranceDeductionType, insuranceDeduction.Value);
|
||||||
|
FineAbsenceDeduction = new(
|
||||||
|
fineAbsenceDeduction.FineAbsenceDeductionType, fineAbsenceDeduction.Value,
|
||||||
|
fineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
||||||
|
.Select(x => new FineAbsenceDayOfWeek(x.DayOfWeek)).ToList()
|
||||||
|
);
|
||||||
|
LateToWork = new(
|
||||||
|
lateToWork.LateToWorkType,
|
||||||
|
lateToWork.LateToWorkTimeFines.Select(x => new LateToWorkTimeFine(x.Minute, x.FineMoney))
|
||||||
|
.ToList(), lateToWork.Value
|
||||||
|
);
|
||||||
|
EarlyExit = new(earlyExit.EarlyExitType,
|
||||||
|
earlyExit.EarlyExitTimeFines.Select(x => new EarlyExitTimeFine(x.Minute, x.FineMoney))
|
||||||
|
.ToList(), earlyExit.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public void OverWriteEmployeesShiftAndSalary(IEnumerable<long> ids,ICollection<RollCallWorkshopEmployeeSettingsShift> employeeSettingsShifts,double salary)
|
||||||
|
//{
|
||||||
|
// var permittedToOverWrite= RollCallWorkshopEmployeeSettingsCollection.Where(x => ids.Contains(x.id));
|
||||||
|
// foreach (var item in permittedToOverWrite)
|
||||||
|
// {
|
||||||
|
// item.OverWriteSalaryAndShift(employeeSettingsShifts, salary);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,15 +11,17 @@ 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,13 +54,31 @@ namespace Company.Domain.EmployeeComputeOptionsAgg
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SignCheckout { get; private set; }
|
public bool SignCheckout { get; private set; }
|
||||||
|
|
||||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
/// <summary>
|
||||||
bool signCheckout)
|
/// مدت قرارداد
|
||||||
|
/// </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,
|
||||||
|
bool signCheckout, string contractTerm, IsActive cutContractEndOfYear)
|
||||||
{
|
{
|
||||||
ComputeOptions = computeOptions;
|
ComputeOptions = computeOptions;
|
||||||
BonusesOptions = bonusesOptions;
|
BonusesOptions = bonusesOptions;
|
||||||
YearsOptions = yearsOptions;
|
YearsOptions = yearsOptions;
|
||||||
SetContractAndCheckoutOptions(createContract, signContract, createCheckout, signCheckout);
|
|
||||||
|
ContractTerm = contractTerm;
|
||||||
|
CutContractEndOfYear = contractTerm == "1" ? IsActive.None : cutContractEndOfYear;
|
||||||
|
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>
|
||||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||||
|
|||||||
@@ -77,23 +77,13 @@ public class Workshop : EntityBase
|
|||||||
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//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,7 +132,9 @@ public class Workshop : EntityBase
|
|||||||
CreateCheckout = createCheckout;
|
CreateCheckout = createCheckout;
|
||||||
SignCheckout = signCheckout;
|
SignCheckout = signCheckout;
|
||||||
CutContractEndOfYear = cutContractEndOfYear;
|
CutContractEndOfYear = cutContractEndOfYear;
|
||||||
}
|
RotatingShiftCompute = rotatingShiftCompute;
|
||||||
|
IsStaticCheckout = isStaticCheckout;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public string WorkshopName { get; private set; }
|
public string WorkshopName { get; private set; }
|
||||||
@@ -231,7 +223,17 @@ 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; }
|
||||||
|
|
||||||
public Workshop()
|
/// <summary>
|
||||||
|
/// محاسبه نوبت کاری در فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public bool RotatingShiftCompute { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تصفیه حساب بصورت استاتیک محاصبه شود
|
||||||
|
/// </summary>
|
||||||
|
public bool IsStaticCheckout { get; private set; }
|
||||||
|
|
||||||
|
public Workshop()
|
||||||
{
|
{
|
||||||
RollCallServicesList = new List<RollCallService>();
|
RollCallServicesList = new List<RollCallService>();
|
||||||
CustomizeCheckouts = new List<CustomizeCheckout>();
|
CustomizeCheckouts = new List<CustomizeCheckout>();
|
||||||
@@ -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,7 +310,9 @@ public class Workshop : EntityBase
|
|||||||
CreateCheckout = createCheckout;
|
CreateCheckout = createCheckout;
|
||||||
SignCheckout = signCheckout;
|
SignCheckout = signCheckout;
|
||||||
CutContractEndOfYear = cutContractEndOfYear;
|
CutContractEndOfYear = cutContractEndOfYear;
|
||||||
}
|
RotatingShiftCompute = rotatingShiftCompute;
|
||||||
|
IsStaticCheckout = isStaticCheckout;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Active(string archiveCode)
|
public void Active(string archiveCode)
|
||||||
|
|||||||
@@ -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,17 +73,19 @@ 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 long Id { get; set; }
|
public List<DayOfWeek> WeeklyOffDays { 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; }
|
||||||
public string EmployeeFullName { get; set; }
|
public string EmployeeFullName { 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,9 +386,17 @@ public class CheckoutApplication : ICheckoutApplication
|
|||||||
contractEnd);
|
contractEnd);
|
||||||
|
|
||||||
}
|
}
|
||||||
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
|
||||||
{
|
public Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel)
|
||||||
var result = new List<CheckoutViewModel>();
|
{
|
||||||
|
return _checkoutRepository.SearchCheckoutOptimized(searchModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
||||||
|
{
|
||||||
|
var watch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
|
watch.Start();
|
||||||
|
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()
|
||||||
{
|
{
|
||||||
@@ -415,22 +423,22 @@ public class CheckoutApplication : ICheckoutApplication
|
|||||||
EmployerName = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.EmployerFullName,
|
EmployerName = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.EmployerFullName,
|
||||||
IsBlockCantracingParty = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.IsBlockContractingParty,
|
IsBlockCantracingParty = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.IsBlockContractingParty,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
//foreach (var items in query)
|
//foreach (var items in query)
|
||||||
//{
|
//{
|
||||||
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
||||||
// if (s != null)
|
// if (s != null)
|
||||||
// {
|
// {
|
||||||
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
||||||
// }
|
// }
|
||||||
// result.Add(items);
|
// result.Add(items);
|
||||||
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
||||||
// // .Select(x => x.EmployerId).FirstOrDefault();
|
// // .Select(x => x.EmployerId).FirstOrDefault();
|
||||||
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
||||||
// // = 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();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -197,6 +197,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|||||||
return opration.Failed("کد ملی وارد شده تکراری است");
|
return opration.Failed("کد ملی وارد شده تکراری است");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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,8 +21,16 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
|||||||
|
|
||||||
public OperationResult Create(CreateEmployeeComputeOptions command)
|
public OperationResult Create(CreateEmployeeComputeOptions command)
|
||||||
{
|
{
|
||||||
|
|
||||||
var opration = new OperationResult();
|
var opration = new OperationResult();
|
||||||
try
|
if (command.CreateContract && command.ContractTerm != "1" && command.CutContractEndOfYear == IsActive.None)
|
||||||
|
return opration.Failed("لطفا تعیین کنید که قراداد منتهی به پایان سال یاشد یا نباشد");
|
||||||
|
|
||||||
|
if (command.ContractTerm == "1")
|
||||||
|
command.CutContractEndOfYear = IsActive.None;
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (_employeeComputeOptionsRepository.Exists(x =>
|
if (_employeeComputeOptionsRepository.Exists(x =>
|
||||||
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId))
|
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId))
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -512,13 +512,13 @@ public class InsuranceListApplication : IInsuranceListApplication
|
|||||||
monthlyBenefits = GetRoundValue(monthlyBenefits += overTimePay);
|
monthlyBenefits = GetRoundValue(monthlyBenefits += overTimePay);
|
||||||
}
|
}
|
||||||
|
|
||||||
//سرای ملک
|
//سرای ملک
|
||||||
// نوشین خالی
|
// نرجس خالی
|
||||||
// 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);
|
||||||
//محاسبه جمع مزایای مشمول و دستمزد ماهانه
|
//محاسبه جمع مزایای مشمول و دستمزد ماهانه
|
||||||
var benefitsIncludedContinuous = monthlyBenefits + monthlySalary;
|
var benefitsIncludedContinuous = monthlyBenefits + monthlySalary;
|
||||||
|
|||||||
@@ -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());
|
||||||
@@ -156,7 +157,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
|||||||
account = _personalContractingPartyRepository.GetAccountByPersonalContractingParty(institutionContract.ContractingPartyId);
|
account = _personalContractingPartyRepository.GetAccountByPersonalContractingParty(institutionContract.ContractingPartyId);
|
||||||
if(account == null || account.ClientAreaPermission != "true")
|
if(account == null || account.ClientAreaPermission != "true")
|
||||||
return operation.Failed("بدلیل نداشتن حساب کاربری کلاینت نمیتوانید سرویس حضور غیاب را فعال کنید");
|
return operation.Failed("بدلیل نداشتن حساب کاربری کلاینت نمیتوانید سرویس حضور غیاب را فعال کنید");
|
||||||
|
|
||||||
}
|
}
|
||||||
var workshop = new Workshop(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode,
|
var workshop = new Workshop(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode,
|
||||||
command.TypeOfOwnership,
|
command.TypeOfOwnership,
|
||||||
@@ -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,9 +282,11 @@ 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")
|
||||||
{
|
{
|
||||||
|
|
||||||
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
||||||
if (institutionContract == null)
|
if (institutionContract == null)
|
||||||
return operation.Failed("بدلیل نداشتن قرار داد مالی نمیتوانید سرویس حضور غیاب را فعال کنید");
|
return operation.Failed("بدلیل نداشتن قرار داد مالی نمیتوانید سرویس حضور غیاب را فعال کنید");
|
||||||
@@ -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,7 +228,14 @@ public class CustomizeWorkshopEmployeeSettingsMapping : IEntityTypeConfiguration
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,15 @@ public class CustomizeWorkshopGroupSettingsMapping : IEntityTypeConfiguration<Cu
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.OwnsMany(x => x.CustomizeRotatingShifts);
|
|
||||||
|
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.HasOne(x => x.CustomizeWorkshopSettings).WithMany(x => x.CustomizeWorkshopGroupSettingsCollection)
|
builder.HasOne(x => x.CustomizeWorkshopSettings).WithMany(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||||
|
|||||||
@@ -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");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,332 +18,449 @@ namespace CompanyManagment.EFCore.Repository;
|
|||||||
|
|
||||||
public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyOverview>, IAdminMonthlyOverviewRepository
|
public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyOverview>, IAdminMonthlyOverviewRepository
|
||||||
{
|
{
|
||||||
private readonly CompanyContext _companyContext;
|
private readonly CompanyContext _companyContext;
|
||||||
private readonly AccountContext _accountContext;
|
private readonly AccountContext _accountContext;
|
||||||
public AdminMonthlyOverviewRepository(CompanyContext companyContext, AccountContext accountContext) : base(companyContext)
|
public AdminMonthlyOverviewRepository(CompanyContext companyContext, AccountContext accountContext) : base(companyContext)
|
||||||
{
|
{
|
||||||
_companyContext = companyContext;
|
_companyContext = companyContext;
|
||||||
_accountContext = accountContext;
|
_accountContext = accountContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<AdminMonthlyOverviewListViewModel>> GetWorkshopStatus(AdminMonthlyOverviewSearchModel searchModel)
|
public async Task<List<AdminMonthlyOverviewListViewModel>> GetWorkshopStatus(AdminMonthlyOverviewSearchModel searchModel)
|
||||||
{
|
{
|
||||||
|
|
||||||
var year = searchModel.Year;
|
var year = searchModel.Year;
|
||||||
var month = searchModel.Month;
|
var month = searchModel.Month;
|
||||||
var accountId = searchModel.AdminAccountId;
|
var accountId = searchModel.AdminAccountId;
|
||||||
// اگر تبدیل تاریخ به میلادی موفق نبود، لیست خالی برگردان
|
// اگر تبدیل تاریخ به میلادی موفق نبود، لیست خالی برگردان
|
||||||
if ($"{year:0000}/{month:00}/01".TryToGeorgianDateTime(out var targetStartDate) == false)
|
if ($"{year:0000}/{month:00}/01".TryToGeorgianDateTime(out var targetStartDate) == false)
|
||||||
return [];
|
return [];
|
||||||
var targetEndDate = Tools.FindeEndOfMonth(targetStartDate.ToFarsi()).ToGeorgianDateTime();
|
var targetEndDate = Tools.FindeEndOfMonth(targetStartDate.ToFarsi()).ToGeorgianDateTime();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_ = $"{year:0000}/{month:00}/01".ToGeorgianDateTime().AddMonthsFa(1, out var nextFirstMonth);
|
_ = $"{year:0000}/{month:00}/01".ToGeorgianDateTime().AddMonthsFa(1, out var nextFirstMonth);
|
||||||
var nextEndMonth = Tools.FindeEndOfMonth(nextFirstMonth.ToFarsi()).ToGeorgianDateTime();
|
var nextEndMonth = Tools.FindeEndOfMonth(nextFirstMonth.ToFarsi()).ToGeorgianDateTime();
|
||||||
|
|
||||||
|
|
||||||
// دریافت اطلاعات ادمین
|
// دریافت اطلاعات ادمین
|
||||||
var adminAccount = await _accountContext.Accounts.FirstOrDefaultAsync(x => x.id == searchModel.AdminAccountId);
|
var adminAccount = await _accountContext.Accounts.FirstOrDefaultAsync(x => x.id == searchModel.AdminAccountId);
|
||||||
|
|
||||||
// اگر ادمین پیدا نشد، لیست خالی برگردان
|
// اگر ادمین پیدا نشد، لیست خالی برگردان
|
||||||
if (adminAccount == null)
|
if (adminAccount == null)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
// دریافت طرف حساب های معتبر برای تاریخ مورد نظر
|
// دریافت طرف حساب های معتبر برای تاریخ مورد نظر
|
||||||
var contractingPartyIds = _companyContext.InstitutionContractSet.AsNoTracking()
|
var contractingPartyIds = _companyContext.InstitutionContractSet.AsNoTracking()
|
||||||
.Where(c => c.ContractStartGr <= targetEndDate && c.ContractEndGr >= targetStartDate)
|
.Where(c => c.ContractStartGr <= targetEndDate && c.ContractEndGr >= targetStartDate)
|
||||||
.Select(c => c.ContractingPartyId);
|
.Select(c => c.ContractingPartyId);
|
||||||
|
|
||||||
// دریافت کارگاههای مرتبط با اکانت
|
// دریافت کارگاههای مرتبط با اکانت
|
||||||
|
|
||||||
var workshopAccounts = _companyContext.WorkshopAccounts
|
var workshopAccounts = _companyContext.WorkshopAccounts
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.Where(w => w.AccountId == accountId)
|
.Where(w => w.AccountId == accountId)
|
||||||
.Select(w => w.WorkshopId).ToList();
|
.Select(w => w.WorkshopId).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var workshopsHasLeftWorkEmployees = _companyContext.LeftWorkList.Where(x =>
|
var workshopsHasLeftWorkEmployees = _companyContext.LeftWorkList.Where(x =>
|
||||||
((x.StartWorkDate <= targetEndDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate)
|
((x.StartWorkDate <= targetEndDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate)
|
||||||
|| (x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextFirstMonth)) && workshopAccounts.Contains(x.WorkshopId)).Select(x => x.WorkshopId);
|
|| (x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextFirstMonth)) && workshopAccounts.Contains(x.WorkshopId)).Select(x => x.WorkshopId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// دریافت کارگاههای مربوط به طرف حساب و اکانت
|
// دریافت کارگاههای مربوط به طرف حساب و اکانت
|
||||||
// Replace the selected code with the following to return a list of anonymous objects containing both workshop and contractingParty
|
// Replace the selected code with the following to return a list of anonymous objects containing both workshop and contractingParty
|
||||||
var workshopsWithContractingParty = await _companyContext.Workshops
|
var workshopsWithContractingParty = await _companyContext.Workshops
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.Where(w => workshopsHasLeftWorkEmployees.Contains(w.id) && w.IsActive)
|
.Where(w => workshopsHasLeftWorkEmployees.Contains(w.id) && w.IsActive)
|
||||||
.Include(w => w.WorkshopEmployers)
|
.Include(w => w.WorkshopEmployers)
|
||||||
.ThenInclude(we => we.Employer)
|
.ThenInclude(we => we.Employer)
|
||||||
.ThenInclude(e => e.ContractingParty).AsSplitQuery().
|
.ThenInclude(e => e.ContractingParty).AsSplitQuery().
|
||||||
Where(w => w.WorkshopEmployers.Any(we =>
|
Where(w => w.WorkshopEmployers.Any(we =>
|
||||||
we.Employer != null &&
|
we.Employer != null &&
|
||||||
contractingPartyIds.Contains(we.Employer.ContractingPartyId)))
|
contractingPartyIds.Contains(we.Employer.ContractingPartyId)))
|
||||||
.Select(w => new
|
.Select(w => new
|
||||||
{
|
{
|
||||||
Workshop = w,
|
Workshop = w,
|
||||||
ContractingParty = w.WorkshopEmployers
|
ContractingParty = w.WorkshopEmployers
|
||||||
.Where(we => we.Employer != null && contractingPartyIds.Contains(we.Employer.ContractingPartyId))
|
.Where(we => we.Employer != null && contractingPartyIds.Contains(we.Employer.ContractingPartyId))
|
||||||
.Select(we => we.Employer.ContractingParty)
|
.Select(we => we.Employer.ContractingParty)
|
||||||
.FirstOrDefault()
|
.FirstOrDefault()
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
var workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||||
|
|
||||||
|
|
||||||
// پیدا کردن کارگاههایی که قبلاً برای این ماه/سال AdminMonthlyOverview دارند
|
// پیدا کردن کارگاههایی که قبلاً برای این ماه/سال AdminMonthlyOverview دارند
|
||||||
var adminMonthlyOverviewWorkshopIds = await _companyContext.AdminMonthlyOverviews
|
var adminMonthlyOverviewWorkshopIds = await _companyContext.AdminMonthlyOverviews
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year)
|
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year)
|
||||||
.Select(x => x.WorkshopId)
|
.Select(x => x.WorkshopId)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
// پیدا کردن کارگاههایی که نیاز به ایجاد AdminMonthlyOverview جدید دارند
|
// پیدا کردن کارگاههایی که نیاز به ایجاد AdminMonthlyOverview جدید دارند
|
||||||
var notExistAdminMonthlyReviewsWorkshopIds = workshopIds
|
var notExistAdminMonthlyReviewsWorkshopIds = workshopIds
|
||||||
.Except(adminMonthlyOverviewWorkshopIds)
|
.Except(adminMonthlyOverviewWorkshopIds)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ایجاد رکوردهای AdminMonthlyOverview که وجود ندارند
|
// ایجاد رکوردهای AdminMonthlyOverview که وجود ندارند
|
||||||
if (notExistAdminMonthlyReviewsWorkshopIds.Any())
|
if (notExistAdminMonthlyReviewsWorkshopIds.Any())
|
||||||
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)
|
||||||
{
|
{
|
||||||
var isBlock = searchModel.ActivationStatus == IsActive.True ? "false" : "true";
|
var isBlock = searchModel.ActivationStatus == IsActive.True ? "false" : "true";
|
||||||
|
|
||||||
workshopsWithContractingParty = workshopsWithContractingParty
|
workshopsWithContractingParty = workshopsWithContractingParty
|
||||||
.Where(x => x.ContractingParty?.IsBlock == isBlock).ToList();
|
.Where(x => x.ContractingParty?.IsBlock == isBlock).ToList();
|
||||||
|
|
||||||
workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// دریافت همه AdminMonthlyOverview برای این کارگاهها/ماه/سال
|
// دریافت همه AdminMonthlyOverview برای این کارگاهها/ماه/سال
|
||||||
var adminMonthlyOverviewsQuery = _companyContext.AdminMonthlyOverviews
|
var adminMonthlyOverviewsQuery = _companyContext.AdminMonthlyOverviews
|
||||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year);
|
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year);
|
||||||
|
|
||||||
if (searchModel.WorkshopId > 0)
|
if (searchModel.WorkshopId > 0)
|
||||||
{
|
{
|
||||||
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => x.WorkshopId == searchModel.WorkshopId);
|
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => x.WorkshopId == searchModel.WorkshopId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchModel.EmployerId > 0)
|
if (searchModel.EmployerId > 0)
|
||||||
{
|
{
|
||||||
var searchWorkshopId = workshopsWithContractingParty.Where(x => x.Workshop.WorkshopEmployers.Any(e => e.EmployerId == searchModel.EmployerId)).Select(x => x.Workshop.id).ToList();
|
var searchWorkshopId = workshopsWithContractingParty.Where(x => x.Workshop.WorkshopEmployers.Any(e => e.EmployerId == searchModel.EmployerId)).Select(x => x.Workshop.id).ToList();
|
||||||
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => searchWorkshopId.Contains(x.WorkshopId));
|
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => searchWorkshopId.Contains(x.WorkshopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
var employeeCheckoutCounts = _companyContext.LeftWorkList.Where(x =>
|
var employeeCheckoutCounts = _companyContext.LeftWorkList.Where(x =>
|
||||||
x.StartWorkDate <= targetStartDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
x.StartWorkDate <= targetStartDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
||||||
.GroupBy(x => x.WorkshopId).Select(x => new { EmployeeCounts = x.Count(), WorkshopId = x.Key }).ToList();
|
.GroupBy(x => x.WorkshopId).Select(x => new { EmployeeCounts = x.Count(), WorkshopId = x.Key }).ToList();
|
||||||
|
|
||||||
var employeeContractCounts = _companyContext.LeftWorkList.Where(x =>
|
var employeeContractCounts = _companyContext.LeftWorkList.Where(x =>
|
||||||
x.StartWorkDate <= nextFirstMonth && x.LeftWorkDate.AddDays(-1) >= nextFirstMonth && workshopIds.Contains(x.WorkshopId))
|
x.StartWorkDate <= nextFirstMonth && x.LeftWorkDate.AddDays(-1) >= nextFirstMonth && workshopIds.Contains(x.WorkshopId))
|
||||||
.GroupBy(x => x.WorkshopId).Select(x => new { EmployeeCounts = x.Count(), WorkshopId = x.Key }).ToList();
|
.GroupBy(x => x.WorkshopId).Select(x => new { EmployeeCounts = x.Count(), WorkshopId = x.Key }).ToList();
|
||||||
|
|
||||||
var adminMonthlyOverviewsList = await adminMonthlyOverviewsQuery.ToListAsync();
|
var adminMonthlyOverviewsList = await adminMonthlyOverviewsQuery.ToListAsync();
|
||||||
|
|
||||||
var now = DateTime.Today;
|
var now = DateTime.Today;
|
||||||
//پرسنل ادمین اجرایی
|
//پرسنل ادمین اجرایی
|
||||||
var operatorAdminAccounts = _accountContext.AccountLeftWorks
|
var operatorAdminAccounts = _accountContext.AccountLeftWorks
|
||||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkGr <= now && x.LeftWorkGr >= now &&
|
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkGr <= now && x.LeftWorkGr >= now &&
|
||||||
x.RoleId == 5).Select(x => new { x.WorkshopId, x.AccountId })
|
x.RoleId == 5).Select(x => new { x.WorkshopId, x.AccountId })
|
||||||
.Join(_accountContext.Accounts,
|
.Join(_accountContext.Accounts,
|
||||||
x => x.AccountId,
|
x => x.AccountId,
|
||||||
account => account.id, (x, account) => new
|
account => account.id, (x, account) => new
|
||||||
{
|
{
|
||||||
x.WorkshopId,
|
x.WorkshopId,
|
||||||
account.Fullname
|
account.Fullname
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var adminMonthlyOverviewList = adminMonthlyOverviewsList.Select(x =>
|
var adminMonthlyOverviewList = adminMonthlyOverviewsList.Select(x =>
|
||||||
{
|
{
|
||||||
var employeeCheckoutCount = employeeCheckoutCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
var employeeCheckoutCount = employeeCheckoutCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||||
var employeeContractCount = employeeContractCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
var employeeContractCount = employeeContractCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||||
var workshopWithContractingParty =
|
var workshopWithContractingParty =
|
||||||
workshopsWithContractingParty.FirstOrDefault(w => w.Workshop.id == x.WorkshopId);
|
workshopsWithContractingParty.FirstOrDefault(w => w.Workshop.id == x.WorkshopId);
|
||||||
|
|
||||||
var operatorAccount = operatorAdminAccounts.FirstOrDefault(o => o.WorkshopId == x.WorkshopId);
|
var operatorAccount = operatorAdminAccounts.FirstOrDefault(o => o.WorkshopId == x.WorkshopId);
|
||||||
|
|
||||||
var workshop = workshopWithContractingParty?.Workshop;
|
var workshop = workshopWithContractingParty?.Workshop;
|
||||||
var contractingParty = workshopWithContractingParty?.ContractingParty;
|
var contractingParty = workshopWithContractingParty?.ContractingParty;
|
||||||
var employer = workshop?.WorkshopEmployers.FirstOrDefault()?.Employer;
|
var employer = workshop?.WorkshopEmployers.FirstOrDefault()?.Employer;
|
||||||
return new AdminMonthlyOverviewListViewModel
|
return new AdminMonthlyOverviewListViewModel
|
||||||
{
|
{
|
||||||
WorkshopId = x.WorkshopId,
|
WorkshopId = x.WorkshopId,
|
||||||
Status = x.Status,
|
Status = x.Status,
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
WorkshopName = workshop?.WorkshopFullName ?? "",
|
WorkshopName = workshop?.WorkshopFullName ?? "",
|
||||||
WorkshopArchiveCode = workshop?.ArchiveCode ?? "",
|
WorkshopArchiveCode = workshop?.ArchiveCode ?? "",
|
||||||
WorkshopArchiveCodeInt = workshop?.ArchiveCode.ExtractIntNumbers() ?? 0,
|
WorkshopArchiveCodeInt = workshop?.ArchiveCode.ExtractIntNumbers() ?? 0,
|
||||||
Address = workshop?.Address ?? "",
|
Address = workshop?.Address ?? "",
|
||||||
City = workshop?.City ?? "",
|
City = workshop?.City ?? "",
|
||||||
Province = workshop?.State ?? "",
|
Province = workshop?.State ?? "",
|
||||||
EmployerName = employer?.FullName ?? "",
|
EmployerName = employer?.FullName ?? "",
|
||||||
EmployerPhoneNumber = employer?.Phone ?? "",
|
EmployerPhoneNumber = employer?.Phone ?? "",
|
||||||
AdminFullName = operatorAccount?.Fullname ?? "",
|
AdminFullName = operatorAccount?.Fullname ?? "",
|
||||||
CheckoutEmployeeCount = employeeCheckoutCount?.EmployeeCounts ?? 0,
|
CheckoutEmployeeCount = employeeCheckoutCount?.EmployeeCounts ?? 0,
|
||||||
ContractEmployeeCount = employeeContractCount?.EmployeeCounts ?? 0,
|
ContractEmployeeCount = employeeContractCount?.EmployeeCounts ?? 0,
|
||||||
AgentPhoneNumber = "",
|
AgentPhoneNumber = "",
|
||||||
IsBlock = contractingParty?.IsBlock == "true"
|
IsBlock = contractingParty?.IsBlock == "true"
|
||||||
};
|
};
|
||||||
}).OrderBy(x => x.IsBlock).ThenBy(x => x.WorkshopArchiveCodeInt).ToList();
|
}).OrderBy(x => x.IsBlock).ThenBy(x => x.WorkshopArchiveCodeInt).ToList();
|
||||||
|
|
||||||
|
|
||||||
return adminMonthlyOverviewList;
|
return adminMonthlyOverviewList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<AdminMonthlyOverViewCounterVm> GetCounter(int year, int month, long accountId)
|
public async Task<AdminMonthlyOverViewCounterVm> GetCounter(int year, int month, long accountId)
|
||||||
{
|
{
|
||||||
var searchModel = new AdminMonthlyOverviewSearchModel()
|
var searchModel = new AdminMonthlyOverviewSearchModel()
|
||||||
{
|
{
|
||||||
AdminAccountId = accountId,
|
AdminAccountId = accountId,
|
||||||
Month = month,
|
Month = month,
|
||||||
Year = year
|
Year = year
|
||||||
};
|
};
|
||||||
var list = await GetWorkshopStatus(searchModel);
|
var list = await GetWorkshopStatus(searchModel);
|
||||||
|
|
||||||
var allCount = list.Count;
|
var allCount = list.Count;
|
||||||
var archivedCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.Archived);
|
var archivedCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.Archived);
|
||||||
var createDocCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.CreateDocuments);
|
var createDocCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.CreateDocuments);
|
||||||
var visitCompleteCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitCompleted);
|
var visitCompleteCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitCompleted);
|
||||||
var visitInProgressCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitInProgress);
|
var visitInProgressCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitInProgress);
|
||||||
var visitPendingCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitPending);
|
var visitPendingCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitPending);
|
||||||
|
|
||||||
return new AdminMonthlyOverViewCounterVm
|
return new AdminMonthlyOverViewCounterVm
|
||||||
{
|
{
|
||||||
All = allCount,
|
All = allCount,
|
||||||
Archived = archivedCount,
|
Archived = archivedCount,
|
||||||
VisitPending = visitPendingCount,
|
VisitPending = visitPendingCount,
|
||||||
VisitInProgress = visitInProgressCount,
|
VisitInProgress = visitInProgressCount,
|
||||||
VisitCompleted = visitCompleteCount,
|
VisitCompleted = visitCompleteCount,
|
||||||
CreateDocument = createDocCount
|
CreateDocument = createDocCount
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 = _companyContext.LeftWorkList.AsNoTracking()
|
|
||||||
.Join(
|
var workingCheckoutEmployeeIds = GetWorkingCheckoutEmployeeIds(workshopIds, targetStartDate, targetEndDate, vipGroup);
|
||||||
_companyContext.Contracts.AsNoTracking(),
|
//var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
// .Join(
|
||||||
contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
// _companyContext.Contracts.AsNoTracking(),
|
||||||
(leftWork, contract) => new { leftWork, contract }
|
// leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
||||||
)
|
// contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
||||||
.Where(x =>
|
// (leftWork, contract) => new { leftWork, contract }
|
||||||
workshopIds.Contains(x.leftWork.WorkshopId) &&
|
// )
|
||||||
x.leftWork.StartWorkDate <= targetEndDate &&
|
// .Where(x =>
|
||||||
x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
// workshopIds.Contains(x.leftWork.WorkshopId) &&
|
||||||
x.contract.ContarctStart <= targetEndDate &&
|
// x.leftWork.StartWorkDate <= targetEndDate &&
|
||||||
x.contract.ContractEnd >= targetStartDate &&
|
// x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||||
!vipGroup.Contains(x.leftWork.EmployeeId) &&
|
// x.contract.ContarctStart <= targetEndDate &&
|
||||||
!_companyContext.EmployeeClientTemps
|
// x.contract.ContractEnd >= targetStartDate &&
|
||||||
.Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
// !vipGroup.Contains(x.leftWork.EmployeeId) &&
|
||||||
)
|
// !_companyContext.EmployeeClientTemps
|
||||||
.Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
// .Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
||||||
|
// )
|
||||||
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
// .Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
||||||
.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)
|
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
).Select(x => new { x.WorkshopId, x.EmployeeId });
|
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||||
|
!vipGroup.Contains(x.EmployeeId) &&
|
||||||
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
!_companyContext.EmployeeClientTemps
|
||||||
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
.Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId))
|
||||||
.Select(x => new { x.WorkshopIds, x.EmployeeId })
|
.GroupJoin(_companyContext.EmployeeComputeOptionsSet.Where(o => workshopIds.Contains(o.WorkshopId)),
|
||||||
.ToListAsync())
|
x => new { x.EmployeeId, x.WorkshopId },
|
||||||
.Select(x => (x.WorkshopIds, x.EmployeeId))
|
option => new { option.EmployeeId, option.WorkshopId },
|
||||||
.ToHashSet();
|
(x, options) => new { LeftWork = x, options })
|
||||||
|
.SelectMany(
|
||||||
var checkoutSet = (await _companyContext.CheckoutSet.AsNoTracking()
|
x => x.options.DefaultIfEmpty(),
|
||||||
.Where(x => x.ContractStart <= targetEndDate && x.ContractEnd >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
(x, option) => new { x.LeftWork, option })
|
||||||
.Select(x => new { x.WorkshopId, x.EmployeeId })
|
.Where(x => x.option != null ? x.option.CreateContract
|
||||||
.ToListAsync())
|
: x.LeftWork.Workshop.CreateContract)
|
||||||
.Select(x => (x.WorkshopId, x.EmployeeId))
|
.Select(x => new { x.LeftWork.WorkshopId, x.LeftWork.EmployeeId });
|
||||||
.ToHashSet();
|
|
||||||
|
|
||||||
var workingCheckoutGrouping = workingCheckoutEmployeeIds.GroupBy(x => x.WorkshopId).ToList();
|
//var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||||
|
// .Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||||
var workingContractGrouping = workingContractEmployeeIds.GroupBy(x => x.WorkshopId).Select(x => new
|
// !vipGroup.Contains(x.EmployeeId) &&
|
||||||
{
|
// !_companyContext.EmployeeClientTemps
|
||||||
WorkshopId = x.Key,
|
// .Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId)
|
||||||
Data = x.ToList()
|
// ).Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||||
}).ToList();
|
|
||||||
|
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
||||||
var workshopsWithFullContracts = workingContractGrouping
|
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
||||||
.Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
.Select(x => new { x.WorkshopIds, x.EmployeeId })
|
||||||
.Select(g => g.WorkshopId)
|
.ToListAsync())
|
||||||
.ToList();
|
.Select(x => (x.WorkshopIds, x.EmployeeId))
|
||||||
|
.ToHashSet();
|
||||||
var list = workingContractEmployeeIds.ToList().Where(x=>!contractSet.Any(a=>a.EmployeeId== x.EmployeeId&&a.WorkshopIds == x.WorkshopId)).ToList();
|
|
||||||
|
var checkoutSet = (await _companyContext.CheckoutSet.AsNoTracking()
|
||||||
var workshopsWithFullCheckout = workingCheckoutGrouping
|
.Where(x => x.ContractStart <= targetEndDate && x.ContractEnd >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
||||||
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
.Select(x => new { x.WorkshopId, x.EmployeeId })
|
||||||
.Select(g => g.Key)
|
.ToListAsync())
|
||||||
.ToList();
|
.Select(x => (x.WorkshopId, x.EmployeeId))
|
||||||
|
.ToHashSet();
|
||||||
|
|
||||||
var fullyCoveredWorkshops = workshopsWithFullContracts.Intersect(workshopsWithFullCheckout).ToList();
|
var workingCheckoutGrouping = workingCheckoutEmployeeIds.GroupBy(x => x.WorkshopId).ToList();
|
||||||
|
|
||||||
//var notFullyCoveredWorkshops = groupedCheckout
|
var workingContractGrouping = workingContractEmployeeIds.GroupBy(x => x.WorkshopId).Select(x => new
|
||||||
// .Where(g => g.Any(emp =>
|
{
|
||||||
// !contractSet.Contains((emp.WorkshopId, emp.EmployeeId)) ||
|
WorkshopId = x.Key,
|
||||||
// !checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
Data = x.ToList()
|
||||||
// .Select(g => g.Key)
|
}).ToList();
|
||||||
// .ToList();
|
|
||||||
|
var workshopsWithFullContracts = workingContractGrouping
|
||||||
var notFullyCoveredWorkshops = workshopIds.Except(fullyCoveredWorkshops);
|
.Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||||
|
.Select(g => g.WorkshopId)
|
||||||
var adminMonthlyOverviews = _companyContext.AdminMonthlyOverviews
|
.ToList();
|
||||||
.Where(x => x.Month == month && x.Year == year);
|
|
||||||
|
var list = workingContractEmployeeIds.ToList().Where(x => !contractSet.Any(a => a.EmployeeId == x.EmployeeId && a.WorkshopIds == x.WorkshopId)).ToList();
|
||||||
var adminMonthlyOverviewsWithFullContracts = await adminMonthlyOverviews
|
|
||||||
.Where(x => fullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status == AdminMonthlyOverviewStatus.CreateDocuments)
|
var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||||
.ToListAsync();
|
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||||
|
.Select(g => g.Key)
|
||||||
var adminMonthlyOverviewsWithNotFullContracts = await adminMonthlyOverviews
|
.ToList();
|
||||||
.Where(x => notFullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status != AdminMonthlyOverviewStatus.CreateDocuments)
|
|
||||||
.ToListAsync();
|
|
||||||
|
var fullyCoveredWorkshops = workshopsWithFullContracts.Intersect(workshopsWithFullCheckout).ToList();
|
||||||
foreach (var adminMonthlyOverview in adminMonthlyOverviewsWithFullContracts)
|
|
||||||
adminMonthlyOverview.SetStatus(AdminMonthlyOverviewStatus.VisitPending);
|
//var notFullyCoveredWorkshops = groupedCheckout
|
||||||
|
// .Where(g => g.Any(emp =>
|
||||||
foreach (var adminMonthlyOverview in adminMonthlyOverviewsWithNotFullContracts)
|
// !contractSet.Contains((emp.WorkshopId, emp.EmployeeId)) ||
|
||||||
adminMonthlyOverview.SetStatus(AdminMonthlyOverviewStatus.CreateDocuments);
|
// !checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||||
|
// .Select(g => g.Key)
|
||||||
await _companyContext.SaveChangesAsync();
|
// .ToList();
|
||||||
}
|
|
||||||
|
var notFullyCoveredWorkshops = workshopIds.Except(fullyCoveredWorkshops);
|
||||||
private async Task CreateRangeAdminMonthlyOverview(List<long> workshopIds, int month, int year)
|
|
||||||
{
|
var adminMonthlyOverviews = _companyContext.AdminMonthlyOverviews
|
||||||
foreach (var workshopId in workshopIds)
|
.Where(x => x.Month == month && x.Year == year);
|
||||||
{
|
|
||||||
var adminMonthlyOverview =
|
var adminMonthlyOverviewsWithFullContracts = await adminMonthlyOverviews
|
||||||
new AdminMonthlyOverview(workshopId, month, year, AdminMonthlyOverviewStatus.CreateDocuments);
|
.Where(x => fullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status == AdminMonthlyOverviewStatus.CreateDocuments)
|
||||||
await _companyContext.AddAsync(adminMonthlyOverview);
|
.ToListAsync();
|
||||||
}
|
|
||||||
|
var adminMonthlyOverviewsWithNotFullContracts = await adminMonthlyOverviews
|
||||||
await _companyContext.SaveChangesAsync();
|
.Where(x => notFullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status != AdminMonthlyOverviewStatus.CreateDocuments)
|
||||||
}
|
.ToListAsync();
|
||||||
|
|
||||||
|
foreach (var adminMonthlyOverview in adminMonthlyOverviewsWithFullContracts)
|
||||||
|
adminMonthlyOverview.SetStatus(AdminMonthlyOverviewStatus.VisitPending);
|
||||||
|
|
||||||
|
foreach (var adminMonthlyOverview in adminMonthlyOverviewsWithNotFullContracts)
|
||||||
|
adminMonthlyOverview.SetStatus(AdminMonthlyOverviewStatus.CreateDocuments);
|
||||||
|
|
||||||
|
await _companyContext.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private async Task CreateRangeAdminMonthlyOverview(List<long> workshopIds, int month, int year)
|
||||||
|
{
|
||||||
|
foreach (var workshopId in workshopIds)
|
||||||
|
{
|
||||||
|
var adminMonthlyOverview =
|
||||||
|
new AdminMonthlyOverview(workshopId, month, year, AdminMonthlyOverviewStatus.CreateDocuments);
|
||||||
|
await _companyContext.AddAsync(adminMonthlyOverview);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||||
@@ -23,18 +26,18 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
public EditLeftWork GetDetails(long id)
|
public EditLeftWork GetDetails(long id)
|
||||||
{
|
{
|
||||||
return _context.LeftWorkList.Select(x => new EditLeftWork()
|
return _context.LeftWorkList.Select(x => new EditLeftWork()
|
||||||
{
|
{
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||||
EmployeeFullName = x.EmployeeFullName,
|
EmployeeFullName = x.EmployeeFullName,
|
||||||
WorkshopName = x.WorkshopName,
|
WorkshopName = x.WorkshopName,
|
||||||
WorkshopId = x.WorkshopId,
|
WorkshopId = x.WorkshopId,
|
||||||
EmployeeId = x.EmployeeId
|
EmployeeId = x.EmployeeId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.FirstOrDefault(x => x.Id == id);
|
.FirstOrDefault(x => x.Id == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,10 +95,10 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
AddYearsPay = x.AddYearsPay,
|
AddYearsPay = x.AddYearsPay,
|
||||||
AddLeavePay = x.AddLeavePay,
|
AddLeavePay = x.AddLeavePay,
|
||||||
JobId = x.JobId,
|
JobId = x.JobId,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}).Where(x=>x.WorkshopId == workshopId);
|
|
||||||
|
}).Where(x => x.WorkshopId == workshopId);
|
||||||
|
|
||||||
return query.ToList();
|
return query.ToList();
|
||||||
}
|
}
|
||||||
@@ -103,7 +106,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
public List<LeftWorkViewModel> search(LeftWorkSearchModel searchModel)
|
public List<LeftWorkViewModel> search(LeftWorkSearchModel searchModel)
|
||||||
{
|
{
|
||||||
|
|
||||||
var query = _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
var query = _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||||
{
|
{
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
@@ -135,24 +138,24 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
public LeftWorkViewModel CheckoutleftWorkCheck(DateTime contractStart, long workshopId, long employeeId)
|
public LeftWorkViewModel CheckoutleftWorkCheck(DateTime contractStart, long workshopId, long employeeId)
|
||||||
{
|
{
|
||||||
return _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
return _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||||
{
|
{
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||||
StartWorkDateGr = x.StartWorkDate,
|
StartWorkDateGr = x.StartWorkDate,
|
||||||
LeftWorkDateGr = x.LeftWorkDate,
|
LeftWorkDateGr = x.LeftWorkDate,
|
||||||
EmployeeFullName = x.EmployeeFullName,
|
EmployeeFullName = x.EmployeeFullName,
|
||||||
WorkshopName = x.WorkshopName,
|
WorkshopName = x.WorkshopName,
|
||||||
WorkshopId = x.WorkshopId,
|
WorkshopId = x.WorkshopId,
|
||||||
EmployeeId = x.EmployeeId,
|
EmployeeId = x.EmployeeId,
|
||||||
AddLeavePay = x.AddLeavePay,
|
AddLeavePay = x.AddLeavePay,
|
||||||
AddBonusesPay = x.AddBonusesPay,
|
AddBonusesPay = x.AddBonusesPay,
|
||||||
AddYearsPay = x.AddYearsPay,
|
AddYearsPay = x.AddYearsPay,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId
|
})
|
||||||
|
.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId
|
||||||
&& contractStart >= x.StartWorkDateGr && contractStart <= x.LeftWorkDateGr);
|
&& contractStart >= x.StartWorkDateGr && contractStart <= x.LeftWorkDateGr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +166,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
_context.LeftWorkList.Remove(item);
|
_context.LeftWorkList.Remove(item);
|
||||||
_context.SaveChanges();
|
_context.SaveChanges();
|
||||||
if (!_context.LeftWorkList.Any(x => x.WorkshopId == item.WorkshopId && x.EmployeeId == item.EmployeeId && item.id != x.id) && HasActiveRollCallStatus(item.WorkshopId, item.EmployeeId))
|
if (!_context.LeftWorkList.Any(x => x.WorkshopId == item.WorkshopId && x.EmployeeId == item.EmployeeId && item.id != x.id) && HasActiveRollCallStatus(item.WorkshopId, item.EmployeeId))
|
||||||
@@ -179,31 +182,31 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
public LeftWorkViewModel GetByDateAndWorkshopIdAndEmployeeId(long workshopId, long employeeId, DateTime dateTime)
|
public LeftWorkViewModel GetByDateAndWorkshopIdAndEmployeeId(long workshopId, long employeeId, DateTime dateTime)
|
||||||
{
|
{
|
||||||
var entity = _context.LeftWorkList.FirstOrDefault(x =>
|
var entity = _context.LeftWorkList.FirstOrDefault(x =>
|
||||||
x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||||
(x.StartWorkDate <= dateTime && x.LeftWorkDate >= dateTime));
|
(x.StartWorkDate <= dateTime && x.LeftWorkDate >= dateTime));
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
EmployeeId = entity.EmployeeId,
|
EmployeeId = entity.EmployeeId,
|
||||||
WorkshopId = entity.WorkshopId,
|
WorkshopId = entity.WorkshopId,
|
||||||
LeftWorkDate = entity.LeftWorkDate.ToFarsi(),
|
LeftWorkDate = entity.LeftWorkDate.ToFarsi(),
|
||||||
HasLeft = entity.HasLeft,
|
HasLeft = entity.HasLeft,
|
||||||
LeftWorkDateGr = entity.LeftWorkDate,
|
LeftWorkDateGr = entity.LeftWorkDate,
|
||||||
StartWorkDateGr = entity.StartWorkDate,
|
StartWorkDateGr = entity.StartWorkDate,
|
||||||
Id = entity.id
|
Id = entity.id
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<long> GetAllEmployeeIdsInWorkshop(long workshopId)
|
public List<long> GetAllEmployeeIdsInWorkshop(long workshopId)
|
||||||
{
|
{
|
||||||
var leftWorks = _context.LeftWorkList
|
var leftWorks = _context.LeftWorkList
|
||||||
.Where(x => x.WorkshopId == workshopId)
|
.Where(x => x.WorkshopId == workshopId)
|
||||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||||
var insuranceLeftWork = _context.LeftWorkInsuranceList
|
var insuranceLeftWork = _context.LeftWorkInsuranceList
|
||||||
.Where(x => x.WorkshopId == workshopId)
|
.Where(x => x.WorkshopId == workshopId)
|
||||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||||
@@ -267,7 +270,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
RemoveEmployeeRollCallStatus(workshopId, employeeId);
|
RemoveEmployeeRollCallStatus(workshopId, employeeId);
|
||||||
if (hasLeftWorkInsurance)
|
if (hasLeftWorkInsurance)
|
||||||
return
|
return
|
||||||
op.Succcedded(1, "حذف با موفقیت انجام شد."); //+ "<br/>" + "<span class='text-danger'>" + "کد پرسنلی این شخص به دلیل استفاده در ترک کار بیمه قابل حذف نمی باشد. " + "</span>");
|
op.Succcedded(1, "حذف با موفقیت انجام شد."); //+ "<br/>" + "<span class='text-danger'>" + "کد پرسنلی این شخص به دلیل استفاده در ترک کار بیمه قابل حذف نمی باشد. " + "</span>");
|
||||||
else
|
else
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
}
|
}
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,7 +396,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (var item in leftWorkGroups)
|
foreach (var item in leftWorkGroups)
|
||||||
{
|
{
|
||||||
#region PersonelCode
|
#region PersonelCode
|
||||||
@@ -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))
|
||||||
{
|
{
|
||||||
@@ -416,18 +419,18 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
_context.PersonnelCodeSet.Add(new PersonnelCodeDomain(item.WorkshopId, commandEmployeeId, personelcode.PersonnelCode));
|
_context.PersonnelCodeSet.Add(new PersonnelCodeDomain(item.WorkshopId, commandEmployeeId, personelcode.PersonnelCode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
if (item.LeftWorkViewModels != null && item.LeftWorkViewModels.Count > 0)
|
if (item.LeftWorkViewModels != null && item.LeftWorkViewModels.Count > 0)
|
||||||
{
|
{
|
||||||
bool checkRegister = false;
|
bool checkRegister = false;
|
||||||
|
|
||||||
|
|
||||||
var LeftWorkList = _context.LeftWorkList.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).ToList();
|
var LeftWorkList = _context.LeftWorkList.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).ToList();
|
||||||
|
|
||||||
var removeList = new List<LeftWork>();
|
var removeList = new List<LeftWork>();
|
||||||
|
|
||||||
foreach (var removeItem in LeftWorkList)
|
foreach (var removeItem in LeftWorkList)
|
||||||
{
|
{
|
||||||
if (!item.LeftWorkViewModels.Any(x => x.Id == removeItem.id))
|
if (!item.LeftWorkViewModels.Any(x => x.Id == removeItem.id))
|
||||||
@@ -463,7 +466,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
{
|
{
|
||||||
_context.LeftWorkList.RemoveRange(removeList);
|
_context.LeftWorkList.RemoveRange(removeList);
|
||||||
}
|
}
|
||||||
|
|
||||||
//foreach (var item2 in item.LeftWorkViewModels)
|
//foreach (var item2 in item.LeftWorkViewModels)
|
||||||
//{
|
//{
|
||||||
// var LeftWork = _context.LeftWorkList.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).ToList();
|
// var LeftWork = _context.LeftWorkList.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).ToList();
|
||||||
@@ -480,7 +483,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
_context.SaveChanges();
|
_context.SaveChanges();
|
||||||
transaction.Commit();
|
transaction.Commit();
|
||||||
op.Succcedded(-1, " ثبت با موفقیت انجام شد. ");
|
op.Succcedded(-1, " ثبت با موفقیت انجام شد. ");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -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;
|
||||||
@@ -514,23 +517,23 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
return op.Failed("در این تاریخ تصفیه حساب ثبت شده است.برای حذف تاریخ ترک کار، ابتدا تصفیه حساب های مربوطه را حذف کنید");
|
return op.Failed("در این تاریخ تصفیه حساب ثبت شده است.برای حذف تاریخ ترک کار، ابتدا تصفیه حساب های مربوطه را حذف کنید");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
}
|
}
|
||||||
public OperationResult CheckEditLeftWork(long workshopId, long employeeId, DateTime date, int type)
|
public OperationResult CheckEditLeftWork(long workshopId, long employeeId, DateTime date, int type)
|
||||||
{
|
{
|
||||||
var op = new OperationResult();
|
var op = new OperationResult();
|
||||||
bool hasContracts = false;
|
bool hasContracts = false;
|
||||||
|
|
||||||
|
|
||||||
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("لطفا ابتدا تصفیه حساب های آتی را حذف نمایید");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var LeftDay = date.Date;
|
var LeftDay = date.Date;
|
||||||
@@ -553,16 +556,16 @@ 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();
|
||||||
|
|
||||||
//if (contract != null)
|
//if (contract != null)
|
||||||
//{
|
//{
|
||||||
|
|
||||||
// if ((contract.ContarctStart.Date <= endDateSend.Date && contract.ContractEnd.Date >= endDateSend.Date))
|
// if ((contract.ContarctStart.Date <= endDateSend.Date && contract.ContractEnd.Date >= endDateSend.Date))
|
||||||
// {
|
// {
|
||||||
|
|
||||||
// var checkout = _context.CheckoutSet.Where(x =>
|
// var checkout = _context.CheckoutSet.Where(x =>
|
||||||
// x.EmployeeId == employeeId && x.WorkshopId == workshopId &&
|
// x.EmployeeId == employeeId && x.WorkshopId == workshopId &&
|
||||||
// (x.ContractStart.Date <= date.Date && x.ContractEnd.Date >= date.Date)).FirstOrDefault();
|
// (x.ContractStart.Date <= date.Date && x.ContractEnd.Date >= date.Date)).FirstOrDefault();
|
||||||
@@ -591,7 +594,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
// //}
|
// //}
|
||||||
//}
|
//}
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return op.Succcedded();
|
return op.Succcedded();
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -655,9 +658,9 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
.Select(x => x.EmployeeId)
|
.Select(x => x.EmployeeId)
|
||||||
.Except([5976]).ToList();
|
.Except([5976]).ToList();
|
||||||
var clientTemps = _context.EmployeeClientTemps.Where(x => x.WorkshopId == searchModel.WorkshopId)
|
var clientTemps = _context.EmployeeClientTemps.Where(x => x.WorkshopId == searchModel.WorkshopId)
|
||||||
.Select(x => x.EmployeeId);
|
.Select(x => x.EmployeeId);
|
||||||
|
|
||||||
var query = _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
var query = _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||||
{
|
{
|
||||||
Id = x.id,
|
Id = x.id,
|
||||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||||
@@ -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;
|
||||||
@@ -724,8 +727,167 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
|||||||
|
|
||||||
}
|
}
|
||||||
//_context.RollCallEmployees.Remove(entity);
|
//_context.RollCallEmployees.Remove(entity);
|
||||||
|
|
||||||
}
|
}
|
||||||
#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,8 +317,12 @@ 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);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sumLeave > starndardHoursesPerTotalDaysSapn)
|
if (sumLeave > starndardHoursesPerTotalDaysSapn)
|
||||||
@@ -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,7 +1728,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
|||||||
EndDate = endComplex,
|
EndDate = endComplex,
|
||||||
ShiftSpan = (endComplex - startComplex),
|
ShiftSpan = (endComplex - startComplex),
|
||||||
ShiftDate = currentDateGr,
|
ShiftDate = currentDateGr,
|
||||||
});
|
ShiftEndWithoutRest = endComplex
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var endCal = end - start;
|
var endCal = end - start;
|
||||||
|
|||||||
@@ -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,9 +3317,10 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
|||||||
|
|
||||||
periodOfAbsence = usedLeaves;
|
periodOfAbsence = usedLeaves;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
contactCanToleaveList.Add(new ContractsCanToLeave()
|
#endregion
|
||||||
|
|
||||||
|
contactCanToleaveList.Add(new ContractsCanToLeave()
|
||||||
{
|
{
|
||||||
ContractCounter = contractCounter,
|
ContractCounter = contractCounter,
|
||||||
WorkingPerDayHourses = workingHoursePerDay,
|
WorkingPerDayHourses = workingHoursePerDay,
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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.Signature == "1")
|
@if (item.HasSignCheckout)
|
||||||
{
|
{
|
||||||
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
@if (item.Signature == "1")
|
||||||
|
{
|
||||||
|
<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
|
||||||
|
{
|
||||||
|
<a permission="20216" class="myLinkSign " 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
|
else
|
||||||
{
|
{
|
||||||
<a permission="20216" class="myLinkSign " name="foo2" value="@item.Id" style="font-size: 20px">
|
<a class="myLinkSign" style="font-size: 20px">
|
||||||
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
|
||||||
<input type="hidden" value="@item.Id" name="unsigned" />
|
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||||
|
|
||||||
</a>
|
</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,24 +557,30 @@
|
|||||||
</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;">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<thead>
|
||||||
<table style="width: 100%;">
|
<tr>
|
||||||
<tbody>
|
<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">
|
||||||
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
</th>
|
||||||
<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 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.TotalPresentTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<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>
|
</th>
|
||||||
<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>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
|
<tbody>
|
||||||
</tbody>
|
<tr>
|
||||||
</table>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
</div>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
</div>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||||
</div>
|
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</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,23 +538,28 @@
|
|||||||
</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;">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
<thead>
|
||||||
<table style="width: 100%;">
|
<tr>
|
||||||
<tbody>
|
<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">
|
||||||
|
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
</th>
|
||||||
<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 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.TotalPresentTimeStr</td>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
<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>
|
</th>
|
||||||
<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>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
|
<tbody>
|
||||||
</tbody>
|
<tr>
|
||||||
</table>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
</div>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||||
</div>
|
<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>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -133,15 +159,15 @@
|
|||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<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>
|
||||||
}
|
}
|
||||||
@@ -151,15 +177,15 @@
|
|||||||
@if (@item.ContractPerson)
|
@if (@item.ContractPerson)
|
||||||
{
|
{
|
||||||
<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.Signature == "1")
|
@if (@item.HasSignContract)
|
||||||
{
|
{
|
||||||
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
|
@if (item.Signature == "1")
|
||||||
|
{
|
||||||
|
<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" />
|
else
|
||||||
</a> *@
|
{
|
||||||
|
<a permission="20117" class="myLinkSign" 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
|
else
|
||||||
{
|
{
|
||||||
<a permission="20117" class="myLinkSign" name="foo2" value="@item.Id" style="font-size: 20px">
|
<a class="myLinkSign" style="font-size: 20px">
|
||||||
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
|
|
||||||
<input type="hidden" value="@item.Id" name="unsigned" />
|
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||||
|
|
||||||
</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> *@
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|||||||
@@ -548,37 +548,105 @@
|
|||||||
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) {
|
||||||
|
$('#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);
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
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) {
|
||||||
|
|
||||||
if (response.success) {
|
// $('#name').removeClass("disable");
|
||||||
$('#IsAuthorized').val(true);
|
// $('#family').removeClass("disable");
|
||||||
$('#name').val(response.data.fName);
|
// $('#FatherName').removeClass("disable");
|
||||||
$('#family').val(response.data.lName);
|
// $('#DateOfBirth').removeClass("disable");
|
||||||
$('#FatherName').val(response.data.fatherName);
|
// $('#code-melli').removeClass("disable");
|
||||||
$('#DateOfBirth').val(response.data.birthDate);
|
// $('#IdNumber').removeClass("disable");
|
||||||
$('#code-melli').val(response.data.nationalCode);
|
// $('#IdNumberSerial').removeClass("disable");
|
||||||
$('#IdNumber').val(response.data.idNumber);
|
// $('#IdNumberSeri').removeClass("disable");
|
||||||
$('#IdNumberSerial').val(response.data.idNumberSerial);
|
// $('#GenderMale').removeClass("disable");
|
||||||
$('#IdNumberSeri').val(response.data.idNumberSeri);
|
// $('#GenderFemale').removeClass("disable");
|
||||||
if (response.data.gender === 0) {
|
// $('#divGender .radio-box').removeClass('disable');
|
||||||
$('#GenderMale').prop('checked', true);
|
// currentStep++;
|
||||||
$('#soldier').prop('disabled', false);
|
// showStep(currentStep);
|
||||||
} else if (response.data.gender === 1) {
|
// $.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
$('#GenderFemale').prop('checked', true);
|
// return;
|
||||||
$('#soldier').prop('disabled', true);
|
// }
|
||||||
}
|
// else {
|
||||||
} else {
|
// $.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
// return;
|
||||||
return;
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
currentStep++;
|
// currentStep++;
|
||||||
showStep(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);
|
||||||
@@ -188,8 +193,73 @@ 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,7 +271,8 @@ public class IndexModel : PageModel
|
|||||||
|
|
||||||
public JsonResult OnPostEdit(EditEmployee command)
|
public JsonResult OnPostEdit(EditEmployee command)
|
||||||
{
|
{
|
||||||
var childrenEdit = 0;
|
var op = new OperationResult();
|
||||||
|
var childrenEdit = 0;
|
||||||
var children = 0;
|
var children = 0;
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
@@ -213,15 +284,29 @@ public class IndexModel : PageModel
|
|||||||
if (command.EditEmployeChildrenList != null)
|
if (command.EditEmployeChildrenList != null)
|
||||||
childrenEdit = command.EditEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
childrenEdit = command.EditEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
||||||
|
|
||||||
//if (children > 0)
|
//if (children > 0)
|
||||||
//{
|
//{
|
||||||
// var oldChildrenNumber = Convert.ToInt32(command.NumberOfChildren);
|
// var oldChildrenNumber = Convert.ToInt32(command.NumberOfChildren);
|
||||||
// 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);
|
||||||
if (result.IsSuccedded)
|
if (result.IsSuccedded)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,88 +84,130 @@ 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);
|
MaxPersonnelCode = res.EmployeeList.Select(x => x.PersonnelCode).Max();
|
||||||
var personnelCodeSearch = new PersonnelCodeSearchModel
|
MaxPersonnelCode += 1;
|
||||||
{
|
}
|
||||||
WorkshopId = id
|
else
|
||||||
};
|
{
|
||||||
var pcodes = _personnelCodeApplication.Search(personnelCodeSearch);
|
MaxPersonnelCode = 1;
|
||||||
if (pcodes.Any(x => x.PersonnelCode > 0))
|
}
|
||||||
{
|
|
||||||
MaxPersonnelCode = pcodes.Select(x => x.PersonnelCode).Max();
|
EmployeeList = res.EmployeeList.Where(x => x.EmployeeHasCreateContract).ToList();
|
||||||
MaxPersonnelCode += 1;
|
EmployeeSelectList = new SelectList(res.EmployeeList, "EmployeeId", "EmployeeName");
|
||||||
|
HavingPersonel = !res.EmployeeList.Any(x => x.EmployeeHasCreateContract) ? false : res.HavingPersonel;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MaxPersonnelCode = 1;
|
MaxPersonnelCode = 1;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
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,16 +308,20 @@
|
|||||||
@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>
|
<div class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
<div class="" style="display: flex; align-items: center;">
|
||||||
</select>
|
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||||
</div> *@
|
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
||||||
|
</div>
|
||||||
<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;" />
|
|
||||||
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
|
||||||
</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 class="form-group">
|
@* <div class="form-group">
|
||||||
@@ -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="" style="display: flex; align-items: center;">
|
|
||||||
<input type="checkbox" asp-for="Command.WorkshopHolidayWorking" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
<div class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||||
<label asp-for="Command.WorkshopHolidayWorking" style="margin: 0;">این کارگاه در ایام تعطیلات رسمی باز است</label>
|
<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;" />
|
||||||
|
<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">
|
||||||
@@ -464,22 +477,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<input type="hidden" id="CutContractEndOfYear" asp-for="Command.CutContractEndOfYear" />
|
<input type="hidden" id="CutContractEndOfYear" asp-for="Command.CutContractEndOfYear" />
|
||||||
<div style="display: flex; align-items: center; gap: 14px;">
|
<div style="display: flex; align-items: center; gap: 14px;">
|
||||||
آیا قراردادهای بالای یک ماه منتهی به پایان سال باشد یا نباشد؟
|
آیا قراردادهای بالای یک ماه منتهی به پایان سال باشد یا نباشد؟
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card textFloat">
|
<div class="card textFloat">
|
||||||
@@ -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");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
if (command.HasRollCallFreeVip == "on")
|
if (command.HasRollCallFreeVip == "on")
|
||||||
{
|
{
|
||||||
command.HasRollCallFreeVip = "true";
|
command.HasRollCallFreeVip = "true";
|
||||||
@@ -231,7 +231,8 @@ 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%;">
|
||||||
@@ -519,23 +519,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<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>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -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;">
|
||||||
@@ -717,26 +717,32 @@
|
|||||||
</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 <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>
|
</tr>
|
||||||
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
<tr>
|
||||||
</div>
|
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||||
</div>
|
<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>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</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%;">
|
||||||
@@ -513,23 +513,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<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>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -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,22 +539,29 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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; ">
|
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||||
<table style="width: 100%;">
|
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||||
<tbody>
|
<thead>
|
||||||
|
<tr>
|
||||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
<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">
|
||||||
<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>
|
موظفی @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 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور : @Model.TotalPresentTimeStr</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.TotalBreakTimeStr</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 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>
|
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||||
</tr>
|
</th>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</thead>
|
||||||
</table>
|
<tbody>
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<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>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -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="col-6 p-0">
|
<div class="day-off-button-container mb-3">
|
||||||
<div class="group-container">
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
class="day-off-button text-center day-off-button__active ">
|
||||||
<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))" />
|
</button>
|
||||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex form-group my-1 group">
|
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
<div class="group-container">
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SaturdayInput"
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
value="@((int)(DayOfWeek.Saturday))" />
|
||||||
<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" />
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
<label for="HolidayWork1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SundayInput" value="@((int)(DayOfWeek.Sunday))" />
|
||||||
</div>
|
|
||||||
<div class="d-flex form-group my-1 group">
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
<input type="radio" name="HolidayWork1" id="HolidayWork2" class="form-check-input Main-Radio" value="@HolidayWork.WorkInHolidays" />
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="MondayInput" value="@((int)(DayOfWeek.Monday))" />
|
||||||
<label for="HolidayWork2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
|
||||||
</div>
|
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||||
</div>
|
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="TuesdayInput" value="@((int)(DayOfWeek.Tuesday))" />
|
||||||
</div>
|
|
||||||
|
<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))" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" id="GroupId" name="Command.CreateCustomizeEmployeeSettings.GroupId" value="" />
|
</div>
|
||||||
</div>
|
<div class="day-off-title mb-2">
|
||||||
</div>
|
وضعیت فعالیت مجموعه در روزهای جمعه و تعطیلات رسمی
|
||||||
</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>
|
||||||
|
|
||||||
<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>
|
||||||
<div class="row extraOptionBorder">
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
<div class="day-off-button-container mb-3">
|
||||||
<div class="group-container">
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
class="day-off-button text-center day-off-button__active">
|
||||||
<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))"/>
|
</button>
|
||||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
|
||||||
</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))"/>
|
|
||||||
<label for="Friday2" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار میکند.</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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 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>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||||
<div class="col-6 p-0">
|
<input type="radio" name="command.HolidayWork" id="OffDays1" class="custom-checkbox"
|
||||||
<div class="group-container">
|
@(Model.HolidayWork == HolidayWork.Default ? "checked" : "")
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
value="@((int)(HolidayWork.Default))" />
|
||||||
<div class="d-flex form-group my-1 group">
|
<label for="OffDays1" class="text-nowrap day-off-status-person__item--label">
|
||||||
<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>
|
</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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -379,46 +379,118 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row mt-2">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
|
||||||
<div class="row extraOptionBorder">
|
|
||||||
|
|
||||||
<div class="col-6 p-0">
|
<div class="day-off-parent">
|
||||||
<div class="group-container">
|
<div class="day-off-title mb-2">
|
||||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
روزهای تعطیل هفته
|
||||||
<div class="d-flex form-group my-1 group">
|
</div>
|
||||||
<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 class="day-off-button-container mb-3">
|
||||||
</div>
|
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||||
<div class="d-flex form-group my-1 group">
|
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Saturday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||||
<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>
|
</button>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<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 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>
|
|
||||||
|
|
||||||
</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