diff --git a/0_Framework/Application/ClassificationRangeOfGroupRate.cs b/0_Framework/Application/ClassificationRangeOfGroupRate.cs
new file mode 100644
index 00000000..5085e52e
--- /dev/null
+++ b/0_Framework/Application/ClassificationRangeOfGroupRate.cs
@@ -0,0 +1,237 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace _0_Framework.Application;
+
+///
+/// دامنه امتیازات گروه های طبقه بندی مشاغل
+///
+public static class ClassificationRangeOfGroupRate
+{
+
+ ///
+ /// دریافت فاصله امتیاز گروه
+ ///
+ ///
+ ///
+ public static ClassificationGroupRate GetGroupDistanceRate(string groupNo)
+ {
+
+ switch (groupNo)
+ {
+ case "1":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 0,
+ HighRate = 80,
+ DistanceRate = 0,
+ };
+ break;
+ case "2":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 81,
+ HighRate = 95,
+ DistanceRate = 15,
+ };
+ break;
+ case "3":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 96,
+ HighRate = 110,
+ DistanceRate = 30, //فاصله سقف این گروه تا سقف گروه یک
+ };
+ break;
+ case "4":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 111,
+ HighRate = 125,
+ DistanceRate = 45, //فاصله سقف این گروه تا سقف گروه یک
+ };
+ break;
+ case "5":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 126,
+ HighRate = 145,
+ DistanceRate = 65, //فاصله سقف این گروه تا سقف گروه یک
+ };
+ break;
+ case "6":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 146,
+ HighRate = 165,
+ DistanceRate = 85,
+ };
+ break;
+ case "7":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 166,
+ HighRate = 185,
+ DistanceRate = 105,
+ };
+ break;
+ case "8":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 186,
+ HighRate = 210,
+ DistanceRate = 130,
+ };
+ break;
+ case "9":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 211,
+ HighRate = 235,
+ DistanceRate = 155,
+ };
+ break;
+ case "10":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 236,
+ HighRate = 265,
+ DistanceRate = 185,
+ };
+ break;
+ case "11":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 266,
+ HighRate = 295,
+ DistanceRate = 215,
+ };
+ break;
+ case "12":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 296,
+ HighRate = 325,
+ DistanceRate = 245,
+ };
+ break;
+ case "13":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 326,
+ HighRate = 365,
+ DistanceRate = 285,
+ };
+ break;
+ case "14":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 366,
+ HighRate = 405,
+ DistanceRate = 325,
+ };
+ break;
+ case "15":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 406,
+ HighRate = 445,
+ DistanceRate = 365,
+ };
+ break;
+ case "16":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 446,
+ HighRate = 495,
+ DistanceRate = 415,
+ };
+ break;
+ case "17":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 496,
+ HighRate = 545,
+ DistanceRate = 465,
+ };
+ break;
+ case "18":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 546,
+ HighRate = 605,
+ DistanceRate = 525,
+ };
+ break;
+ case "19":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 606,
+ HighRate = 665,
+ DistanceRate = 585,
+ };
+ break;
+ case "20":
+ return new ClassificationGroupRate()
+ {
+ GroupNo = groupNo,
+ LowRate = 666,
+ HighRate = 740,
+ DistanceRate = 660,
+ };
+ break;
+ }
+
+
+ return new ClassificationGroupRate();
+ }
+}
+
+///
+/// دیتای امتیازات هر گرو
+///
+public class ClassificationGroupRate
+{
+
+ ///
+ /// شمازه گروه
+ ///
+ public string GroupNo { get; set; }
+
+ ///
+ /// امتیاز کف
+ ///
+ public int LowRate { get; set; }
+
+ ///
+ /// امتیاز سقف
+ ///
+ public int HighRate { get; set; }
+
+ ///
+ /// فاصله امتیاز
+ ///
+ public int DistanceRate { get; set; }
+}
\ No newline at end of file
diff --git a/0_Framework/Application/Enums/TypeOfCoefficient.cs b/0_Framework/Application/Enums/TypeOfCoefficient.cs
new file mode 100644
index 00000000..97475bb8
--- /dev/null
+++ b/0_Framework/Application/Enums/TypeOfCoefficient.cs
@@ -0,0 +1,14 @@
+namespace _0_Framework.Application.Enums;
+
+public enum TypeOfCoefficient
+{
+ ///
+ /// ضریب ریالی طرح
+ ///
+ RialCoefficient,
+
+ ///
+ /// ضریب ریالی اداره کار
+ ///
+ JobOrganization,
+}
\ No newline at end of file
diff --git a/0_Framework/Application/Tools.cs b/0_Framework/Application/Tools.cs
index 23afe3cb..9cec9606 100644
--- a/0_Framework/Application/Tools.cs
+++ b/0_Framework/Application/Tools.cs
@@ -33,6 +33,35 @@ public static class Tools
public static string[] DayNames = { "شنبه", "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه" };
public static string[] DayNamesG = { "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه", "شنبه" };
+ ///
+ /// نام ستون از جدول مزد سنوات طبثه بندی را میگیرد و دیتای داخل آن ستون را برمیگرداند
+ ///
+ ///
+ ///
+ ///
+ public static double? GetDynamicDouble(object obj, string propertyName)
+ {
+ if (obj == null || string.IsNullOrWhiteSpace(propertyName))
+ return null;
+
+ var propertyInfo = obj.GetType().GetProperty(propertyName);
+ if (propertyInfo == null)
+ return null;
+
+ var value = propertyInfo.GetValue(obj);
+ if (value == null)
+ return null;
+
+ try
+ {
+ return Convert.ToDouble(value);
+ }
+ catch
+ {
+ return null;
+ }
+ }
+
public static bool IsMobileValid(this string mobileNo)
{
diff --git a/0_Framework/Domain/IRepository.cs b/0_Framework/Domain/IRepository.cs
index 209a5f29..0e7bd2ce 100644
--- a/0_Framework/Domain/IRepository.cs
+++ b/0_Framework/Domain/IRepository.cs
@@ -11,7 +11,8 @@ namespace _0_Framework.Domain;
public interface IRepository where T:class
{
T Get(TKey id);
- List Get();
+ List Get();
+ Task> GetListByIdList(List ids);
void Create(T entity);
Task CreateAsync(T entity);
bool ExistsIgnoreQueryFilter(Expression> expression);
diff --git a/0_Framework/InfraStructure/RepositoryBase.cs b/0_Framework/InfraStructure/RepositoryBase.cs
index 8f8a9fac..9f3de438 100644
--- a/0_Framework/InfraStructure/RepositoryBase.cs
+++ b/0_Framework/InfraStructure/RepositoryBase.cs
@@ -53,6 +53,11 @@ namespace _0_Framework.InfraStructure
{
return _context.Set().ToList();
}
+
+ public async Task> GetListByIdList(List ids)
+ {
+ return await _context.Set().Where(e => ids.Contains(EF.Property(e, "id"))).ToListAsync();
+ }
public void Remove(T entity)
{
_context.Set().Remove(entity);
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationEmployee.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationEmployee.cs
new file mode 100644
index 00000000..b4f5add6
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationEmployee.cs
@@ -0,0 +1,93 @@
+using _0_Framework.Domain;
+using System;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public class ClassificationEmployee : EntityBase
+{
+ ///
+ /// ایجاد پرسنل طرح
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ClassificationEmployee(long workshopId, long employeeId, long classificationSchemeId, long classificationGroupId, long classificationGroupJobId, DateTime? startGroupDate)
+ {
+ WorkshopId = workshopId;
+ EmployeeId = employeeId;
+ ClassificationSchemeId = classificationSchemeId;
+ ClassificationGroupId = classificationGroupId;
+ ClassificationGroupJobId = classificationGroupJobId;
+ StartGroupDate = startGroupDate;
+
+ }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; private set; }
+
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; private set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long ClassificationSchemeId { get; private set; }
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; private set; }
+
+ ///
+ /// آی دی شغل
+ ///
+ public long ClassificationGroupJobId { get; private set; }
+
+
+ ///
+ /// تاریخ شروع استفاده از گروه
+ ///
+ public DateTime? StartGroupDate{ get; private set; }
+
+ ///
+ /// تاریخ پایان استفاده از گروه
+ ///
+ public DateTime? EndGroupDate { get; private set; }
+
+ public ClassificationGroup ClassificationGroup { get; set; }
+
+ ///
+ /// ویرایش پرسنل طرح
+ ///
+ ///
+ ///
+ public void Edit(long classificationGroupId, long classificationGroupJobId)
+ {
+ ClassificationGroupId = classificationGroupId;
+ ClassificationGroupJobId = classificationGroupJobId;
+ }
+
+ ///
+ /// ویرایش گروه های چندگانه پرسنل طرح
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void EditMultipleGroupMember(long classificationGroupId, long classificationGroupJobId, DateTime startGroupDate)
+ {
+ ClassificationGroupId = classificationGroupId;
+ ClassificationGroupJobId = classificationGroupJobId;
+ StartGroupDate = startGroupDate;
+
+ }
+
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationGroup.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationGroup.cs
new file mode 100644
index 00000000..7220575a
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationGroup.cs
@@ -0,0 +1,43 @@
+using System.Collections.Generic;
+using _0_Framework.Domain;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+
+public class ClassificationGroup : EntityBase
+{
+ ///
+ /// ایجاد گروه های بیست گانه طرح طبقه بندی
+ ///
+ ///
+ ///
+ ///
+ public ClassificationGroup(string groupNo, long workshopId, long classificationSchemeId)
+ {
+ GroupNo = groupNo;
+ WorkshopId = workshopId;
+ ClassificationSchemeId = classificationSchemeId;
+ }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; private set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; private set; }
+ ///
+ /// آی دی طرح
+ ///
+ public long ClassificationSchemeId { get; private set; }
+
+ public ClassificationScheme ClassificationScheme { get; set; }
+
+
+ public List ClassificationGroupJobs { get; set; }
+ public List ClassificationGroupSalaries { get; set; }
+
+ public List ClassificationEmployees { get; set; }
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationGroupJob.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationGroupJob.cs
new file mode 100644
index 00000000..a4884bae
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationGroupJob.cs
@@ -0,0 +1,55 @@
+using _0_Framework.Domain;
+using _0_Framework_b.Domain;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public class ClassificationGroupJob : EntityBaseWithoutCreationDate
+{
+ ///
+ /// ایجاد لیست مشغال برای گروه های طرح طبقه بندی
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ClassificationGroupJob(long jobId, string jobName, string jobCode, long classificationGroupId, string groupNo)
+ {
+ JobId = jobId;
+ JobName = jobName;
+ JobCode = jobCode;
+ ClassificationGroupId = classificationGroupId;
+ GroupNo = groupNo;
+
+ }
+
+ ///
+ /// آی دی شغل
+ ///
+ public long JobId { get; private set; }
+
+ ///
+ /// نام شغل
+ ///
+ public string JobName { get; private set; }
+
+ ///
+ /// کد شغل
+ ///
+ public string JobCode { get; private set; }
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; private set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; private set; }
+
+
+ public ClassificationGroup ClassificationGroup { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationGroupSalary.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationGroupSalary.cs
new file mode 100644
index 00000000..79c1b67c
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationGroupSalary.cs
@@ -0,0 +1,82 @@
+using _0_Framework.Domain;
+using System;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public class ClassificationGroupSalary : EntityBase
+{
+
+
+ ///
+ /// ایجاد دستمزد برای گروه
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ClassificationGroupSalary(long classificationGroupId, string groupNo, double groupSalary, DateTime startDate, DateTime endDate, int year, long schemeId)
+ {
+ ClassificationGroupId = classificationGroupId;
+ GroupNo = groupNo;
+ GroupSalary = groupSalary;
+ StartDate = startDate;
+ EndDate = endDate;
+ Year = year;
+ SchemeId = schemeId;
+ }
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; private set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; private set; }
+
+ ///
+ /// دستمزد گروه
+ ///
+ public double GroupSalary { get; private set; }
+
+
+ ///
+ /// تاریخ شروع
+ ///
+ public DateTime StartDate { get; private set; }
+
+ ///
+ /// تاریخ پایان
+ ///
+ public DateTime EndDate { get; private set; }
+
+ ///
+ /// سال
+ ///
+ public int Year { get; private set; }
+
+ public long SchemeId { get; private set; }
+
+
+ public ClassificationGroup ClassificationGroup { get; set; }
+
+ ///
+ /// ویرایش دستمزد گروه
+ ///
+
+ ///
+ ///
+ ///
+ ///
+ public void Edit(double groupSalary, DateTime startDate, DateTime endDate, int year)
+ {
+
+ GroupSalary = groupSalary;
+ StartDate = startDate;
+ EndDate = endDate;
+ Year = year;
+ }
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationRialCoefficient.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationRialCoefficient.cs
new file mode 100644
index 00000000..726bfb0b
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationRialCoefficient.cs
@@ -0,0 +1,68 @@
+using System;
+using _0_Framework.Domain;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public class ClassificationRialCoefficient : EntityBaseWithoutCreationDate
+{
+ ///
+ /// ایچاد ضریب ریالی
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ClassificationRialCoefficient(long classificationSchemeId, double rialCoefficient, DateTime startDate, DateTime endDate, int year)
+ {
+ ClassificationSchemeId = classificationSchemeId;
+ RialCoefficient = rialCoefficient;
+ StartDate = startDate;
+ EndDate = endDate;
+ Year = year;
+ }
+
+ //آی دی طرح
+ public long ClassificationSchemeId { get; private set; }
+
+ ///
+ /// ضریب ریالی
+ ///
+ public double RialCoefficient { get; private set; }
+
+ ///
+ /// تاریخ شروع
+ ///
+ public DateTime StartDate { get; private set; }
+
+ ///
+ /// تاریخ پایان
+ ///
+ public DateTime EndDate { get; private set; }
+
+ ///
+ /// سال
+ ///
+ public int Year { get; private set; }
+
+
+ public ClassificationScheme ClassificationScheme { get; set; }
+
+ ///
+ /// ویرایش ضریب ریالی
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void Edit(double rialCoefficient, DateTime startDate, DateTime endDate, int year)
+ {
+
+ RialCoefficient = rialCoefficient;
+ StartDate = startDate;
+ EndDate = endDate;
+ Year = year;
+ }
+
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/ClassificationScheme.cs b/Company.Domain/ClassificationSchemeAgg/ClassificationScheme.cs
new file mode 100644
index 00000000..bc2c12dd
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/ClassificationScheme.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using _0_Framework.Application.Enums;
+using _0_Framework.Domain;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public class ClassificationScheme : EntityBase
+{
+ ///
+ /// ایجاد طرح طبقه بندی مشاغل
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ClassificationScheme(DateTime includingDateGr, DateTime executionDateGr, string designerFullName, string designerPhone, long workshopId, TypeOfCoefficient typeOfCoefficient)
+ {
+ IncludingDateGr = includingDateGr;
+ ExecutionDateGr = executionDateGr;
+ DesignerFullName = designerFullName;
+ DesignerPhone = designerPhone;
+ WorkshopId = workshopId;
+ TypeOfCoefficient = typeOfCoefficient;
+ }
+
+ ///
+ /// تاریخ شمول طرح
+ ///
+ public DateTime IncludingDateGr { get; private set; }
+
+ ///
+ /// تاریخ اجرای طرح
+ ///
+ public DateTime ExecutionDateGr { get; private set; }
+
+ ///
+ /// تاریخ پایان طرح
+ ///
+ public DateTime? EndSchemeDateGr { get; private set; }
+
+
+ ///
+ /// نام کامل طراح
+ ///
+ public string DesignerFullName { get; private set; }
+
+ ///
+ /// شماره همراه طراح
+ ///
+ public string DesignerPhone { get; private set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; private set; }
+
+
+ ///
+ /// نوع ضریب
+ ///
+ public TypeOfCoefficient TypeOfCoefficient { get; private set; }
+
+
+ public List ClassificationGroups { get; set; }
+
+ public List ClassificationRialCoefficients { get; set; }
+
+ ///
+ /// ویرایش طرح
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void Edit(DateTime includingDateGr, DateTime executionDateGr,string designerFullName, string designerPhone, TypeOfCoefficient typeOfCoefficient)
+ {
+ IncludingDateGr = includingDateGr;
+ ExecutionDateGr = executionDateGr;
+ DesignerFullName = designerFullName;
+ DesignerPhone = designerPhone;
+ TypeOfCoefficient = typeOfCoefficient;
+
+ }
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/IClassificationEmployeeRepository.cs b/Company.Domain/ClassificationSchemeAgg/IClassificationEmployeeRepository.cs
new file mode 100644
index 00000000..4db0dc93
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/IClassificationEmployeeRepository.cs
@@ -0,0 +1,42 @@
+using _0_Framework.Domain;
+using CompanyManagment.App.Contracts.ClassificationScheme;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public interface IClassificationEmployeeRepository : IRepository
+{
+ ///
+ /// دریافت لیست پرسنل کارگاه
+ /// تب افزودن پرسنل
+ ///
+ ///
+ ///
+ Task> GetEmployeeListData(long schemeId);
+
+
+ ///
+ /// دریافت اطلاعات عضویتی پرسنل در گروه
+ ///
+ ///
+ ///
+ Task> GetEmployeeMemberizeData(long employeeId);
+
+ ///
+ /// ذخیره انتقال پرسنل به گره های دیگر
+ ///بصورت گروهی
+ ///
+ ///
+ ///
+ Task CreateTransferRange(List command);
+
+
+ ///
+ /// حذف پرسنل از گروه از سمت ویرایش
+ ///
+ ///
+ ///
+ Task RemoveRangeByEdit(List command);
+
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/IClassificationGroupRepository.cs b/Company.Domain/ClassificationSchemeAgg/IClassificationGroupRepository.cs
new file mode 100644
index 00000000..e636b438
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/IClassificationGroupRepository.cs
@@ -0,0 +1,61 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using _0_Framework.Domain;
+using CompanyManagment.App.Contracts.ClassificationScheme;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public interface IClassificationGroupRepository : IRepository
+{
+ ///
+ /// دریافت گروه های طرح
+ ///
+ ///
+ ///
+ Task> GetGroups(long schemeId);
+
+ ///
+ /// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
+ ///
+ ///
+ ///
+ Task> GetGroupAndJobs(long schemeId);
+
+
+ ///
+ /// دریافت مشاغل گروه توسط آی دی گروه
+ ///
+ ///
+ ///
+ Task> GetGroupJobs(long groupId);
+
+ ///
+ /// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
+ ///
+ ///
+ ///
+ ///
+ Task CheckEmployeeHasThisJob(long id, long groupId);
+
+ ///
+ /// ایجاد مشاغل
+ ///
+ ///
+ ///
+ ///
+ Task CreateJobs(List createClassificationGroupJob, List deleteJobList);
+
+
+ ///
+ /// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
+ ///
+ ///
+ Task GetGroupToCreateSalariesModal(long schemeId);
+
+ ///
+ /// ایجاد گروه های بیست گانه
+ ///
+ ///
+ ///
+ Task CreateGroups(List groupList);
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/IClassificationGroupSalariesRepository.cs b/Company.Domain/ClassificationSchemeAgg/IClassificationGroupSalariesRepository.cs
new file mode 100644
index 00000000..fc026a2c
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/IClassificationGroupSalariesRepository.cs
@@ -0,0 +1,34 @@
+using _0_Framework.Domain;
+using CompanyManagment.App.Contracts.ClassificationScheme;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public interface IClassificationGroupSalariesRepository : IRepository
+{
+ ///
+ /// ایجاد دستمزدهای گروه ها
+ ///
+ ///
+ ///
+ Task CreateSalaries(List createClassificationGroupSalary);
+
+
+ ///
+ /// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task GetEditSalariesData(long schemeId, string startDate, string endDate);
+
+ ///
+ /// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
+ ///
+ ///
+ ///
+ Task GetSalariesTabData(long schemeId);
+}
+
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/IClassificationRialCoefficientRepository.cs b/Company.Domain/ClassificationSchemeAgg/IClassificationRialCoefficientRepository.cs
new file mode 100644
index 00000000..5d41918a
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/IClassificationRialCoefficientRepository.cs
@@ -0,0 +1,8 @@
+using _0_Framework.Domain;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public interface IClassificationRialCoefficientRepository : IRepository
+{
+
+}
\ No newline at end of file
diff --git a/Company.Domain/ClassificationSchemeAgg/IClassificationSchemeRepository.cs b/Company.Domain/ClassificationSchemeAgg/IClassificationSchemeRepository.cs
new file mode 100644
index 00000000..8d41ae41
--- /dev/null
+++ b/Company.Domain/ClassificationSchemeAgg/IClassificationSchemeRepository.cs
@@ -0,0 +1,56 @@
+using _0_Framework.Application;
+using _0_Framework.Domain;
+using CompanyManagment.App.Contracts.ClassificationScheme;
+using CompanyManagment.App.Contracts.YearlySalary;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Company.Domain.ClassificationSchemeAgg;
+
+public interface IClassificationSchemeRepository : IRepository
+{
+ ///
+ /// پارشیال صفحه ایجاد طرح
+ ///
+ ///
+ ///
+ Task GetClassificationSchemeList(long workshopId);
+
+
+ ///
+ /// دریافت اطلاعات طرح برای ویرایش
+ ///
+ ///
+ ///
+ Task GetClassificationScheme(long id);
+
+
+ ///
+ /// دریافت اطلاعات طر برای محاسبات
+ ///
+ ///
+ ///
+ Task GetClassificationSchemeToCompute(long id);
+
+ ///
+ /// متد محاسبه پایه سنوات برا افراد تک گروه
+ ///
+ /// تاریخ شروع طرح
+ /// تاریخ پاین طرح، اجباری نیست
+ /// تاریخ شروع قراداد
+ /// تاریخ پایان قراداد
+ /// شماره گروه
+ /// آی دی پرسنل
+ /// آی دی کارگاه
+ ///
+ Task BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
+ DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
+
+ ///
+ /// حذف طرح
+ ///
+ ///
+ ///
+ Task DeleteClassificationScheme(long id);
+}
\ No newline at end of file
diff --git a/Company.Domain/JobAgg/IJobRepository.cs b/Company.Domain/JobAgg/IJobRepository.cs
index 75e9dfc7..69514cdb 100644
--- a/Company.Domain/JobAgg/IJobRepository.cs
+++ b/Company.Domain/JobAgg/IJobRepository.cs
@@ -11,6 +11,13 @@ public interface IJobRepository : IRepository
EditJob GetDetails(long id);
List Search(JobSearchModel searchModel);
List SearchJobForMain(JobSearchModel searchModel);
+
+ ///
+ /// جستجوس مشاغل
+ ///
+ ///
+ ///
+ Task> JobSearchSelect(string searchtText);
// Task> GetJobListByText(string searchtText);
List GetJobListByText(string searchtText);
List GetJobListByWorkshopId(long workshopId);
diff --git a/Company.Domain/WorkshopAgg/Workshop.cs b/Company.Domain/WorkshopAgg/Workshop.cs
index 2fe015b4..02b0d0f8 100644
--- a/Company.Domain/WorkshopAgg/Workshop.cs
+++ b/Company.Domain/WorkshopAgg/Workshop.cs
@@ -185,8 +185,17 @@ public class Workshop : EntityBase
public bool AddLeavePay { get; private set; }
public string ZoneName { get; private set; }
public bool TotalPaymentHide { get; private set; }
+
+ ///
+ /// آیا طبقه بندی شده است
+ /// [کارگاه دارای طرح طبقه بندی می باشد ؟]
+ ///
public bool IsClassified { get; private set; }
+ ///
+ /// آیا طرح طبقه بندی تکمیل شده است
+ ///
+ public bool IsClassificationSchemeCompleted { get; private set; }
//نحوه محاسبه مزد مرخصی
public string ComputeOptions { get; private set; }
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/AddEmployeeToGroup.cs b/CompanyManagment.App.Contracts/ClassificationScheme/AddEmployeeToGroup.cs
new file mode 100644
index 00000000..3e8b495f
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/AddEmployeeToGroup.cs
@@ -0,0 +1,84 @@
+using System.Collections.Generic;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// مدل برای مدال افزودن پرسنل ب گروه
+///
+public class AddEmployeeToGroup
+{
+ ///
+ /// آی دی
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// نام کامل پرسنل
+ ///
+ public string EmployeeFullName { get; set; }
+
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// آی دی گروه
+ ///
+ public long GroupId { get; set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GoroupNo { get; set; }
+
+ ///
+ /// آی دی شغل
+ ///
+ public long JobId { get; set; }
+
+ ///
+ /// نام شغل
+ ///
+ public string JobName { get; set; }
+
+ ///
+ /// کد شغل
+ ///
+ public string JobCode { get; set; }
+
+
+ ///
+ /// لیست گروه ها
+ ///
+ public List ClassificationGroupList{ get; set; }
+}
+
+///
+/// لیست گروه ها
+///
+public class ClassificationGroupList
+{
+ ///
+ /// آی دی گروه
+ ///
+ public long GroupId { get; set; }
+
+ ///
+ /// شماره گروه
+ /// استرینگ
+ ///
+ public string GroupNo { get; set; }
+
+
+ ///
+ /// شماره گروه
+ /// اینتیجر
+ ///
+ public int GroupNoInt { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/CheckStatusToDeleteScheme.cs b/CompanyManagment.App.Contracts/ClassificationScheme/CheckStatusToDeleteScheme.cs
new file mode 100644
index 00000000..deac4a4d
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/CheckStatusToDeleteScheme.cs
@@ -0,0 +1,32 @@
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+public class CheckStatusToDeleteScheme
+{
+ ///
+ /// وضعیت طرح برای حذف
+ ///
+ public DeleteSchemeStatus DeleteSchemeStatus { get; set; }
+
+ ///
+ /// پیام سیستم
+ ///
+ public string Message { get; set; }
+}
+
+public enum DeleteSchemeStatus
+{
+ ///
+ /// مجاز
+ ///
+ Valid,
+ ///
+ /// مجاز باشرط تایید
+ ///
+ ConfirmationNeeded,
+
+ ///
+ /// غیر مجاز
+ ///
+ NotValid,
+
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationGroupAndJobModel.cs b/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationGroupAndJobModel.cs
new file mode 100644
index 00000000..2754818c
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationGroupAndJobModel.cs
@@ -0,0 +1,104 @@
+using System.Collections.Generic;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// ایجاد گروه
+///
+public class ClassificationGroupAndJobModel
+{
+ ///
+ /// آی دی گروه
+ ///
+ public long GroupId { get; set; }
+ ///
+ /// شماره گروه
+ /// استرینگ
+ ///
+ public string GroupNo { get; set; }
+
+ ///
+ /// شماره گروه نوع عددی
+ ///
+ public int GroupNoInt { get; set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+ ///
+ /// آی دی طرح
+ ///
+ public long ClassificationSchemeId { get; set; }
+
+ ///
+ /// لیست مشاغل
+ ///
+ public List EditClassificationGroupJob { get; set; }
+}
+
+///
+/// ایجاد مشاغل گروه
+///
+public class CreateClassificationGroupJob
+{
+ ///
+ /// آی دی شغل
+ ///
+ public long JobId { get; set; }
+
+ ///
+ /// نام شغل
+ ///
+ public string JobName { get; set; }
+
+ ///
+ /// کد شغل
+ ///
+ public string JobCode { get; set; }
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; set; }
+}
+
+///
+/// ویرایش مشاغل گروه
+///
+public class EditClassificationGroupJob : CreateClassificationGroupJob
+{
+ ///
+ /// ای دی شغل
+ ///
+ public long Id { get; set; }
+}
+
+///
+/// ایجاد یا ویرایش مشاغل
+///
+public class CreateOrEditGroupJobs
+{
+ ///
+ /// آی دی گروه
+ ///
+ public long GroupId { get; set; }
+
+ ///
+ /// شماره گروه
+ /// استرینگ
+ ///
+ public string GroupNo { get; set; }
+
+ ///
+ /// آی دی مشاغل
+ ///
+ public List JobIdList { get; set; }
+}
+
+
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationSchemeListDto.cs b/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationSchemeListDto.cs
new file mode 100644
index 00000000..aee59eb6
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/ClassificationSchemeListDto.cs
@@ -0,0 +1,24 @@
+using System.Collections.Generic;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// پارشیال صفحه ایجاد طرح
+///
+public class ClassificationSchemeListDto
+{
+ ///
+ /// آیا طرح دارد
+ ///
+ public bool HasScheme { get; set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+
+ ///
+ /// لیست طرح
+ ///
+ public List ClassificationSchemesList { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationGroupSalaryAndRialCoeficient.cs b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationGroupSalaryAndRialCoeficient.cs
new file mode 100644
index 00000000..7baadf53
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationGroupSalaryAndRialCoeficient.cs
@@ -0,0 +1,204 @@
+using _0_Framework.Application.Enums;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// ایجاد دستمزد گروه و ضریب ریالی
+///
+public class CreateClassificationGroupSalaryAndRialCoefficient
+{
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; set; }
+
+ ///
+ /// دستمزد گروه
+ ///
+ public double GroupSalary { get; set; }
+
+
+ ///
+ /// تاریخ شروع
+ ///
+ public DateTime StartDate { get; set; }
+
+ ///
+ /// تاریخ پایان
+ ///
+ public DateTime EndDate { get; set; }
+
+ ///
+ /// سال
+ ///
+ public int Year { get; set; }
+
+
+
+}
+
+///
+/// ویرایش دستمزد
+///
+public class EditClassificationGroupSalaryAndRialCoefficient : CreateClassificationGroupSalaryAndRialCoefficient
+{
+ ///
+ /// آی دی
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// تاریخ شروع
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string StartDateFa { get; set; }
+
+ ///
+ /// تاریخ پایان
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string EndDateFa { get; set; }
+
+ ///
+ /// دستمزد گروه
+ ///
+ public string GroupSalaryStr { get; set; }
+}
+
+///
+/// لیست دستمزدها و ضرایب ریالی
+///
+public class SalaryAndRialCoefficientModel
+{
+ ///
+ /// تاریخ شروع
+ /// میلادی
+ ///
+ public DateTime StartDate { get; set; }
+
+ ///
+ /// تاریخ شروع
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string StartDateFa { get; set; }
+
+ ///
+ /// تاریخ پایان
+ /// میلادی
+ ///
+ public DateTime EndDate { get; set; }
+
+ ///
+ /// تاریخ پایان
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string EndDateFa { get; set; }
+
+ ///
+ /// سال
+ ///
+ public int Year { get; set; }
+
+
+ ///
+ /// ضریب ریالی
+ /// string
+ ///
+ public string RialCoefficientStr { get; set; }
+
+ ///
+ /// ضریب ریالی
+ /// double
+ ///
+ public double RialCoefficient { get; set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// نوع ضریب
+ ///
+ public TypeOfCoefficient TypeOfCoefficient { get; set; }
+
+ ///
+ /// آی دی ضریب ریالی
+ ///
+ public long CoefficientId { get; set; }
+
+ ///
+ /// لیست دستمزدها و ضرایب بر اساس سال
+ ///
+ public List SalariesAndCoefficientList { get; set; }
+}
+
+
+///
+/// تب دستمزد ها و ضرایب ریالی
+///
+public class SalaryAndRialCoefficientTab
+{
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// آیا دستمزدی قبلا ایجاد شده است؟
+ ///
+ public bool HasAnySalaries { get; set; }
+
+ ///
+ /// لیست دستمزدها و ضرایب
+ ///
+ public List SalaryAndRialCoefficientTabDataList { get; set; }
+}
+
+///
+/// لیست دستمزدها
+///
+public class SalaryAndRialCoefficientTabDataList
+{
+ ///
+ /// تاریخ شروع
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string StartDateFa { get; set; }
+
+ ///
+ /// تاریخ پایان
+ /// شمسی
+ ///
+ [DataType(DataType.Text)]
+ public string EndDateFa { get; set; }
+
+ ///
+ /// سال
+ ///
+ public int Year { get; set; }
+
+ ///
+ /// ضریب ریالی
+ /// string
+ ///
+ public string RialCoefficientStr { get; set; }
+}
+
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationScheme.cs b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationScheme.cs
new file mode 100644
index 00000000..75f1812d
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationScheme.cs
@@ -0,0 +1,59 @@
+using _0_Framework.Application.Enums;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// ایجاد طرح
+///
+public class CreateClassificationScheme
+{
+
+
+ ///
+ /// تاریخ شمول طرح
+ /// شمسی
+ ///
+ public string IncludingDateFa { get; set; }
+
+ ///
+ /// تاریخ اجرای طرح
+ /// میلادی
+ ///
+ public DateTime ExecutionDateGr { get; set; }
+
+ ///
+ /// تاریخ اجرای طرح
+ /// شمسی
+ ///
+ public string ExecutionDateFa { get; set; }
+
+ ///
+ /// تاریخ پایان طرح
+ ///
+ public DateTime? EndSchemeDateGr { get; set; }
+
+
+ ///
+ /// نام کامل طراح
+ ///
+ public string DesignerFullName { get; set; }
+
+ ///
+ /// شماره همراه طراح
+ ///
+ [RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
+ public string DesignerPhone { get; set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+
+
+ ///
+ /// نوع ضریب
+ ///
+ public TypeOfCoefficient TypeOfCoefficient { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationSchemeDto.cs b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationSchemeDto.cs
new file mode 100644
index 00000000..130bfcb5
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/CreateClassificationSchemeDto.cs
@@ -0,0 +1,46 @@
+using _0_Framework.Application.Enums;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+public class CreateClassificationSchemeDto
+{
+
+
+ ///
+ /// تاریخ شمول طرح
+ /// شمسی
+ ///
+ public string IncludingDateFa { get; set; }
+
+
+ ///
+ /// تاریخ اجرای طرح
+ /// شمسی
+ ///
+ public string ExecutionDateFa { get; set; }
+
+
+ ///
+ /// نام کامل طراح
+ ///
+ public string DesignerFullName { get; set; }
+
+ ///
+ /// شماره همراه طراح
+ ///
+ [RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
+ public string DesignerPhone { get; set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+
+
+ ///
+ /// نوع ضریب
+ ///
+ public TypeOfCoefficient TypeOfCoefficient { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationScheme.cs b/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationScheme.cs
new file mode 100644
index 00000000..542a8e93
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationScheme.cs
@@ -0,0 +1,12 @@
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// ویرایش طرح
+///
+public class EditClassificationScheme : CreateClassificationScheme
+{
+ ///
+ /// آی دی طرح
+ ///
+ public long Id { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationSchemeDto.cs b/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationSchemeDto.cs
new file mode 100644
index 00000000..904acf5f
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/EditClassificationSchemeDto.cs
@@ -0,0 +1,45 @@
+using _0_Framework.Application.Enums;
+using System.ComponentModel.DataAnnotations;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+public class EditClassificationSchemeDto
+{
+ ///
+ /// آی دی طرح
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// تاریخ شمول طرح
+ /// شمسی
+ ///
+ public string IncludingDateFa { get; set; }
+
+
+ ///
+ /// تاریخ اجرای طرح
+ /// شمسی
+ ///
+ public string ExecutionDateFa { get; set; }
+
+
+ ///
+ /// نام کامل طراح
+ ///
+ public string DesignerFullName { get; set; }
+
+ ///
+ /// شماره همراه طراح
+ ///
+ [RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
+ public string DesignerPhone { get; set; }
+
+
+
+
+ ///
+ /// نوع ضریب
+ ///
+ public TypeOfCoefficient TypeOfCoefficient { get; set; }
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/EditEmployeeGroup.cs b/CompanyManagment.App.Contracts/ClassificationScheme/EditEmployeeGroup.cs
new file mode 100644
index 00000000..e680c19e
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/EditEmployeeGroup.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+///
+/// ویرایش گروه پرسنل
+///
+public class EditEmployeeGroup
+{
+ ///
+ /// آیا گروه بندی پرسنل چند گانه است
+ ///
+ public bool HasMultipleGroup { get; set; }
+
+ ///
+ /// نام کامل پرسنل
+ ///
+ public string EmployeeFullName { get; set; }
+
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// لیست گروه های پرسنل
+ ///
+ public List EditEmployeeGroupLists { get; set; }
+
+ ///
+ /// لیست گروه های طرح
+ ///
+ public List ClassificationGroupList { get; set; }
+}
+
+///
+/// لیست گروه های پرسنل
+///
+public class EditEmployeeGroupList
+{
+ ///
+ /// آی دی
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; set; }
+
+
+ ///
+ /// آی دی گروه
+ ///
+ public long ClassificationGroupId { get; set; }
+
+ ///
+ /// آی دی شغل
+ ///
+ public long ClassificationGroupJobId { get; set; }
+
+
+ ///
+ /// تاریخ شروع استفاده از گروه
+ ///
+ public DateTime? StartGroupDate { get; set; }
+
+ ///
+ /// تاریخ پایان استفاده از گروه
+ ///
+ public DateTime? EndGroupDate { get; set; }
+
+ ///
+ /// تاریخ شروع استفاده از گروه
+ ///
+ public string StartGroupDateFa { get; set; }
+
+ ///
+ /// تاریخ پایان استفاده از گروه
+ ///
+ public string EndGroupDateFa { get; set; }
+
+ ///
+ /// آیا حذف شده است
+ ///
+ public bool IsRemoved { get; set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/EmployeeInfoTab.cs b/CompanyManagment.App.Contracts/ClassificationScheme/EmployeeInfoTab.cs
new file mode 100644
index 00000000..a2f9cd5e
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/EmployeeInfoTab.cs
@@ -0,0 +1,110 @@
+using System.Collections.Generic;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// جستجوی پرسنل
+/// تب افزودن پرسنل طبقه بندی مشاغل
+///
+public class EmployeeInfoTab
+{
+ ///
+ /// آی دی کارگاه
+ ///
+ public long WorkshopId { get; set; }
+
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; set; }
+
+ ///
+ /// نام کامل پرسنل
+ ///
+ public string FullName { get; set; }
+
+ ///
+ /// آی دی طرح
+ ///
+ public long SchemeId { get; set; }
+
+ ///
+ /// لیست پرسنل
+ ///
+ public List EmployeeInfoList { get; set; }
+
+ public List YearlyList { get; set; }
+}
+
+///
+/// لیست پرسنل
+/// تب افزودن پرسنل طبقه بندی مشاغل
+///
+public class EmployeeInfoList
+{
+ ///
+ /// آی دی پرسنل
+ ///
+ public long EmployeeId { get; set; }
+
+ ///
+ /// نام کامل پرسنل
+ ///
+ public string FullName { get; set; }
+
+ ///
+ /// شماره گروه یا گره هایی که پرسنل در آن اضافه شده
+ ///
+ public string GroupNo { get; set; }
+
+ ///
+ /// آیا پرسنل هیچ گروهی دارد؟
+ ///
+ public bool HasGroup { get; set; }
+
+
+ ///
+ /// آخرین تاریخ شروع بکار قراداد
+ ///
+ public string LastStartContractWork { get; set; }
+
+ ///
+ /// آخرین تاریخ ترک کار قراداد
+ ///
+ public string LastLeftContractWork { get; set; }
+
+ ///
+ /// آخرین تاریخ شروع بکار بیمه
+ ///
+ public string LastStartInsuranceWork { get; set; }
+
+ ///
+ /// آخرین تاریخ ترک کار بیمه
+ ///
+ public string LastLeftInsuranceWork { get; set; }
+
+ ///
+ /// آیا پرسنل قرداد است
+ ///
+ public bool ContractPerson { get; set; }
+
+ ///
+ /// آیا پرسنل بیمه است
+ ///
+ public bool InsurancePerson { get; set; }
+
+ ///
+ /// آیا ترک کار قرارداد دارد
+ ///
+ public bool ContractLeft { get; set; }
+
+ ///
+ /// آیا ترک کار بیمه دارد
+ ///
+ public bool InsuranceLeft { get; set; }
+
+ ///
+ /// آیا کلا ترک کار کرده است
+ ///
+ public bool Black { get; set; }
+}
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/IClassificationSchemeApplication.cs b/CompanyManagment.App.Contracts/ClassificationScheme/IClassificationSchemeApplication.cs
new file mode 100644
index 00000000..d87424ba
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/IClassificationSchemeApplication.cs
@@ -0,0 +1,202 @@
+using _0_Framework.Application;
+using CompanyManagment.App.Contracts.TemporaryClientRegistration;
+using CompanyManagment.App.Contracts.YearlySalary;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+///
+/// اپلیکیش طرح طبقه بندی مشاغل
+///
+public interface IClassificationSchemeApplication
+{
+ ///
+ /// پارشیال صفحه ایجاد طرح
+ ///
+ ///
+ ///
+ Task GetClassificationSchemeList(long workshopId);
+
+ ///
+ /// ایجاد طرح
+ ///
+ ///
+ ///
+ Task CreateClassificationScheme(CreateClassificationSchemeDto command);
+
+ ///
+ /// دریافت اطلاعات طرح برای مودال ویرایش
+ ///
+ ///
+ ///
+ Task GetClassificationScheme(long id);
+
+ ///
+ /// دریافت اطلاعات طر برای محاسبات
+ ///
+ ///
+ ///
+ Task GetClassificationSchemeToCompute(long id);
+
+ ///
+ /// ویرایش طرح
+ ///
+ ///
+ ///
+ Task EditClassificationScheme(EditClassificationSchemeDto command);
+
+
+
+ ///
+ /// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
+ ///
+ ///
+ ///
+ Task> GetGroupAndJobs(long schemeId);
+
+
+ ///
+ /// دریافت مشاغل گروه توسط آی دی گروه
+ ///
+ ///
+ ///
+ Task> GetGroupJobs(long groupId);
+
+ ///
+ /// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
+ ///
+ ///
+ ///
+ ///
+ Task CheckEmployeeHasThisJob(long id, long groupId);
+
+ ///
+ /// ایجاد مشاغل گروه
+ ///
+ ///
+ ///
+ ///
+ Task CreateGroupJobs(List createClassificationGroupJob, List deleteJobList);
+
+
+ ///
+ /// چک میکند که آیا برای این طرح تابحال دستمزدی ایجاد شده یا نه
+ ///
+ ///
+ ///
+ Task GetSalariesTabData(long schemeId);
+
+ ///
+ /// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
+ ///
+ ///
+ Task GetGroupToCreateSalariesModal(long schemeId);
+
+ ///
+ /// ایجاد دستمزدها و ضرایب ریالی هر گروه در هر سال
+ ///
+ ///
+ ///
+ Task CreateGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
+
+
+
+ ///
+ /// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task GetEditSalariesData(long schemeId, string startDate, string endDate);
+
+ ///
+ /// ثبت ویرایش دستمزدها و ضریب
+ ///
+ ///
+ ///
+ Task EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
+
+
+ ///
+ /// دریافت لیست پرسنل برای تب افزودن پرسنل
+ ///
+ ///
+ ///
+ Task GetEmployeeDataTab(EmployeeInfoTab command);
+
+
+ ///
+ /// دریافت گروه های طرح
+ ///
+ ///
+ ///
+ Task> GetGroups(long schemeId);
+
+ ///
+ /// ذخیره پرسنل افزوده شده در گروه
+ ///
+ ///
+ ///
+ Task AddEmployeeToGroup(AddEmployeeToGroup command);
+
+ ///
+ /// انتقال پرسنل به گروه جدید
+ ///
+ ///
+ ///
+ Task TransferEmployeeToNewGroup(List command);
+
+ ///
+ /// ذخیره ویرایش گروه پرسنل
+ ///
+ ///
+ ///
+ Task EditGroupMember(AddEmployeeToGroup command);
+
+ ///
+ /// ذخیره ویرایش گروه چندگانه پرسنل
+ ///
+ ///
+ ///
+ Task EditMultipleGroupMember(List command);
+
+ ///
+ /// دریافت اطلاعات عضویتی پرسنل در گروه
+ ///
+ ///
+ ///
+ Task GetEmployeeMemberizeData(long employeeId);
+
+
+ ///
+ /// متد محاسبه پایه سنوات برا افراد تک گروه
+ ///
+ /// تاریخ شروع طرح
+ /// تاریخ پاین طرح، اجباری نیست
+ /// تاریخ شروع قراداد
+ /// تاریخ پایان قراداد
+ /// شماره گروه
+ /// آی دی پرسنل
+ /// آی دی کارگاه
+ ///
+ Task BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
+ DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
+
+ ///
+ /// چک کردن امکان حذف طرح
+ ///
+ ///
+ ///
+ Task CheckToDeleteScheme(long id);
+
+ ///
+ /// حذف طرح
+ ///
+ ///
+ ///
+ Task DeleteScheme(long id);
+
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/ClassificationScheme/SchemeListDto.cs b/CompanyManagment.App.Contracts/ClassificationScheme/SchemeListDto.cs
new file mode 100644
index 00000000..f1e8133a
--- /dev/null
+++ b/CompanyManagment.App.Contracts/ClassificationScheme/SchemeListDto.cs
@@ -0,0 +1,32 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace CompanyManagment.App.Contracts.ClassificationScheme;
+
+public class SchemeListDto
+{
+ ///
+ /// آی دی طرح
+ ///
+ public long Id { get; set; }
+
+ ///
+ /// تاریخ شمول طرح
+ /// شمسی
+ ///
+ public string IncludingDateFa { get; set; }
+
+
+ ///
+ /// تاریخ اجرای طرح
+ /// شمسی
+ ///
+ public string ExecutionDateFa { get; set; }
+
+
+ ///
+ /// نام کامل طراح
+ ///
+ public string DesignerFullName { get; set; }
+
+
+}
\ No newline at end of file
diff --git a/CompanyManagment.App.Contracts/Job/IJobApplication.cs b/CompanyManagment.App.Contracts/Job/IJobApplication.cs
index 23c98fff..4d4379cf 100644
--- a/CompanyManagment.App.Contracts/Job/IJobApplication.cs
+++ b/CompanyManagment.App.Contracts/Job/IJobApplication.cs
@@ -13,6 +13,13 @@ public interface IJobApplication
List Search(JobSearchModel searchModel);
List SearchJobForMain(JobSearchModel searchModel);
//Task> GetJobListByText(string searchtText);
+
+ ///
+ /// جستجوی مشاغل برای سلکت تو
+ ///
+ ///
+ ///
+ Task> JobSearchSelect(string searchtText);
List GetJobListByText(string searchtText);
List GetJobListByWorkshopId(long workshopId);
List GetJobListByTextAndWorkshopId(string textSearch, long workshopId);
diff --git a/CompanyManagment.App.Contracts/YearlySalary/BaseYearDataViewModel.cs b/CompanyManagment.App.Contracts/YearlySalary/BaseYearDataViewModel.cs
index 058e3dc2..b4f9a358 100644
--- a/CompanyManagment.App.Contracts/YearlySalary/BaseYearDataViewModel.cs
+++ b/CompanyManagment.App.Contracts/YearlySalary/BaseYearDataViewModel.cs
@@ -94,4 +94,9 @@ public class BaseYearDataList
/// آیا تاریخ پایان کار دارد
///
public bool HasLeftWork { get; set; }
+
+ ///
+ /// شماره گروه
+ ///
+ public string GroupNo { get; set; }
}
\ No newline at end of file
diff --git a/CompanyManagment.Application/ClassificationSchemeApplication.cs b/CompanyManagment.Application/ClassificationSchemeApplication.cs
new file mode 100644
index 00000000..fdc2f332
--- /dev/null
+++ b/CompanyManagment.Application/ClassificationSchemeApplication.cs
@@ -0,0 +1,610 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using _0_Framework.Application;
+using _0_Framework.Application.Enums;
+using Company.Domain.ClassificationSchemeAgg;
+using CompanyManagment.App.Contracts.ClassificationScheme;
+using CompanyManagment.App.Contracts.YearlySalary;
+using Microsoft.EntityFrameworkCore;
+
+namespace CompanyManagment.Application;
+
+public class ClassificationSchemeApplication : IClassificationSchemeApplication
+{
+ private readonly IClassificationSchemeRepository _classificationSchemeRepository;
+ private readonly IClassificationGroupRepository _classificationGroupRepository;
+ private readonly IClassificationGroupSalariesRepository _classificationGroupSalariesRepository;
+ private readonly IClassificationRialCoefficientRepository _classificationRialCoefficientRepository;
+ private readonly IClassificationEmployeeRepository _classificationEmployeeRepository;
+
+ public ClassificationSchemeApplication(IClassificationSchemeRepository classificationSchemeRepository, IClassificationGroupRepository classificationGroupRepository, IClassificationGroupSalariesRepository classificationGroupSalariesRepository, IClassificationRialCoefficientRepository classificationRialCoefficientRepository, IClassificationEmployeeRepository classificationEmployeeRepository)
+ {
+ _classificationSchemeRepository = classificationSchemeRepository;
+ _classificationGroupRepository = classificationGroupRepository;
+ _classificationGroupSalariesRepository = classificationGroupSalariesRepository;
+ _classificationRialCoefficientRepository = classificationRialCoefficientRepository;
+ _classificationEmployeeRepository = classificationEmployeeRepository;
+ }
+
+ public Task GetClassificationSchemeList(long workshopId)
+ {
+ return _classificationSchemeRepository.GetClassificationSchemeList(workshopId);
+ }
+
+ public async Task CreateClassificationScheme(CreateClassificationSchemeDto command)
+ {
+ var op = new OperationResult();
+
+
+ #region Validation
+
+ if (!command.ExecutionDateFa.TryToGeorgianDateTime(out var executionDateGr))
+ {
+ return op.Failed("تاریخ اجرا صحیح نمی باشد");
+ }
+ if (!command.IncludingDateFa.TryToGeorgianDateTime(out var includingDateGr))
+ {
+ return op.Failed("تاریخ شمول صحیح نمی باشد");
+ }
+
+
+
+ #endregion
+ //ایجاد طرح
+ var create = new Company.Domain.ClassificationSchemeAgg.ClassificationScheme(includingDateGr, executionDateGr,
+ command.DesignerFullName, command.DesignerPhone, command.WorkshopId, command.TypeOfCoefficient);
+ _classificationSchemeRepository.Create(create);
+ await _classificationSchemeRepository.SaveChangesAsync();
+ //ایجاد گروه های طرح
+ var groups = new List()
+ {
+ new ClassificationGroup("1",command.WorkshopId,create.id),
+ new ClassificationGroup("2",command.WorkshopId,create.id),
+ new ClassificationGroup("3",command.WorkshopId,create.id),
+ new ClassificationGroup("4",command.WorkshopId,create.id),
+ new ClassificationGroup("5",command.WorkshopId,create.id),
+ new ClassificationGroup("6",command.WorkshopId,create.id),
+ new ClassificationGroup("7",command.WorkshopId,create.id),
+ new ClassificationGroup("8",command.WorkshopId,create.id),
+ new ClassificationGroup("9",command.WorkshopId,create.id),
+ new ClassificationGroup("10",command.WorkshopId,create.id),
+ new ClassificationGroup("11",command.WorkshopId,create.id),
+ new ClassificationGroup("12",command.WorkshopId,create.id),
+ new ClassificationGroup("13",command.WorkshopId,create.id),
+ new ClassificationGroup("14",command.WorkshopId,create.id),
+ new ClassificationGroup("15",command.WorkshopId,create.id),
+ new ClassificationGroup("16",command.WorkshopId,create.id),
+ new ClassificationGroup("17",command.WorkshopId,create.id),
+ new ClassificationGroup("18",command.WorkshopId,create.id),
+ new ClassificationGroup("19",command.WorkshopId,create.id),
+ new ClassificationGroup("20",command.WorkshopId,create.id),
+ };
+
+ await _classificationGroupRepository.CreateGroups(groups);
+
+
+
+ return op.Succcedded();
+ }
+
+ public async Task GetClassificationScheme(long id)
+ {
+ return await _classificationSchemeRepository.GetClassificationScheme(id);
+ }
+
+
+ public Task GetClassificationSchemeToCompute(long id)
+ {
+ return _classificationSchemeRepository.GetClassificationSchemeToCompute(id);
+ }
+
+ public async Task EditClassificationScheme(EditClassificationSchemeDto command)
+ {
+ var op = new OperationResult();
+
+
+ #region Validation
+
+ if (!command.ExecutionDateFa.TryToGeorgianDateTime(out var executionDateGr))
+ {
+ return op.Failed("تاریخ اجرا صحیح نمی باشد");
+ }
+ if (!command.IncludingDateFa.TryToGeorgianDateTime(out var includingDateGr))
+ {
+ return op.Failed("تاریخ شمول صحیح نمی باشد");
+ }
+ var scheme = _classificationSchemeRepository.Get(command.Id);
+ if (scheme == null)
+ return op.Failed("رکورد مورد نظر وجود ندارد");
+ #endregion
+
+
+ scheme.Edit(includingDateGr, executionDateGr, command.DesignerFullName, command.DesignerPhone, command.TypeOfCoefficient);
+ await _classificationSchemeRepository.SaveChangesAsync();
+ return op.Succcedded();
+ }
+
+ public async Task> GetGroupAndJobs(long schemeId)
+ {
+ return await _classificationGroupRepository.GetGroupAndJobs(schemeId);
+ }
+
+ public async Task> GetGroupJobs(long groupId)
+ {
+ return await _classificationGroupRepository.GetGroupJobs(groupId);
+ }
+
+ public async Task CheckEmployeeHasThisJob(long id, long groupId)
+ {
+ return await _classificationGroupRepository.CheckEmployeeHasThisJob(id, groupId);
+ }
+
+ public async Task CreateGroupJobs(List createClassificationGroupJob, List deleteJobList)
+ {
+ var newJoblist = new List();
+ if (createClassificationGroupJob.Count > 0)
+ {
+ foreach (var item in createClassificationGroupJob)
+ {
+ var newJob = new ClassificationGroupJob(item.JobId, item.JobName, item.JobCode, item.ClassificationGroupId,
+ item.GroupNo);
+ newJoblist.Add(newJob);
+ }
+
+ }
+
+
+
+ return await _classificationGroupRepository.CreateJobs(newJoblist, deleteJobList);
+ }
+
+ public async Task GetSalariesTabData(long schemeId)
+ {
+ return await _classificationGroupSalariesRepository.GetSalariesTabData(schemeId);
+ }
+
+ public async Task GetGroupToCreateSalariesModal(long schemeId)
+ {
+ return await _classificationGroupRepository.GetGroupToCreateSalariesModal(schemeId);
+ }
+
+
+
+ public async Task CreateGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command)
+ {
+ var op = new OperationResult();
+ #region Validation
+
+ if (string.IsNullOrWhiteSpace(command.StartDateFa) || string.IsNullOrWhiteSpace(command.StartDateFa))
+ return op.Failed("تاریخ شروع و پایان نمی توانند خالی باشند");
+
+
+ if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient && command.RialCoefficient == 0)
+ return op.Failed("ضریب ریالی وارد نشده است");
+
+
+ if (command.SalariesAndCoefficientList.Any(x => string.IsNullOrWhiteSpace(x.GroupSalaryStr) || x.GroupSalaryStr == "0"))
+ return op.Failed("دستمزد تمامی گروه ها می بایست تعیین شود");
+
+
+ if (!command.StartDateFa.TryToGeorgianDateTime(out var startDate))
+ {
+ return op.Failed("تاریخ شروع وارد شده صحیح نمی باشد");
+ }
+ if (!command.EndDateFa.TryToGeorgianDateTime(out var endDate))
+ {
+ return op.Failed("تاریخ پایان وارد شده صحیح نمی باشد");
+ }
+
+ if (_classificationGroupSalariesRepository.Exists(x => x.StartDate <= endDate && x.EndDate >= startDate && x.SchemeId == command.SchemeId))
+ {
+ return op.Failed("بازه تاریخ وارد شده با داده های ذخیره شده قبل تداخل دارد");
+
+ }
+
+ var year = Convert.ToInt32(command.StartDateFa.Substring(0, 4));
+
+ var endDateYear = Convert.ToInt32(command.EndDateFa.Substring(0, 4));
+ if (year != endDateYear)
+ return op.Failed("سال تاریخ شروع از سال تاریخ پایان متفاوت است");
+ #endregion
+
+
+
+ var createSalaries = new List();
+
+ foreach (var item in command.SalariesAndCoefficientList)
+ {
+ item.GroupSalary = item.GroupSalaryStr.MoneyToDouble();
+ var create = new ClassificationGroupSalary(item.ClassificationGroupId, item.GroupNo, item.GroupSalary, startDate, endDate, year, command.SchemeId);
+ createSalaries.Add(create);
+ }
+
+ await _classificationGroupSalariesRepository.CreateSalaries(createSalaries);
+
+ if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
+ {
+ try
+ {
+ command.RialCoefficient = command.RialCoefficient;
+
+ await _classificationRialCoefficientRepository.CreateAsync(new ClassificationRialCoefficient(command.SchemeId,
+ command.RialCoefficient, startDate, endDate, year));
+ await _classificationRialCoefficientRepository.SaveChangesAsync();
+ }
+ catch (Exception e)
+ {
+ return op.Failed("فرمت مبلغ ضریب ریالی اشتباه است");
+ }
+ }
+
+ op.SendId = command.SchemeId;
+ return op.Succcedded();
+ }
+
+ public async Task GetEditSalariesData(long schemeId, string startDate, string endDate)
+ {
+ return await _classificationGroupSalariesRepository.GetEditSalariesData(schemeId, startDate, endDate);
+ }
+
+ public async Task EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command)
+ {
+ var op = new OperationResult();
+ #region Validation
+
+ if (string.IsNullOrWhiteSpace(command.StartDateFa) || string.IsNullOrWhiteSpace(command.StartDateFa))
+ return op.Failed("تاریخ شروع و پایان نمی توانند خالی باشند");
+
+
+ if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient && command.RialCoefficient == 0)
+ return op.Failed("ضریب ریالی وارد نشده است");
+
+
+ if (command.SalariesAndCoefficientList.Any(x => string.IsNullOrWhiteSpace(x.GroupSalaryStr) || x.GroupSalaryStr == "0"))
+ return op.Failed("دستمزد تمامی گروه ها می بایست تعیین شود");
+
+
+ if (!command.StartDateFa.TryToGeorgianDateTime(out var startDate))
+ {
+ return op.Failed("تاریخ شروع وارد شده صحیح نمی باشد");
+ }
+ if (!command.EndDateFa.TryToGeorgianDateTime(out var endDate))
+ {
+ return op.Failed("تاریخ پایان وارد شده صحیح نمی باشد");
+ }
+
+ var salariesId = command.SalariesAndCoefficientList.Select(x => x.Id).ToList();
+ if (_classificationGroupSalariesRepository.Exists(x => x.StartDate <= endDate && x.EndDate >= startDate && x.SchemeId == command.SchemeId && !salariesId.Contains(x.id)))
+ {
+ return op.Failed("بازه تاریخ وارد شده با داده های ذخیره شده قبل تداخل دارد");
+
+ }
+
+ var year = Convert.ToInt32(command.StartDateFa.Substring(0, 4));
+
+ var endDateYear = Convert.ToInt32(command.EndDateFa.Substring(0, 4));
+ if (year != endDateYear)
+ return op.Failed("سال تاریخ شروع از سال تاریخ پایان متفاوت است");
+ #endregion
+
+
+
+ foreach (var item in command.SalariesAndCoefficientList)
+ {
+ var editSalary = _classificationGroupSalariesRepository.Get(item.Id);
+
+ item.GroupSalary = item.GroupSalaryStr.MoneyToDouble();
+
+ editSalary.Edit(item.GroupSalary, startDate, endDate, year);
+ await _classificationGroupSalariesRepository.SaveChangesAsync();
+
+ }
+
+ if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
+ {
+ var editRialCoefficient = _classificationRialCoefficientRepository.Get(command.CoefficientId);
+ editRialCoefficient.Edit(command.RialCoefficient, startDate, endDate, year);
+ await _classificationRialCoefficientRepository.SaveChangesAsync();
+
+ }
+
+ return op.Succcedded();
+ }
+
+
+
+ public async Task GetEmployeeDataTab(EmployeeInfoTab command)
+ {
+ var employeeInfoTab = new EmployeeInfoTab();
+ var employeeInfoList = _classificationEmployeeRepository.GetEmployeeListData(command.SchemeId).GetAwaiter().GetResult();
+ if (employeeInfoList.Any())
+ {
+ if (!string.IsNullOrWhiteSpace(command.FullName))
+ employeeInfoList = employeeInfoList.Where(x => x.FullName.Contains(command.FullName)).ToList();
+
+ employeeInfoTab.EmployeeInfoList = employeeInfoList;
+ employeeInfoTab.FullName = command.FullName;
+
+
+ }
+
+
+ return employeeInfoTab;
+ }
+
+ public async Task> GetGroups(long schemeId)
+ {
+ return await _classificationGroupRepository.GetGroups(schemeId);
+ }
+
+
+ public async Task AddEmployeeToGroup(AddEmployeeToGroup command)
+ {
+ var op = new OperationResult();
+ #region Validation
+
+ if (command.GroupId == 0)
+ return op.Failed("لطفا گروه را انتخاب کنید");
+
+ if (command.JobId == 0)
+ return op.Failed("لطفا سمت را انتخاب کنید");
+
+ #endregion
+
+
+ var scheme = _classificationSchemeRepository.GetClassificationSchemeToCompute(command.SchemeId).GetAwaiter().GetResult();
+
+
+ var create = new ClassificationEmployee(scheme.WorkshopId, command.EmployeeId, command.SchemeId,
+ command.GroupId, command.JobId, scheme.ExecutionDateGr);
+ await _classificationEmployeeRepository.CreateAsync(create);
+ await _classificationEmployeeRepository.SaveChangesAsync();
+
+ return op.Succcedded();
+ }
+
+
+ public async Task EditGroupMember(AddEmployeeToGroup command)
+ {
+ var op = new OperationResult();
+ #region Validation
+
+ if (command.GroupId == 0)
+ return op.Failed("لطفا گروه را انتخاب کنید");
+
+ if (command.JobId == 0)
+ return op.Failed("لطفا سمت را انتخاب کنید");
+
+ #endregion
+
+
+ var editGroup = _classificationEmployeeRepository.Get(command.Id);
+ editGroup.Edit(command.GroupId, command.JobId);
+ await _classificationEmployeeRepository.SaveChangesAsync();
+
+ return op.Succcedded();
+ }
+
+ public async Task TransferEmployeeToNewGroup(List command)
+ {
+ var op = new OperationResult();
+ if (command.Count < 1)
+ return op.Failed("هیچ انتقالی ایجاد نشده است");
+ var oldGroupsMemberize = await _classificationEmployeeRepository.GetEmployeeMemberizeData(command[0].EmployeeId);
+ var scheme = await _classificationSchemeRepository.GetClassificationSchemeToCompute(oldGroupsMemberize[0].SchemeId);
+ var newStartDateList = new List();
+ foreach (var item in command)
+ {
+ #region Validation
+
+ if (item.ClassificationGroupId == 0)
+ return op.Failed("لطفا گروه را انتخاب کنید");
+
+ if (item.ClassificationGroupJobId == 0)
+ return op.Failed("لطفا سمت را انتخاب کنید");
+
+ if (!item.StartGroupDateFa.TryToGeorgianDateTime(out var startDate))
+ {
+ string startDateFaild = "تاریخ شروع" + " " + item.StartGroupDateFa + " " + "صحیح نمیباشد";
+ return op.Failed(startDateFaild);
+ }
+
+ if (item.StartGroupDateFa.Substring(8, 2) != "01")
+ return op.Failed("تاریخ شروع فقط می تواند یکم هر ماه باشد");
+
+ if (newStartDateList.Any(x => x == startDate))
+ return op.Failed($"تاریخ انتقال {item.StartGroupDateFa} با تاریخ های قبل تداخل دارد");
+ newStartDateList.Add(startDate);
+
+ if (oldGroupsMemberize.Any(x => x.StartGroupDate == startDate))
+ return op.Failed($"تاریخ انتقال {item.StartGroupDateFa} با تاریخ های قبل تداخل دارد");
+ if (startDate < scheme.ExecutionDateGr)
+ return op.Failed($"تاریخ انتقال {item.StartGroupDateFa} کوچکتر از تاریخ شروع طرح : {scheme.ExecutionDateFa} است");
+
+ #endregion
+ }
+
+ var lastRecord = oldGroupsMemberize.FirstOrDefault(x => x.EndGroupDate == null);
+
+ if (lastRecord != null)
+ {
+ var edit = _classificationEmployeeRepository.Get(lastRecord.Id);
+ var firstNewRcord = newStartDateList.MinBy(x => x);
+
+ edit.EditMultipleGroupMember(lastRecord.ClassificationGroupId, lastRecord.ClassificationGroupJobId, lastRecord.StartGroupDate.Value);
+
+ }
+
+
+
+ newStartDateList = newStartDateList.OrderByDescending(x => x).ToList();
+ var lastNewRecord = newStartDateList.MaxBy(x => x);
+
+
+ var c = command.FirstOrDefault(x => x.StartGroupDateFa == lastNewRecord.ToFarsi());
+ var create = new ClassificationEmployee(scheme.WorkshopId, c.EmployeeId, c.SchemeId,
+ c.ClassificationGroupId, c.ClassificationGroupJobId, lastNewRecord.Date);
+ await _classificationEmployeeRepository.CreateAsync(create);
+ newStartDateList.Remove(lastNewRecord);
+ var createList = new List();
+ foreach (var item in newStartDateList)
+ {
+ var commandEdit = command.FirstOrDefault(x => x.StartGroupDateFa == item.ToFarsi());
+ var createCommand = new ClassificationEmployee(scheme.WorkshopId, commandEdit.EmployeeId, commandEdit.SchemeId,
+ commandEdit.ClassificationGroupId, commandEdit.ClassificationGroupJobId, item);
+ createList.Add(createCommand);
+ lastNewRecord = item;
+ }
+
+
+ if (createList.Any())
+ {
+ createList = createList.OrderBy(x => x.StartGroupDate).ToList();
+ await _classificationEmployeeRepository.CreateTransferRange(createList);
+ }
+
+
+ await _classificationEmployeeRepository.SaveChangesAsync();
+
+ return op.Succcedded();
+
+
+
+ }
+ public async Task EditMultipleGroupMember(List command)
+ {
+ var op = new OperationResult();
+ var zeroItem = command.First(x => x.Id == 0);
+ var oldGroupsMemberize = await _classificationEmployeeRepository.GetEmployeeMemberizeData(zeroItem.EmployeeId);
+ var scheme = await _classificationSchemeRepository.GetClassificationSchemeToCompute(zeroItem.SchemeId);
+ command = command.Where(x=>x.Id != 0).ToList();
+ var newStartDateList = new List();
+ foreach (var item in command)
+ {
+ #region Validation
+
+ if (item.ClassificationGroupId == 0)
+ return op.Failed("لطفا گروه را انتخاب کنید");
+
+ if (item.ClassificationGroupJobId == 0)
+ return op.Failed("لطفا سمت را انتخاب کنید");
+
+ if (!item.StartGroupDateFa.TryToGeorgianDateTime(out var startDate))
+ {
+ string startDateFaild = "تاریخ شروع" + " " + item.StartGroupDateFa + " " + "صحیح نمیباشد";
+ return op.Failed(startDateFaild);
+ }
+ if (item.StartGroupDateFa.Substring(8, 2) != "01")
+ return op.Failed("تاریخ شروع فقط می تواند یکم هر ماه باشد");
+
+ if (oldGroupsMemberize.Any(x=>x.StartGroupDate == startDate && x.Id != item.Id))
+ return op.Failed($"تاریخ {item.StartGroupDateFa} با تاریخ های قبل یا بعد از خود تداخل دارد");
+
+ if (startDate < scheme.ExecutionDateGr)
+ return op.Failed($"تاریخ انتقال {item.StartGroupDateFa} کوچکتر از تاریخ شروع طرح : {scheme.ExecutionDateFa} است");
+ newStartDateList.Add(startDate);
+ #endregion
+ }
+
+ foreach (var item in command)
+ {
+ var edit = _classificationEmployeeRepository.Get(item.Id);
+
+
+ edit.EditMultipleGroupMember(item.ClassificationGroupId, item.ClassificationGroupJobId, item.StartGroupDateFa.ToGeorgianDateTime());
+
+
+
+
+ }
+
+ var removeItemIdList = command.Select(x => x.Id).ToList();
+ var toBeRemove = removeItemIdList.Any() ? oldGroupsMemberize.Where(x=> !removeItemIdList.Contains(x.Id)).Select(x=>x.Id).ToList() : oldGroupsMemberize.Select(x=>x.Id).ToList();
+ if (toBeRemove.Any())
+ {
+ var getRemoveList =await _classificationEmployeeRepository.GetListByIdList(toBeRemove);
+
+ await _classificationEmployeeRepository.RemoveRangeByEdit(getRemoveList);
+ }
+
+ await _classificationEmployeeRepository.SaveChangesAsync();
+ return op.Succcedded();
+ }
+
+
+ ///
+ /// دریافت اطلاعات عضویتی پرسنل در گروه
+ ///
+ ///
+ ///
+ public async Task GetEmployeeMemberizeData(long employeeId)
+ {
+ var result = new EditEmployeeGroup();
+ var res = await _classificationEmployeeRepository.GetEmployeeMemberizeData(employeeId);
+
+ if (res.Any())
+ {
+ result.HasMultipleGroup = res.Count > 1;
+ result.EditEmployeeGroupLists = res;
+ }
+
+ return result;
+
+
+ }
+
+ public async Task BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd, DateTime contractStart, DateTime contractEnd,
+ string groupNo, long employeeId, long workshopId)
+ {
+ return await _classificationSchemeRepository.BaseYearComputeOneGroup(schemeStart, schemeEnd, contractStart,
+ contractEnd, groupNo, employeeId, workshopId);
+ }
+
+ public async Task CheckToDeleteScheme(long id)
+ {
+ var op = new CheckStatusToDeleteScheme();
+ var scheme = _classificationSchemeRepository.Get(id);
+ if (scheme != null)
+ {
+ var employeeInfoList =await _classificationEmployeeRepository.GetEmployeeListData(id);
+ var anyHasGroup = employeeInfoList.Any(x => x.HasGroup);
+ if (employeeInfoList.Any() && anyHasGroup)
+ {
+
+ op.DeleteSchemeStatus = DeleteSchemeStatus.ConfirmationNeeded;
+ op.Message = "برای این طرح پرسنل افزوده شده است، آیا از حذف طرح اطمینان دارید";
+ return op;
+
+ }
+ else
+ {
+
+ op.DeleteSchemeStatus = DeleteSchemeStatus.Valid;
+ op.Message = "مجاز برای حذف";
+ return op;
+ }
+
+ }
+
+ op.DeleteSchemeStatus = DeleteSchemeStatus.NotValid;
+ op.Message = "یافت نشد";
+ return op;
+ }
+
+ public async Task DeleteScheme(long id)
+ {
+ var op = new OperationResult();
+ var scheme = _classificationSchemeRepository.Get(id);
+
+ if (scheme != null)
+ {
+ await _classificationSchemeRepository.DeleteClassificationScheme(id);
+ return op.Succcedded();
+ }
+
+ return op.Failed("یافت نشد");
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.Application/JobApplication.cs b/CompanyManagment.Application/JobApplication.cs
index c48292ad..c10c76fa 100644
--- a/CompanyManagment.Application/JobApplication.cs
+++ b/CompanyManagment.Application/JobApplication.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Threading.Tasks;
using _0_Framework.Application;
using Company.Domain.JobAgg;
using CompanyManagment.App.Contracts.Job;
@@ -66,6 +67,11 @@ public class JobApplication : IJobApplication
return _jobRepository.SearchJobForMain(searchModel);
}
+ public async Task> JobSearchSelect(string searchtText)
+ {
+ return await _jobRepository.JobSearchSelect(searchtText);
+ }
+
//public Task> GetJobListByText(string searchtText)
//{
// return _jobRepository.GetJobListByText(searchtText);
diff --git a/CompanyManagment.Application/WorkshopAppliction.cs b/CompanyManagment.Application/WorkshopAppliction.cs
index c13a9203..d98ac684 100644
--- a/CompanyManagment.Application/WorkshopAppliction.cs
+++ b/CompanyManagment.Application/WorkshopAppliction.cs
@@ -124,38 +124,37 @@ public class WorkshopAppliction : IWorkshopApplication
return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
}
- if (command.IsClassified)
- {
- if (string.IsNullOrWhiteSpace(command.CreatePlan.ExecutionDateFa) ||
- command.CreatePlan.ExecutionDateFa.Length < 10)
- return operation.Failed("تاریخ اجرای طرح را بصورت صحیح وارد کنید");
- if (string.IsNullOrWhiteSpace(command.CreatePlan.IncludingDateFa) ||
- command.CreatePlan.IncludingDateFa.Length < 10)
- return operation.Failed("تاریخ شمول طرح را بصورت صحیح وارد کنید");
- var groupCounter = 0;
- // var planEmployeeCounter = command.CreatePlan.EditWorkshopPlanEmployeeList == null ? 0 : command.CreatePlan.EditWorkshopPlanEmployeeList.Count;
- for (int i = 0; i <= command.CreatePlan.EditGroupPlanlist.Count - 1; i++)
- {
- if (!string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].AnnualSalaryStr)
- && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].BaseSalaryStr)
- && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].JobSalaryStr)
- && command.CreatePlan.EditGroupPlanlist[i].JobIdList.Count > 0)
- {
- groupCounter += 1;
- }
- }
+ //if (command.IsClassified)
+ //{
+ // if (string.IsNullOrWhiteSpace(command.CreatePlan.ExecutionDateFa) || command.CreatePlan.ExecutionDateFa.Length < 10)
+ // return operation.Failed("تاریخ اجرای طرح را بصورت صحیح وارد کنید");
+ // if(string.IsNullOrWhiteSpace(command.CreatePlan.IncludingDateFa) || command.CreatePlan.IncludingDateFa.Length <10)
+ // return operation.Failed("تاریخ شمول طرح را بصورت صحیح وارد کنید");
+ // var groupCounter = 0;
+ // // var planEmployeeCounter = command.CreatePlan.EditWorkshopPlanEmployeeList == null ? 0 : command.CreatePlan.EditWorkshopPlanEmployeeList.Count;
+ // for (int i = 0; i <= command.CreatePlan.EditGroupPlanlist.Count - 1; i++)
+ // {
+ // if (!string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].AnnualSalaryStr)
+ // && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].BaseSalaryStr)
+ // && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].JobSalaryStr)
+ // && command.CreatePlan.EditGroupPlanlist[i].JobIdList.Count > 0)
+ // {
+ // groupCounter += 1;
- if (groupCounter >= 1)
- {
- createPlanValidations = true;
- }
- else
- {
- createPlanValidations = false;
- return operation.Failed("وارد کردن اطلاعات تمامی گروه ها الزامی است");
- }
- }
+ // }
+ // }
+ // if (groupCounter >= 1)
+ // {
+ // createPlanValidations = true;
+
+ // }
+ // else
+ // {
+ // createPlanValidations = false;
+ // return operation.Failed("وارد کردن اطلاعات تمامی گروه ها الزامی است");
+ // }
+ //}
//if (string.IsNullOrWhiteSpace(command.TypeOfInsuranceSend))
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
var account = new AccountViewModel();
diff --git a/CompanyManagment.EFCore/CompanyContext.cs b/CompanyManagment.EFCore/CompanyContext.cs
index 194f33c3..cd074c41 100644
--- a/CompanyManagment.EFCore/CompanyContext.cs
+++ b/CompanyManagment.EFCore/CompanyContext.cs
@@ -7,6 +7,7 @@ using Company.Domain.Board;
using Company.Domain.BoardType;
using Company.Domain.ChapterAgg;
using Company.Domain.CheckoutAgg;
+using Company.Domain.ClassificationSchemeAgg;
using Company.Domain.ClassifiedSalaryAgg;
using Company.Domain.ClientEmployeeWorkshopAgg;
using Company.Domain.Contact2Agg;
@@ -230,6 +231,42 @@ public class CompanyContext : DbContext
public DbSet PlanPercentages { get; set; }
+ #region ClassificationScheme
+
+ ///
+ /// جدول طرح طبقه بندی
+ ///
+ public DbSet ClassificationSchemes { get; set; }
+
+ ///
+ /// جدول گروه های طرح
+ ///
+ public DbSet ClassificationGroups { get; set; }
+
+ ///
+ /// جدول ضرایب ریالی
+ ///
+ public DbSet ClassificationRialCoefficients { get; set; }
+
+
+ ///
+ /// جدول شغل های گروه
+ ///
+ public DbSet ClassificationGroupJobs { get; set; }
+
+ ///
+ /// جدول مزد شغل گروه ها
+ ///
+ public DbSet ClassificationGroupSalaries { get; set; }
+
+ ///
+ /// جدول پرسنل طرح
+ ///
+ public DbSet ClassificationEmployees { get; set; }
+
+
+ #endregion
+
#region TemporaryClientRegisteration
public DbSet ContractingPartyTemps { get; set; }
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationEmployeeMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationEmployeeMapping.cs
new file mode 100644
index 00000000..44687e7e
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationEmployeeMapping.cs
@@ -0,0 +1,22 @@
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationEmployeeMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationEmployee");
+ builder.HasKey(x => x.id);
+
+ builder.Property(x => x.StartGroupDate).IsRequired(false);
+ builder.Property(x => x.EndGroupDate).IsRequired(false);
+
+
+ builder.HasOne(x => x.ClassificationGroup)
+ .WithMany(x => x.ClassificationEmployees)
+ .HasForeignKey(x => x.ClassificationGroupId);
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationGroupJobMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationGroupJobMapping.cs
new file mode 100644
index 00000000..f10497c6
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationGroupJobMapping.cs
@@ -0,0 +1,22 @@
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationGroupJobMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationGroupJobs");
+ builder.HasKey(x => x.id);
+
+ builder.Property(x => x.JobName).HasMaxLength(255);
+ builder.Property(x => x.JobCode).HasMaxLength(100);
+ builder.Property(x => x.GroupNo).HasMaxLength(2);
+
+ builder.HasOne(x => x.ClassificationGroup)
+ .WithMany(x => x.ClassificationGroupJobs)
+ .HasForeignKey(x => x.ClassificationGroupId);
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationGroupMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationGroupMapping.cs
new file mode 100644
index 00000000..1cb0b761
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationGroupMapping.cs
@@ -0,0 +1,35 @@
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationGroupMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationGroups");
+ builder.HasKey(x => x.id);
+
+ builder.Property(x => x.GroupNo).HasMaxLength(2);
+
+ builder.HasOne(x => x.ClassificationScheme)
+ .WithMany(x => x.ClassificationGroups)
+ .HasForeignKey(x => x.ClassificationSchemeId);
+
+
+ builder.HasMany(x => x.ClassificationGroupJobs)
+ .WithOne(x => x.ClassificationGroup)
+ .HasForeignKey(x => x.ClassificationGroupId);
+
+
+ builder.HasMany(x => x.ClassificationEmployees)
+ .WithOne(x => x.ClassificationGroup)
+ .HasForeignKey(x => x.ClassificationGroupId);
+
+
+ builder.HasMany(x => x.ClassificationGroupSalaries)
+ .WithOne(x => x.ClassificationGroup)
+ .HasForeignKey(x => x.ClassificationGroupId);
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationGroupSalaryMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationGroupSalaryMapping.cs
new file mode 100644
index 00000000..2230236c
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationGroupSalaryMapping.cs
@@ -0,0 +1,20 @@
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationGroupSalaryMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationGroupSalaries");
+ builder.HasKey(x => x.id);
+
+ builder.Property(x => x.GroupNo).HasMaxLength(2);
+
+ builder.HasOne(x => x.ClassificationGroup)
+ .WithMany(x => x.ClassificationGroupSalaries)
+ .HasForeignKey(x => x.ClassificationGroupId);
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationRialCoefficientMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationRialCoefficientMapping.cs
new file mode 100644
index 00000000..ecb31092
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationRialCoefficientMapping.cs
@@ -0,0 +1,18 @@
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationRialCoefficientMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationRialCoefficients");
+ builder.HasKey(x => x.id);
+
+ builder.HasOne(x => x.ClassificationScheme)
+ .WithMany(x => x.ClassificationRialCoefficients)
+ .HasForeignKey(x => x.ClassificationSchemeId);
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Mapping/ClassificationSchemeMapping.cs b/CompanyManagment.EFCore/Mapping/ClassificationSchemeMapping.cs
new file mode 100644
index 00000000..b3c25c15
--- /dev/null
+++ b/CompanyManagment.EFCore/Mapping/ClassificationSchemeMapping.cs
@@ -0,0 +1,38 @@
+using System;
+using _0_Framework.Application.Enums;
+using Company.Domain.ClassificationSchemeAgg;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+
+namespace CompanyManagment.EFCore.Mapping;
+
+public class ClassificationSchemeMapping : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("ClassificationSchemes");
+ builder.HasKey(x => x.id);
+
+
+ builder.Property(x => x.IncludingDateGr);
+ builder.Property(x => x.ExecutionDateGr);
+ builder.Property(x => x.EndSchemeDateGr).IsRequired(false);
+ builder.Property(x => x.DesignerFullName).HasMaxLength(50);
+ builder.Property(x => x.DesignerPhone).HasMaxLength(20);
+ builder.Property(x => x.WorkshopId);
+ builder.Property(x => x.WorkshopId);
+ builder.Property(x => x.TypeOfCoefficient).HasConversion(
+ v => v.ToString(),
+ v => (TypeOfCoefficient)Enum.Parse(typeof(TypeOfCoefficient), v)).HasMaxLength(30);
+
+
+ builder.HasMany(x => x.ClassificationGroups)
+ .WithOne(x => x.ClassificationScheme)
+ .HasForeignKey(x => x.ClassificationSchemeId);
+
+ builder.HasMany(x => x.ClassificationRialCoefficients)
+ .WithOne(x => x.ClassificationScheme)
+ .HasForeignKey(x => x.ClassificationSchemeId);
+
+ }
+}
\ No newline at end of file
diff --git a/CompanyManagment.EFCore/Migrations/20260101112146_ClassificationScheme.Designer.cs b/CompanyManagment.EFCore/Migrations/20260101112146_ClassificationScheme.Designer.cs
new file mode 100644
index 00000000..c13eaba7
--- /dev/null
+++ b/CompanyManagment.EFCore/Migrations/20260101112146_ClassificationScheme.Designer.cs
@@ -0,0 +1,11806 @@
+//
+using System;
+using System.Collections.Generic;
+using CompanyManagment.EFCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CompanyManagment.EFCore.Migrations
+{
+ [DbContext(typeof(CompanyContext))]
+ [Migration("20260101112146_ClassificationScheme")]
+ partial class ClassificationScheme
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "10.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("Company.Domain.AdminMonthlyOverviewAgg.AdminMonthlyOverview", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Month")
+ .HasColumnType("int");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(155)
+ .HasColumnType("nvarchar(155)");
+
+ b.Property("WorkshopId")
+ .HasColumnType("bigint");
+
+ b.Property("Year")
+ .HasColumnType("int");
+
+ b.HasKey("id");
+
+ b.ToTable("AdminMonthlyOverviews");
+ });
+
+ modelBuilder.Entity("Company.Domain.AndroidApkVersionAgg.AndroidApkVersion", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("ApkType")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("nvarchar(20)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("IsActive")
+ .IsRequired()
+ .HasMaxLength(5)
+ .HasColumnType("nvarchar(5)");
+
+ b.Property("IsForce")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Title")
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("VersionCode")
+ .HasMaxLength(20)
+ .HasColumnType("nvarchar(20)");
+
+ b.Property("VersionName")
+ .HasMaxLength(35)
+ .HasColumnType("nvarchar(35)");
+
+ b.HasKey("id");
+
+ b.ToTable("AndroidApkVersions", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.AuthorizedBankDetailsAgg.AuthorizedBankDetails", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("AccountNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BankName")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("CardNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("IBan")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("id");
+
+ b.ToTable("AuthorizedBankDetails", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.AuthorizedPersonAgg.AuthorizedPerson", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("BirthDate")
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DeathStatus")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("FatherName")
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("Gender")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsVerified")
+ .HasColumnType("bit");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("nvarchar(100)");
+
+ b.Property("NationalCode")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("ShenasnameSeri")
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("ShenasnameSerial")
+ .HasMaxLength(10)
+ .HasColumnType("nvarchar(10)");
+
+ b.Property("ShenasnamehNumber")
+ .HasMaxLength(20)
+ .HasColumnType("nvarchar(20)");
+
+ b.Property("VerificationDate")
+ .HasColumnType("datetime2");
+
+ b.HasKey("id");
+
+ b.HasIndex("NationalCode")
+ .IsUnique();
+
+ b.ToTable("AuthorizedPersons", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.BankAgg.Bank", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("BankLogoMediaId")
+ .HasColumnType("bigint");
+
+ b.Property("BankName")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("id");
+
+ b.ToTable("Banks", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.BillAgg.EntityBill", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("Appointed")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Contact")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsActiveString")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProcessingStage")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SubjectBill")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.HasKey("id");
+
+ b.ToTable("TextManager_Bill", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.Board.Board", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("BoardChairman")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BoardType_Id")
+ .HasColumnType("int");
+
+ b.Property("Branch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("DisputeResolutionPetitionDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ExpertReport")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("File_Id")
+ .HasColumnType("bigint");
+
+ b.HasKey("id");
+
+ b.HasIndex("BoardType_Id");
+
+ b.HasIndex("File_Id");
+
+ b.ToTable("Boards", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.BoardType.BoardType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Title")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("BoardTypes", (string)null);
+ });
+
+ modelBuilder.Entity("Company.Domain.CameraBugReportAgg.CameraBugReport", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AccountId")
+ .HasColumnType("bigint");
+
+ b.Property("AppVersion")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BatteryLevel")
+ .HasColumnType("int");
+
+ b.Property("BuildNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeviceId")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeviceModel")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Flavor")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("InstallTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsCharging")
+ .HasColumnType("bit");
+
+ b.Property("LastUpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Manufacturer")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MemoryInMB")
+ .HasColumnType("int");
+
+ b.Property("NetworkType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OsVersion")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PackageName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Platform")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Priority")
+ .HasColumnType("int");
+
+ b.Property("ScreenResolution")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StackTrace")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Status")
+ .HasColumnType("int");
+
+ b.Property("StorageInMB")
+ .HasColumnType("int");
+
+ b.Property("Title")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("UpdateDate")
+ .HasColumnType("datetime2");
+
+ b.Property("UserEmail")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("CameraBugReports");
+ });
+
+ modelBuilder.Entity("Company.Domain.CameraBugReportAgg.CameraBugReportLog", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("CameraBugReportId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Message")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Timestamp")
+ .HasColumnType("datetime2");
+
+ b.HasKey("id");
+
+ b.HasIndex("CameraBugReportId");
+
+ b.ToTable("CameraBugReportLogs");
+ });
+
+ modelBuilder.Entity("Company.Domain.CameraBugReportAgg.CameraBugReportScreenshot", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("id"));
+
+ b.Property("Base64Data")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CameraBugReportId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationDate")
+ .HasColumnType("datetime2");
+
+ b.Property("FileName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property