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;
|
||||
}
|
||||
public static string ToFarsiMonthByNumber(this string value)
|
||||
|
||||
@@ -10,67 +10,70 @@ namespace _0_Framework.Application.UID;
|
||||
|
||||
public class UidService : IUidService
|
||||
{
|
||||
private readonly HttpClient _httpClient;
|
||||
private const string BaseUrl= "https://json-api.uid.ir/api/inquiry/";
|
||||
private readonly HttpClient _httpClient;
|
||||
private const string BaseUrl = "https://json-api.uid.ir/api/inquiry/";
|
||||
|
||||
public UidService()
|
||||
{
|
||||
_httpClient = new HttpClient()
|
||||
{
|
||||
BaseAddress = new Uri(BaseUrl)
|
||||
};
|
||||
}
|
||||
public UidService()
|
||||
{
|
||||
_httpClient = new HttpClient()
|
||||
{
|
||||
BaseAddress = new Uri(BaseUrl)
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode, string birthDate)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
BirthDate = birthDate ,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
public async Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode, string birthDate)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
BirthDate = birthDate,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var requestResult = await _httpClient.PostAsync("person/v2", contentType);
|
||||
try
|
||||
{
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
|
||||
if (responseResult.BasicInformation != null)
|
||||
{
|
||||
responseResult.BasicInformation.FirstName = responseResult.BasicInformation.FirstName?.ToPersian();
|
||||
responseResult.BasicInformation.LastName = responseResult.BasicInformation.LastName?.ToPersian();
|
||||
responseResult.BasicInformation.FatherName = responseResult.BasicInformation.FatherName?.ToPersian();
|
||||
}
|
||||
try
|
||||
{
|
||||
var requestResult = await _httpClient.PostAsync("person/v2", contentType);
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
|
||||
if (responseResult.BasicInformation != null)
|
||||
{
|
||||
responseResult.BasicInformation.FirstName = responseResult.BasicInformation.FirstName?.ToPersian();
|
||||
responseResult.BasicInformation.LastName = responseResult.BasicInformation.LastName?.ToPersian();
|
||||
responseResult.BasicInformation.FatherName = responseResult.BasicInformation.FatherName?.ToPersian();
|
||||
}
|
||||
|
||||
return responseResult;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return responseResult;
|
||||
}
|
||||
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)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
MobileNumber = phoneNumber,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
public async Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode, string phoneNumber)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
MobileNumber = phoneNumber,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var requestResult = await _httpClient.PostAsync("mobile/owner/v2", contentType);
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
var requestResult = await _httpClient.PostAsync("mobile/owner/v2", contentType);
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<MatchMobileWithNationalCodeResponse>();
|
||||
return responseResult;
|
||||
}
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<MatchMobileWithNationalCodeResponse>();
|
||||
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.ValueObjects;
|
||||
using Microsoft.EntityFrameworkCore.Design.Internal;
|
||||
@@ -12,8 +14,7 @@ public class BaseCustomizeEntity : EntityBase
|
||||
}
|
||||
public BaseCustomizeEntity(FridayPay fridayPay, OverTimePay overTimePay,
|
||||
BaseYearsPay baseYearsPay, BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||
FridayWork fridayWork, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays)
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, BreakTime breakTime,int leavePermittedDays,List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
|
||||
FridayPay = fridayPay;
|
||||
@@ -29,10 +30,10 @@ public class BaseCustomizeEntity : EntityBase
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
BreakTime = breakTime;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
WeeklyOffDays = weeklyOffDays.Select(x=> new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -117,4 +118,28 @@ public class BaseCustomizeEntity : EntityBase
|
||||
|
||||
|
||||
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 DeleteCheckout(long id);
|
||||
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);
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -27,12 +27,13 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, long employeeId,
|
||||
long workshopId, double salary, long customizeWorkshopGroupSettingId,
|
||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> customizeWorkshopEmployeeSettingsShifts,
|
||||
FridayWork fridayWork,
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime,
|
||||
int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts
|
||||
, List<WeeklyOffDay> weeklyOffDays) :
|
||||
base(fridayPay, overTimePay,
|
||||
baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
||||
earlyExit, holidayWork, breakTime, leavePermittedDays,weeklyOffDays)
|
||||
{
|
||||
CustomizeWorkshopGroupSettingId = customizeWorkshopGroupSettingId;
|
||||
IsSettingChanged = false;
|
||||
@@ -82,7 +83,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
/// <param name="fineAbsenceDeduction">جریمه غیبت</param>
|
||||
/// <param name="lateToWork">تاخیر در ورود</param>
|
||||
/// <param name="earlyExit">تعجیل درخروج</param>
|
||||
/// <param name="fridayWork">آیا در روز های جمعه موظف به کار است</param>
|
||||
/// <param name="holidayWork">آیا در تعطیلات رسمی موظف به کار است</param>
|
||||
/// <param name="workshopIrregularShifts">نوع شیفت کاری </param>
|
||||
/// <param name="workshopShiftStatus">آیا شیفت منظم است یا نا منظم</param>
|
||||
@@ -91,7 +91,7 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
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
|
||||
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
||||
@@ -99,7 +99,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
|
||||
Salary = salary;
|
||||
IsSettingChanged = isSettingChange;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
}
|
||||
@@ -112,8 +111,8 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
public void SimpleEdit(
|
||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> employeeSettingsShift,
|
||||
IrregularShift irregularShift,
|
||||
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange, FridayWork fridayWork, HolidayWork holidayWork,
|
||||
ICollection<CustomizeRotatingShift> rotatingShifts)
|
||||
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange,HolidayWork holidayWork,
|
||||
ICollection<CustomizeRotatingShift> rotatingShifts,List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||
IsShiftChanged = isShiftChange;
|
||||
@@ -126,9 +125,8 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
|
||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
WeeklyOffDays = weeklyOffDays;
|
||||
}
|
||||
|
||||
|
||||
@@ -269,4 +267,6 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
|
||||
IsShiftChanged = isShiftChange;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,340 +17,344 @@ namespace Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities;
|
||||
|
||||
public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
{
|
||||
public CustomizeWorkshopGroupSettings()
|
||||
{
|
||||
public CustomizeWorkshopGroupSettings()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public CustomizeWorkshopGroupSettings(string groupName, double salary,
|
||||
long customizeWorkshopSettingId, ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||
FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||
BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork,
|
||||
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays, ICollection<CustomizeRotatingShift> rotatingShifts) :
|
||||
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, fridayWork, holidayWork, breakTime, leavePermittedDays)
|
||||
{
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
public CustomizeWorkshopGroupSettings(string groupName, double salary,
|
||||
long customizeWorkshopSettingId, ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||
FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||
BonusesPay bonusesPay, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||
HolidayWork holidayWork, BreakTime breakTime, WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, int leavePermittedDays,
|
||||
ICollection<CustomizeRotatingShift> rotatingShifts, List<WeeklyOffDay> weeklyOffDays) :
|
||||
base(fridayPay, overTimePay, baseYearsPay, bonusesPay, nightWorkPay,
|
||||
marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction, lateToWork,
|
||||
earlyExit, holidayWork, breakTime, leavePermittedDays, weeklyOffDays)
|
||||
{
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||
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 ?
|
||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
}
|
||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
}
|
||||
|
||||
private void GuardGroupShifts(ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts)
|
||||
{
|
||||
if (customizeWorkshopGroupSettingsShifts.Count >= 4)
|
||||
{
|
||||
throw new InvalidDataException("شما نمیتوانید بیشتر از سه ساعت کاری در کارگاه بگذارید");
|
||||
}
|
||||
}
|
||||
private void GuardGroupShifts(ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts)
|
||||
{
|
||||
if (customizeWorkshopGroupSettingsShifts.Count >= 4)
|
||||
{
|
||||
throw new InvalidDataException("شما نمیتوانید بیشتر از سه ساعت کاری در کارگاه بگذارید");
|
||||
}
|
||||
}
|
||||
|
||||
public string GroupName { get; private set; }
|
||||
public double Salary { get; private set; }
|
||||
public long CustomizeWorkshopSettingId { get; private set; }
|
||||
public WorkshopShiftStatus WorkshopShiftStatus { get; private set; }
|
||||
public bool MainGroup { get; private set; }
|
||||
public bool IsShiftChange { get; private set; }
|
||||
public bool IsSettingChange { get; private set; }
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public ICollection<CustomizeWorkshopGroupSettingsShift> CustomizeWorkshopGroupSettingsShifts { get; set; }
|
||||
public ICollection<CustomizeWorkshopEmployeeSettings> CustomizeWorkshopEmployeeSettingsCollection { get; set; }
|
||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public CustomizeWorkshopSettings CustomizeWorkshopSettings { get; set; }
|
||||
public string GroupName { get; private set; }
|
||||
public double Salary { get; private set; }
|
||||
public long CustomizeWorkshopSettingId { get; private set; }
|
||||
public WorkshopShiftStatus WorkshopShiftStatus { get; private set; }
|
||||
public bool MainGroup { get; private set; }
|
||||
public bool IsShiftChange { get; private set; }
|
||||
public bool IsSettingChange { get; private set; }
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public ICollection<CustomizeWorkshopGroupSettingsShift> CustomizeWorkshopGroupSettingsShifts { get; set; }
|
||||
public ICollection<CustomizeWorkshopEmployeeSettings> CustomizeWorkshopEmployeeSettingsCollection { get; set; }
|
||||
public ICollection<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public CustomizeWorkshopSettings CustomizeWorkshopSettings { get; set; }
|
||||
|
||||
|
||||
|
||||
public CustomizeWorkshopGroupSettings CreateMainGroup(FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit,
|
||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, FridayWork fridayWork,
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, ICollection<CustomizeRotatingShift> rotatingShifts,
|
||||
WorkshopShiftStatus workshopShiftStatus, long customizeWorkshopSettingId, BreakTime breakTime, int leavePermittedDays)
|
||||
{
|
||||
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
||||
GroupName = "اصلی";
|
||||
Salary = 0;
|
||||
FridayPay = fridayPay;
|
||||
OverTimePay = overTimePay;
|
||||
BaseYearsPay = baseYearsPay;
|
||||
BonusesPay = bonusesPay;
|
||||
NightWorkPay = nightWorkPay;
|
||||
MarriedAllowance = marriedAllowance;
|
||||
ShiftPay = shiftPay;
|
||||
FamilyAllowance = familyAllowance;
|
||||
LeavePay = leavePay;
|
||||
InsuranceDeduction = insuranceDeduction;
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||
public CustomizeWorkshopGroupSettings CreateMainGroup(FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit,
|
||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||
HolidayWork holidayWork, IrregularShift irregularShift, ICollection<CustomizeRotatingShift> rotatingShifts,
|
||||
WorkshopShiftStatus workshopShiftStatus, long customizeWorkshopSettingId, BreakTime breakTime, int leavePermittedDays)
|
||||
{
|
||||
GuardGroupShifts(customizeWorkshopGroupSettingsShifts);
|
||||
GroupName = "اصلی";
|
||||
Salary = 0;
|
||||
FridayPay = fridayPay;
|
||||
OverTimePay = overTimePay;
|
||||
BaseYearsPay = baseYearsPay;
|
||||
BonusesPay = bonusesPay;
|
||||
NightWorkPay = nightWorkPay;
|
||||
MarriedAllowance = marriedAllowance;
|
||||
ShiftPay = shiftPay;
|
||||
FamilyAllowance = familyAllowance;
|
||||
LeavePay = leavePay;
|
||||
InsuranceDeduction = insuranceDeduction;
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
HolidayWork = holidayWork;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||
|
||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||
CustomizeRotatingShifts = workshopShiftStatus == WorkshopShiftStatus.Rotating ? rotatingShifts : [];
|
||||
|
||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||
MainGroup = true;
|
||||
BreakTime = breakTime;
|
||||
CustomizeWorkshopEmployeeSettingsCollection = [];
|
||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
CustomizeWorkshopSettingId = customizeWorkshopSettingId;
|
||||
MainGroup = true;
|
||||
BreakTime = breakTime;
|
||||
CustomizeWorkshopEmployeeSettingsCollection = [];
|
||||
|
||||
return this;
|
||||
return this;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void EditAndOverwriteOnEmployees(string groupName, double salary, IEnumerable<long> employeeIds,
|
||||
FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||
{
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
FridayPay = fridayPay;
|
||||
OverTimePay = overTimePay;
|
||||
BaseYearsPay = baseYearsPay;
|
||||
BonusesPay = bonusesPay;
|
||||
NightWorkPay = nightWorkPay;
|
||||
MarriedAllowance = marriedAllowance;
|
||||
ShiftPay = shiftPay;
|
||||
FamilyAllowance = familyAllowance;
|
||||
LeavePay = leavePay;
|
||||
InsuranceDeduction = insuranceDeduction;
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
IsSettingChange = isSettingChange;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
public void EditAndOverwriteOnEmployees(string groupName, double salary, IEnumerable<long> employeeIds,
|
||||
FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||
{
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
FridayPay = fridayPay;
|
||||
OverTimePay = overTimePay;
|
||||
BaseYearsPay = baseYearsPay;
|
||||
BonusesPay = bonusesPay;
|
||||
NightWorkPay = nightWorkPay;
|
||||
MarriedAllowance = marriedAllowance;
|
||||
ShiftPay = shiftPay;
|
||||
FamilyAllowance = familyAllowance;
|
||||
LeavePay = leavePay;
|
||||
InsuranceDeduction = insuranceDeduction;
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
HolidayWork = holidayWork;
|
||||
IsSettingChange = isSettingChange;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
|
||||
|
||||
var employeeSettingsShift = CustomizeWorkshopGroupSettingsShifts
|
||||
.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();
|
||||
|
||||
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
||||
foreach (var item in permittedToOverWrite)
|
||||
{
|
||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||
LateToWork, EarlyExit, FridayWork, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||
}
|
||||
}
|
||||
public void EditAndOverwriteOnAllEmployees(string groupName, double salary,
|
||||
FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit, FridayWork fridayWork, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||
{
|
||||
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
||||
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
||||
lateToWork, earlyExit);
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
IsSettingChange = isSettingChange;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
var permittedToOverWrite = CustomizeWorkshopEmployeeSettingsCollection.Where(x => employeeIds.Contains(x.EmployeeId));
|
||||
foreach (var item in permittedToOverWrite)
|
||||
{
|
||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||
LateToWork, EarlyExit, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||
}
|
||||
}
|
||||
public void EditAndOverwriteOnAllEmployees(string groupName, double salary,
|
||||
FridayPay fridayPay,
|
||||
OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay, ShiftPay shiftPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, FamilyAllowance familyAllowance,
|
||||
LeavePay leavePay, InsuranceDeduction insuranceDeduction, FineAbsenceDeduction fineAbsenceDeduction,
|
||||
LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, bool isSettingChange, int leavePermittedDays)
|
||||
{
|
||||
SetValueObjects(fridayPay, overTimePay, baseYearsPay, bonusesPay
|
||||
, nightWorkPay, marriedAllowance, shiftPay, familyAllowance, leavePay, insuranceDeduction, fineAbsenceDeduction,
|
||||
lateToWork, earlyExit);
|
||||
GroupName = groupName;
|
||||
Salary = salary;
|
||||
HolidayWork = holidayWork;
|
||||
IsSettingChange = isSettingChange;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
|
||||
|
||||
var employeeSettingsShift = CustomizeWorkshopGroupSettingsShifts
|
||||
.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)
|
||||
{
|
||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||
LateToWork, EarlyExit, FridayWork, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||
}
|
||||
}
|
||||
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
||||
{
|
||||
item.EditEmployees(Salary, FridayPay, OverTimePay, BaseYearsPay, BonusesPay
|
||||
, NightWorkPay, MarriedAllowance, ShiftPay, FamilyAllowance, LeavePay, InsuranceDeduction, FineAbsenceDeduction,
|
||||
LateToWork, EarlyExit, HolidayWork, IrregularShift, false, leavePermittedDays);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveEmployeeFromGroup(long employeeId)
|
||||
{
|
||||
var currentItem = CustomizeWorkshopEmployeeSettingsCollection.FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||
if (currentItem != null)
|
||||
CustomizeWorkshopEmployeeSettingsCollection.Remove(currentItem);
|
||||
}
|
||||
public void RemoveEmployeeFromGroup(long employeeId)
|
||||
{
|
||||
var currentItem = CustomizeWorkshopEmployeeSettingsCollection.FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||
if (currentItem != null)
|
||||
CustomizeWorkshopEmployeeSettingsCollection.Remove(currentItem);
|
||||
}
|
||||
|
||||
public void EditSimpleAndOverwriteOnEmployee(string groupName, IEnumerable<long> employeeIds,
|
||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, WorkshopShiftStatus workshopShiftStatus,
|
||||
IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange, FridayWork fridayWork, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts)
|
||||
{
|
||||
GroupName = groupName;
|
||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
public void EditSimpleAndOverwriteOnEmployee(string groupName, IEnumerable<long> employeeIds,
|
||||
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 : [];
|
||||
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);
|
||||
IsShiftChange = isShiftChange;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||
IsShiftChange = isShiftChange;
|
||||
|
||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
if (isShiftChange)
|
||||
{
|
||||
HolidayWork = holidayWork;
|
||||
|
||||
}
|
||||
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,
|
||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts,
|
||||
WorkshopShiftStatus workshopShiftStatus, IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,
|
||||
FridayWork fridayWork, HolidayWork holidayWork, ICollection<CustomizeRotatingShift> rotatingShifts)
|
||||
{
|
||||
GroupName = groupName;
|
||||
CustomizeWorkshopGroupSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopGroupSettingsShifts : [];
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
foreach (var item in permittedToOverWrite)
|
||||
{
|
||||
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||
.ToList();
|
||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||
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);
|
||||
IsShiftChange = isShiftChange;
|
||||
HolidayWork = holidayWork;
|
||||
FridayWork = fridayWork;
|
||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||
IsShiftChange = isShiftChange;
|
||||
HolidayWork = holidayWork;
|
||||
|
||||
//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);
|
||||
}
|
||||
WeeklyOffDays = weeklyOffDays;
|
||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
|
||||
|
||||
private void SetValueObjects(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||
BonusesPay bonusesPay
|
||||
, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction,
|
||||
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);
|
||||
}
|
||||
foreach (var item in CustomizeWorkshopEmployeeSettingsCollection)
|
||||
{
|
||||
var employeeWeeklyOffDays = WeeklyOffDays.Select(x => new WeeklyOffDay(x.DayOfWeek)).ToList();
|
||||
var newRotatingShifts = CustomizeRotatingShifts.Select(x => new CustomizeRotatingShift(x.StartTime, x.EndTime))
|
||||
.ToList();
|
||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||
irregularShift, workshopShiftStatus, breakTime, false, HolidayWork, newRotatingShifts, employeeWeeklyOffDays);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
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)
|
||||
//{
|
||||
// var permittedToOverWrite= RollCallWorkshopEmployeeSettingsCollection.Where(x => ids.Contains(x.id));
|
||||
// foreach (var item in permittedToOverWrite)
|
||||
// {
|
||||
// item.OverWriteSalaryAndShift(employeeSettingsShifts, salary);
|
||||
// }
|
||||
//}
|
||||
private void SetValueObjects(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay,
|
||||
BonusesPay bonusesPay
|
||||
, NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction,
|
||||
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,
|
||||
ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts, int leavePermittedDays,
|
||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
||||
WorkshopShiftStatus workshopShiftStatus,HolidayWork holidayWork, List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
FridayPay = new FridayPay(FridayPayType.None, 0);
|
||||
OverTimePay = new OverTimePay(OverTimePayType.None, 0);
|
||||
@@ -38,11 +38,10 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
OverTimeThresholdMinute = 0;
|
||||
Currency = Currency.Rial;
|
||||
MaxMonthDays = MaxMonthDays.Default;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
BonusesPaysInEndOfMonth = BonusesPaysInEndOfYear.EndOfYear;
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
|
||||
WeeklyOffDays = weeklyOffDays;
|
||||
HolidayWork = holidayWork;
|
||||
if (workshopShiftStatus == WorkshopShiftStatus.Irregular)
|
||||
return;
|
||||
|
||||
@@ -92,8 +91,7 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
public void Edit(FridayPay fridayPay, OverTimePay overTimePay, BaseYearsPay baseYearsPay, BonusesPay bonusesPay,
|
||||
NightWorkPay nightWorkPay, MarriedAllowance marriedAllowance, ShiftPay shiftPay,
|
||||
FamilyAllowance familyAllowance, LeavePay leavePay, InsuranceDeduction insuranceDeduction,
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit,
|
||||
FridayWork fridayWork, HolidayWork holidayWork, BonusesPaysInEndOfYear bonusesPaysInEndOfYear,
|
||||
FineAbsenceDeduction fineAbsenceDeduction, LateToWork lateToWork, EarlyExit earlyExit, HolidayWork holidayWork, BonusesPaysInEndOfYear bonusesPaysInEndOfYear,
|
||||
int leavePermittedDays, BaseYearsPayInEndOfYear baseYearsPayInEndOfYear, int overTimeThresholdMinute)
|
||||
{
|
||||
FridayPay = fridayPay;
|
||||
@@ -109,7 +107,6 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
FineAbsenceDeduction = fineAbsenceDeduction;
|
||||
LateToWork = lateToWork;
|
||||
EarlyExit = earlyExit;
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
BonusesPaysInEndOfMonth = bonusesPaysInEndOfYear;
|
||||
LeavePermittedDays = leavePermittedDays;
|
||||
@@ -127,19 +124,18 @@ public class CustomizeWorkshopSettings : BaseCustomizeEntity
|
||||
}
|
||||
|
||||
public void ChangeWorkshopShifts(ICollection<CustomizeWorkshopSettingsShift> customizeWorkshopSettingsShifts,
|
||||
WorkshopShiftStatus workshopShiftStatus,FridayWork fridayWork,HolidayWork holidayWork)
|
||||
WorkshopShiftStatus workshopShiftStatus,HolidayWork holidayWork, List<WeeklyOffDay> weeklyOffDays)
|
||||
{
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
HolidayWork = holidayWork;
|
||||
FridayWork = fridayWork;
|
||||
CustomizeWorkshopSettingsShifts = workshopShiftStatus == WorkshopShiftStatus.Regular ? customizeWorkshopSettingsShifts : new List<CustomizeWorkshopSettingsShift>();
|
||||
WeeklyOffDays = weeklyOffDays;
|
||||
|
||||
if (workshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
var date = new DateOnly();
|
||||
var firstStartShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MinBy(x => x.Placement).StartTime);
|
||||
var lastEndShift = new DateTime(date, CustomizeWorkshopSettingsShifts.MaxBy(x => x.Placement).EndTime);
|
||||
|
||||
|
||||
if (lastEndShift > firstStartShift)
|
||||
firstStartShift = firstStartShift.AddDays(1);
|
||||
var offSet = (firstStartShift - lastEndShift).Divide(2);
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.EmployeeComputeOptionsAgg
|
||||
@@ -10,15 +11,17 @@ namespace Company.Domain.EmployeeComputeOptionsAgg
|
||||
public class EmployeeComputeOptions : EntityBase
|
||||
{
|
||||
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;
|
||||
EmployeeId = employeeId;
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
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>
|
||||
public bool SignCheckout { get; private set; }
|
||||
|
||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
||||
bool signCheckout)
|
||||
/// <summary>
|
||||
/// مدت قرارداد
|
||||
/// </summary>
|
||||
public string ContractTerm { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||
/// این آیتم
|
||||
/// True
|
||||
/// است
|
||||
/// </summary>
|
||||
public IsActive CutContractEndOfYear { get; private set; }
|
||||
|
||||
|
||||
|
||||
public void Edit(string computeOptions, string bonusesOptions, string yearsOptions, bool createContract, bool signContract, bool createCheckout,
|
||||
bool signCheckout, string contractTerm, IsActive cutContractEndOfYear)
|
||||
{
|
||||
ComputeOptions = computeOptions;
|
||||
BonusesOptions = bonusesOptions;
|
||||
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 CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
|
||||
namespace Company.Domain.LeftWorkAgg;
|
||||
|
||||
@@ -46,4 +47,11 @@ public interface ILeftWorkRepository : IRepository<long, LeftWork>
|
||||
|
||||
Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId);
|
||||
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>
|
||||
{
|
||||
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>
|
||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||
|
||||
@@ -77,23 +77,13 @@ public class Workshop : EntityBase
|
||||
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,
|
||||
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,
|
||||
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;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -142,7 +132,9 @@ public class Workshop : EntityBase
|
||||
CreateCheckout = createCheckout;
|
||||
SignCheckout = signCheckout;
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
}
|
||||
RotatingShiftCompute = rotatingShiftCompute;
|
||||
IsStaticCheckout = isStaticCheckout;
|
||||
}
|
||||
|
||||
|
||||
public string WorkshopName { get; private set; }
|
||||
@@ -231,7 +223,17 @@ public class Workshop : EntityBase
|
||||
public IsActive CutContractEndOfYear { 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>();
|
||||
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 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 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;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -308,7 +310,9 @@ public class Workshop : EntityBase
|
||||
CreateCheckout = createCheckout;
|
||||
SignCheckout = signCheckout;
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
}
|
||||
RotatingShiftCompute = rotatingShiftCompute;
|
||||
IsStaticCheckout = isStaticCheckout;
|
||||
}
|
||||
|
||||
|
||||
public void Active(string archiveCode)
|
||||
|
||||
@@ -133,6 +133,9 @@ public class CheckoutViewModel
|
||||
/// </summary>
|
||||
public string TotalPaidLeave { get; set; }
|
||||
|
||||
|
||||
public bool HasSignCheckout { get; set; }
|
||||
|
||||
public TimeSpan TotalHourlyLeave { get; set; }
|
||||
public List<CheckoutDailyRollCallViewModel> MonthlyRollCall { get; set; }
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
||||
|
||||
@@ -39,7 +39,11 @@ public class CreateCheckoutListViewModel
|
||||
|
||||
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// آیا پرسنل اجازه ایجاد قرارداد دارد
|
||||
/// </summary>
|
||||
public bool EmployeeHasCreateCheckout { get; set; }
|
||||
|
||||
|
||||
public bool HasWorkFlow { get; set; }
|
||||
public List<CreateCheckoutListViewModel> CreateCheckoutList { get; set; }
|
||||
}
|
||||
@@ -27,6 +27,14 @@ public interface ICheckoutApplication
|
||||
Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year,
|
||||
string month,
|
||||
string contractStart, string contractEnd);
|
||||
/// <summary>
|
||||
/// لیست تصفیه حساب
|
||||
/// جدید
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel);
|
||||
Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel);
|
||||
List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel);
|
||||
List<CheckoutViewModel> PrintAll(List<long> id);
|
||||
|
||||
@@ -63,6 +63,10 @@ public class ContractViweModel
|
||||
public string EmployeeLName { get; set; }
|
||||
|
||||
public string IsBlockCantracingParty { get; set; }
|
||||
/// <summary>
|
||||
/// آیا مجاز به امضاء قرادا می باشد
|
||||
/// </summary>
|
||||
public bool HasSignContract { get; set; }
|
||||
public IQueryable<WorkshopEmployerViewModel> WorkshopEmployerList { get; set; }
|
||||
public List<EmployerViewModel> Employers { get; set; }
|
||||
public List<WorkshopViewModel> Workshops { get; set; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
@@ -16,8 +17,9 @@ public class CreateCustomizeWorkshopGroupSettings
|
||||
public IrregularShift IrregularShift { get; set; }
|
||||
public BreakTime BreakTime { get; set; }
|
||||
public int LeavePermittedDays { get; set; }
|
||||
public FridayWork FridayWork { get; set; }
|
||||
//public FridayWork FridayWork { get; set; }
|
||||
public HolidayWork HolidayWork { get; set; }
|
||||
public List<DayOfWeek> OffDayOfWeeks { 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 System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||
@@ -20,16 +21,18 @@ public class CreateCustomizeWorkshopSettings
|
||||
public BreakTime BreakTime { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آیا جمعه کار میکند یا نه
|
||||
/// </summary>
|
||||
public FridayWork FridayWork { get; set; }
|
||||
///// <summary>
|
||||
///// آیا جمعه کار میکند یا نه
|
||||
///// </summary>
|
||||
//public FridayWork FridayWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا در روز های تعطیل کار میکند
|
||||
/// </summary>
|
||||
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 System.Collections.Generic;
|
||||
|
||||
@@ -20,7 +21,8 @@ public class CustomizeWorkshopEmployeeSettingsViewModel
|
||||
public bool ChangeSettingEmployeeShiftIsChange { get; set; }
|
||||
public BreakTime BreakTime { get; set; }
|
||||
public HolidayWork HolidayWork { get; set; }
|
||||
public FridayWork FridayWork { get; set; }
|
||||
//public FridayWork FridayWork { get; set; }
|
||||
public int LeavePermittedDays { 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.ValueObjects;
|
||||
|
||||
@@ -18,4 +20,5 @@ public class CustomizeWorkshopGroupSettingsViewModel
|
||||
public BreakTime BreakTime { get; set; }
|
||||
public FridayWork FridayWork { 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 System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects;
|
||||
@@ -72,17 +73,19 @@ public class EditCustomizeEmployeeSettings:CreateCustomizeEmployeeSettings
|
||||
/// </summary>
|
||||
public EarlyExitViewModel EarlyExit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا جمعه کار میکند یا نه
|
||||
/// </summary>
|
||||
public FridayWork FridayWork { get; set; }
|
||||
///// <summary>
|
||||
///// آیا جمعه کار میکند یا نه
|
||||
///// </summary>
|
||||
//public FridayWork FridayWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا در روز های تعطیل کار میکند
|
||||
/// </summary>
|
||||
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 NameGroup { get; set; }
|
||||
public string EmployeeFullName { get; set; }
|
||||
@@ -91,4 +94,5 @@ public class EditCustomizeEmployeeSettings:CreateCustomizeEmployeeSettings
|
||||
public IEnumerable<CustomizeWorkshopShiftViewModel> ShiftViewModel { get; set; }
|
||||
public ICollection<CustomizeRotatingShiftsViewModel> CustomizeRotatingShifts{ 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 System.Collections.Generic;
|
||||
using _0_Framework.Domain.CustomizeCheckoutShared.Base;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
|
||||
@@ -75,16 +77,18 @@ public class EditCustomizeWorkshopGroupSettings : CreateCustomizeWorkshopGroupSe
|
||||
/// </summary>
|
||||
public EarlyExitViewModel EarlyExit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا جمعه کار میکند یا نه
|
||||
/// </summary>
|
||||
public FridayWork FridayWork { get; set; }
|
||||
///// <summary>
|
||||
///// آیا جمعه کار میکند یا نه
|
||||
///// </summary>
|
||||
//public FridayWork FridayWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا در روز های تعطیل کار میکند
|
||||
/// </summary>
|
||||
public HolidayWork HolidayWork { get; set; }
|
||||
|
||||
//public List<DayOfWeek> WeeklyOffDays { get; set; }
|
||||
|
||||
public bool IsShiftChanged { 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.ValueObjects;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
@@ -51,11 +52,14 @@ public interface ICustomizeWorkshopSettingsApplication
|
||||
/// </summary>
|
||||
/// <param name="shiftViewModels">شیفت هت</param>
|
||||
/// <param name="customizeWorkshopSettingsId">آیدی تنظیمات کارگاه</param>
|
||||
/// <param name="replaceChangedGroups"></param>
|
||||
/// <param name="workshopShiftStatus"></param>
|
||||
/// <param name="holidayWork"></param>
|
||||
/// <param name="weeklyOffDays"></param>
|
||||
/// <param name="replaceChangedGroups"></param>
|
||||
/// <returns></returns>
|
||||
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.
|
||||
CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopId(long workshopId, AuthViewModel auth);
|
||||
|
||||
@@ -26,4 +26,5 @@ public class EmployeeDataFromApiViewModel
|
||||
/// </summary>
|
||||
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.Linq;
|
||||
using System.Text;
|
||||
@@ -34,5 +35,18 @@ namespace CompanyManagment.App.Contracts.EmployeeComputeOptions
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
@@ -28,4 +30,18 @@ public class EmployeeComputeOptionsViewModel
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
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 _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
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 CheckDeleteLeftWork(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
|
||||
{
|
||||
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>
|
||||
/// گزارش نوبت کاری حضور غیاب
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -43,4 +44,17 @@ public class ConnectedPersonnelViewModel
|
||||
/// امضای تصفیه
|
||||
/// </summary>
|
||||
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>
|
||||
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);
|
||||
|
||||
}
|
||||
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
||||
{
|
||||
var result = new List<CheckoutViewModel>();
|
||||
|
||||
public Task<List<CheckoutViewModel>> SearchCheckoutOptimized(CheckoutSearchModel searchModel)
|
||||
{
|
||||
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);
|
||||
query = query.Select(x => new CheckoutViewModel()
|
||||
{
|
||||
@@ -415,22 +423,22 @@ public class CheckoutApplication : ICheckoutApplication
|
||||
EmployerName = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.EmployerFullName,
|
||||
IsBlockCantracingParty = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.IsBlockContractingParty,
|
||||
}).ToList();
|
||||
//foreach (var items in query)
|
||||
//{
|
||||
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
||||
// if (s != null)
|
||||
// {
|
||||
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
||||
// }
|
||||
// result.Add(items);
|
||||
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
||||
// // .Select(x => x.EmployerId).FirstOrDefault();
|
||||
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
||||
// // = employerName;
|
||||
//foreach (var items in query)
|
||||
//{
|
||||
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
||||
// if (s != null)
|
||||
// {
|
||||
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
||||
// }
|
||||
// result.Add(items);
|
||||
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
||||
// // .Select(x => x.EmployerId).FirstOrDefault();
|
||||
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
||||
// // = employerName;
|
||||
|
||||
//}
|
||||
|
||||
return query;
|
||||
//}
|
||||
Console.WriteLine("old : " + watch.Elapsed);
|
||||
return query;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using Company.Domain.YearlySalaryAgg;
|
||||
using Company.Domain.YearlySalaryItemsAgg;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
@@ -39,6 +40,7 @@ public class ContractApplication : IContractApplication
|
||||
private readonly IPersonnelCodeRepository _personnelCodeRepository;
|
||||
private readonly IWorkingHoursTempApplication _workingHoursTempApplication;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly IEmployeeComputeOptionsApplication _employeeComputeOptionsApplication;
|
||||
|
||||
public List<EmployerViewModel> EmpList;
|
||||
|
||||
@@ -54,7 +56,7 @@ public class ContractApplication : IContractApplication
|
||||
IYearlySalaryRepository yearlySalaryRepository,
|
||||
IYearlySalaryItemRepository yearlySalaryItemRepository
|
||||
, 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;
|
||||
_holidayItemRepository = holidayItemRepository;
|
||||
@@ -70,6 +72,7 @@ public class ContractApplication : IContractApplication
|
||||
_personnelCodeRepository = personnelCodeRepository;
|
||||
_workingHoursTempApplication = workingHoursTempApplication;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
|
||||
|
||||
//_leftWorkApplication = leftWorkApplication;
|
||||
}
|
||||
@@ -3155,7 +3158,7 @@ public class ContractApplication : IContractApplication
|
||||
EmployeeFName = x.EmployeeFName,
|
||||
EmployeeLName = x.EmployeeLName,
|
||||
IsBlockCantracingParty = _contractingPartyApp.IsBlockByEmployerId(x.EmployerId),
|
||||
|
||||
HasSignContract = _employeeComputeOptionsApplication.GetEmployeeOptions(x.WorkshopIds,x.EmployeeId).SignContract
|
||||
|
||||
}).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("کد ملی وارد شده تکراری است");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1558,7 +1559,11 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
if (employee.IsAuthorized == false)
|
||||
{
|
||||
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
||||
if (apiResult.ResponseContext.Status.Code == 14)
|
||||
{
|
||||
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
||||
|
||||
}
|
||||
if (apiResult.ResponseContext.Status.Code != 0)
|
||||
{
|
||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||
@@ -1614,7 +1619,16 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
return op.Succcedded(data);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||
|
||||
@@ -21,8 +21,16 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
||||
|
||||
public OperationResult Create(CreateEmployeeComputeOptions command)
|
||||
{
|
||||
|
||||
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 =>
|
||||
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.WorkshopId))
|
||||
@@ -31,7 +39,7 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
||||
var editOptions = _employeeComputeOptionsRepository.Get(query.Id);
|
||||
|
||||
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();
|
||||
return opration.Succcedded();
|
||||
@@ -40,7 +48,7 @@ public class EmployeeComputeOptionsApplication : IEmployeeComputeOptionsApplicat
|
||||
{
|
||||
var createOptions = new EmployeeComputeOptions(command.WorkshopId, command.EmployeeId,
|
||||
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.SaveChanges();
|
||||
|
||||
@@ -512,13 +512,13 @@ public class InsuranceListApplication : IInsuranceListApplication
|
||||
monthlyBenefits = GetRoundValue(monthlyBenefits += overTimePay);
|
||||
}
|
||||
|
||||
//سرای ملک
|
||||
// نوشین خالی
|
||||
// 39692467
|
||||
//if (employee.EmployeeId == 45280)
|
||||
// monthlyBenefits += 39692467;
|
||||
//سرای ملک
|
||||
// نرجس خالی
|
||||
// 39692467
|
||||
if (employee.EmployeeId == 45280)
|
||||
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);
|
||||
//محاسبه جمع مزایای مشمول و دستمزد ماهانه
|
||||
var benefitsIncludedContinuous = monthlyBenefits + monthlySalary;
|
||||
|
||||
@@ -15,6 +15,7 @@ using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.WorkingHours;
|
||||
using CompanyManagment.App.Contracts.WorkingHoursItems;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using PersianTools.Core;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
@@ -600,6 +601,11 @@ public class LeftWorkApplication : ILeftWorkApplication
|
||||
return _leftWorkRepository.CheckEditLeftWork(workshopId, employeeId, date.ToGeorgianDateTime(), type);
|
||||
}
|
||||
|
||||
public AutoExtensionDto AutoExtentionEmployees(long workshopId)
|
||||
{
|
||||
return _leftWorkRepository.AutoExtentionEmployees(workshopId);
|
||||
}
|
||||
|
||||
#region Pooya
|
||||
//این متد ترک کار های کارمند را با فعالیت حضور غیاب یکپارچه می کند
|
||||
private void IfEmployeeHasNewLeftWorkDateAddEndDateToRollCallStatus(long employeeId)
|
||||
|
||||
@@ -19,6 +19,7 @@ using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||
using CompanyManagment.App.Contracts.ReportClient;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.EFCore.Migrations;
|
||||
using OperationResult = _0_Framework.Application.OperationResult;
|
||||
using Tools = _0_Framework.Application.Tools;
|
||||
|
||||
@@ -174,10 +175,19 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
|
||||
|
||||
await _leftWorkRepository.CreateAsync(newLeftWork);
|
||||
_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 _leftWorkTempRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
@@ -148,6 +148,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
||||
var account = new AccountViewModel();
|
||||
var institutionContract = new InstitutionContract();
|
||||
|
||||
if (command.HasRollCallFreeVip == "true")
|
||||
{
|
||||
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
||||
@@ -156,7 +157,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
account = _personalContractingPartyRepository.GetAccountByPersonalContractingParty(institutionContract.ContractingPartyId);
|
||||
if(account == null || account.ClientAreaPermission != "true")
|
||||
return operation.Failed("بدلیل نداشتن حساب کاربری کلاینت نمیتوانید سرویس حضور غیاب را فعال کنید");
|
||||
|
||||
|
||||
}
|
||||
var workshop = new Workshop(command.WorkshopName, command.WorkshopSureName, command.InsuranceCode,
|
||||
command.TypeOfOwnership,
|
||||
@@ -167,7 +168,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
command.AddYearsPay,command.AddLeavePay,command.TotalPaymentHide,command.IsClassified,command.ComputeOptions,
|
||||
command.BonusesOptions,command.YearsOptions,command.HasRollCallFreeVip,command.WorkshopHolidayWorking,
|
||||
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.SaveChanges();
|
||||
|
||||
@@ -281,9 +282,11 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
}
|
||||
var account = new AccountViewModel();
|
||||
var institutionContract = new InstitutionContract();
|
||||
|
||||
|
||||
if (command.HasRollCallFreeVip == "true")
|
||||
{
|
||||
|
||||
|
||||
institutionContract = _institutionContractRepository.InstitutionContractByEmployerId(employer.FirstOrDefault());
|
||||
if (institutionContract == null)
|
||||
return operation.Failed("بدلیل نداشتن قرار داد مالی نمیتوانید سرویس حضور غیاب را فعال کنید");
|
||||
@@ -358,7 +361,7 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
command.AddBonusesPay, command.AddYearsPay, command.AddLeavePay, command.TotalPaymentHide,command.IsClassified,
|
||||
command.ComputeOptions,command.BonusesOptions, command.YearsOptions,command.HasRollCallFreeVip,
|
||||
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.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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
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.YearsOptions).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)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("ContractTerm")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<bool>("CreateCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -1818,6 +1822,11 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CutContractEndOfYear")
|
||||
.IsRequired()
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -5705,10 +5714,16 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<bool>("IsOldContract")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsStaticCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("Population")
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("nvarchar(25)");
|
||||
|
||||
b.Property<bool>("RotatingShiftCompute")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("SignCheckout")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -7634,6 +7649,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.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("BonusesPay");
|
||||
@@ -7669,6 +7710,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("OverTimePay");
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopGroupSettingsAgg.Entities.CustomizeWorkshopGroupSettings", b =>
|
||||
@@ -8192,6 +8235,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.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("BonusesPay");
|
||||
@@ -8227,6 +8296,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("OverTimePay");
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.CustomizeWorkshopSettingsAgg.Entities.CustomizeWorkshopSettings", b =>
|
||||
@@ -8677,6 +8748,32 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.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("BonusesPay");
|
||||
@@ -8705,6 +8802,8 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
|
||||
b.Navigation("ShiftPay");
|
||||
|
||||
b.Navigation("WeeklyOffDays");
|
||||
|
||||
b.Navigation("Workshop");
|
||||
});
|
||||
|
||||
|
||||
@@ -18,332 +18,449 @@ namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyOverview>, IAdminMonthlyOverviewRepository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
private readonly AccountContext _accountContext;
|
||||
public AdminMonthlyOverviewRepository(CompanyContext companyContext, AccountContext accountContext) : base(companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
private readonly CompanyContext _companyContext;
|
||||
private readonly AccountContext _accountContext;
|
||||
public AdminMonthlyOverviewRepository(CompanyContext companyContext, AccountContext accountContext) : base(companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
|
||||
public async Task<List<AdminMonthlyOverviewListViewModel>> GetWorkshopStatus(AdminMonthlyOverviewSearchModel searchModel)
|
||||
{
|
||||
public async Task<List<AdminMonthlyOverviewListViewModel>> GetWorkshopStatus(AdminMonthlyOverviewSearchModel searchModel)
|
||||
{
|
||||
|
||||
var year = searchModel.Year;
|
||||
var month = searchModel.Month;
|
||||
var accountId = searchModel.AdminAccountId;
|
||||
// اگر تبدیل تاریخ به میلادی موفق نبود، لیست خالی برگردان
|
||||
if ($"{year:0000}/{month:00}/01".TryToGeorgianDateTime(out var targetStartDate) == false)
|
||||
return [];
|
||||
var targetEndDate = Tools.FindeEndOfMonth(targetStartDate.ToFarsi()).ToGeorgianDateTime();
|
||||
var year = searchModel.Year;
|
||||
var month = searchModel.Month;
|
||||
var accountId = searchModel.AdminAccountId;
|
||||
// اگر تبدیل تاریخ به میلادی موفق نبود، لیست خالی برگردان
|
||||
if ($"{year:0000}/{month:00}/01".TryToGeorgianDateTime(out var targetStartDate) == false)
|
||||
return [];
|
||||
var targetEndDate = Tools.FindeEndOfMonth(targetStartDate.ToFarsi()).ToGeorgianDateTime();
|
||||
|
||||
|
||||
|
||||
_ = $"{year:0000}/{month:00}/01".ToGeorgianDateTime().AddMonthsFa(1, out var nextFirstMonth);
|
||||
var nextEndMonth = Tools.FindeEndOfMonth(nextFirstMonth.ToFarsi()).ToGeorgianDateTime();
|
||||
_ = $"{year:0000}/{month:00}/01".ToGeorgianDateTime().AddMonthsFa(1, out var nextFirstMonth);
|
||||
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)
|
||||
return [];
|
||||
// اگر ادمین پیدا نشد، لیست خالی برگردان
|
||||
if (adminAccount == null)
|
||||
return [];
|
||||
|
||||
// دریافت طرف حساب های معتبر برای تاریخ مورد نظر
|
||||
var contractingPartyIds = _companyContext.InstitutionContractSet.AsNoTracking()
|
||||
.Where(c => c.ContractStartGr <= targetEndDate && c.ContractEndGr >= targetStartDate)
|
||||
.Select(c => c.ContractingPartyId);
|
||||
// دریافت طرف حساب های معتبر برای تاریخ مورد نظر
|
||||
var contractingPartyIds = _companyContext.InstitutionContractSet.AsNoTracking()
|
||||
.Where(c => c.ContractStartGr <= targetEndDate && c.ContractEndGr >= targetStartDate)
|
||||
.Select(c => c.ContractingPartyId);
|
||||
|
||||
// دریافت کارگاههای مرتبط با اکانت
|
||||
// دریافت کارگاههای مرتبط با اکانت
|
||||
|
||||
var workshopAccounts = _companyContext.WorkshopAccounts
|
||||
.AsNoTracking()
|
||||
.Where(w => w.AccountId == accountId)
|
||||
.Select(w => w.WorkshopId).ToList();
|
||||
var workshopAccounts = _companyContext.WorkshopAccounts
|
||||
.AsNoTracking()
|
||||
.Where(w => w.AccountId == accountId)
|
||||
.Select(w => w.WorkshopId).ToList();
|
||||
|
||||
|
||||
|
||||
var workshopsHasLeftWorkEmployees = _companyContext.LeftWorkList.Where(x =>
|
||||
((x.StartWorkDate <= targetEndDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate)
|
||||
|| (x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextFirstMonth)) && workshopAccounts.Contains(x.WorkshopId)).Select(x => x.WorkshopId);
|
||||
var workshopsHasLeftWorkEmployees = _companyContext.LeftWorkList.Where(x =>
|
||||
((x.StartWorkDate <= targetEndDate && x.LeftWorkDate.AddDays(-1) >= targetStartDate)
|
||||
|| (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
|
||||
var workshopsWithContractingParty = await _companyContext.Workshops
|
||||
.AsNoTracking()
|
||||
.Where(w => workshopsHasLeftWorkEmployees.Contains(w.id) && w.IsActive)
|
||||
.Include(w => w.WorkshopEmployers)
|
||||
.ThenInclude(we => we.Employer)
|
||||
.ThenInclude(e => e.ContractingParty).AsSplitQuery().
|
||||
Where(w => w.WorkshopEmployers.Any(we =>
|
||||
we.Employer != null &&
|
||||
contractingPartyIds.Contains(we.Employer.ContractingPartyId)))
|
||||
.Select(w => new
|
||||
{
|
||||
Workshop = w,
|
||||
ContractingParty = w.WorkshopEmployers
|
||||
.Where(we => we.Employer != null && contractingPartyIds.Contains(we.Employer.ContractingPartyId))
|
||||
.Select(we => we.Employer.ContractingParty)
|
||||
.FirstOrDefault()
|
||||
})
|
||||
.ToListAsync();
|
||||
// دریافت کارگاههای مربوط به طرف حساب و اکانت
|
||||
// Replace the selected code with the following to return a list of anonymous objects containing both workshop and contractingParty
|
||||
var workshopsWithContractingParty = await _companyContext.Workshops
|
||||
.AsNoTracking()
|
||||
.Where(w => workshopsHasLeftWorkEmployees.Contains(w.id) && w.IsActive)
|
||||
.Include(w => w.WorkshopEmployers)
|
||||
.ThenInclude(we => we.Employer)
|
||||
.ThenInclude(e => e.ContractingParty).AsSplitQuery().
|
||||
Where(w => w.WorkshopEmployers.Any(we =>
|
||||
we.Employer != null &&
|
||||
contractingPartyIds.Contains(we.Employer.ContractingPartyId)))
|
||||
.Select(w => new
|
||||
{
|
||||
Workshop = w,
|
||||
ContractingParty = w.WorkshopEmployers
|
||||
.Where(we => we.Employer != null && contractingPartyIds.Contains(we.Employer.ContractingPartyId))
|
||||
.Select(we => we.Employer.ContractingParty)
|
||||
.FirstOrDefault()
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
var workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||
var workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||
|
||||
|
||||
// پیدا کردن کارگاههایی که قبلاً برای این ماه/سال AdminMonthlyOverview دارند
|
||||
var adminMonthlyOverviewWorkshopIds = await _companyContext.AdminMonthlyOverviews
|
||||
.AsNoTracking()
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year)
|
||||
.Select(x => x.WorkshopId)
|
||||
.ToListAsync();
|
||||
// پیدا کردن کارگاههایی که قبلاً برای این ماه/سال AdminMonthlyOverview دارند
|
||||
var adminMonthlyOverviewWorkshopIds = await _companyContext.AdminMonthlyOverviews
|
||||
.AsNoTracking()
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year)
|
||||
.Select(x => x.WorkshopId)
|
||||
.ToListAsync();
|
||||
|
||||
// پیدا کردن کارگاههایی که نیاز به ایجاد AdminMonthlyOverview جدید دارند
|
||||
var notExistAdminMonthlyReviewsWorkshopIds = workshopIds
|
||||
.Except(adminMonthlyOverviewWorkshopIds)
|
||||
.ToList();
|
||||
// پیدا کردن کارگاههایی که نیاز به ایجاد AdminMonthlyOverview جدید دارند
|
||||
var notExistAdminMonthlyReviewsWorkshopIds = workshopIds
|
||||
.Except(adminMonthlyOverviewWorkshopIds)
|
||||
.ToList();
|
||||
|
||||
|
||||
|
||||
// ایجاد رکوردهای AdminMonthlyOverview که وجود ندارند
|
||||
if (notExistAdminMonthlyReviewsWorkshopIds.Any())
|
||||
await CreateRangeAdminMonthlyOverview(notExistAdminMonthlyReviewsWorkshopIds, month, year);
|
||||
|
||||
// بهروزرسانی وضعیتها
|
||||
await UpdateAdminMonthlyOverviewStatus(year, month, workshopIds, targetStartDate,targetEndDate, nextFirstMonth,nextEndMonth);
|
||||
// ایجاد رکوردهای AdminMonthlyOverview که وجود ندارند
|
||||
if (notExistAdminMonthlyReviewsWorkshopIds.Any())
|
||||
await CreateRangeAdminMonthlyOverview(notExistAdminMonthlyReviewsWorkshopIds, month, year);
|
||||
|
||||
// بهروزرسانی وضعیتها
|
||||
await UpdateAdminMonthlyOverviewStatus(year, month, workshopIds, targetStartDate, targetEndDate, nextFirstMonth, nextEndMonth);
|
||||
|
||||
if (searchModel.ActivationStatus != IsActive.None)
|
||||
{
|
||||
var isBlock = searchModel.ActivationStatus == IsActive.True ? "false" : "true";
|
||||
|
||||
workshopsWithContractingParty = workshopsWithContractingParty
|
||||
.Where(x => x.ContractingParty?.IsBlock == isBlock).ToList();
|
||||
if (searchModel.ActivationStatus != IsActive.None)
|
||||
{
|
||||
var isBlock = searchModel.ActivationStatus == IsActive.True ? "false" : "true";
|
||||
|
||||
workshopsWithContractingParty = workshopsWithContractingParty
|
||||
.Where(x => x.ContractingParty?.IsBlock == isBlock).ToList();
|
||||
|
||||
workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||
}
|
||||
|
||||
// دریافت همه AdminMonthlyOverview برای این کارگاهها/ماه/سال
|
||||
var adminMonthlyOverviewsQuery = _companyContext.AdminMonthlyOverviews
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year);
|
||||
|
||||
if (searchModel.WorkshopId > 0)
|
||||
{
|
||||
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => x.WorkshopId == searchModel.WorkshopId);
|
||||
}
|
||||
workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||
}
|
||||
|
||||
// دریافت همه AdminMonthlyOverview برای این کارگاهها/ماه/سال
|
||||
var adminMonthlyOverviewsQuery = _companyContext.AdminMonthlyOverviews
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.Month == month && x.Year == year);
|
||||
|
||||
if (searchModel.WorkshopId > 0)
|
||||
{
|
||||
adminMonthlyOverviewsQuery = adminMonthlyOverviewsQuery.Where(x => x.WorkshopId == searchModel.WorkshopId);
|
||||
}
|
||||
|
||||
if (searchModel.EmployerId > 0)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
var employeeCheckoutCounts = _companyContext.LeftWorkList.Where(x =>
|
||||
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();
|
||||
|
||||
var employeeContractCounts = _companyContext.LeftWorkList.Where(x =>
|
||||
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();
|
||||
|
||||
var adminMonthlyOverviewsList = await adminMonthlyOverviewsQuery.ToListAsync();
|
||||
|
||||
var now = DateTime.Today;
|
||||
//پرسنل ادمین اجرایی
|
||||
var operatorAdminAccounts = _accountContext.AccountLeftWorks
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkGr <= now && x.LeftWorkGr >= now &&
|
||||
x.RoleId == 5).Select(x => new { x.WorkshopId, x.AccountId })
|
||||
.Join(_accountContext.Accounts,
|
||||
x => x.AccountId,
|
||||
account => account.id, (x, account) => new
|
||||
{
|
||||
x.WorkshopId,
|
||||
account.Fullname
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var adminMonthlyOverviewList = adminMonthlyOverviewsList.Select(x =>
|
||||
{
|
||||
var employeeCheckoutCount = employeeCheckoutCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||
var employeeContractCount = employeeContractCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||
var workshopWithContractingParty =
|
||||
workshopsWithContractingParty.FirstOrDefault(w => w.Workshop.id == x.WorkshopId);
|
||||
|
||||
var operatorAccount = operatorAdminAccounts.FirstOrDefault(o => o.WorkshopId == x.WorkshopId);
|
||||
|
||||
var workshop = workshopWithContractingParty?.Workshop;
|
||||
var contractingParty = workshopWithContractingParty?.ContractingParty;
|
||||
var employer = workshop?.WorkshopEmployers.FirstOrDefault()?.Employer;
|
||||
return new AdminMonthlyOverviewListViewModel
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
Status = x.Status,
|
||||
Id = x.id,
|
||||
WorkshopName = workshop?.WorkshopFullName ?? "",
|
||||
WorkshopArchiveCode = workshop?.ArchiveCode ?? "",
|
||||
WorkshopArchiveCodeInt = workshop?.ArchiveCode.ExtractIntNumbers() ?? 0,
|
||||
Address = workshop?.Address ?? "",
|
||||
City = workshop?.City ?? "",
|
||||
Province = workshop?.State ?? "",
|
||||
EmployerName = employer?.FullName ?? "",
|
||||
EmployerPhoneNumber = employer?.Phone ?? "",
|
||||
AdminFullName = operatorAccount?.Fullname ?? "",
|
||||
CheckoutEmployeeCount = employeeCheckoutCount?.EmployeeCounts ?? 0,
|
||||
ContractEmployeeCount = employeeContractCount?.EmployeeCounts ?? 0,
|
||||
AgentPhoneNumber = "",
|
||||
IsBlock = contractingParty?.IsBlock == "true"
|
||||
};
|
||||
}).OrderBy(x => x.IsBlock).ThenBy(x => x.WorkshopArchiveCodeInt).ToList();
|
||||
|
||||
|
||||
return adminMonthlyOverviewList;
|
||||
}
|
||||
|
||||
public async Task<AdminMonthlyOverViewCounterVm> GetCounter(int year, int month, long accountId)
|
||||
{
|
||||
var searchModel = new AdminMonthlyOverviewSearchModel()
|
||||
{
|
||||
AdminAccountId = accountId,
|
||||
Month = month,
|
||||
Year = year
|
||||
};
|
||||
var list = await GetWorkshopStatus(searchModel);
|
||||
|
||||
var allCount = list.Count;
|
||||
var archivedCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.Archived);
|
||||
var createDocCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.CreateDocuments);
|
||||
var visitCompleteCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitCompleted);
|
||||
var visitInProgressCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitInProgress);
|
||||
var visitPendingCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitPending);
|
||||
|
||||
return new AdminMonthlyOverViewCounterVm
|
||||
{
|
||||
All = allCount,
|
||||
Archived = archivedCount,
|
||||
VisitPending = visitPendingCount,
|
||||
VisitInProgress = visitInProgressCount,
|
||||
VisitCompleted = visitCompleteCount,
|
||||
CreateDocument = createDocCount
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
.Select(x => x.EmployeeId)
|
||||
.Except([5976]).ToList();
|
||||
|
||||
var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||
.Join(
|
||||
_companyContext.Contracts.AsNoTracking(),
|
||||
leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
||||
contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
||||
(leftWork, contract) => new { leftWork, contract }
|
||||
)
|
||||
.Where(x =>
|
||||
workshopIds.Contains(x.leftWork.WorkshopId) &&
|
||||
x.leftWork.StartWorkDate <= targetEndDate &&
|
||||
x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||
x.contract.ContarctStart <= targetEndDate &&
|
||||
x.contract.ContractEnd >= targetStartDate &&
|
||||
!vipGroup.Contains(x.leftWork.EmployeeId) &&
|
||||
!_companyContext.EmployeeClientTemps
|
||||
.Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
||||
)
|
||||
.Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
||||
|
||||
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||
!vipGroup.Contains(x.EmployeeId) &&
|
||||
!_companyContext.EmployeeClientTemps
|
||||
.Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId)
|
||||
).Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||
|
||||
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
||||
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
||||
.Select(x => new { x.WorkshopIds, x.EmployeeId })
|
||||
.ToListAsync())
|
||||
.Select(x => (x.WorkshopIds, x.EmployeeId))
|
||||
.ToHashSet();
|
||||
|
||||
var checkoutSet = (await _companyContext.CheckoutSet.AsNoTracking()
|
||||
.Where(x => x.ContractStart <= targetEndDate && x.ContractEnd >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
||||
.Select(x => new { x.WorkshopId, x.EmployeeId })
|
||||
.ToListAsync())
|
||||
.Select(x => (x.WorkshopId, x.EmployeeId))
|
||||
.ToHashSet();
|
||||
|
||||
var workingCheckoutGrouping = workingCheckoutEmployeeIds.GroupBy(x => x.WorkshopId).ToList();
|
||||
|
||||
var workingContractGrouping = workingContractEmployeeIds.GroupBy(x => x.WorkshopId).Select(x => new
|
||||
{
|
||||
WorkshopId = x.Key,
|
||||
Data = x.ToList()
|
||||
}).ToList();
|
||||
|
||||
var workshopsWithFullContracts = workingContractGrouping
|
||||
.Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.WorkshopId)
|
||||
.ToList();
|
||||
|
||||
var list = workingContractEmployeeIds.ToList().Where(x=>!contractSet.Any(a=>a.EmployeeId== x.EmployeeId&&a.WorkshopIds == x.WorkshopId)).ToList();
|
||||
|
||||
var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.Key)
|
||||
.ToList();
|
||||
|
||||
|
||||
var fullyCoveredWorkshops = workshopsWithFullContracts.Intersect(workshopsWithFullCheckout).ToList();
|
||||
|
||||
//var notFullyCoveredWorkshops = groupedCheckout
|
||||
// .Where(g => g.Any(emp =>
|
||||
// !contractSet.Contains((emp.WorkshopId, emp.EmployeeId)) ||
|
||||
// !checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
// .Select(g => g.Key)
|
||||
// .ToList();
|
||||
|
||||
var notFullyCoveredWorkshops = workshopIds.Except(fullyCoveredWorkshops);
|
||||
|
||||
var adminMonthlyOverviews = _companyContext.AdminMonthlyOverviews
|
||||
.Where(x => x.Month == month && x.Year == year);
|
||||
|
||||
var adminMonthlyOverviewsWithFullContracts = await adminMonthlyOverviews
|
||||
.Where(x => fullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status == AdminMonthlyOverviewStatus.CreateDocuments)
|
||||
.ToListAsync();
|
||||
|
||||
var adminMonthlyOverviewsWithNotFullContracts = await adminMonthlyOverviews
|
||||
.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();
|
||||
}
|
||||
if (searchModel.EmployerId > 0)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
var employeeCheckoutCounts = _companyContext.LeftWorkList.Where(x =>
|
||||
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();
|
||||
|
||||
var employeeContractCounts = _companyContext.LeftWorkList.Where(x =>
|
||||
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();
|
||||
|
||||
var adminMonthlyOverviewsList = await adminMonthlyOverviewsQuery.ToListAsync();
|
||||
|
||||
var now = DateTime.Today;
|
||||
//پرسنل ادمین اجرایی
|
||||
var operatorAdminAccounts = _accountContext.AccountLeftWorks
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkGr <= now && x.LeftWorkGr >= now &&
|
||||
x.RoleId == 5).Select(x => new { x.WorkshopId, x.AccountId })
|
||||
.Join(_accountContext.Accounts,
|
||||
x => x.AccountId,
|
||||
account => account.id, (x, account) => new
|
||||
{
|
||||
x.WorkshopId,
|
||||
account.Fullname
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var adminMonthlyOverviewList = adminMonthlyOverviewsList.Select(x =>
|
||||
{
|
||||
var employeeCheckoutCount = employeeCheckoutCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||
var employeeContractCount = employeeContractCounts.FirstOrDefault(e => e.WorkshopId == x.WorkshopId);
|
||||
var workshopWithContractingParty =
|
||||
workshopsWithContractingParty.FirstOrDefault(w => w.Workshop.id == x.WorkshopId);
|
||||
|
||||
var operatorAccount = operatorAdminAccounts.FirstOrDefault(o => o.WorkshopId == x.WorkshopId);
|
||||
|
||||
var workshop = workshopWithContractingParty?.Workshop;
|
||||
var contractingParty = workshopWithContractingParty?.ContractingParty;
|
||||
var employer = workshop?.WorkshopEmployers.FirstOrDefault()?.Employer;
|
||||
return new AdminMonthlyOverviewListViewModel
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
Status = x.Status,
|
||||
Id = x.id,
|
||||
WorkshopName = workshop?.WorkshopFullName ?? "",
|
||||
WorkshopArchiveCode = workshop?.ArchiveCode ?? "",
|
||||
WorkshopArchiveCodeInt = workshop?.ArchiveCode.ExtractIntNumbers() ?? 0,
|
||||
Address = workshop?.Address ?? "",
|
||||
City = workshop?.City ?? "",
|
||||
Province = workshop?.State ?? "",
|
||||
EmployerName = employer?.FullName ?? "",
|
||||
EmployerPhoneNumber = employer?.Phone ?? "",
|
||||
AdminFullName = operatorAccount?.Fullname ?? "",
|
||||
CheckoutEmployeeCount = employeeCheckoutCount?.EmployeeCounts ?? 0,
|
||||
ContractEmployeeCount = employeeContractCount?.EmployeeCounts ?? 0,
|
||||
AgentPhoneNumber = "",
|
||||
IsBlock = contractingParty?.IsBlock == "true"
|
||||
};
|
||||
}).OrderBy(x => x.IsBlock).ThenBy(x => x.WorkshopArchiveCodeInt).ToList();
|
||||
|
||||
|
||||
return adminMonthlyOverviewList;
|
||||
}
|
||||
|
||||
public async Task<AdminMonthlyOverViewCounterVm> GetCounter(int year, int month, long accountId)
|
||||
{
|
||||
var searchModel = new AdminMonthlyOverviewSearchModel()
|
||||
{
|
||||
AdminAccountId = accountId,
|
||||
Month = month,
|
||||
Year = year
|
||||
};
|
||||
var list = await GetWorkshopStatus(searchModel);
|
||||
|
||||
var allCount = list.Count;
|
||||
var archivedCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.Archived);
|
||||
var createDocCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.CreateDocuments);
|
||||
var visitCompleteCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitCompleted);
|
||||
var visitInProgressCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitInProgress);
|
||||
var visitPendingCount = list.Count(x => x.Status == AdminMonthlyOverviewStatus.VisitPending);
|
||||
|
||||
return new AdminMonthlyOverViewCounterVm
|
||||
{
|
||||
All = allCount,
|
||||
Archived = archivedCount,
|
||||
VisitPending = visitPendingCount,
|
||||
VisitInProgress = visitInProgressCount,
|
||||
VisitCompleted = visitCompleteCount,
|
||||
CreateDocument = createDocCount
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
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)
|
||||
.Select(x => x.EmployeeId)
|
||||
.Except([5976]).ToHashSet();
|
||||
|
||||
|
||||
var workingCheckoutEmployeeIds = GetWorkingCheckoutEmployeeIds(workshopIds, targetStartDate, targetEndDate, vipGroup);
|
||||
//var workingCheckoutEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||
// .Join(
|
||||
// _companyContext.Contracts.AsNoTracking(),
|
||||
// leftWork => new { leftWork.EmployeeId, WorkshopId = leftWork.WorkshopId },
|
||||
// contract => new { contract.EmployeeId, WorkshopId = contract.WorkshopIds },
|
||||
// (leftWork, contract) => new { leftWork, contract }
|
||||
// )
|
||||
// .Where(x =>
|
||||
// workshopIds.Contains(x.leftWork.WorkshopId) &&
|
||||
// x.leftWork.StartWorkDate <= targetEndDate &&
|
||||
// x.leftWork.LeftWorkDate.AddDays(-1) >= targetStartDate &&
|
||||
// x.contract.ContarctStart <= targetEndDate &&
|
||||
// x.contract.ContractEnd >= targetStartDate &&
|
||||
// !vipGroup.Contains(x.leftWork.EmployeeId) &&
|
||||
// !_companyContext.EmployeeClientTemps
|
||||
// .Any(temp => temp.EmployeeId == x.leftWork.EmployeeId && temp.WorkshopId == x.leftWork.WorkshopId)
|
||||
// )
|
||||
// .Select(x => new { x.leftWork.WorkshopId, x.leftWork.EmployeeId });
|
||||
|
||||
|
||||
|
||||
var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||
!vipGroup.Contains(x.EmployeeId) &&
|
||||
!_companyContext.EmployeeClientTemps
|
||||
.Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId))
|
||||
.GroupJoin(_companyContext.EmployeeComputeOptionsSet.Where(o => workshopIds.Contains(o.WorkshopId)),
|
||||
x => new { x.EmployeeId, x.WorkshopId },
|
||||
option => new { option.EmployeeId, option.WorkshopId },
|
||||
(x, options) => new { LeftWork = x, options })
|
||||
.SelectMany(
|
||||
x => x.options.DefaultIfEmpty(),
|
||||
(x, option) => new { x.LeftWork, option })
|
||||
.Where(x => x.option != null ? x.option.CreateContract
|
||||
: x.LeftWork.Workshop.CreateContract)
|
||||
.Select(x => new { x.LeftWork.WorkshopId, x.LeftWork.EmployeeId });
|
||||
|
||||
|
||||
//var workingContractEmployeeIds = _companyContext.LeftWorkList.AsNoTracking()
|
||||
// .Where(x => workshopIds.Contains(x.WorkshopId) && x.StartWorkDate <= nextEndMonth && x.LeftWorkDate.AddDays(-1) >= nextStartMonth &&
|
||||
// !vipGroup.Contains(x.EmployeeId) &&
|
||||
// !_companyContext.EmployeeClientTemps
|
||||
// .Any(temp => temp.EmployeeId == x.EmployeeId && temp.WorkshopId == x.WorkshopId)
|
||||
// ).Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||
|
||||
var contractSet = (await _companyContext.Contracts.AsNoTracking()
|
||||
.Where(x => x.ContarctStart <= nextEndMonth && x.ContractEnd >= nextStartMonth && workshopIds.Contains(x.WorkshopIds))
|
||||
.Select(x => new { x.WorkshopIds, x.EmployeeId })
|
||||
.ToListAsync())
|
||||
.Select(x => (x.WorkshopIds, x.EmployeeId))
|
||||
.ToHashSet();
|
||||
|
||||
var checkoutSet = (await _companyContext.CheckoutSet.AsNoTracking()
|
||||
.Where(x => x.ContractStart <= targetEndDate && x.ContractEnd >= targetStartDate && workshopIds.Contains(x.WorkshopId))
|
||||
.Select(x => new { x.WorkshopId, x.EmployeeId })
|
||||
.ToListAsync())
|
||||
.Select(x => (x.WorkshopId, x.EmployeeId))
|
||||
.ToHashSet();
|
||||
|
||||
var workingCheckoutGrouping = workingCheckoutEmployeeIds.GroupBy(x => x.WorkshopId).ToList();
|
||||
|
||||
var workingContractGrouping = workingContractEmployeeIds.GroupBy(x => x.WorkshopId).Select(x => new
|
||||
{
|
||||
WorkshopId = x.Key,
|
||||
Data = x.ToList()
|
||||
}).ToList();
|
||||
|
||||
var workshopsWithFullContracts = workingContractGrouping
|
||||
.Where(g => g.Data.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.WorkshopId)
|
||||
.ToList();
|
||||
|
||||
var list = workingContractEmployeeIds.ToList().Where(x => !contractSet.Any(a => a.EmployeeId == x.EmployeeId && a.WorkshopIds == x.WorkshopId)).ToList();
|
||||
|
||||
var workshopsWithFullCheckout = workingCheckoutGrouping
|
||||
.Where(g => g.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
.Select(g => g.Key)
|
||||
.ToList();
|
||||
|
||||
|
||||
var fullyCoveredWorkshops = workshopsWithFullContracts.Intersect(workshopsWithFullCheckout).ToList();
|
||||
|
||||
//var notFullyCoveredWorkshops = groupedCheckout
|
||||
// .Where(g => g.Any(emp =>
|
||||
// !contractSet.Contains((emp.WorkshopId, emp.EmployeeId)) ||
|
||||
// !checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId))))
|
||||
// .Select(g => g.Key)
|
||||
// .ToList();
|
||||
|
||||
var notFullyCoveredWorkshops = workshopIds.Except(fullyCoveredWorkshops);
|
||||
|
||||
var adminMonthlyOverviews = _companyContext.AdminMonthlyOverviews
|
||||
.Where(x => x.Month == month && x.Year == year);
|
||||
|
||||
var adminMonthlyOverviewsWithFullContracts = await adminMonthlyOverviews
|
||||
.Where(x => fullyCoveredWorkshops.Contains(x.WorkshopId) && x.Status == AdminMonthlyOverviewStatus.CreateDocuments)
|
||||
.ToListAsync();
|
||||
|
||||
var adminMonthlyOverviewsWithNotFullContracts = await adminMonthlyOverviews
|
||||
.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 EditCustomizeEmployeeSettings()
|
||||
{
|
||||
FridayWork = entity.FridayWork,
|
||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||
LateToWork = new()
|
||||
{
|
||||
|
||||
@@ -265,7 +265,7 @@ public class CustomizeWorkshopGroupSettingsRepository(CompanyContext companyCont
|
||||
var entity = _companyContext.CustomizeWorkshopGroupSettings.AsSplitQuery().FirstOrDefault(x => x.id == groupId);
|
||||
return new EditCustomizeWorkshopGroupSettings()
|
||||
{
|
||||
FridayWork = entity.FridayWork,
|
||||
//FridayWork = entity.FridayWork,
|
||||
FridayPay = new (){ FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||
LateToWork = new()
|
||||
{
|
||||
@@ -338,8 +338,8 @@ public class CustomizeWorkshopGroupSettingsRepository(CompanyContext companyCont
|
||||
{
|
||||
EndTime = x.EndTime.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();
|
||||
var viewModel = new EditCustomizeWorkshopSettings()
|
||||
{
|
||||
FridayWork = entity.FridayWork,
|
||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||
LateToWork = new()
|
||||
{
|
||||
@@ -234,7 +233,8 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
||||
LeavePermittedDays = entity.LeavePermittedDays,
|
||||
BaseYearsPayInEndOfYear = entity.BaseYearsPayInEndOfYear,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||
OffDays = entity.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||
|
||||
};
|
||||
return viewModel;
|
||||
@@ -261,8 +261,8 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
||||
Id = entity.id,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
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"),
|
||||
StartTime = r.StartTime.ToString("HH:mm")
|
||||
}).ToList()
|
||||
}).ToList(),
|
||||
OffDayOfWeeks = g.WeeklyOffDays.Select(x=>x.DayOfWeek).ToList()
|
||||
|
||||
}).ToList(),
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
||||
CreateCheckout = x.CreateCheckout,
|
||||
CreateContract = x.CreateContract,
|
||||
SignContract = x.SignContract,
|
||||
ContractTerm = x.ContractTerm,
|
||||
CutContractEndOfYear = x.CutContractEndOfYear
|
||||
|
||||
}).FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId);
|
||||
|
||||
@@ -49,10 +51,12 @@ public class EmployeeComputeOptionsRepository : RepositoryBase<long, EmployeeCom
|
||||
ComputeOptions = getFromWorkshop.ComputeOptions,
|
||||
YearsOptions = getFromWorkshop.YearsOptions,
|
||||
BonusesOptions= getFromWorkshop.BonusesOptions,
|
||||
CreateCheckout = true,
|
||||
CreateContract = true,
|
||||
SignCheckout = true,
|
||||
SignContract = true
|
||||
CreateCheckout = getFromWorkshop.CreateCheckout,
|
||||
CreateContract = getFromWorkshop.CreateContract,
|
||||
SignCheckout = getFromWorkshop.SignCheckout,
|
||||
SignContract = getFromWorkshop.SignContract,
|
||||
ContractTerm = getFromWorkshop.ContractTerm,
|
||||
CutContractEndOfYear = getFromWorkshop.CutContractEndOfYear
|
||||
};
|
||||
|
||||
result = fromWorkshop;
|
||||
|
||||
@@ -6,8 +6,11 @@ using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
using Company.Domain.PersonnelCodeAgg;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
@@ -23,18 +26,18 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
public EditLeftWork GetDetails(long id)
|
||||
{
|
||||
return _context.LeftWorkList.Select(x => new EditLeftWork()
|
||||
{
|
||||
Id = x.id,
|
||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
WorkshopName = x.WorkshopName,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId
|
||||
{
|
||||
Id = x.id,
|
||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
WorkshopName = x.WorkshopName,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId
|
||||
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
.FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
@@ -92,10 +95,10 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
AddYearsPay = x.AddYearsPay,
|
||||
AddLeavePay = x.AddLeavePay,
|
||||
JobId = x.JobId,
|
||||
|
||||
|
||||
|
||||
}).Where(x=>x.WorkshopId == workshopId);
|
||||
|
||||
}).Where(x => x.WorkshopId == workshopId);
|
||||
|
||||
return query.ToList();
|
||||
}
|
||||
@@ -103,7 +106,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
|
||||
public List<LeftWorkViewModel> search(LeftWorkSearchModel searchModel)
|
||||
{
|
||||
|
||||
|
||||
var query = _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
@@ -135,24 +138,24 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
public LeftWorkViewModel CheckoutleftWorkCheck(DateTime contractStart, long workshopId, long employeeId)
|
||||
{
|
||||
return _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
StartWorkDateGr = x.StartWorkDate,
|
||||
LeftWorkDateGr = x.LeftWorkDate,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
WorkshopName = x.WorkshopName,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
AddLeavePay = x.AddLeavePay,
|
||||
AddBonusesPay = x.AddBonusesPay,
|
||||
AddYearsPay = x.AddYearsPay,
|
||||
|
||||
{
|
||||
Id = x.id,
|
||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
StartWorkDateGr = x.StartWorkDate,
|
||||
LeftWorkDateGr = x.LeftWorkDate,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
WorkshopName = x.WorkshopName,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
AddLeavePay = x.AddLeavePay,
|
||||
AddBonusesPay = x.AddBonusesPay,
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -163,7 +166,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
if (item != null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
_context.LeftWorkList.Remove(item);
|
||||
_context.SaveChanges();
|
||||
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)
|
||||
{
|
||||
var entity = _context.LeftWorkList.FirstOrDefault(x =>
|
||||
x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
(x.StartWorkDate <= dateTime && x.LeftWorkDate >= dateTime));
|
||||
if (entity == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new()
|
||||
{
|
||||
EmployeeId = entity.EmployeeId,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
LeftWorkDate = entity.LeftWorkDate.ToFarsi(),
|
||||
HasLeft = entity.HasLeft,
|
||||
LeftWorkDateGr = entity.LeftWorkDate,
|
||||
StartWorkDateGr = entity.StartWorkDate,
|
||||
Id = entity.id
|
||||
var entity = _context.LeftWorkList.FirstOrDefault(x =>
|
||||
x.WorkshopId == workshopId && x.EmployeeId == employeeId &&
|
||||
(x.StartWorkDate <= dateTime && x.LeftWorkDate >= dateTime));
|
||||
if (entity == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new()
|
||||
{
|
||||
EmployeeId = entity.EmployeeId,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
LeftWorkDate = entity.LeftWorkDate.ToFarsi(),
|
||||
HasLeft = entity.HasLeft,
|
||||
LeftWorkDateGr = entity.LeftWorkDate,
|
||||
StartWorkDateGr = entity.StartWorkDate,
|
||||
Id = entity.id
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
public List<long> GetAllEmployeeIdsInWorkshop(long workshopId)
|
||||
{
|
||||
var leftWorks = _context.LeftWorkList
|
||||
.Where(x => x.WorkshopId == workshopId)
|
||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||
var leftWorks = _context.LeftWorkList
|
||||
.Where(x => x.WorkshopId == workshopId)
|
||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||
var insuranceLeftWork = _context.LeftWorkInsuranceList
|
||||
.Where(x => x.WorkshopId == workshopId)
|
||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||
@@ -267,7 +270,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
RemoveEmployeeRollCallStatus(workshopId, employeeId);
|
||||
if (hasLeftWorkInsurance)
|
||||
return
|
||||
op.Succcedded(1, "حذف با موفقیت انجام شد."); //+ "<br/>" + "<span class='text-danger'>" + "کد پرسنلی این شخص به دلیل استفاده در ترک کار بیمه قابل حذف نمی باشد. " + "</span>");
|
||||
op.Succcedded(1, "حذف با موفقیت انجام شد."); //+ "<br/>" + "<span class='text-danger'>" + "کد پرسنلی این شخص به دلیل استفاده در ترک کار بیمه قابل حذف نمی باشد. " + "</span>");
|
||||
else
|
||||
return op.Succcedded();
|
||||
}
|
||||
@@ -369,7 +372,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
_context.LeftWorkList.RemoveRange(LeftWork);
|
||||
DateTime left = item2.LeftWorkDate.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);
|
||||
}
|
||||
}
|
||||
@@ -393,7 +396,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
foreach (var item in leftWorkGroups)
|
||||
{
|
||||
#region PersonelCode
|
||||
@@ -401,7 +404,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
if (commandPersonnelCode != null && commandPersonnelCode.Count > 0)
|
||||
{
|
||||
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))
|
||||
{
|
||||
@@ -416,18 +419,18 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
_context.PersonnelCodeSet.Add(new PersonnelCodeDomain(item.WorkshopId, commandEmployeeId, personelcode.PersonnelCode));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
if (item.LeftWorkViewModels != null && item.LeftWorkViewModels.Count > 0)
|
||||
{
|
||||
bool checkRegister = false;
|
||||
|
||||
|
||||
|
||||
var LeftWorkList = _context.LeftWorkList.Where(x => x.EmployeeId == commandEmployeeId && x.WorkshopId == item.WorkshopId).ToList();
|
||||
|
||||
var removeList = new List<LeftWork>();
|
||||
|
||||
|
||||
foreach (var removeItem in LeftWorkList)
|
||||
{
|
||||
if (!item.LeftWorkViewModels.Any(x => x.Id == removeItem.id))
|
||||
@@ -463,7 +466,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
{
|
||||
_context.LeftWorkList.RemoveRange(removeList);
|
||||
}
|
||||
|
||||
|
||||
//foreach (var item2 in item.LeftWorkViewModels)
|
||||
//{
|
||||
// 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();
|
||||
transaction.Commit();
|
||||
op.Succcedded(-1, " ثبت با موفقیت انجام شد. ");
|
||||
op.Succcedded(-1, " ثبت با موفقیت انجام شد. ");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -497,8 +500,8 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
var op = new OperationResult();
|
||||
bool hasContracts = false;
|
||||
var endDateSend = date.Date.AddDays(-1);
|
||||
if (type==1)
|
||||
hasContracts= _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= endDateSend) && x.IsActiveString == "true");
|
||||
if (type == 1)
|
||||
hasContracts = _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= endDateSend) && x.IsActiveString == "true");
|
||||
else
|
||||
{
|
||||
endDateSend = date.Date;
|
||||
@@ -514,23 +517,23 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
|
||||
return op.Failed("در این تاریخ تصفیه حساب ثبت شده است.برای حذف تاریخ ترک کار، ابتدا تصفیه حساب های مربوطه را حذف کنید");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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();
|
||||
bool hasContracts = false;
|
||||
|
||||
|
||||
|
||||
if (type == 1)
|
||||
{
|
||||
hasContracts= _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date>= date) && x.IsActiveString == "true");
|
||||
if(hasContracts)
|
||||
hasContracts = _context.CheckoutSet.Any(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && (x.ContractStart.Date >= date) && x.IsActiveString == "true");
|
||||
if (hasContracts)
|
||||
return op.Failed("لطفا ابتدا تصفیه حساب های آتی را حذف نمایید");
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var LeftDay = date.Date;
|
||||
@@ -553,16 +556,16 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
var LastDayContract = _context.CheckoutSet.Any(x =>
|
||||
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.IsActiveString == "true" &&
|
||||
x.ContractEnd.Date > lastDay.Date);
|
||||
if(LastDayContract)
|
||||
if (LastDayContract)
|
||||
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.ContarctStart.Date <= endDateSend.Date && contract.ContractEnd.Date >= endDateSend.Date))
|
||||
// {
|
||||
|
||||
|
||||
// var checkout = _context.CheckoutSet.Where(x =>
|
||||
// x.EmployeeId == employeeId && x.WorkshopId == workshopId &&
|
||||
// (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();
|
||||
@@ -644,7 +647,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
|
||||
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();
|
||||
return leftWork;
|
||||
}
|
||||
@@ -655,9 +658,9 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
.Select(x => x.EmployeeId)
|
||||
.Except([5976]).ToList();
|
||||
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,
|
||||
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
|
||||
|
||||
|
||||
}).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)
|
||||
query = query.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeeId == searchModel.EmployeeId);
|
||||
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)
|
||||
{
|
||||
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)
|
||||
return;
|
||||
@@ -724,8 +727,167 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
|
||||
}
|
||||
//_context.RollCallEmployees.Remove(entity);
|
||||
|
||||
|
||||
}
|
||||
#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
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
#region OfficialChckout
|
||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
|
||||
DateTime contractEnd,
|
||||
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout)
|
||||
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute)
|
||||
{
|
||||
#region Entities
|
||||
|
||||
@@ -270,14 +270,16 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
{
|
||||
|
||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
}
|
||||
totalLeaveSpan = starndardHoursesPerTotalDaysSapn;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumSpans = sumSpans.Add(totalLeave);
|
||||
}
|
||||
totalLeaveSpan = totalLeave;
|
||||
}
|
||||
|
||||
|
||||
totalLeaveSpan = totalLeave;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,8 +317,12 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
}
|
||||
else
|
||||
{
|
||||
sumLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
||||
}
|
||||
var dayLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
||||
|
||||
sumLeave = dayLeave.Add(hoursesleaveTimeSpans);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (sumLeave > starndardHoursesPerTotalDaysSapn)
|
||||
@@ -334,17 +340,17 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
|
||||
}
|
||||
//اگر مرخصی روزانه نداشت و فقط مرخصی ساعتی داشت
|
||||
if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
||||
{
|
||||
if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
||||
{
|
||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
}
|
||||
else
|
||||
{
|
||||
sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
||||
}
|
||||
}
|
||||
//if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
||||
//{
|
||||
// if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
||||
// {
|
||||
// sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
||||
// }
|
||||
//}
|
||||
Console.WriteLine(sumSpans);
|
||||
#endregion
|
||||
//***********************************//
|
||||
@@ -365,7 +371,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
//TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
|
||||
//TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
|
||||
|
||||
double mandatoryWorkWithOutleaves = (sumSpansWhitOutleaves.TotalMinutes) / 60;
|
||||
double mandatoryWorkWithOutleaves = (sumSpans.TotalMinutes) / 60;
|
||||
double overTimeWork = 0;
|
||||
if (mandatoryWorkWithOutleaves > mandatoryHours)
|
||||
{
|
||||
@@ -676,7 +682,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
break;
|
||||
}
|
||||
var rotatingFaResult = "";
|
||||
if (countOutOfRange >= validCount)
|
||||
if (countOutOfRange >= validCount && rotatingShiftCompute)
|
||||
{
|
||||
shiftOver22Hours = "0";
|
||||
shiftOver22Minuts = "0";
|
||||
@@ -1722,7 +1728,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
EndDate = endComplex,
|
||||
ShiftSpan = (endComplex - startComplex),
|
||||
ShiftDate = currentDateGr,
|
||||
});
|
||||
ShiftEndWithoutRest = endComplex
|
||||
});
|
||||
|
||||
|
||||
var endCal = end - start;
|
||||
|
||||
@@ -969,7 +969,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
var activatedEmployeesList = activeEmployeesQuery.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()
|
||||
{
|
||||
HolidayYear = startSearch.ToFarsiYear()
|
||||
@@ -984,33 +984,46 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
List<RollCallsByDateViewModel> result = new();
|
||||
foreach (var day in days)
|
||||
{
|
||||
|
||||
List<RollCallEmployee> activatedEmployeesListInDay = new();
|
||||
bool isHoliday = totalHolidays.Any(x => x.HolidaydateGr == day);
|
||||
|
||||
//in working days everyone should be present
|
||||
if (day.DayOfWeek != DayOfWeek.Friday && !isHoliday)
|
||||
List<RollCallEmployee> activatedEmployeesListInDay = new();
|
||||
|
||||
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
|
||||
else if (day.DayOfWeek == DayOfWeek.Friday)
|
||||
{
|
||||
activatedEmployeesListInDay = activatedEmployeesList
|
||||
.Join(employeeSettingsList.Where(x => x.FridayWork != FridayWork.Default)
|
||||
, x => x.EmployeeId, y => y.EmployeeId,
|
||||
(x, y) => x).ToList();
|
||||
}
|
||||
////in working days everyone should be present
|
||||
//if (day.DayOfWeek != DayOfWeek.Friday && isHoliday == false)
|
||||
//{
|
||||
// activatedEmployeesListInDay = activatedEmployeesList;
|
||||
//}
|
||||
|
||||
//in holidays holiday worksers should be present
|
||||
else
|
||||
{
|
||||
activatedEmployeesListInDay = activatedEmployeesList
|
||||
.Join(employeeSettingsList.Where(x => x.HolidayWork != HolidayWork.Default)
|
||||
, x => x.EmployeeId, y => y.EmployeeId,
|
||||
(x, y) => x).ToList();
|
||||
}
|
||||
////in fridays, friday workers should be present
|
||||
//else if (day.DayOfWeek == DayOfWeek.Friday)
|
||||
//{
|
||||
// activatedEmployeesListInDay = activatedEmployeesList
|
||||
// .Join(employeeSettingsList.Where(x => x.FridayWork != FridayWork.Default)
|
||||
// , x => x.EmployeeId, y => y.EmployeeId,
|
||||
// (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()
|
||||
{
|
||||
DateGr = day,
|
||||
@@ -1037,6 +1050,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
}
|
||||
|
||||
|
||||
|
||||
//گزارش آنلاین حضور غیاب کارگاه
|
||||
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
|
||||
{
|
||||
|
||||
@@ -203,6 +203,8 @@ public class WorkshopRepository : RepositoryBase<long, Company.Domain.WorkshopAg
|
||||
SignContract = x.SignContract,
|
||||
CreateCheckout = x.CreateCheckout,
|
||||
SignCheckout = x.SignCheckout,
|
||||
RotatingShiftCompute = x.RotatingShiftCompute,
|
||||
IsStaticCheckout = x.IsStaticCheckout,
|
||||
|
||||
}).FirstOrDefault(x => x.Id == id);
|
||||
}
|
||||
|
||||
@@ -2739,6 +2739,9 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
else
|
||||
{
|
||||
periodOfAbsence = usedLeaves - canToLeave;
|
||||
if (workingHoursePerDay >= 7.33)
|
||||
periodOfAbsence = 0;
|
||||
|
||||
|
||||
#region AbsenceItemsCompute
|
||||
|
||||
@@ -3314,9 +3317,10 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
|
||||
periodOfAbsence = usedLeaves;
|
||||
|
||||
#endregion
|
||||
|
||||
contactCanToleaveList.Add(new ContractsCanToLeave()
|
||||
#endregion
|
||||
|
||||
contactCanToleaveList.Add(new ContractsCanToLeave()
|
||||
{
|
||||
ContractCounter = contractCounter,
|
||||
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 b = 0;
|
||||
@@ -14,7 +15,7 @@
|
||||
|
||||
|
||||
|
||||
@if (Model.CreateCheckoutList.Count > 0)
|
||||
@if (Model.CreateCheckoutList.Count > 0 && !Model.HasWorkFlow)
|
||||
{
|
||||
@foreach (var item in Model.CreateCheckoutList)
|
||||
{
|
||||
@@ -151,6 +152,22 @@
|
||||
</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>
|
||||
|
||||
@@ -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: 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>
|
||||
@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;">
|
||||
<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; 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; 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"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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"> ساعات حضور <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"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </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; 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>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -170,21 +170,33 @@
|
||||
@item.PersonnelCode
|
||||
</td>
|
||||
<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>
|
||||
<input type="hidden" value="@item.Id" name="signed" />
|
||||
</a>
|
||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
||||
<input type="hidden" value="@item.Id" name="signed"/>
|
||||
</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
|
||||
{
|
||||
<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 class="myLinkSign" style="font-size: 20px">
|
||||
|
||||
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||
|
||||
</a>
|
||||
}
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
</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">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
</div>
|
||||
|
||||
<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; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@@ -557,24 +557,30 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</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; ">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
|
||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||
<thead>
|
||||
<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">
|
||||
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||
</th>
|
||||
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</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;">
|
||||
<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; 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; 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"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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"> ساعات حضور <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"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </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; 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>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -149,7 +149,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">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
</div>
|
||||
|
||||
<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; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@@ -538,23 +538,28 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</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; ">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
|
||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||
<thead>
|
||||
<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">
|
||||
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||
</th>
|
||||
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page
|
||||
@using _0_Framework.Application
|
||||
@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/responsive.bootstrap4.min.css" 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" />
|
||||
|
||||
@@ -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>
|
||||
@@ -56,12 +62,32 @@
|
||||
i++;
|
||||
}
|
||||
<td>
|
||||
<h6>@item.PersonName</h6>
|
||||
<span style="font-size:10px">@item.PersonName</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<h6>@item.PersonelCode</h6>
|
||||
<span style="font-size:10px">@item.PersonelCode</span>
|
||||
</td>
|
||||
<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)
|
||||
{
|
||||
<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" />
|
||||
</svg>
|
||||
}
|
||||
</td>
|
||||
</td> *@
|
||||
<td>
|
||||
@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="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال به شرطی که قرارداد منتهی به پایان سال باشد </option>
|
||||
@@ -110,7 +136,7 @@
|
||||
<td>
|
||||
@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="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnLeftWork"> محاسبه در پایان همکاری (ترک کار از مجموعه) </option>
|
||||
@@ -121,7 +147,7 @@
|
||||
<td>
|
||||
@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="OnEndOfContract"> محاسبه در پایان قرارداد </option>
|
||||
<option value="OnEndOfYear"> محاسبه در پایان سال </option>
|
||||
@@ -133,15 +159,15 @@
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<div>
|
||||
<label for="FailureCreateContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureCreateContract_@item.EmployeeId" @(!item.CreateContract ? "checked" : "") />
|
||||
عدم ایجاد قرارداد
|
||||
<label for="FailureCreateContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input class="real-checkbox" type="checkbox" data-employeeId="@item.EmployeeId" id="FailureCreateContract_@item.EmployeeId" @(item.CreateContract ? "checked" : "") />
|
||||
ایجاد قرارداد
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="FailureSignContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureSignContract_@item.EmployeeId" @(!item.SignContract ? "checked" : "") />
|
||||
عدم امضا قرارداد
|
||||
<label for="FailureSignContract_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureSignContract_@item.EmployeeId" @(item.SignContract ? "checked" : "") />
|
||||
امضا قرارداد
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
@@ -151,15 +177,15 @@
|
||||
@if (@item.ContractPerson)
|
||||
{
|
||||
<div>
|
||||
<label for="FailureCreateCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureCreateCheckout_@item.EmployeeId" @(!item.CreateCheckout ? "checked" : "") />
|
||||
عدم ایجاد تصفیه حساب
|
||||
<label for="FailureCreateCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureCreateCheckout_@item.EmployeeId" @(item.CreateCheckout ? "checked" : "") />
|
||||
ایجاد تصفیه حساب
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="FailureSignCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input type="checkbox" id="FailureSignCheckout_@item.EmployeeId" @(!item.SignCheckout ? "checked" : "") />
|
||||
عدم امضا تصفیه حساب
|
||||
<label for="FailureSignCheckout_@item.EmployeeId" style="display: flex; align-items: center; gap: 5px;">
|
||||
<input class="real-checkbox" data-employeeId="@item.EmployeeId" type="checkbox" id="FailureSignCheckout_@item.EmployeeId" @(item.SignCheckout ? "checked" : "") />
|
||||
امضا تصفیه حساب
|
||||
</label>
|
||||
</div>
|
||||
}
|
||||
@@ -168,12 +194,12 @@
|
||||
<td>
|
||||
@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})">
|
||||
<i class="ion-information-circled ionSize"></i>
|
||||
</a>
|
||||
</a> *@
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -49,10 +49,9 @@ namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels
|
||||
foreach (var item in result)
|
||||
{
|
||||
var option = new EmployeeComputeOptionsViewModel();
|
||||
if (item.ContractPerson)
|
||||
{
|
||||
|
||||
option = _employeeComputeOptionsApplication.GetEmployeeOptions(workshopID, item.EmployeeId);
|
||||
}
|
||||
|
||||
|
||||
var finalResult = new ConnectedPersonnelViewModel()
|
||||
{
|
||||
@@ -66,13 +65,15 @@ namespace ServiceHost.Areas.Admin.Pages.Company.ConnectedPersonnels
|
||||
InsurancetLeft = item.InsurancetLeft,
|
||||
Black = item.Black,
|
||||
StartWork = item.StartWork,
|
||||
BonusesOptions = item.ContractPerson ? option.BonusesOptions : "null",
|
||||
ComputeOptions = item.ContractPerson ? option.ComputeOptions : "null",
|
||||
YearsOptions = item.ContractPerson ? option.YearsOptions : "null",
|
||||
CreateContract = item.ContractPerson ? option.CreateContract :false,
|
||||
CreateCheckout = item.ContractPerson ? option.CreateCheckout : false,
|
||||
SignContract = item.ContractPerson ? option.SignContract : false,
|
||||
SignCheckout = item.ContractPerson ? option.SignCheckout : false
|
||||
BonusesOptions = option.BonusesOptions,
|
||||
ComputeOptions = option.ComputeOptions,
|
||||
YearsOptions = option.YearsOptions,
|
||||
CreateContract = option.CreateContract,
|
||||
CreateCheckout = option.CreateCheckout,
|
||||
SignContract = option.SignContract,
|
||||
SignCheckout = option.SignCheckout,
|
||||
ContractTerm = option.ContractTerm,
|
||||
CutContractEndOfYear = option.CutContractEndOfYear
|
||||
};
|
||||
|
||||
final.Add(finalResult);
|
||||
|
||||
@@ -748,30 +748,35 @@
|
||||
@item.PersonnelCode
|
||||
</td>
|
||||
<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>
|
||||
<input type="hidden" value="@item.Id" name="signed" />
|
||||
</a>
|
||||
@* <a class="myLinkSign @(item.IsBlockCantracingParty=="true"?"disabled":"")" name="foo1" value="@item.Id" style="font-size: 20px">
|
||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
||||
<input type="hidden" value="@item.Id" name="signed"/>
|
||||
</a>
|
||||
|
||||
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
|
||||
<input type="hidden" value="@item.Id" name="signed" />
|
||||
</a> *@
|
||||
}
|
||||
else
|
||||
{
|
||||
<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
|
||||
{
|
||||
<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 class="myLinkSign" style="font-size: 20px">
|
||||
|
||||
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
|
||||
|
||||
</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>
|
||||
|
||||
@{
|
||||
|
||||
@@ -548,37 +548,105 @@
|
||||
var codeMelli = $('#iniCodeMelli').val();
|
||||
|
||||
try {
|
||||
const response = await $.ajax({
|
||||
const response = $.ajax({
|
||||
url: loadUidInfo,
|
||||
method: 'POST',
|
||||
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) {
|
||||
$('#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 {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'خطا', response.message);
|
||||
return;
|
||||
}
|
||||
// $('#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;
|
||||
// }
|
||||
|
||||
currentStep++;
|
||||
showStep(currentStep);
|
||||
// currentStep++;
|
||||
// showStep(currentStep);
|
||||
} catch (error) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'خطا', "ارسال اطلاعات با مشکل مواجه شد.");
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -320,7 +320,7 @@
|
||||
<div id="my_camera"></div>
|
||||
<div class="col-md-12 m-r-10 top-btns">
|
||||
<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 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>
|
||||
|
||||
@@ -161,11 +161,16 @@ public class IndexModel : PageModel
|
||||
|
||||
#endregion
|
||||
|
||||
#region Create Employee File پرونده
|
||||
public IActionResult OnGetCreate()
|
||||
{
|
||||
return Partial("./Create");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد پرسنل پرونده
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostCreate(CreateEmployee command)
|
||||
{
|
||||
var children = command.CreateEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
||||
@@ -188,8 +193,73 @@ public class IndexModel : PageModel
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -201,7 +271,8 @@ public class IndexModel : PageModel
|
||||
|
||||
public JsonResult OnPostEdit(EditEmployee command)
|
||||
{
|
||||
var childrenEdit = 0;
|
||||
var op = new OperationResult();
|
||||
var childrenEdit = 0;
|
||||
var children = 0;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
@@ -213,15 +284,29 @@ public class IndexModel : PageModel
|
||||
if (command.EditEmployeChildrenList != null)
|
||||
childrenEdit = command.EditEmployeChildrenList.Count(x => x.DateOfBirth != null);
|
||||
|
||||
//if (children > 0)
|
||||
//{
|
||||
// var oldChildrenNumber = Convert.ToInt32(command.NumberOfChildren);
|
||||
// var sumChildren = oldChildrenNumber + children;
|
||||
// command.NumberOfChildren = sumChildren.ToString();
|
||||
//}
|
||||
//if (children > 0)
|
||||
//{
|
||||
// var oldChildrenNumber = Convert.ToInt32(command.NumberOfChildren);
|
||||
// var sumChildren = oldChildrenNumber + children;
|
||||
// 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);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
|
||||
@@ -776,15 +776,15 @@
|
||||
<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="#">
|
||||
<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 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>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.ContractAgg;
|
||||
@@ -12,6 +13,7 @@ using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.WorkingHours;
|
||||
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
@@ -38,7 +40,7 @@ public class AutoExtensionModel : PageModel
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||
public List<ContractViweModel> EmployeeList;
|
||||
public List<AutoExtensionEmployeeListDto> EmployeeList;
|
||||
public SelectList EmployeeSelectList { get; set; }
|
||||
private string InterferenceMessage = string.Empty;
|
||||
public List<string> YearlyList;
|
||||
@@ -82,88 +84,130 @@ public class AutoExtensionModel : PageModel
|
||||
|
||||
public void OnGet(long id)
|
||||
{
|
||||
var selctedWorkshop = _workshopApplication.GetDetails(id);
|
||||
workshopName = selctedWorkshop?.WorkshopFullName;
|
||||
var watch = new Stopwatch();
|
||||
watch.Start();
|
||||
var res = _leftWorkApplication.AutoExtentionEmployees(id);
|
||||
YearlyList =
|
||||
_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
|
||||
};
|
||||
var LeftWorkList = _leftWorkApplication.SearchCreateContract(LeftWorkSerchModel);
|
||||
var personnelCodeSearch = new PersonnelCodeSearchModel
|
||||
{
|
||||
WorkshopId = id
|
||||
};
|
||||
var pcodes = _personnelCodeApplication.Search(personnelCodeSearch);
|
||||
if (pcodes.Any(x => x.PersonnelCode > 0))
|
||||
{
|
||||
MaxPersonnelCode = pcodes.Select(x => x.PersonnelCode).Max();
|
||||
MaxPersonnelCode += 1;
|
||||
if (res.EmployeeList.Any(x => x.PersonnelCode > 0))
|
||||
{
|
||||
MaxPersonnelCode = res.EmployeeList.Select(x => x.PersonnelCode).Max();
|
||||
MaxPersonnelCode += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
MaxPersonnelCode = 1;
|
||||
}
|
||||
|
||||
EmployeeList = res.EmployeeList.Where(x => x.EmployeeHasCreateContract).ToList();
|
||||
EmployeeSelectList = new SelectList(res.EmployeeList, "EmployeeId", "EmployeeName");
|
||||
HavingPersonel = !res.EmployeeList.Any(x => x.EmployeeHasCreateContract) ? false : res.HavingPersonel;
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#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();
|
||||
}
|
||||
|
||||
|
||||
@@ -308,16 +308,20 @@
|
||||
@if (Model.Command.PermissionIds != null && Model.Command.PermissionIds.Contains(10323))
|
||||
{
|
||||
<div class="col-lg-12 col-md-12 col-xs-12">
|
||||
@* <div class="" style="margin-top: 5px;">
|
||||
<label>تعیین سطح دسترسی برای قرارداد </label>
|
||||
<select class="form-control select-city" multiple asp-for="@Model.Command.AccountIdsList" asp-items='new SelectList(Model.Command.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
</div> *@
|
||||
|
||||
<div class="" 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 class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||
<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 class="col-xs-12 area-workshop">
|
||||
@* <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;" />
|
||||
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
||||
</div>
|
||||
|
||||
<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;" />
|
||||
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
||||
</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>
|
||||
$("#hasRollCall").on("click", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#hasChekoutService").removeAttr("disabled");
|
||||
|
||||
} else {
|
||||
$("#hasChekoutService").attr("disabled", "disabled");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -51,7 +51,8 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
CutContractEndOfYear = IsActive.None
|
||||
CutContractEndOfYear = IsActive.None,
|
||||
RotatingShiftCompute = true
|
||||
};
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
@@ -185,6 +186,7 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
|
||||
}
|
||||
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>
|
||||
</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 class="col-xs-12 col-md-4" style="position: relative;top: 12px;background-color: aliceblue;">
|
||||
<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 class="col-xs-12 area-workshop">
|
||||
<div id="radio2" class="card">
|
||||
@@ -464,22 +477,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<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: 15px;">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<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: 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;">
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.True" @(Model.Command.CutContractEndOfYear == IsActive.True ? "checked" : "")/>
|
||||
باشد
|
||||
</label>
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.True" @(Model.Command.CutContractEndOfYear == IsActive.True ? "checked" : "") />
|
||||
باشد
|
||||
</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;">
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.False" @(Model.Command.CutContractEndOfYear == IsActive.False ? "checked" : "")/>
|
||||
نباشد
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" class="form-control single-check" style="margin: 0;" value="@IsActive.False" @(Model.Command.CutContractEndOfYear == IsActive.False ? "checked" : "") />
|
||||
نباشد
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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" : "") />
|
||||
<label asp-for="Command.HasRollCallFreeVip" style="margin: 0;">فعال سازی سرویس حضور و غیاب ویژه رایگان</label>
|
||||
</div>
|
||||
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
@{
|
||||
if (Model.Command.HasRollCallFreeVip == "true")
|
||||
@@ -622,12 +636,20 @@
|
||||
}
|
||||
<label asp-for="Command.HasCustomizeCheckoutService" style="margin: 0;">فعال سازی سرویس فیش غیر رسمی رایگان</label>
|
||||
</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>
|
||||
$("#hasRollCall").on("click", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$("#hasChekoutService").removeAttr("disabled");
|
||||
|
||||
} else {
|
||||
$("#hasChekoutService").attr("disabled", "disabled");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
@@ -231,7 +231,8 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "false";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
||||
//Console.WriteLine("endStep 1 ============");
|
||||
//SetRollCall(r1);
|
||||
|
||||
await SetWorkshopRoleSubAccount();
|
||||
await ChangeFridayWorkToWeeklyDayOfWeek();
|
||||
ViewData["message"] = "تومام دو";
|
||||
return Page();
|
||||
}
|
||||
@@ -534,5 +534,32 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
||||
// ViewData["message"] = "تومام";
|
||||
// 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 prevPermission = @(hasPrevPermission ? "false" : "true");
|
||||
|
||||
var accessAccountToSearchAccounts = [2, 3,423,392];
|
||||
var accessAccountToSearchAccounts = [2, 3,392,434];
|
||||
</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,
|
||||
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)
|
||||
return new JsonResult(new
|
||||
@@ -240,7 +240,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
//Todo:Vafa!!
|
||||
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
||||
var result = _customizeWorkshopSettingsApplication
|
||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, fridayWork, holidayWork);
|
||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, holidayWork, offDayOfWeeks);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
</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;">
|
||||
<table style="/* table-layout: fixed; */width: 100%">
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
</fieldset>
|
||||
</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%;">
|
||||
<div class="table-container">
|
||||
<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;">
|
||||
<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; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
||||
</tr>
|
||||
<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"> موظفی @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"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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"> ساعات حضور <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"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
</div>
|
||||
|
||||
<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;">
|
||||
@@ -717,26 +717,32 @@
|
||||
</table>
|
||||
</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; ">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
|
||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||
<thead>
|
||||
<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">
|
||||
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||
</th>
|
||||
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="row" style="margin-top: 4px;">
|
||||
<div style="width: 65%;">
|
||||
<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%;">
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
</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;">
|
||||
<table style="/* table-layout: fixed; */width: 100%">
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
</fieldset>
|
||||
</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%;">
|
||||
<div class="table-container">
|
||||
<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;">
|
||||
<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; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی <span>:</span> @Model.TotalSickLeave </td>
|
||||
</tr>
|
||||
<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"> موظفی @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"> ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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"> ساعات حضور <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"> ساعات استراحت <span>:</span> @Model.TotalBreakTimeStr </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> ساعات کارکرد واقعی <span>:</span> @Model.TotalWorkingTimeStr </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10" style="padding: 0;">
|
||||
<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;">
|
||||
<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>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
</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;">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
</div>
|
||||
|
||||
<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; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@@ -539,22 +539,29 @@
|
||||
</table>
|
||||
</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; ">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
|
||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||
<table style="width:100%; background-color: #575656 !important;border-radius: 10px">
|
||||
<thead>
|
||||
<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">
|
||||
موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr
|
||||
</th>
|
||||
<th colspan="2" style="color:#ffffff !important; text-align: center; border-bottom: 1px solid #CCCCCC; font-size: 8px; padding: 2px">
|
||||
ساعات کارکرد واقعی : @Model.TotalWorkingTimeStr
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px"> ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; border-left: 1px solid #CCCCCC; font-size: 8px; padding: 2px">مدت مرخصی استحقاقی : @Model.TotalPaidLeave </td>
|
||||
<td style="color:#ffffff !important; width:25%; text-align: center; font-size: 8px; padding: 2px"> مدت مرخصی استعلاجی : @Model.TotalSickLeave</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
|
||||
<div class="col-12 group-container">
|
||||
<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))" />
|
||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||
</div>
|
||||
<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))" />
|
||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
@@ -56,14 +56,14 @@
|
||||
|
||||
<div class="col-12 group-container">
|
||||
<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))" />
|
||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||
</div>
|
||||
<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))" />
|
||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
<div class="col-12 group-container">
|
||||
<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))" />
|
||||
<label for="Friday1">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||
</div>
|
||||
<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))" />
|
||||
<label for="Friday2">پرسنل در روزهای جمعه کار میکند.</label>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
|
||||
<div class="container my-3" id="footer-section">
|
||||
<div class="row breack-time">
|
||||
<div class="row breack-time mb-2">
|
||||
<div>
|
||||
<div class="d-flex align-items-center my-1 breakTimeDiv">
|
||||
<input type="checkbox" id="BreakTimeFirst" class="form-check-input">
|
||||
@@ -226,47 +226,109 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-12">
|
||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
||||
<div class="row extraOptionBorder">
|
||||
<div class="day-off-parent">
|
||||
<div class="day-off-title mb-2">
|
||||
روزهای تعطیل هفته
|
||||
</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="FridayWork1" id="Friday1" class="form-check-input Main-Radio" value="@((int)(FridayWork.Default))" />
|
||||
<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 class="day-off-button-container mb-3">
|
||||
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||
class="day-off-button text-center day-off-button__active ">
|
||||
شنبه
|
||||
</button>
|
||||
|
||||
</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">
|
||||
<div class="group-container">
|
||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="HolidayWork1" id="HolidayWork1" class="form-check-input Main-Radio" value="@HolidayWork.Default" />
|
||||
<label for="HolidayWork1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
||||
</div>
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="HolidayWork1" id="HolidayWork2" class="form-check-input Main-Radio" value="@HolidayWork.WorkInHolidays" />
|
||||
<label for="HolidayWork2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SaturdayInput"
|
||||
value="@((int)(DayOfWeek.Saturday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="SundayInput" value="@((int)(DayOfWeek.Sunday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="MondayInput" value="@((int)(DayOfWeek.Monday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="TuesdayInput" value="@((int)(DayOfWeek.Tuesday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="WednesdayInput"
|
||||
|
||||
value="@((int)(DayOfWeek.Wednesday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="ThursdayInput"
|
||||
value="@((int)(DayOfWeek.Thursday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.CreateCustomizeEmployeeSettings.WeeklyOffDays" id="FridayInput" value="@((int)(DayOfWeek.Friday))" />
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="GroupId" name="Command.CreateCustomizeEmployeeSettings.GroupId" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="day-off-title mb-2">
|
||||
وضعیت فعالیت مجموعه در روزهای جمعه و تعطیلات رسمی
|
||||
</div>
|
||||
<div class="day-off-status-person mb-3">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<span class="day-off-status-person__item">وضعیت پرسنل در روز های تعطیل رسمی : </span>
|
||||
|
||||
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||
<input type="radio" class="custom-checkbox" name="Command.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>
|
||||
|
||||
<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"
|
||||
};
|
||||
|
||||
if (res.HasUploadedImage)
|
||||
if (res.HasUploadedImage && res.EmployeeSettings != null)
|
||||
{
|
||||
return Partial("ModalTakeImagesEdit", res);
|
||||
}
|
||||
@@ -467,7 +467,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
var employeeSettings =
|
||||
_customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
|
||||
_workshopId, hasRollCallEmployee.EmployeeId);
|
||||
if (employeeSettings.Id == 0)
|
||||
if (employeeSettings == null || employeeSettings.Id == 0)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -240,9 +240,10 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
BreakTime = employee.BreakTime,
|
||||
WorkshopShiftStatus = employee.WorkshopShiftStatus,
|
||||
IrregularShift = employee.IrregularShift,
|
||||
FridayWork = employee.FridayWork,
|
||||
//FridayWork = employee.FridayWork,
|
||||
HolidayWork = employee.HolidayWork,
|
||||
CustomizeRotatingShifts = employee.CustomizeRotatingShiftsViewModels
|
||||
CustomizeRotatingShifts = employee.CustomizeRotatingShiftsViewModels,
|
||||
WeeklyOffDays = employee.WeeklyOffDays
|
||||
};
|
||||
return Partial("ModalEditEmployeeFromGroup", command);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
}
|
||||
|
||||
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 workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
@@ -324,7 +324,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
//Todo:Vafa!!
|
||||
//Todo: Vafa : to in ja bool replaceChange group ro ezafe kon. hatman ham workshopShiftStatus az front pas bede be in.
|
||||
var result = _customizeWorkshopSettingsApplication
|
||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus,fridayWork, holidayWork);
|
||||
.EditWorkshopSettingShifts(shiftViewModels, customizeWorkshopSettingsId, workshopShiftStatus, holidayWork, offDayOfWeeks);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -221,45 +221,114 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-12">
|
||||
<div class="lableCheckBreakTime text-center">وضعیت فعالیت مجموعه در روز های جمعه و تعطیلات رسمی</div>
|
||||
<div class="row extraOptionBorder">
|
||||
<div class="day-off-parent">
|
||||
<div class="day-off-title mb-2">
|
||||
روزهای تعطیل هفته
|
||||
</div>
|
||||
|
||||
<div class="col-6 p-0">
|
||||
<div class="group-container">
|
||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="Command.FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))"/>
|
||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||
</div>
|
||||
<div 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>
|
||||
<div class="day-off-button-container mb-3">
|
||||
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||
class="day-off-button text-center day-off-button__active">
|
||||
شنبه
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button type="button" name="Sunday" value="@((int)(DayOfWeek.Sunday))"
|
||||
class="day-off-button text-center 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 class="col-6 p-0">
|
||||
<div class="group-container">
|
||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های تعطیلات رسمی</div> *@
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="Command.HolidayWork" id="OffDays1" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.Default ? "checked" : "") value="@((int)(HolidayWork.Default))"/>
|
||||
<label for="OffDays1" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار نمیکند.</label>
|
||||
</div>
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="Command.HolidayWork" id="OffDays2" class="form-check-input Main-Radio" @(Model.HolidayWork == HolidayWork.WorkInHolidays ? "checked" : "") value="@((int)(HolidayWork.WorkInHolidays))"/>
|
||||
<label for="OffDays2" class="lableCheckBreakTime">پرسنل در ایام تعطیل رسمی کار میکند.</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center gap-1 day-off-status-person__item">
|
||||
<input type="radio" name="command.HolidayWork" id="OffDays1" class="custom-checkbox"
|
||||
@(Model.HolidayWork == HolidayWork.Default ? "checked" : "")
|
||||
value="@((int)(HolidayWork.Default))" />
|
||||
<label for="OffDays1" class="text-nowrap day-off-status-person__item--label">
|
||||
اشتغال ندارد
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -379,46 +379,118 @@
|
||||
</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="group-container">
|
||||
@* <div class="lableCheckBreakTime">وضعیت فعالیت مجموعه در روز های جمعه</div> *@
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="FridayWork" id="Friday1" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.Default ? "checked" : "") value="@((int)(FridayWork.Default))" />
|
||||
<label for="Friday1" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار نمیکند.</label>
|
||||
</div>
|
||||
<div class="d-flex form-group my-1 group">
|
||||
<input type="radio" name="FridayWork" id="Friday2" class="form-check-input Main-Radio" @(Model.FridayWork == FridayWork.WorkInFriday ? "checked" : "") value="@((int)(FridayWork.WorkInFriday))" />
|
||||
<label for="Friday2" class="lableCheckBreakTime">پرسنل در روزهای جمعه کار میکند.</label>
|
||||
</div>
|
||||
<div class="day-off-parent">
|
||||
<div class="day-off-title mb-2">
|
||||
روزهای تعطیل هفته
|
||||
</div>
|
||||
|
||||
<div class="day-off-button-container mb-3">
|
||||
<button type="button" name="Saturday" value="@((int)(DayOfWeek.Saturday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Saturday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
شنبه
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button type="button" name="Sunday" value="@((int)(DayOfWeek.Sunday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Sunday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
یکشنبه
|
||||
</button>
|
||||
|
||||
<button type="button" name="Monday" value="@((int)(DayOfWeek.Monday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Monday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
دوشنبه
|
||||
</button>
|
||||
|
||||
<button type="button" name="Tuesday" value="@((int)(DayOfWeek.Tuesday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Tuesday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
سهشنبه
|
||||
</button>
|
||||
|
||||
<button type="button" name="Wednesday" value="@((int)(DayOfWeek.Wednesday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Wednesday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
چهارشنبه
|
||||
</button>
|
||||
|
||||
<button type="button" name="Thursday" value="@((int)(DayOfWeek.Thursday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Thursday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
پنجشنبه
|
||||
</button>
|
||||
|
||||
<button type="button" name="Friday" value="@((int)(DayOfWeek.Friday))"
|
||||
class="day-off-button text-center @(Model.WeeklyOffDays.Contains(DayOfWeek.Friday) ? "day-off-button__diactive" : "day-off-button__active")">
|
||||
جمعه
|
||||
</button>
|
||||
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="SaturdayInput"
|
||||
@(Model.WeeklyOffDays.Contains(DayOfWeek.Saturday) ? "checked" : "")
|
||||
value="@((int)(DayOfWeek.Saturday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="SundayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Sunday) ?
|
||||
"checked" : "") value="@((int)(DayOfWeek.Sunday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="MondayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Monday) ?
|
||||
"checked" : "") value="@((int)(DayOfWeek.Monday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="TuesdayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Tuesday)
|
||||
? "checked" : "") value="@((int)(DayOfWeek.Tuesday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="WednesdayInput"
|
||||
@(Model.WeeklyOffDays.Contains(DayOfWeek.Wednesday) ? "checked" : "")
|
||||
value="@((int)(DayOfWeek.Wednesday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="ThursdayInput"
|
||||
@(Model.WeeklyOffDays.Contains(DayOfWeek.Thursday) ? "checked" : "")
|
||||
value="@((int)(DayOfWeek.Thursday))" />
|
||||
|
||||
<input type="checkbox" style="display: none;" class="custom-checkbox weeklyOffDays-Input"
|
||||
name="Command.WeeklyOffDays" id="FridayInput" @(Model.WeeklyOffDays.Contains(DayOfWeek.Friday) ?
|
||||
"checked" : "") value="@((int)(DayOfWeek.Friday))" />
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<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 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>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user