diff --git a/0_Framework/Application/SubAccountPermissionHelper.cs b/0_Framework/Application/SubAccountPermissionHelper.cs
index 43a5bdff..36b299ae 100644
--- a/0_Framework/Application/SubAccountPermissionHelper.cs
+++ b/0_Framework/Application/SubAccountPermissionHelper.cs
@@ -37,10 +37,12 @@
///
public const int PersonnelStatusIndividualReportPermissionCode = 10205;
- ///
- /// لیست کل پرسنل
- ///
- public const int PersonnelListPermissionCode = 10206;
+
+ //کد 10206 به بخش عملیات پرسنل منتقل شد و رزرو می باشد
+ /////
+ ///// لیست کل پرسنل
+ /////
+ //public const int PersonnelListPermissionCode = 10206;
#endregion
@@ -72,11 +74,22 @@
///
public const int PaymentToEmployeePermissionCode = 10304;
+
///
/// عملیات حساب بانکی پرسنل
///
public const int EmployeeBankInformationPermissionCode = 10309;
+ ///
+ /// عملیات افزودن پرسنل
+ ///
+ public const int AddEmployeePermissionCode = 10310;
+
+ ///
+ /// عملیات افزودن پرسنل
+ ///
+ public const int LeftWorkEmployeePermissionCode = 10311;
+
///
/// ایجاد وام
///
@@ -190,6 +203,12 @@
public const int DeleteFinePermissionCode = 1030804;
#endregion
+ ///
+ /// لیست کل پرسنل
+ ///
+ public const int PersonnelListPermissionCode = 10206;
+
+
#endregion
@@ -562,13 +581,7 @@
Code = PersonnelStatusIndividualReportPermissionCode,
ParentId = WorkshopOperationsPermissionCode
};
- public static SubAccountPermissionDto PersonnelListPermission { get; } = new()
- {
- Id = PersonnelListPermissionCode,
- Name = "لیست کل پرسنل",
- Code = PersonnelListPermissionCode,
- ParentId = WorkshopOperationsPermissionCode
- };
+
#endregion
#region عملیات پرسنل, ParentId = PersonnelOperationsPermissionCode
@@ -613,12 +626,35 @@
ParentId = PersonnelOperationsPermissionCode
};
- #endregion
+ public static SubAccountPermissionDto AddEmployeeInformationPermission { get; } = new()
+ {
+ Id = AddEmployeePermissionCode,
+ Name = "عملیات افزودن پرسنل",
+ Code = AddEmployeePermissionCode,
+ ParentId = PersonnelOperationsPermissionCode
+ };
- #region فیش حقوقی غیر رسمی,ParentId = CustomizeCheckoutOperationsPermissionCode
+ public static SubAccountPermissionDto LeftWorkEmployeeInformationPermission { get; } = new()
+ {
+ Id = LeftWorkEmployeePermissionCode,
+ Name = "عملیات ترک کار پرسنل",
+ Code = LeftWorkEmployeePermissionCode,
+ ParentId = PersonnelOperationsPermissionCode
+ };
+
+ public static SubAccountPermissionDto PersonnelListPermission { get; } = new()
+ {
+ Id = PersonnelListPermissionCode,
+ Name = "لیست کل پرسنل",
+ Code = PersonnelListPermissionCode,
+ ParentId = PersonnelOperationsPermissionCode
+ };
+ #endregion
+
+ #region فیش حقوقی غیر رسمی,ParentId = CustomizeCheckoutOperationsPermissionCode
- public static SubAccountPermissionDto CustomizeCheckoutSetGroupAndSalaryPermission { get; } = new()
+ public static SubAccountPermissionDto CustomizeCheckoutSetGroupAndSalaryPermission { get; } = new()
{
Id = CustomizeCheckoutSetGroupAndSalaryPermissionCode,
Name = "تنظیم گروه بندی و حقوق پرسنل",
diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs
index 61585c0d..ceee94b3 100644
--- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs
+++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs
@@ -71,13 +71,16 @@ CreateWorkingHoursTemp command, bool holidayWorking)
//گرفتن ساعت استراحت پرسنل از تنظیمات
#region breakTime
- BaseCustomizeEntity settings = _context.CustomizeWorkshopEmployeeSettings.AsSplitQuery().FirstOrDefault(x =>
+ BaseCustomizeEntity settings = _context.CustomizeWorkshopEmployeeSettings.AsSplitQuery()
+ .Include(x=>x.CustomizeWorkshopGroupSettings).FirstOrDefault(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId);
//اگر ساعت استراحت پرسنل وجود نداشت صفر است
var breakTime = settings == null ? new BreakTime(false, new TimeOnly()) : settings.BreakTime;
- #endregion
- List rollCallResult = _context.RollCalls.Where(x =>
+
+ #endregion
+
+ List rollCallResult = _context.RollCalls.Where(x =>
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date &&
x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null).Select(x => new RollCallViewModel()
{
@@ -148,6 +151,8 @@ CreateWorkingHoursTemp command, bool holidayWorking)
}).ToList();
leavingDayCout += afterCheckout.Sum(x => x.DayCounter);
Console.WriteLine(leavingDayCout);
+
+
TimeSpan workingPerDayAve = sumSpans / groupedRollCall.Count;//میانگین ساعت کار در روز
TimeSpan sumLeave = new TimeSpan();
if (workingPerDayAve <= new TimeSpan(7, 20, 0))