Merge from ClassificationScheme
This commit is contained in:
237
0_Framework/Application/ClassificationRangeOfGroupRate.cs
Normal file
237
0_Framework/Application/ClassificationRangeOfGroupRate.cs
Normal file
@@ -0,0 +1,237 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
/// <summary>
|
||||
/// دامنه امتیازات گروه های طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public static class ClassificationRangeOfGroupRate
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// دریافت فاصله امتیاز گروه
|
||||
/// </summary>
|
||||
/// <param name="groupNo"></param>
|
||||
/// <returns></returns>
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دیتای امتیازات هر گرو
|
||||
/// </summary>
|
||||
public class ClassificationGroupRate
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// شمازه گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// امتیاز کف
|
||||
/// </summary>
|
||||
public int LowRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// امتیاز سقف
|
||||
/// </summary>
|
||||
public int HighRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فاصله امتیاز
|
||||
/// </summary>
|
||||
public int DistanceRate { get; set; }
|
||||
}
|
||||
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace _0_Framework.Application.Enums;
|
||||
|
||||
public enum TypeOfCoefficient
|
||||
{
|
||||
/// <summary>
|
||||
/// ضریب ریالی طرح
|
||||
/// </summary>
|
||||
RialCoefficient,
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی اداره کار
|
||||
/// </summary>
|
||||
JobOrganization,
|
||||
}
|
||||
@@ -33,6 +33,35 @@ public static class Tools
|
||||
public static string[] DayNames = { "شنبه", "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه" };
|
||||
public static string[] DayNamesG = { "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه", "شنبه" };
|
||||
|
||||
/// <summary>
|
||||
/// نام ستون از جدول مزد سنوات طبثه بندی را میگیرد و دیتای داخل آن ستون را برمیگرداند
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="propertyName"></param>
|
||||
/// <returns></returns>
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace _0_Framework.Domain;
|
||||
public interface IRepository<TKey, T> where T:class
|
||||
{
|
||||
T Get(TKey id);
|
||||
List<T> Get();
|
||||
List<T> Get();
|
||||
Task<List<T>> GetListByIdList(List<TKey> ids);
|
||||
void Create(T entity);
|
||||
Task CreateAsync(T entity);
|
||||
bool ExistsIgnoreQueryFilter(Expression<Func<T, bool>> expression);
|
||||
|
||||
@@ -53,6 +53,11 @@ namespace _0_Framework.InfraStructure
|
||||
{
|
||||
return _context.Set<T>().ToList();
|
||||
}
|
||||
|
||||
public async Task<List<T>> GetListByIdList(List<TKey> ids)
|
||||
{
|
||||
return await _context.Set<T>().Where(e => ids.Contains(EF.Property<TKey>(e, "id"))).ToListAsync();
|
||||
}
|
||||
public void Remove(T entity)
|
||||
{
|
||||
_context.Set<T>().Remove(entity);
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
using _0_Framework.Domain;
|
||||
using System;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public class ClassificationEmployee : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد پرسنل طرح
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="classificationSchemeId"></param>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="classificationGroupJobId"></param>
|
||||
/// <param name="startGroupDate"></param>
|
||||
/// <param name="endGroupDate"></param>
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long ClassificationSchemeId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی شغل
|
||||
/// </summary>
|
||||
public long ClassificationGroupJobId { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع استفاده از گروه
|
||||
/// </summary>
|
||||
public DateTime? StartGroupDate{ get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان استفاده از گروه
|
||||
/// </summary>
|
||||
public DateTime? EndGroupDate { get; private set; }
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش پرسنل طرح
|
||||
/// </summary>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="classificationGroupJobId"></param>
|
||||
public void Edit(long classificationGroupId, long classificationGroupJobId)
|
||||
{
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
ClassificationGroupJobId = classificationGroupJobId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش گروه های چندگانه پرسنل طرح
|
||||
/// </summary>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="classificationGroupJobId"></param>
|
||||
/// <param name="startGroupDate"></param>
|
||||
/// <param name="endGroupDate"></param>
|
||||
public void EditMultipleGroupMember(long classificationGroupId, long classificationGroupJobId, DateTime startGroupDate)
|
||||
{
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
ClassificationGroupJobId = classificationGroupJobId;
|
||||
StartGroupDate = startGroupDate;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
|
||||
public class ClassificationGroup : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد گروه های بیست گانه طرح طبقه بندی
|
||||
/// </summary>
|
||||
/// <param name="groupNo"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="classificationSchemeId"></param>
|
||||
public ClassificationGroup(string groupNo, long workshopId, long classificationSchemeId)
|
||||
{
|
||||
GroupNo = groupNo;
|
||||
WorkshopId = workshopId;
|
||||
ClassificationSchemeId = classificationSchemeId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; private set; }
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long ClassificationSchemeId { get; private set; }
|
||||
|
||||
public ClassificationScheme ClassificationScheme { get; set; }
|
||||
|
||||
|
||||
public List<ClassificationGroupJob> ClassificationGroupJobs { get; set; }
|
||||
public List<ClassificationGroupSalary> ClassificationGroupSalaries { get; set; }
|
||||
|
||||
public List<ClassificationEmployee> ClassificationEmployees { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using _0_Framework.Domain;
|
||||
using _0_Framework_b.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public class ClassificationGroupJob : EntityBaseWithoutCreationDate
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد لیست مشغال برای گروه های طرح طبقه بندی
|
||||
/// </summary>
|
||||
/// <param name="jobId"></param>
|
||||
/// <param name="jobName"></param>
|
||||
/// <param name="jobCode"></param>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="groupNo"></param>
|
||||
public ClassificationGroupJob(long jobId, string jobName, string jobCode, long classificationGroupId, string groupNo)
|
||||
{
|
||||
JobId = jobId;
|
||||
JobName = jobName;
|
||||
JobCode = jobCode;
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
GroupNo = groupNo;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آی دی شغل
|
||||
/// </summary>
|
||||
public long JobId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شغل
|
||||
/// </summary>
|
||||
public string JobName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد شغل
|
||||
/// </summary>
|
||||
public string JobCode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; private set; }
|
||||
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using _0_Framework.Domain;
|
||||
using System;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public class ClassificationGroupSalary : EntityBase
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد دستمزد برای گروه
|
||||
/// </summary>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="groupNo"></param>
|
||||
/// <param name="groupSalary"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد گروه
|
||||
/// </summary>
|
||||
public double GroupSalary { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; private set; }
|
||||
|
||||
public long SchemeId { get; private set; }
|
||||
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش دستمزد گروه
|
||||
/// </summary>
|
||||
|
||||
/// <param name="groupSalary"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
public void Edit(double groupSalary, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
|
||||
GroupSalary = groupSalary;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
Year = year;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public class ClassificationRialCoefficient : EntityBaseWithoutCreationDate
|
||||
{
|
||||
/// <summary>
|
||||
/// ایچاد ضریب ریالی
|
||||
/// </summary>
|
||||
/// <param name="classificationSchemeId"></param>
|
||||
/// <param name="rialCoefficient"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی
|
||||
/// </summary>
|
||||
public double RialCoefficient { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; private set; }
|
||||
|
||||
|
||||
public ClassificationScheme ClassificationScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش ضریب ریالی
|
||||
/// </summary>
|
||||
/// <param name="classificationSchemeId"></param>
|
||||
/// <param name="rialCoefficient"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
public void Edit(double rialCoefficient, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
|
||||
RialCoefficient = rialCoefficient;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
Year = year;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
/// <param name="includingDateGr"></param>
|
||||
/// <param name="executionDateGr"></param>
|
||||
/// <param name="designerFullName"></param>
|
||||
/// <param name="designerPhone"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="typeOfCoefficient"></param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// </summary>
|
||||
public DateTime IncludingDateGr { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// </summary>
|
||||
public DateTime ExecutionDateGr { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان طرح
|
||||
/// </summary>
|
||||
public DateTime? EndSchemeDateGr { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طراح
|
||||
/// </summary>
|
||||
public string DesignerFullName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه طراح
|
||||
/// </summary>
|
||||
public string DesignerPhone { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; private set; }
|
||||
|
||||
|
||||
public List<ClassificationGroup> ClassificationGroups { get; set; }
|
||||
|
||||
public List<ClassificationRialCoefficient> ClassificationRialCoefficients { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="includingDateGr"></param>
|
||||
/// <param name="executionDateGr"></param>
|
||||
/// <param name="designerFullName"></param>
|
||||
/// <param name="designerPhone"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
public void Edit(DateTime includingDateGr, DateTime executionDateGr,string designerFullName, string designerPhone, TypeOfCoefficient typeOfCoefficient)
|
||||
{
|
||||
IncludingDateGr = includingDateGr;
|
||||
ExecutionDateGr = executionDateGr;
|
||||
DesignerFullName = designerFullName;
|
||||
DesignerPhone = designerPhone;
|
||||
TypeOfCoefficient = typeOfCoefficient;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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<long, ClassificationEmployee>
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت لیست پرسنل کارگاه
|
||||
/// تب افزودن پرسنل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EmployeeInfoList>> GetEmployeeListData(long schemeId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EditEmployeeGroupList>> GetEmployeeMemberizeData(long employeeId);
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره انتقال پرسنل به گره های دیگر
|
||||
///بصورت گروهی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task CreateTransferRange(List<ClassificationEmployee> command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// حذف پرسنل از گروه از سمت ویرایش
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task RemoveRangeByEdit(List<ClassificationEmployee> command);
|
||||
|
||||
}
|
||||
@@ -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<long, ClassificationGroup>
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت گروه های طرح
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ClassificationGroupList>> GetGroups(long schemeId);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مشاغل گروه توسط آی دی گروه
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId);
|
||||
|
||||
/// <summary>
|
||||
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> CheckEmployeeHasThisJob(long id, long groupId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد مشاغل
|
||||
/// </summary>
|
||||
/// <param name="createClassificationGroupJob"></param>
|
||||
/// <param name="deleteJobList"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> CreateJobs(List<ClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد گروه های بیست گانه
|
||||
/// </summary>
|
||||
/// <param name="groupList"></param>
|
||||
/// <returns></returns>
|
||||
Task CreateGroups(List<ClassificationGroup> groupList);
|
||||
}
|
||||
@@ -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<long, ClassificationGroupSalary>
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد دستمزدهای گروه ها
|
||||
/// </summary>
|
||||
/// <param name="createClassificationGroupSalary"></param>
|
||||
/// <returns></returns>
|
||||
Task CreateSalaries(List<ClassificationGroupSalary> createClassificationGroupSalary);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public interface IClassificationRialCoefficientRepository : IRepository<long, ClassificationRialCoefficient>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -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<long, ClassificationScheme>
|
||||
{
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="worskhopId"></param>
|
||||
/// <returns></returns>
|
||||
Task<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationSchemeDto> GetClassificationScheme(long id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طر برای محاسبات
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات برا افراد تک گروه
|
||||
/// </summary>
|
||||
/// <param name="schemeStart">تاریخ شروع طرح</param>
|
||||
/// <param name="schemeEnd">تاریخ پاین طرح، اجباری نیست</param>
|
||||
/// <param name="contractStart">تاریخ شروع قراداد</param>
|
||||
/// <param name="contractEnd">تاریخ پایان قراداد</param>
|
||||
/// <param name="groupNo">شماره گروه</param>
|
||||
/// <param name="employeeId">آی دی پرسنل</param>
|
||||
/// <param name="workshopId">آی دی کارگاه</param>
|
||||
/// <returns></returns>
|
||||
Task<BaseYearDataViewModel> BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
|
||||
DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// حذف طرح
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteClassificationScheme(long id);
|
||||
}
|
||||
@@ -11,6 +11,13 @@ public interface IJobRepository : IRepository<long, Job>
|
||||
EditJob GetDetails(long id);
|
||||
List<JobViewModel> Search(JobSearchModel searchModel);
|
||||
List<JobViewModel> SearchJobForMain(JobSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// جستجوس مشاغل
|
||||
/// </summary>
|
||||
/// <param name="searchtText"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<JobViewModel>> JobSearchSelect(string searchtText);
|
||||
// Task<List<JobViewModel>> GetJobListByText(string searchtText);
|
||||
List<JobViewModel> GetJobListByText(string searchtText);
|
||||
List<JobViewModel> GetJobListByWorkshopId(long workshopId);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا طبقه بندی شده است
|
||||
/// [کارگاه دارای طرح طبقه بندی می باشد ؟]
|
||||
/// </summary>
|
||||
public bool IsClassified { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا طرح طبقه بندی تکمیل شده است
|
||||
/// </summary>
|
||||
public bool IsClassificationSchemeCompleted { get; private set; }
|
||||
|
||||
//نحوه محاسبه مزد مرخصی
|
||||
public string ComputeOptions { get; private set; }
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// مدل برای مدال افزودن پرسنل ب گروه
|
||||
/// </summary>
|
||||
public class AddEmployeeToGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل پرسنل
|
||||
/// </summary>
|
||||
public string EmployeeFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GoroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی شغل
|
||||
/// </summary>
|
||||
public long JobId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شغل
|
||||
/// </summary>
|
||||
public string JobName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد شغل
|
||||
/// </summary>
|
||||
public string JobCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروه ها
|
||||
/// </summary>
|
||||
public List<ClassificationGroupList> ClassificationGroupList{ get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروه ها
|
||||
/// </summary>
|
||||
public class ClassificationGroupList
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// استرینگ
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// اینتیجر
|
||||
/// </summary>
|
||||
public int GroupNoInt { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
public class CheckStatusToDeleteScheme
|
||||
{
|
||||
/// <summary>
|
||||
/// وضعیت طرح برای حذف
|
||||
/// </summary>
|
||||
public DeleteSchemeStatus DeleteSchemeStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پیام سیستم
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
public enum DeleteSchemeStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// مجاز
|
||||
/// </summary>
|
||||
Valid,
|
||||
/// <summary>
|
||||
/// مجاز باشرط تایید
|
||||
/// </summary>
|
||||
ConfirmationNeeded,
|
||||
|
||||
/// <summary>
|
||||
/// غیر مجاز
|
||||
/// </summary>
|
||||
NotValid,
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد گروه
|
||||
/// </summary>
|
||||
public class ClassificationGroupAndJobModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long GroupId { get; set; }
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// استرینگ
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه نوع عددی
|
||||
/// </summary>
|
||||
public int GroupNoInt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long ClassificationSchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست مشاغل
|
||||
/// </summary>
|
||||
public List<EditClassificationGroupJob> EditClassificationGroupJob { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد مشاغل گروه
|
||||
/// </summary>
|
||||
public class CreateClassificationGroupJob
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی شغل
|
||||
/// </summary>
|
||||
public long JobId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شغل
|
||||
/// </summary>
|
||||
public string JobName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد شغل
|
||||
/// </summary>
|
||||
public string JobCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش مشاغل گروه
|
||||
/// </summary>
|
||||
public class EditClassificationGroupJob : CreateClassificationGroupJob
|
||||
{
|
||||
/// <summary>
|
||||
/// ای دی شغل
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد یا ویرایش مشاغل
|
||||
/// </summary>
|
||||
public class CreateOrEditGroupJobs
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// استرینگ
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی مشاغل
|
||||
/// </summary>
|
||||
public List<long> JobIdList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
public class ClassificationSchemeListDto
|
||||
{
|
||||
/// <summary>
|
||||
/// آیا طرح دارد
|
||||
/// </summary>
|
||||
public bool HasScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرح
|
||||
/// </summary>
|
||||
public List<SchemeListDto> ClassificationSchemesList { get; set; }
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد دستمزد گروه و ضریب ریالی
|
||||
/// </summary>
|
||||
public class CreateClassificationGroupSalaryAndRialCoefficient
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد گروه
|
||||
/// </summary>
|
||||
public double GroupSalary { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش دستمزد
|
||||
/// </summary>
|
||||
public class EditClassificationGroupSalaryAndRialCoefficient : CreateClassificationGroupSalaryAndRialCoefficient
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد گروه
|
||||
/// </summary>
|
||||
public string GroupSalaryStr { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها و ضرایب ریالی
|
||||
/// </summary>
|
||||
public class SalaryAndRialCoefficientModel
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی
|
||||
/// string
|
||||
/// </summary>
|
||||
public string RialCoefficientStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی
|
||||
/// double
|
||||
/// </summary>
|
||||
public double RialCoefficient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی ضریب ریالی
|
||||
/// </summary>
|
||||
public long CoefficientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها و ضرایب بر اساس سال
|
||||
/// </summary>
|
||||
public List<EditClassificationGroupSalaryAndRialCoefficient> SalariesAndCoefficientList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تب دستمزد ها و ضرایب ریالی
|
||||
/// </summary>
|
||||
public class SalaryAndRialCoefficientTab
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزدی قبلا ایجاد شده است؟
|
||||
/// </summary>
|
||||
public bool HasAnySalaries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها و ضرایب
|
||||
/// </summary>
|
||||
public List<SalaryAndRialCoefficientTabDataList> SalaryAndRialCoefficientTabDataList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها
|
||||
/// </summary>
|
||||
public class SalaryAndRialCoefficientTabDataList
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی
|
||||
/// string
|
||||
/// </summary>
|
||||
public string RialCoefficientStr { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
public class CreateClassificationScheme
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string IncludingDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ExecutionDateGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ExecutionDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان طرح
|
||||
/// </summary>
|
||||
public DateTime? EndSchemeDateGr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طراح
|
||||
/// </summary>
|
||||
public string DesignerFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه طراح
|
||||
/// </summary>
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string DesignerPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
public class CreateClassificationSchemeDto
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string IncludingDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ExecutionDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طراح
|
||||
/// </summary>
|
||||
public string DesignerFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه طراح
|
||||
/// </summary>
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string DesignerPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
public class EditClassificationScheme : CreateClassificationScheme
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
public class EditClassificationSchemeDto
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string IncludingDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ExecutionDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طراح
|
||||
/// </summary>
|
||||
public string DesignerFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه طراح
|
||||
/// </summary>
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string DesignerPhone { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع ضریب
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
/// <summary>
|
||||
/// ویرایش گروه پرسنل
|
||||
/// </summary>
|
||||
public class EditEmployeeGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// آیا گروه بندی پرسنل چند گانه است
|
||||
/// </summary>
|
||||
public bool HasMultipleGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل پرسنل
|
||||
/// </summary>
|
||||
public string EmployeeFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروه های پرسنل
|
||||
/// </summary>
|
||||
public List<EditEmployeeGroupList> EditEmployeeGroupLists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروه های طرح
|
||||
/// </summary>
|
||||
public List<ClassificationGroupList> ClassificationGroupList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروه های پرسنل
|
||||
/// </summary>
|
||||
public class EditEmployeeGroupList
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آی دی گروه
|
||||
/// </summary>
|
||||
public long ClassificationGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی شغل
|
||||
/// </summary>
|
||||
public long ClassificationGroupJobId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع استفاده از گروه
|
||||
/// </summary>
|
||||
public DateTime? StartGroupDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان استفاده از گروه
|
||||
/// </summary>
|
||||
public DateTime? EndGroupDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع استفاده از گروه
|
||||
/// </summary>
|
||||
public string StartGroupDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان استفاده از گروه
|
||||
/// </summary>
|
||||
public string EndGroupDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا حذف شده است
|
||||
/// </summary>
|
||||
public bool IsRemoved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// جستجوی پرسنل
|
||||
/// تب افزودن پرسنل طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public class EmployeeInfoTab
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل پرسنل
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست پرسنل
|
||||
/// </summary>
|
||||
public List<EmployeeInfoList> EmployeeInfoList { get; set; }
|
||||
|
||||
public List<string> YearlyList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست پرسنل
|
||||
/// تب افزودن پرسنل طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public class EmployeeInfoList
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی پرسنل
|
||||
/// </summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل پرسنل
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه یا گره هایی که پرسنل در آن اضافه شده
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا پرسنل هیچ گروهی دارد؟
|
||||
/// </summary>
|
||||
public bool HasGroup { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آخرین تاریخ شروع بکار قراداد
|
||||
/// </summary>
|
||||
public string LastStartContractWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آخرین تاریخ ترک کار قراداد
|
||||
/// </summary>
|
||||
public string LastLeftContractWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آخرین تاریخ شروع بکار بیمه
|
||||
/// </summary>
|
||||
public string LastStartInsuranceWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آخرین تاریخ ترک کار بیمه
|
||||
/// </summary>
|
||||
public string LastLeftInsuranceWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا پرسنل قرداد است
|
||||
/// </summary>
|
||||
public bool ContractPerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا پرسنل بیمه است
|
||||
/// </summary>
|
||||
public bool InsurancePerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا ترک کار قرارداد دارد
|
||||
/// </summary>
|
||||
public bool ContractLeft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا ترک کار بیمه دارد
|
||||
/// </summary>
|
||||
public bool InsuranceLeft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا کلا ترک کار کرده است
|
||||
/// </summary>
|
||||
public bool Black { get; set; }
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// اپلیکیش طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public interface IClassificationSchemeApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="worskhopId"></param>
|
||||
/// <returns></returns>
|
||||
Task<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateClassificationScheme(CreateClassificationSchemeDto command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationSchemeDto> GetClassificationScheme(long id);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طر برای محاسبات
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditClassificationScheme(EditClassificationSchemeDto command);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مشاغل گروه توسط آی دی گروه
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId);
|
||||
|
||||
/// <summary>
|
||||
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> CheckEmployeeHasThisJob(long id, long groupId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد مشاغل گروه
|
||||
/// </summary>
|
||||
/// <param name="createClassificationGroupJob"></param>
|
||||
/// <param name="deleteJobList"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> CreateGroupJobs(List<CreateClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// چک میکند که آیا برای این طرح تابحال دستمزدی ایجاد شده یا نه
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId);
|
||||
|
||||
/// <summary>
|
||||
/// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد دستمزدها و ضرایب ریالی هر گروه در هر سال
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||
|
||||
/// <summary>
|
||||
/// ثبت ویرایش دستمزدها و ضریب
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست پرسنل برای تب افزودن پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<EmployeeInfoTab> GetEmployeeDataTab(EmployeeInfoTab command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت گروه های طرح
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ClassificationGroupList>> GetGroups(long schemeId);
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره پرسنل افزوده شده در گروه
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> AddEmployeeToGroup(AddEmployeeToGroup command);
|
||||
|
||||
/// <summary>
|
||||
/// انتقال پرسنل به گروه جدید
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> TransferEmployeeToNewGroup(List<EditEmployeeGroupList> command);
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره ویرایش گروه پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditGroupMember(AddEmployeeToGroup command);
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره ویرایش گروه چندگانه پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditMultipleGroupMember(List<EditEmployeeGroupList> command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditEmployeeGroup> GetEmployeeMemberizeData(long employeeId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات برا افراد تک گروه
|
||||
/// </summary>
|
||||
/// <param name="schemeStart">تاریخ شروع طرح</param>
|
||||
/// <param name="schemeEnd">تاریخ پاین طرح، اجباری نیست</param>
|
||||
/// <param name="contractStart">تاریخ شروع قراداد</param>
|
||||
/// <param name="contractEnd">تاریخ پایان قراداد</param>
|
||||
/// <param name="groupNo">شماره گروه</param>
|
||||
/// <param name="employeeId">آی دی پرسنل</param>
|
||||
/// <param name="workshopId">آی دی کارگاه</param>
|
||||
/// <returns></returns>
|
||||
Task<BaseYearDataViewModel> BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
|
||||
DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// چک کردن امکان حذف طرح
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<CheckStatusToDeleteScheme> CheckToDeleteScheme(long id);
|
||||
|
||||
/// <summary>
|
||||
/// حذف طرح
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> DeleteScheme(long id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
public class SchemeListDto
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string IncludingDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ExecutionDateFa { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طراح
|
||||
/// </summary>
|
||||
public string DesignerFullName { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -13,6 +13,13 @@ public interface IJobApplication
|
||||
List<JobViewModel> Search(JobSearchModel searchModel);
|
||||
List<JobViewModel> SearchJobForMain(JobSearchModel searchModel);
|
||||
//Task<List<JobViewModel>> GetJobListByText(string searchtText);
|
||||
|
||||
/// <summary>
|
||||
/// جستجوی مشاغل برای سلکت تو
|
||||
/// </summary>
|
||||
/// <param name="searchtText"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<JobViewModel>> JobSearchSelect(string searchtText);
|
||||
List<JobViewModel> GetJobListByText(string searchtText);
|
||||
List<JobViewModel> GetJobListByWorkshopId(long workshopId);
|
||||
List<JobViewModel> GetJobListByTextAndWorkshopId(string textSearch, long workshopId);
|
||||
|
||||
@@ -94,4 +94,9 @@ public class BaseYearDataList
|
||||
/// آیا تاریخ پایان کار دارد
|
||||
/// </summary>
|
||||
public bool HasLeftWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره گروه
|
||||
/// </summary>
|
||||
public string GroupNo { get; set; }
|
||||
}
|
||||
610
CompanyManagment.Application/ClassificationSchemeApplication.cs
Normal file
610
CompanyManagment.Application/ClassificationSchemeApplication.cs
Normal file
@@ -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<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId)
|
||||
{
|
||||
return _classificationSchemeRepository.GetClassificationSchemeList(workshopId);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> 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<ClassificationGroup>()
|
||||
{
|
||||
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<EditClassificationSchemeDto> GetClassificationScheme(long id)
|
||||
{
|
||||
return await _classificationSchemeRepository.GetClassificationScheme(id);
|
||||
}
|
||||
|
||||
|
||||
public Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id)
|
||||
{
|
||||
return _classificationSchemeRepository.GetClassificationSchemeToCompute(id);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> 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<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId)
|
||||
{
|
||||
return await _classificationGroupRepository.GetGroupAndJobs(schemeId);
|
||||
}
|
||||
|
||||
public async Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId)
|
||||
{
|
||||
return await _classificationGroupRepository.GetGroupJobs(groupId);
|
||||
}
|
||||
|
||||
public async Task<bool> CheckEmployeeHasThisJob(long id, long groupId)
|
||||
{
|
||||
return await _classificationGroupRepository.CheckEmployeeHasThisJob(id, groupId);
|
||||
}
|
||||
|
||||
public async Task<bool> CreateGroupJobs(List<CreateClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList)
|
||||
{
|
||||
var newJoblist = new List<ClassificationGroupJob>();
|
||||
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<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId)
|
||||
{
|
||||
return await _classificationGroupSalariesRepository.GetSalariesTabData(schemeId);
|
||||
}
|
||||
|
||||
public async Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId)
|
||||
{
|
||||
return await _classificationGroupRepository.GetGroupToCreateSalariesModal(schemeId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<OperationResult> 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<ClassificationGroupSalary>();
|
||||
|
||||
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<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
return await _classificationGroupSalariesRepository.GetEditSalariesData(schemeId, startDate, endDate);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> 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<EmployeeInfoTab> 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<List<ClassificationGroupList>> GetGroups(long schemeId)
|
||||
{
|
||||
return await _classificationGroupRepository.GetGroups(schemeId);
|
||||
}
|
||||
|
||||
|
||||
public async Task<OperationResult> 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<OperationResult> 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<OperationResult> TransferEmployeeToNewGroup(List<EditEmployeeGroupList> 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<DateTime>();
|
||||
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<ClassificationEmployee>();
|
||||
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<OperationResult> EditMultipleGroupMember(List<EditEmployeeGroupList> 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<DateTime>();
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<EditEmployeeGroup> 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<BaseYearDataViewModel> 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<CheckStatusToDeleteScheme> 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<OperationResult> 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("یافت نشد");
|
||||
}
|
||||
}
|
||||
@@ -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<List<JobViewModel>> JobSearchSelect(string searchtText)
|
||||
{
|
||||
return await _jobRepository.JobSearchSelect(searchtText);
|
||||
}
|
||||
|
||||
//public Task<List<JobViewModel>> GetJobListByText(string searchtText)
|
||||
//{
|
||||
// return _jobRepository.GetJobListByText(searchtText);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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<PlanPercentage> PlanPercentages { get; set; }
|
||||
|
||||
#region ClassificationScheme
|
||||
|
||||
/// <summary>
|
||||
/// جدول طرح طبقه بندی
|
||||
/// </summary>
|
||||
public DbSet<ClassificationScheme> ClassificationSchemes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول گروه های طرح
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroup> ClassificationGroups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول ضرایب ریالی
|
||||
/// </summary>
|
||||
public DbSet<ClassificationRialCoefficient> ClassificationRialCoefficients { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جدول شغل های گروه
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroupJob> ClassificationGroupJobs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول مزد شغل گروه ها
|
||||
/// </summary>
|
||||
public DbSet<ClassificationGroupSalary> ClassificationGroupSalaries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جدول پرسنل طرح
|
||||
/// </summary>
|
||||
public DbSet<ClassificationEmployee> ClassificationEmployees { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region TemporaryClientRegisteration
|
||||
|
||||
public DbSet<ContractingPartyTemp> ContractingPartyTemps { get; set; }
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationEmployeeMapping : IEntityTypeConfiguration<ClassificationEmployee>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationEmployee> 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupJobMapping : IEntityTypeConfiguration<ClassificationGroupJob>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroupJob> 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupMapping : IEntityTypeConfiguration<ClassificationGroup>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroup> 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationGroupSalaryMapping : IEntityTypeConfiguration<ClassificationGroupSalary>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationGroupSalary> 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ClassificationRialCoefficientMapping : IEntityTypeConfiguration<ClassificationRialCoefficient>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationRialCoefficient> builder)
|
||||
{
|
||||
builder.ToTable("ClassificationRialCoefficients");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.HasOne(x => x.ClassificationScheme)
|
||||
.WithMany(x => x.ClassificationRialCoefficients)
|
||||
.HasForeignKey(x => x.ClassificationSchemeId);
|
||||
}
|
||||
}
|
||||
@@ -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<ClassificationScheme>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ClassificationScheme> 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);
|
||||
|
||||
}
|
||||
}
|
||||
11806
CompanyManagment.EFCore/Migrations/20260101112146_ClassificationScheme.Designer.cs
generated
Normal file
11806
CompanyManagment.EFCore/Migrations/20260101112146_ClassificationScheme.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ClassificationScheme : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsClassificationSchemeCompleted",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationSchemes",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
IncludingDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ExecutionDateGr = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndSchemeDateGr = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DesignerFullName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
DesignerPhone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
TypeOfCoefficient = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationSchemes", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroups",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroups", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroups_ClassificationSchemes_ClassificationSchemeId",
|
||||
column: x => x.ClassificationSchemeId,
|
||||
principalTable: "ClassificationSchemes",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationRialCoefficients",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
RialCoefficient = table.Column<double>(type: "float", nullable: false),
|
||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Year = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationRialCoefficients", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationRialCoefficients_ClassificationSchemes_ClassificationSchemeId",
|
||||
column: x => x.ClassificationSchemeId,
|
||||
principalTable: "ClassificationSchemes",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationEmployee",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationSchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ClassificationGroupJobId = table.Column<long>(type: "bigint", nullable: false),
|
||||
StartGroupDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
EndGroupDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationEmployee", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationEmployee_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroupJobs",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
JobId = table.Column<long>(type: "bigint", nullable: false),
|
||||
JobName = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
|
||||
JobCode = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroupJobs", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroupJobs_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ClassificationGroupSalaries",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ClassificationGroupId = table.Column<long>(type: "bigint", nullable: false),
|
||||
GroupNo = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true),
|
||||
GroupSalary = table.Column<double>(type: "float", nullable: false),
|
||||
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Year = table.Column<int>(type: "int", nullable: false),
|
||||
SchemeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ClassificationGroupSalaries", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ClassificationGroupSalaries_ClassificationGroups_ClassificationGroupId",
|
||||
column: x => x.ClassificationGroupId,
|
||||
principalTable: "ClassificationGroups",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationEmployee_ClassificationGroupId",
|
||||
table: "ClassificationEmployee",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroupJobs_ClassificationGroupId",
|
||||
table: "ClassificationGroupJobs",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroups_ClassificationSchemeId",
|
||||
table: "ClassificationGroups",
|
||||
column: "ClassificationSchemeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationGroupSalaries_ClassificationGroupId",
|
||||
table: "ClassificationGroupSalaries",
|
||||
column: "ClassificationGroupId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ClassificationRialCoefficients_ClassificationSchemeId",
|
||||
table: "ClassificationRialCoefficients",
|
||||
column: "ClassificationSchemeId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationEmployee");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroupJobs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroupSalaries");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationRialCoefficients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationGroups");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ClassificationSchemes");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsClassificationSchemeCompleted",
|
||||
table: "Workshops");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -733,6 +733,217 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.ToTable("CheckoutWarningMessage", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationEmployee", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ClassificationGroupJobId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime?>("EndGroupDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("StartGroupDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationEmployee", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationSchemeId");
|
||||
|
||||
b.ToTable("ClassificationGroups", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupJob", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<string>("JobCode")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<long>("JobId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("JobName")
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("nvarchar(255)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationGroupJobs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupSalary", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationGroupId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("GroupNo")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("nvarchar(2)");
|
||||
|
||||
b.Property<double>("GroupSalary")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<long>("SchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationGroupId");
|
||||
|
||||
b.ToTable("ClassificationGroupSalaries", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationRialCoefficient", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("ClassificationSchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("EndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("RialCoefficient")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Year")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("ClassificationSchemeId");
|
||||
|
||||
b.ToTable("ClassificationRialCoefficients", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DesignerFullName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DesignerPhone")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<DateTime?>("EndSchemeDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ExecutionDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("IncludingDateGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("TypeOfCoefficient")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("ClassificationSchemes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassifiedSalaryAgg.ClassifiedSalary", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
@@ -6791,6 +7002,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<bool>("IsClassificationSchemeCompleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsClassified")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -7578,6 +7792,61 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("Checkout");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationEmployee", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationEmployees")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", "ClassificationScheme")
|
||||
.WithMany("ClassificationGroups")
|
||||
.HasForeignKey("ClassificationSchemeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationScheme");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupJob", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationGroupJobs")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroupSalary", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", "ClassificationGroup")
|
||||
.WithMany("ClassificationGroupSalaries")
|
||||
.HasForeignKey("ClassificationGroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationGroup");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationRialCoefficient", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", "ClassificationScheme")
|
||||
.WithMany("ClassificationRialCoefficients")
|
||||
.HasForeignKey("ClassificationSchemeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClassificationScheme");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClientEmployeeWorkshopAgg.ClientEmployeeWorkshop", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
|
||||
@@ -11194,6 +11463,22 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("CheckoutWarningMessageList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationGroup", b =>
|
||||
{
|
||||
b.Navigation("ClassificationEmployees");
|
||||
|
||||
b.Navigation("ClassificationGroupJobs");
|
||||
|
||||
b.Navigation("ClassificationGroupSalaries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ClassificationSchemeAgg.ClassificationScheme", b =>
|
||||
{
|
||||
b.Navigation("ClassificationGroups");
|
||||
|
||||
b.Navigation("ClassificationRialCoefficients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b =>
|
||||
{
|
||||
b.Navigation("ContractingPartyBankAccounts");
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationEmployeeRepository : RepositoryBase<long, ClassificationEmployee>, IClassificationEmployeeRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationEmployeeRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<EmployeeInfoList>> GetEmployeeListData(long schemeId)
|
||||
{
|
||||
var leftDate = new DateTime(2121, 3, 21);
|
||||
var workshopId = _context.ClassificationSchemes.FirstOrDefault(x => x.id == schemeId)!.WorkshopId;
|
||||
var join = new List<PersonnelInfoViewModel>();
|
||||
var contractLeftWork =await _context.LeftWorkList.Include(em=>em.Employee).Select(x => new PersonnelInfoViewModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
FullName = x.Employee.FullName,
|
||||
PersonnelCode = 0,
|
||||
ContractPerson = true,
|
||||
ContractLeft = x.LeftWorkDate != leftDate,
|
||||
StartWork = x.StartWorkDate,
|
||||
LeftWork = x.LeftWorkDate,
|
||||
LastStartInsuranceWork = "-",
|
||||
LastLeftInsuranceWork = "-",
|
||||
}).Where(x => x.WorkshopId == workshopId)
|
||||
.OrderByDescending(x => x.StartWork)
|
||||
.ToListAsync();
|
||||
|
||||
contractLeftWork = contractLeftWork.Select(x => new PersonnelInfoViewModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
FullName = x.FullName,
|
||||
|
||||
ContractPerson = true,
|
||||
ContractLeft = x.ContractLeft,
|
||||
LastStartContractWork = x.StartWork.ToFarsi(),
|
||||
LastLeftContractWork = x.LeftWork != leftDate ? x.LeftWork.ToFarsi() : "-",
|
||||
StartWork = x.StartWork,
|
||||
LeftWork = x.LeftWork,
|
||||
LastStartInsuranceWork = x.LastStartInsuranceWork,
|
||||
LastLeftInsuranceWork = x.LastLeftInsuranceWork,
|
||||
}).ToList();
|
||||
|
||||
var insuranceLeftWork =await _context.LeftWorkInsuranceList.Include(em=> em.Employee).Select(x => new PersonnelInfoViewModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
FullName = x.Employee.FullName,
|
||||
PersonnelCode = 0,
|
||||
InsurancePerson = true,
|
||||
InsuranceLeft = x.LeftWorkDate != null,
|
||||
StartWork = x.StartWorkDate,
|
||||
LastStartInsuranceWork = x.StartWorkDate.ToFarsi(),
|
||||
LastLeftInsuranceWork = x.LeftWorkDate != null ? x.LeftWorkDate.ToFarsi() : "-",
|
||||
}).Where(x => x.WorkshopId == workshopId)
|
||||
.OrderByDescending(x => x.StartWork).ToListAsync();
|
||||
|
||||
insuranceLeftWork = insuranceLeftWork.Select(x => new PersonnelInfoViewModel()
|
||||
{
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
FullName = x.FullName,
|
||||
PersonnelCode = _context.PersonnelCodeSet.Any(p => p.EmployeeId == x.EmployeeId && p.WorkshopId == x.WorkshopId) ?
|
||||
_context.PersonnelCodeSet.FirstOrDefault(p => p.EmployeeId == x.EmployeeId && p.WorkshopId == x.WorkshopId)!.PersonnelCode : 0,
|
||||
InsurancePerson = true,
|
||||
InsuranceLeft = x.InsuranceLeft,
|
||||
StartWork = x.StartWork,
|
||||
LastStartInsuranceWork = x.LastStartInsuranceWork,
|
||||
LastLeftInsuranceWork = x.LastLeftInsuranceWork,
|
||||
}).ToList();
|
||||
|
||||
var joinEqualList = contractLeftWork.Join(insuranceLeftWork,
|
||||
x => x.EmployeeId,
|
||||
c => c.EmployeeId,
|
||||
(first, second) => new PersonnelInfoViewModel
|
||||
{
|
||||
EmployeeId = first.EmployeeId,
|
||||
ContractPerson = first.ContractPerson,
|
||||
ContractLeft = first.ContractLeft,
|
||||
InsurancePerson = second.InsurancePerson,
|
||||
InsuranceLeft = second.InsuranceLeft,
|
||||
LastStartContractWork = first.LastStartContractWork,
|
||||
LastLeftContractWork = first.LastLeftContractWork,
|
||||
StartWork = first.StartWork,
|
||||
LeftWork = first.LeftWork,
|
||||
LastStartInsuranceWork = second.LastStartInsuranceWork,
|
||||
LastLeftInsuranceWork = second.LastLeftInsuranceWork,
|
||||
}).ToList();
|
||||
|
||||
if (contractLeftWork.Any() && !insuranceLeftWork.Any())
|
||||
{
|
||||
join = contractLeftWork.ToList();
|
||||
}
|
||||
else if (!contractLeftWork.Any() && insuranceLeftWork.Any())
|
||||
{
|
||||
join = insuranceLeftWork.ToList();
|
||||
}
|
||||
else if (contractLeftWork.Any() && insuranceLeftWork.Any())
|
||||
{
|
||||
join = contractLeftWork.Concat(insuranceLeftWork).ToList();
|
||||
}
|
||||
|
||||
//if (joinEqualList.Count == 0)
|
||||
// return new List<EmployeeInfoList>();
|
||||
|
||||
//join = join.GroupBy(x => x.EmployeeId).Select(d => d.First()).ToList();
|
||||
|
||||
|
||||
var employeeWhitGroup = _context.ClassificationEmployees.Include(g=>g.ClassificationGroup)
|
||||
.Where(x => x.ClassificationSchemeId == schemeId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var finalList = join.Select(x =>
|
||||
{
|
||||
var hasGroup = employeeWhitGroup.Any(em => em.EmployeeId == x.EmployeeId);
|
||||
var groupNo = "";
|
||||
if (hasGroup)
|
||||
{
|
||||
var group = employeeWhitGroup.Where(g => g.EmployeeId == x.EmployeeId)
|
||||
.Select(n => n.ClassificationGroup.GroupNo).ToList();
|
||||
if (group.Count > 0)
|
||||
groupNo = string.Join(" - ", group);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var contractPerson = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.ContractPerson : x.ContractPerson;
|
||||
var insurancePerson = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.InsurancePerson : x.InsurancePerson;
|
||||
var contractLeft = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.ContractLeft : x.ContractLeft;
|
||||
var insuranceLeft = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.InsuranceLeft : x.InsuranceLeft;
|
||||
|
||||
|
||||
var lastStartInsuranceWork = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.LastStartInsuranceWork : x.LastStartInsuranceWork;
|
||||
var lastLeftInsuranceWork = joinEqualList.Any(c => c.EmployeeId == x.EmployeeId) ? joinEqualList.FirstOrDefault(c => c.EmployeeId == x.EmployeeId)!.LastLeftInsuranceWork : x.LastLeftInsuranceWork;
|
||||
|
||||
return new EmployeeInfoList
|
||||
{
|
||||
HasGroup = hasGroup,
|
||||
GroupNo = groupNo,
|
||||
EmployeeId = x.EmployeeId,
|
||||
FullName = x.FullName,
|
||||
ContractPerson = contractPerson,
|
||||
InsurancePerson = insurancePerson,
|
||||
ContractLeft = contractLeft,
|
||||
InsuranceLeft = insuranceLeft,
|
||||
Black = ((contractPerson && insurancePerson && insuranceLeft && contractLeft) || (contractPerson && !insurancePerson && contractLeft) || (insurancePerson && !contractPerson && insuranceLeft)) ? true : false,
|
||||
LastStartContractWork = x.LastStartContractWork,
|
||||
LastLeftContractWork = x.LastLeftContractWork,
|
||||
LastStartInsuranceWork = lastStartInsuranceWork,
|
||||
LastLeftInsuranceWork = lastLeftInsuranceWork,
|
||||
};
|
||||
}).ToList();
|
||||
|
||||
|
||||
var final = finalList.GroupBy(x => x.EmployeeId).Select(x => x.First()).ToList();
|
||||
return final;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<EditEmployeeGroupList>> GetEmployeeMemberizeData(long employeeId)
|
||||
{
|
||||
return await _context.ClassificationEmployees.Where(x => x.EmployeeId == employeeId).Include(x=>x.ClassificationGroup).Select(x=> new EditEmployeeGroupList
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
SchemeId = x.ClassificationSchemeId,
|
||||
ClassificationGroupId = x.ClassificationGroupId,
|
||||
ClassificationGroupJobId = x.ClassificationGroupJobId,
|
||||
StartGroupDate = x.StartGroupDate,
|
||||
EndGroupDate = x.EndGroupDate,
|
||||
StartGroupDateFa = x.StartGroupDate.HasValue ? x.StartGroupDate.ToFarsi() : "",
|
||||
EndGroupDateFa = x.EndGroupDate.HasValue ? x.EndGroupDate.ToFarsi() : "",
|
||||
GroupNo = x.ClassificationGroup.GroupNo
|
||||
|
||||
|
||||
}).OrderBy(x=>x.StartGroupDate).ToListAsync();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async Task CreateTransferRange(List<ClassificationEmployee> command)
|
||||
{
|
||||
await _context.AddRangeAsync(command);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف پرسنل از گروه از سمت ویرایش
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public async Task RemoveRangeByEdit(List<ClassificationEmployee> command)
|
||||
{
|
||||
_context.RemoveRange(command);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationGroupRepository : RepositoryBase<long, ClassificationGroup>, IClassificationGroupRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationGroupRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت گروه های طرح
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ClassificationGroupList>> GetGroups(long schemeId)
|
||||
{
|
||||
return await _context.ClassificationGroups
|
||||
.Where(x => x.ClassificationSchemeId == schemeId)
|
||||
.Select(x=> new ClassificationGroupList
|
||||
{
|
||||
|
||||
GroupId = x.id,
|
||||
GroupNo = x.GroupNo,
|
||||
GroupNoInt = Convert.ToInt32(x.GroupNo)
|
||||
|
||||
}).OrderBy(x=>x.GroupNoInt).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId)
|
||||
{
|
||||
return await _context.ClassificationGroups.Where(x => x.ClassificationSchemeId == schemeId)
|
||||
.Include(x => x.ClassificationGroupJobs).Select(x => new ClassificationGroupAndJobModel
|
||||
{
|
||||
GroupId = x.id,
|
||||
GroupNo = x.GroupNo,
|
||||
GroupNoInt = Convert.ToInt32(x.GroupNo),
|
||||
WorkshopId = x.WorkshopId,
|
||||
ClassificationSchemeId = x.ClassificationSchemeId,
|
||||
EditClassificationGroupJob = x.ClassificationGroupJobs.Select(jobs => new EditClassificationGroupJob()
|
||||
{
|
||||
Id = jobs.id,
|
||||
JobId = jobs.JobId,
|
||||
JobName = jobs.JobName,
|
||||
JobCode = jobs.JobCode,
|
||||
ClassificationGroupId = jobs.ClassificationGroupId,
|
||||
GroupNo = jobs.GroupNo,
|
||||
|
||||
}).ToList(),
|
||||
|
||||
}).OrderBy(x=>x.GroupNoInt).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مشاغل گروه توسط آی دی گروه
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId)
|
||||
{
|
||||
|
||||
return await _context.ClassificationGroupJobs
|
||||
.Where(x => x.ClassificationGroupId == groupId).Select(jobs => new EditClassificationGroupJob()
|
||||
{
|
||||
Id = jobs.id,
|
||||
JobId = jobs.JobId,
|
||||
JobName = jobs.JobName,
|
||||
JobCode = jobs.JobCode,
|
||||
ClassificationGroupId = jobs.ClassificationGroupId,
|
||||
GroupNo = jobs.GroupNo,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> CheckEmployeeHasThisJob(long id, long groupId)
|
||||
{
|
||||
return await _context.ClassificationEmployees.AnyAsync(x =>
|
||||
x.ClassificationGroupJobId == id && x.ClassificationGroupId == groupId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد مشاغل
|
||||
/// </summary>
|
||||
/// <param name="createClassificationGroupJob"></param>
|
||||
/// <param name="deleteJobList"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> CreateJobs(List<ClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList)
|
||||
{
|
||||
if (createClassificationGroupJob.Count > 0)
|
||||
{
|
||||
await _context.ClassificationGroupJobs.AddRangeAsync(createClassificationGroupJob);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
if (deleteJobList.Count > 0)
|
||||
{
|
||||
var deleteItems = _context.ClassificationGroupJobs.Where(x => deleteJobList.Contains(x.id));
|
||||
_context.ClassificationGroupJobs.RemoveRange(deleteItems);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId)
|
||||
{
|
||||
var result = new SalaryAndRialCoefficientModel();
|
||||
var scheme =await _context.ClassificationSchemes.FirstOrDefaultAsync(x => x.id == schemeId);
|
||||
var groups =await _context.ClassificationGroups.Where(x => x.ClassificationSchemeId == schemeId).ToListAsync();
|
||||
|
||||
if (scheme != null)
|
||||
{
|
||||
result.TypeOfCoefficient = scheme.TypeOfCoefficient;
|
||||
result.SchemeId = schemeId;
|
||||
|
||||
result.SalariesAndCoefficientList = groups.Select(x => new EditClassificationGroupSalaryAndRialCoefficient
|
||||
{
|
||||
ClassificationGroupId = x.id,
|
||||
GroupNo = x.GroupNo,
|
||||
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد گروه های بیست گانه
|
||||
/// </summary>
|
||||
/// <param name="groupList"></param>
|
||||
/// <returns></returns>
|
||||
public async Task CreateGroups(List<ClassificationGroup> groupList)
|
||||
{
|
||||
await _context.AddRangeAsync(groupList);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationGroupSalariesRepository : RepositoryBase<long, ClassificationGroupSalary>, IClassificationGroupSalariesRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationGroupSalariesRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
|
||||
public async Task CreateSalaries(List<ClassificationGroupSalary> createClassificationGroupSalary)
|
||||
{
|
||||
if (createClassificationGroupSalary.Count > 0)
|
||||
{
|
||||
await _context.ClassificationGroupSalaries.AddRangeAsync(createClassificationGroupSalary);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
var salaryAndRialCoefficientModel = new SalaryAndRialCoefficientModel();
|
||||
|
||||
try
|
||||
{
|
||||
var scheme = _context.ClassificationSchemes.FirstOrDefaultAsync(x => x.id == schemeId).GetAwaiter().GetResult();
|
||||
var startDatGr = startDate.ToGeorgian();
|
||||
|
||||
|
||||
var rialCoEfficient = await _context.ClassificationRialCoefficients
|
||||
.FirstOrDefaultAsync(x => x.ClassificationSchemeId == schemeId && x.StartDate == startDatGr);
|
||||
salaryAndRialCoefficientModel.SchemeId = schemeId;
|
||||
salaryAndRialCoefficientModel.StartDateFa = startDate;
|
||||
salaryAndRialCoefficientModel.EndDateFa = endDate;
|
||||
salaryAndRialCoefficientModel.TypeOfCoefficient = scheme.TypeOfCoefficient;
|
||||
if (rialCoEfficient == null)
|
||||
{
|
||||
salaryAndRialCoefficientModel.RialCoefficient = 0;
|
||||
salaryAndRialCoefficientModel.CoefficientId = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
salaryAndRialCoefficientModel.RialCoefficient = scheme.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient ? rialCoEfficient.RialCoefficient : 0;
|
||||
salaryAndRialCoefficientModel.CoefficientId = scheme.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient ? rialCoEfficient.id : 0;
|
||||
}
|
||||
|
||||
salaryAndRialCoefficientModel.SalariesAndCoefficientList = _context.ClassificationGroupSalaries.Where(x => x.SchemeId == schemeId && x.StartDate == startDatGr).Select(x => new EditClassificationGroupSalaryAndRialCoefficient
|
||||
{
|
||||
Id = x.id,
|
||||
ClassificationGroupId = x.ClassificationGroupId,
|
||||
GroupNo = x.GroupNo,
|
||||
GroupSalaryStr = x.GroupSalary.ToMoney(),
|
||||
GroupSalary = x.GroupSalary
|
||||
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
return new SalaryAndRialCoefficientModel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return salaryAndRialCoefficientModel;
|
||||
}
|
||||
public async Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId)
|
||||
{
|
||||
var scheme = await _context.ClassificationSchemes.AsSplitQuery().Include(xc=>xc.ClassificationRialCoefficients)
|
||||
.Include(xg => xg.ClassificationGroups)
|
||||
.ThenInclude(xs => xs.ClassificationGroupSalaries)
|
||||
.FirstOrDefaultAsync(x => x.id == schemeId);
|
||||
|
||||
if (scheme == null)
|
||||
return null;
|
||||
|
||||
// جمعآوری همهی حقوقها از تمام گروهها
|
||||
var allSalaries = scheme.ClassificationGroups
|
||||
.SelectMany(g => g.ClassificationGroupSalaries)
|
||||
.ToList();
|
||||
|
||||
// اگر هیچ حقوقی وجود ندارد
|
||||
if (!allSalaries.Any())
|
||||
{
|
||||
return new SalaryAndRialCoefficientTab
|
||||
{
|
||||
SchemeId = scheme.id,
|
||||
HasAnySalaries = false,
|
||||
SalaryAndRialCoefficientTabDataList = new List<SalaryAndRialCoefficientTabDataList>()
|
||||
};
|
||||
}
|
||||
|
||||
// گروهبندی بر اساس StartDate و EndDate برای حذف موارد تکراری
|
||||
var distinctPeriods = allSalaries
|
||||
.GroupBy(s => new { s.StartDate, s.EndDate })
|
||||
.Select(g => g.First()) // فقط یکی از هر بازه تاریخ
|
||||
.OrderByDescending(x => x.StartDate)
|
||||
.ToList();
|
||||
|
||||
//تبدیل به مدل خروجی
|
||||
var dataList = distinctPeriods
|
||||
.Select(s => new SalaryAndRialCoefficientTabDataList
|
||||
{
|
||||
RialCoefficientStr = $"{scheme.ClassificationRialCoefficients.FirstOrDefault(x=>x.StartDate.Date == s.StartDate.Date && x.EndDate.Date == s.EndDate.Date)?.RialCoefficient}",
|
||||
StartDateFa = s.StartDate.ToFarsi(),
|
||||
EndDateFa = s.EndDate.ToFarsi(),
|
||||
Year = s.Year
|
||||
})
|
||||
.ToList();
|
||||
|
||||
var result = new SalaryAndRialCoefficientTab
|
||||
{
|
||||
SchemeId = scheme.id,
|
||||
HasAnySalaries = allSalaries.Any(),
|
||||
SalaryAndRialCoefficientTabDataList = dataList
|
||||
};
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationRialCoefficientRepository : RepositoryBase<long, ClassificationRialCoefficient>, IClassificationRialCoefficientRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationRialCoefficientRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,609 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PersianTools.Core;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationSchemeRepository :RepositoryBase<long, Company.Domain.ClassificationSchemeAgg.ClassificationScheme>, IClassificationSchemeRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationSchemeRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId)
|
||||
{
|
||||
var hasScheme =await _context.ClassificationSchemes.AnyAsync(x => x.WorkshopId == workshopId);
|
||||
if (!hasScheme)
|
||||
return new ClassificationSchemeListDto()
|
||||
{
|
||||
HasScheme = false,
|
||||
|
||||
};
|
||||
|
||||
var schemeList =await _context.ClassificationSchemes.Where(x => x.WorkshopId == workshopId).Select(x =>
|
||||
new SchemeListDto()
|
||||
{
|
||||
Id = x.id,
|
||||
IncludingDateFa = x.IncludingDateGr.ToFarsi(),
|
||||
ExecutionDateFa = x.ExecutionDateGr.ToFarsi(),
|
||||
DesignerFullName = x.DesignerFullName,
|
||||
|
||||
}).ToListAsync();
|
||||
return new ClassificationSchemeListDto()
|
||||
{
|
||||
HasScheme = true,
|
||||
WorkshopId = workshopId,
|
||||
ClassificationSchemesList = schemeList
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public Task<EditClassificationSchemeDto> GetClassificationScheme(long id)
|
||||
{
|
||||
return _context.ClassificationSchemes.Select(x =>
|
||||
new EditClassificationSchemeDto()
|
||||
{
|
||||
|
||||
Id = x.id,
|
||||
IncludingDateFa = x.IncludingDateGr.ToFarsi(),
|
||||
ExecutionDateFa = x.ExecutionDateGr.ToFarsi(),
|
||||
DesignerFullName = x.DesignerFullName,
|
||||
DesignerPhone = x.DesignerPhone,
|
||||
TypeOfCoefficient = x.TypeOfCoefficient
|
||||
|
||||
}).FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طر برای محاسبات
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id)
|
||||
{
|
||||
return _context.ClassificationSchemes.Select(x =>
|
||||
new EditClassificationScheme()
|
||||
{
|
||||
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
ExecutionDateGr = x.ExecutionDateGr,
|
||||
EndSchemeDateGr = x.EndSchemeDateGr,
|
||||
IncludingDateFa = x.IncludingDateGr.ToFarsi(),
|
||||
ExecutionDateFa = x.ExecutionDateGr.ToFarsi(),
|
||||
DesignerFullName = x.DesignerFullName,
|
||||
DesignerPhone = x.DesignerPhone,
|
||||
TypeOfCoefficient = x.TypeOfCoefficient
|
||||
|
||||
}).FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات برا افراد تک گروه
|
||||
/// </summary>
|
||||
/// <param name="schemeStart">تاریخ شروع طرح</param>
|
||||
/// <param name="schemeEnd">تاریخ پاین طرح، اجباری نیست</param>
|
||||
/// <param name="contractStart">تاریخ شروع قراداد</param>
|
||||
/// <param name="contractEnd">تاریخ پایان قراداد</param>
|
||||
/// <param name="groupNo">شماره گروه</param>
|
||||
/// <param name="employeeId">آی دی پرسنل</param>
|
||||
/// <param name="workshopId">آی دی کارگاه</param>
|
||||
/// <returns></returns>
|
||||
public async Task<BaseYearDataViewModel> BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
|
||||
DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId)
|
||||
{
|
||||
//خروجی متد
|
||||
var baseYearResult = new BaseYearDataViewModel();
|
||||
baseYearResult.WorkshopId = workshopId;
|
||||
baseYearResult.EmployeeId = employeeId;
|
||||
|
||||
//بدست آوردن اطلاعات گروهبندی پرسنل
|
||||
var employeeGroupMember = await _context.ClassificationEmployees.Include(x=>x.ClassificationGroup)
|
||||
.Where(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId).OrderBy(x=>x.StartGroupDate)
|
||||
.Select(x=> new{x.StartGroupDate, x.EndGroupDate, x.ClassificationGroup.GroupNo})
|
||||
.OrderByDescending(x=>x.StartGroupDate)
|
||||
.ToListAsync();
|
||||
var employeeGroupMemberData = new List<(DateTime startGroupDate, DateTime EndGroupDate, string GroupNo)>();
|
||||
if (employeeGroupMember.Any())
|
||||
{
|
||||
|
||||
var lastGroup = employeeGroupMember.FirstOrDefault();
|
||||
foreach (var group in employeeGroupMember)
|
||||
{
|
||||
if (group == lastGroup)
|
||||
{
|
||||
|
||||
employeeGroupMemberData.Add(new ValueTuple<DateTime, DateTime, string>(group.StartGroupDate.Value, contractEnd, group.GroupNo));
|
||||
}
|
||||
else
|
||||
{
|
||||
var endOfGroup = employeeGroupMemberData.Last().startGroupDate.AddDays(-1);
|
||||
employeeGroupMemberData.Add(new ValueTuple<DateTime, DateTime, string>(group.StartGroupDate.Value, endOfGroup, group.GroupNo));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//لیست شروع بکار / ترک کار پرسنل
|
||||
var leftWorkList = await _context.LeftWorkList
|
||||
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x=> new LeftWorkViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
StartWorkDateGr = x.StartWorkDate,
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
LeftWorkDateGr = x.LeftWorkDate,
|
||||
HasLeft = x.HasLeft,
|
||||
}).OrderBy(x=>x.StartWorkDateGr).ToListAsync();
|
||||
//اولین شروع بکار
|
||||
var firstStartWorkDate = leftWorkList.First().StartWorkDateGr;
|
||||
var firstStartWork = leftWorkList.First().StartWorkDate;
|
||||
//اگر شروع طرح بعد از اولین شروع بکار بود
|
||||
if (schemeStart > firstStartWorkDate)
|
||||
{
|
||||
var leftWorkStart = leftWorkList.FirstOrDefault(x => x.StartWorkDateGr <= schemeStart && x.LeftWorkDateGr > schemeStart);
|
||||
|
||||
if (leftWorkStart != null)
|
||||
{
|
||||
//اگر تاریخ شروع طرح بین بازه اولین شروع بکار و ترک کار قرار گرفت
|
||||
if (leftWorkStart.StartWorkDateGr == firstStartWorkDate)
|
||||
{
|
||||
var changedLeftwork = new LeftWorkViewModel()
|
||||
{
|
||||
Id = leftWorkStart.Id,
|
||||
StartWorkDateGr = schemeStart,
|
||||
StartWorkDate = schemeStart.ToFarsi(),
|
||||
LeftWorkDateGr = leftWorkStart.LeftWorkDateGr,
|
||||
HasLeft = leftWorkStart.HasLeft,
|
||||
};
|
||||
|
||||
leftWorkList.Remove(leftWorkStart);
|
||||
leftWorkList.Add(changedLeftwork);
|
||||
firstStartWork = schemeStart.ToFarsi();
|
||||
}
|
||||
else //اگر تاریخ شروع طرح در بازه شروع به ترک کارهایی بعد از اولین قرارگرفت
|
||||
{
|
||||
//لیست شروع بکار/ ترک کارهایی که باید حذف شوند
|
||||
var leftWorksToBeRemove = leftWorkList.Where(x => x.StartWorkDateGr < leftWorkStart.StartWorkDateGr)
|
||||
.ToList();
|
||||
foreach (var item in leftWorksToBeRemove.ToList())
|
||||
{
|
||||
leftWorkList.Remove(item);
|
||||
}
|
||||
|
||||
var changedLeftwork = new LeftWorkViewModel()
|
||||
{
|
||||
Id = leftWorkStart.Id,
|
||||
StartWorkDateGr = schemeStart,
|
||||
StartWorkDate = schemeStart.ToFarsi(),
|
||||
LeftWorkDateGr = leftWorkStart.LeftWorkDateGr,
|
||||
HasLeft = leftWorkStart.HasLeft,
|
||||
};
|
||||
firstStartWork = schemeStart.ToFarsi();
|
||||
leftWorkList.Remove(leftWorkStart);
|
||||
leftWorkList.Add(changedLeftwork);
|
||||
}
|
||||
|
||||
}
|
||||
else //اگر شروع طرح در فاصله بین شروع بکار/ترک کارها بود
|
||||
{
|
||||
//لیست شروع بکار/ ترک کارهایی که باید حذف شوند
|
||||
var leftWorksToBeRemove = leftWorkList.Where(x => x.StartWorkDateGr < schemeStart)
|
||||
.ToList();
|
||||
foreach (var item in leftWorksToBeRemove.ToList())
|
||||
{
|
||||
leftWorkList.Remove(item);
|
||||
}
|
||||
|
||||
leftWorkList = leftWorkList.OrderBy(x => x.StartWorkDateGr).ToList();
|
||||
firstStartWork = leftWorkList.First().StartWorkDate;
|
||||
|
||||
}
|
||||
}
|
||||
//مرتب سازی
|
||||
leftWorkList = leftWorkList.OrderBy(x => x.StartWorkDateGr).ToList();
|
||||
|
||||
|
||||
//مقادیر سالانه
|
||||
var salary = await _context.YearlySalaries.OrderByDescending(x => x.EndDate).Include(x => x.YearlySalaryItemsList).ToListAsync();
|
||||
|
||||
//مزد سنوات طبقه بندی
|
||||
var classifiedBaseYearList =await _context.ClassifiedSalaries.ToListAsync();
|
||||
|
||||
//آیا در حلقه کبیشه بودن چک شود
|
||||
bool checkKabiseh = true;
|
||||
var isKabiseh = false;
|
||||
var EndOfYaerDate = new DateTime();
|
||||
//لیست تاریخ هایی که پایه سنوات تعلق گرفته
|
||||
var baseYearDateList = new List<DateTime>();
|
||||
|
||||
double baseYear = 0;
|
||||
|
||||
//اگر تاریخ پایان طرح خالی نبود
|
||||
if (schemeEnd.HasValue)
|
||||
{
|
||||
//اگر تاریخ پایان طرخ از تاریخ پایان قرارداد کوچکتر بود
|
||||
//در نتیجه تاریخ پاینه محاسبات همان پایان طرح است
|
||||
if (schemeEnd.Value < contractEnd)
|
||||
contractEnd = schemeEnd.Value;
|
||||
}
|
||||
|
||||
//اگر فقط یک شروع بکار داشت
|
||||
if (leftWorkList.Count < 2)
|
||||
{
|
||||
var leftWork = leftWorkList.First();
|
||||
//اگر ترک کار کرده بود پایان چرخه تاریخ آخرین روز کاری اوست
|
||||
var endComputeDate = leftWork.HasLeft && leftWork.LeftWorkDateGr <= contractEnd ? leftWork.LeftWorkDateGr.AddDays(-1) : contractEnd;
|
||||
//شروع چرخه شروع بکار پرسنل
|
||||
var startComputeDate = leftWork.StartWorkDateGr;
|
||||
|
||||
|
||||
for (var current = startComputeDate; current <= endComputeDate; current = current.AddDays(1))
|
||||
{
|
||||
var currentChanges = new DateTime(current.Year, current.Month, current.Day);
|
||||
|
||||
if (checkKabiseh)
|
||||
{
|
||||
|
||||
isKabiseh = ($"{current.ToFarsi()}").YearTotalDays() == 367 ? true : false;
|
||||
string kabise = "";
|
||||
if (isKabiseh)
|
||||
kabise = "kabise";
|
||||
var currentChangesPc = currentChanges.ToPersianDateTime();
|
||||
EndOfYaerDate = isKabiseh ? ($"{currentChangesPc.AddDays(365)}").ToGeorgianDateTime() : ($"{currentChangesPc.AddDays(364)}").ToGeorgianDateTime();
|
||||
Console.WriteLine($" start : {current.ToFarsi()} {kabise}");
|
||||
}
|
||||
|
||||
checkKabiseh = false;
|
||||
if (current == EndOfYaerDate)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var a = current.AddDays(1);
|
||||
if (a <= endComputeDate)
|
||||
{
|
||||
checkKabiseh = true;
|
||||
baseYearDateList.Add(a);
|
||||
Console.WriteLine($" End : {a.ToFarsi()}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else //اگر بیش از یک شروع بکار داشت
|
||||
{
|
||||
int max365 = 0;
|
||||
int dayCounter = 0;
|
||||
bool hasCute = false;
|
||||
foreach (var leftWork in leftWorkList)
|
||||
{
|
||||
//اگر ترک کار کرده بود پایان چرخه تاریخ آخرین روز کاری اوست
|
||||
var endComputeDate = leftWork.HasLeft && leftWork.LeftWorkDateGr <= contractEnd ? leftWork.LeftWorkDateGr.AddDays(-1) : contractEnd;
|
||||
//شروع چرخه شروع بکار پرسنل
|
||||
var startComputeDate = leftWork.StartWorkDateGr;
|
||||
|
||||
for (var current = startComputeDate; current <= endComputeDate; current = current.AddDays(1))
|
||||
{
|
||||
|
||||
if (checkKabiseh && dayCounter == 0)
|
||||
{
|
||||
|
||||
isKabiseh = ($"{current.ToFarsi()}").YearTotalDays() == 367 ? true : false;
|
||||
string kabise = "";
|
||||
if (isKabiseh)
|
||||
kabise = "kabise";
|
||||
|
||||
max365 = isKabiseh ? 366 : 365;
|
||||
Console.WriteLine($" start : {current.ToFarsi()} {kabise}");
|
||||
}
|
||||
|
||||
dayCounter += 1;
|
||||
checkKabiseh = false;
|
||||
|
||||
if (dayCounter == max365)
|
||||
{
|
||||
|
||||
var a = !hasCute ? current.AddDays(1) : current;
|
||||
if (a <= endComputeDate)
|
||||
{
|
||||
checkKabiseh = true;
|
||||
baseYearDateList.Add(a);
|
||||
Console.WriteLine($" End : {a.ToFarsi()}");
|
||||
Console.WriteLine(dayCounter);
|
||||
if (hasCute)
|
||||
{
|
||||
dayCounter = 1;
|
||||
isKabiseh = ($"{current.ToFarsi()}").YearTotalDays() == 367 ? true : false;
|
||||
max365 = isKabiseh ? 366 : 365;
|
||||
|
||||
string kabise = "";
|
||||
if (isKabiseh)
|
||||
kabise = "kabise";
|
||||
Console.WriteLine($" start : {current.ToFarsi()} {kabise}");
|
||||
}
|
||||
else
|
||||
{
|
||||
dayCounter = 0;
|
||||
}
|
||||
hasCute = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
hasCute = true;
|
||||
max365 += 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
double selectBase = 0;
|
||||
var baseList = new List<(double baseYaer, DateTime start, DateTime end, string baseYearPay, DateTime baseYearPayGr, string year, bool hasStartWork, bool hasLeftWork, string groupNo)>();
|
||||
|
||||
|
||||
if (baseYearDateList.Count > 0)
|
||||
{
|
||||
var firstBaseYearDate = baseYearDateList.First();
|
||||
var res = MonthByMonthList(firstBaseYearDate, contractEnd);
|
||||
var firstbasicSalari =
|
||||
salary.FirstOrDefault(x => x.StartDate <= firstBaseYearDate && x.EndDate >= firstBaseYearDate);
|
||||
var firstClassifiedBaseYear = classifiedBaseYearList.FirstOrDefault(x => x.StartDate <= firstBaseYearDate && x.EndDate >= firstBaseYearDate);
|
||||
|
||||
//پایه سنوات سال جاری
|
||||
var firstGroupData = employeeGroupMemberData.FirstOrDefault(x => x.startGroupDate <= firstBaseYearDate && x.EndGroupDate >= firstBaseYearDate);
|
||||
|
||||
groupNo = firstGroupData.GroupNo;
|
||||
var firstBasicObject = Tools.GetDynamicDouble(firstClassifiedBaseYear, $"Group{groupNo}");
|
||||
double firstBasic = firstBasicObject != null ? firstBasicObject.Value : 0;
|
||||
var firstfixFeePercentage = firstbasicSalari
|
||||
.YearlySalaryItemsList.Where(x => x.ItemName == "درصد مزد ثابت").Select(x => x.ItemValue).FirstOrDefault();
|
||||
|
||||
// پایه سنوات سال قبل ضربدر درصد مزد ثابت تقسیم بر صد
|
||||
//var beforePercntBaseYear = ((beforBaseStart * firstfixFeePercentage) / 100) + beforBaseStart;
|
||||
//firstBasic += beforePercntBaseYear;
|
||||
baseYear = firstBasic;
|
||||
res = res.Where(x => x.start != firstBaseYearDate).OrderBy(x => x.start).ToList();
|
||||
//var afterSalary = salary.Where(x => x.StartDate > firstbasicSalari.EndDate).ToList();
|
||||
|
||||
|
||||
var first = (firstBasic, firstbasicSalari.StartDate, firstbasicSalari.EndDate, firstBaseYearDate.ToFarsi(), firstBaseYearDate, firstbasicSalari.Year, false, false, $"گروه {groupNo}");
|
||||
baseList.Add(first);
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"{1398} -> firstBasic : {firstBasic}");
|
||||
var lastItem = res.Count > 1 ? res.Last() : res.FirstOrDefault();
|
||||
foreach (var item in res)
|
||||
{
|
||||
var lastReecord = baseList.Last();
|
||||
var year = Convert.ToInt32(item.start.ToFarsi().Substring(0, 4));
|
||||
if (item.start > lastReecord.end && lastReecord.year != $"{year}")
|
||||
{
|
||||
|
||||
|
||||
var selectedSalary = salary.Where(x => x.Year == $"{year}").OrderBy(x => x.StartDate).ToList();
|
||||
var currentSalary = selectedSalary.First();
|
||||
if (selectedSalary.Count > 1)
|
||||
{
|
||||
currentSalary = selectedSalary.Last();
|
||||
var firstSalery = selectedSalary.First();
|
||||
if (baseYearDateList.Any(x => x >= firstSalery.StartDate && x <= firstSalery.EndDate) || lastItem.end < currentSalary.StartDate)
|
||||
{
|
||||
currentSalary = firstSalery;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var selectedBaseYear = classifiedBaseYearList.Where(x => x.Year == year).OrderBy(x => x.StartDate).ToList();
|
||||
var currentBaseYear = selectedBaseYear.First();
|
||||
if (selectedBaseYear.Count > 1)
|
||||
{
|
||||
currentBaseYear = selectedBaseYear.Last();
|
||||
var firstBaseYear = selectedBaseYear.First();
|
||||
if (baseYearDateList.Any(x => x >= firstBaseYear.StartDate && x <= firstBaseYear.EndDate) || lastItem.end < currentBaseYear.StartDate)
|
||||
{
|
||||
currentBaseYear = firstBaseYear;
|
||||
}
|
||||
}
|
||||
|
||||
//درصد مزد ثابت تاریخ جاری
|
||||
var fixFeePercentage = currentSalary
|
||||
.YearlySalaryItemsList.Where(x => x.ItemName == "درصد مزد ثابت").Select(x => x.ItemValue).FirstOrDefault();
|
||||
|
||||
// پایه سنوات سال قبل ضربدر درصد مزد ثابت تقسیم بر صد
|
||||
var percntBaseYear = ((lastReecord.baseYaer * fixFeePercentage) / 100) + lastReecord.baseYaer;
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
|
||||
|
||||
var transferGroupData = employeeGroupMemberData.FirstOrDefault(x => x.startGroupDate <= currentBaseYear.EndDate && x.EndGroupDate >= currentBaseYear.StartDate);
|
||||
|
||||
groupNo = transferGroupData.GroupNo;
|
||||
|
||||
var currentBasicObject = Tools.GetDynamicDouble(currentBaseYear, $"Group{groupNo}");
|
||||
double currentBasic = currentBasicObject != null ? currentBasicObject.Value : 0;
|
||||
//var currentBasic = currentSalary
|
||||
// .YearlySalaryItemsList.Where(x => x.ItemName == "پایه سنوات").Select(x => x.ItemValue).FirstOrDefault();
|
||||
Console.WriteLine($"{year} -> [{lastReecord.baseYaer} * {fixFeePercentage} /100 + {lastReecord.baseYaer}] = {percntBaseYear} => [{currentBasic} + {percntBaseYear}] = {currentBasic + percntBaseYear} ");
|
||||
|
||||
if (!baseYearDateList.Any(x => x >= currentBaseYear.StartDate && x <= currentBaseYear.EndDate))
|
||||
currentBasic = 0;
|
||||
|
||||
var currentBase = currentBasic + percntBaseYear;
|
||||
|
||||
baseYear = currentBase;
|
||||
var baseYearPay = "-";
|
||||
var baseYearPayDayGr = new DateTime();
|
||||
if (baseYearDateList.Any(x => x >= currentBaseYear.StartDate && x <= currentBaseYear.EndDate))
|
||||
{
|
||||
var existBaseYear = baseYearDateList.FirstOrDefault(x => x >= currentBaseYear.StartDate && x <= currentBaseYear.EndDate);
|
||||
baseYearPay = existBaseYear.ToFarsi();
|
||||
baseYearPayDayGr = new DateTime(existBaseYear.Year, existBaseYear.Month, existBaseYear.Day, 17, 01, 01);
|
||||
}
|
||||
else
|
||||
{
|
||||
baseYearPayDayGr = new DateTime(item.start.Year, item.start.Month, item.start.Day, 17, 01, 01);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
Console.WriteLine(baseYearPay);
|
||||
Console.ResetColor();
|
||||
|
||||
// var round = GetCurrectFirstDailyFee(currentBase, $"{year}");
|
||||
var record = (baseYear, currentSalary.StartDate, currentSalary.EndDate, baseYearPay, baseYearPayDayGr, currentSalary.Year, false, false, $"گروه {groupNo}");
|
||||
baseList.Add(record);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Console.ResetColor();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
selectBase = baseList.Any() ? baseList.Last().baseYaer : 0;
|
||||
//افزودن تاریخ های شروع بکار و ترک کار به لیست
|
||||
foreach (var left in leftWorkList)
|
||||
{
|
||||
var startWork = (0, new DateTime(), new DateTime(), left.StartWorkDateGr.ToFarsi(), left.StartWorkDateGr, "-", true, false, "");
|
||||
baseList.Add(startWork);
|
||||
|
||||
if (left.HasLeft)
|
||||
{
|
||||
var leftWork = (0, new DateTime(), new DateTime(), left.LeftWorkDateGr.ToFarsi(), left.LeftWorkDateGr, "-", false, true, "");
|
||||
baseList.Add(leftWork);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
baseYearResult = new BaseYearDataViewModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
EmployeeId = employeeId,
|
||||
BaseYearResult = selectBase,
|
||||
FirstWorkDayInLeftWork = firstStartWork,
|
||||
BaseYearDataList = baseList.Select(x => new BaseYearDataList()
|
||||
{
|
||||
BaseYear = x.baseYaer,
|
||||
|
||||
StartDateGr = x.start,
|
||||
EndDateGr = x.end,
|
||||
BaseYearPayDay = x.baseYearPay,
|
||||
BaseYearPayDayGr = x.baseYearPayGr,
|
||||
StartDateFa = x.start.ToFarsi(),
|
||||
EndDateFa = x.end.ToFarsi(),
|
||||
Year = x.year,
|
||||
HasLeftWork = x.hasLeftWork,
|
||||
HasStartWork = x.hasStartWork,
|
||||
GroupNo = x.groupNo,
|
||||
}).OrderBy(x => x.BaseYearPayDayGr).ToList(),
|
||||
|
||||
};
|
||||
Console.WriteLine("BaseYear : " + selectBase);
|
||||
return baseYearResult;
|
||||
}
|
||||
|
||||
public async Task DeleteClassificationScheme(long id)
|
||||
{
|
||||
var scheme = Get(id);
|
||||
if (scheme != null)
|
||||
{
|
||||
_context.Remove(scheme);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// متد کمکی پایه سنوات
|
||||
/// </summary>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
private List<(DateTime start, DateTime end)> MonthByMonthList(DateTime startDate, DateTime endDate)
|
||||
{
|
||||
|
||||
var start = startDate.ToFarsi();
|
||||
var end = endDate.ToFarsi();
|
||||
var ContractPreiodsList = new List<(DateTime start, DateTime end)>();
|
||||
|
||||
|
||||
var syear = Convert.ToInt32(start.Substring(0, 4));
|
||||
var smonth = Convert.ToInt32(start.Substring(5, 2));
|
||||
var sday = Convert.ToInt32(start.Substring(8, 2));
|
||||
|
||||
var eyear = Convert.ToInt32(end.Substring(0, 4));
|
||||
var emonth = Convert.ToInt32(end.Substring(5, 2));
|
||||
var eday = Convert.ToInt32(end.Substring(8, 2));
|
||||
|
||||
var PersianStartDate = new PersianDateTime(syear, smonth, sday);
|
||||
var PersianStartDateAddingMount = new PersianDateTime(syear, smonth, 1);
|
||||
var PersianEndDate = new PersianDateTime(eyear, emonth, eday);
|
||||
|
||||
|
||||
|
||||
var totalmonth = ((PersianEndDate.Year - PersianStartDateAddingMount.Year) * 12) + (PersianEndDate.Month - PersianStartDateAddingMount.Month) + 1;
|
||||
for (int i = 0; i < totalmonth; i++)
|
||||
{
|
||||
|
||||
|
||||
var currentEndDate = PersianStartDateAddingMount.AddMonths(1).AddDays(-1);
|
||||
if (currentEndDate > PersianEndDate)
|
||||
{
|
||||
currentEndDate = PersianEndDate;
|
||||
}
|
||||
|
||||
DateTime startPeriod = ($"{PersianStartDate}").ToGeorgianDateTime();
|
||||
DateTime endPeriod = ($"{currentEndDate}").ToGeorgianDateTime();
|
||||
var record = (startPeriod, endPeriod);
|
||||
ContractPreiodsList.Add(record);
|
||||
//Console.WriteLine($"Month {i + 1} : {PersianStartDate.ToString("yyyy-MM-dd")} to {currentEndDate.ToString("yyyy-MM-dd")}");
|
||||
|
||||
PersianStartDate = PersianStartDate.AddMonths(1);
|
||||
PersianStartDate = new PersianDateTime(PersianStartDate.Year, PersianStartDate.Month, 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ContractPreiodsList;
|
||||
}
|
||||
}
|
||||
@@ -2008,7 +2008,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
DiscountedAmount = discountAmount.ToMoney(),
|
||||
DiscountPercetage = request.DiscountPercentage,
|
||||
Installments = InstitutionMonthlyInstallmentCaculation((int)request.Duration,
|
||||
totalAmount, DateTime.Now.ToFarsi()),
|
||||
paymentAmount, DateTime.Now.ToFarsi()),
|
||||
OneMonthAmount = discountedOneMonthAmount.ToMoney(),
|
||||
Obligation = totalAmount.ToMoney()
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.JobAgg;
|
||||
using CompanyManagment.App.Contracts.Job;
|
||||
@@ -83,6 +84,32 @@ public class JobRepository: RepositoryBase<long, Job>, IJobRepository
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<JobViewModel>> JobSearchSelect(string searchtText)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchtText))
|
||||
{
|
||||
var query =_context.Jobs.Select(x => new JobViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
JobName = x.JobName,
|
||||
JobCode = x.JobCode
|
||||
});
|
||||
query = query.Where(x => x.JobName.Contains(searchtText));
|
||||
var jobViewModelList =await query.Take(100).Select(x => new JobViewModel
|
||||
{
|
||||
Id = x.Id,
|
||||
JobName = x.JobName,
|
||||
JobCode = x.JobCode
|
||||
}).ToListAsync();
|
||||
return jobViewModelList;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<JobViewModel>();
|
||||
}
|
||||
}
|
||||
|
||||
// public async Task<List<JobViewModel>> GetJobListByText(string searchtText)
|
||||
public List<JobViewModel> GetJobListByText(string searchtText)
|
||||
{
|
||||
|
||||
@@ -233,6 +233,128 @@ using File.EfCore.Repository;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using P_TextManager.Domin.TextManagerAgg;
|
||||
using CompanyManagment.App.Contracts.CrossJobItems;
|
||||
using Company.Domain.CrossJobItemsAgg;
|
||||
using Company.Domain.DateSalaryAgg;
|
||||
using Company.Domain.DateSalaryItemAgg;
|
||||
using Company.Domain.FinancialStatmentAgg;
|
||||
using Company.Domain.FinancialTransactionAgg;
|
||||
using Company.Domain.GroupPlanAgg;
|
||||
using Company.Domain.GroupPlanJobItemAgg;
|
||||
using Company.Domain.InstitutionContractAgg;
|
||||
using Company.Domain.InstitutionContractContactInfoAgg;
|
||||
using CompanyManagment.App.Contracts.Insurance;
|
||||
using Company.Domain.InsuranceAgg;
|
||||
using Company.Domain.InsuranceEmployeeInfoAgg;
|
||||
using Company.Domain.InsuranceJobItemAgg;
|
||||
using Company.Domain.InsuranceListAgg;
|
||||
using Company.Domain.InsurancJobAgg;
|
||||
using Company.Domain.InsurancWorkshopInfoAgg;
|
||||
using Company.Domain.LeftWorkInsuranceAgg;
|
||||
using Company.Domain.PaymentToEmployeeAgg;
|
||||
using Company.Domain.PaymentToEmployeeItemAgg;
|
||||
using Company.Domain.PercentageAgg;
|
||||
using Company.Domain.PersonnelCodeAgg;
|
||||
using Company.Domain.SmsResultAgg;
|
||||
using Company.Domain.WorkingHoursTempAgg;
|
||||
using Company.Domain.WorkingHoursTempItemAgg;
|
||||
using Company.Domain.WorkshopPlanAgg;
|
||||
using Company.Domain.WorkshopPlanEmployeeAgg;
|
||||
using Company.Domain.ZoneAgg;
|
||||
using CompanyManagment.App.Contracts.ClassifiedSalary;
|
||||
using CompanyManagment.App.Contracts.DateSalary;
|
||||
using CompanyManagment.App.Contracts.DateSalaryItem;
|
||||
using CompanyManagment.App.Contracts.EmployeeInsurancListData;
|
||||
using CompanyManagment.App.Contracts.FinancialStatment;
|
||||
using CompanyManagment.App.Contracts.FinancilTransaction;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||
using CompanyManagment.App.Contracts.InsuranceEmployeeInfo;
|
||||
using CompanyManagment.App.Contracts.InsuranceJob;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using CompanyManagment.App.Contracts.InsuranceWorkshopInfo;
|
||||
using CompanyManagment.App.Contracts.LeftWorkInsurance;
|
||||
using CompanyManagment.App.Contracts.PaymentToEmployee;
|
||||
using CompanyManagment.App.Contracts.Percentage;
|
||||
using CompanyManagment.App.Contracts.PersonnleCode;
|
||||
using CompanyManagment.App.Contracts.SmsResult;
|
||||
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||
using CompanyManagment.App.Contracts.WorkingHoursTempItem;
|
||||
using CompanyManagment.App.Contracts.WorkshopPlan;
|
||||
using CompanyManagment.App.Contracts.Zone;
|
||||
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Company.Domain.InsuranceYearlySalaryAgg;
|
||||
using Company.Domain.ReportAgg;
|
||||
using Company.Domain.RollCallAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using Company.Domain.RollCallPlanAgg;
|
||||
using Company.Domain.RollCallServiceAgg;
|
||||
using CompanyManagment.App.Contracts.InsuranceYearlySalary;
|
||||
using CompanyManagment.App.Contracts.Report;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.App.Contracts.RollCallPlan;
|
||||
using Company.Domain.ReportClientAgg;
|
||||
using Company.Domain.TaxJobCategoryAgg;
|
||||
using Company.Domain.WorkshopAccountAgg;
|
||||
using CompanyManagment.App.Contracts.ReportClient;
|
||||
using CompanyManagment.App.Contracts.TaxJobCategory;
|
||||
using Company.Domain.RollCallEmployeeStatusAgg;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using Company.Domain.CustomizeWorkshopEmployeeSettingsAgg;
|
||||
using Company.Domain.CustomizeWorkshopGroupSettingsAgg;
|
||||
using Company.Domain.CustomizeWorkshopSettingsAgg;
|
||||
using Company.Domain.FineAgg;
|
||||
using Company.Domain.LoanAgg;
|
||||
using Company.Domain.RewardAgg;
|
||||
using Company.Domain.SalaryAidAgg;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
using CompanyManagment.App.Contracts.Fine;
|
||||
using CompanyManagment.App.Contracts.Loan;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
using CompanyManagment.App.Contracts.SalaryAid;
|
||||
using Company.Domain.AndroidApkVersionAgg;
|
||||
using Company.Domain.BankAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using Company.Domain.FineSubjectAgg;
|
||||
using CompanyManagment.App.Contracts.FineSubject;
|
||||
using Company.Domain.CustomizeCheckoutAgg;
|
||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||
using Company.Domain.WorkshopSubAccountAgg;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg;
|
||||
using Company.Domain.EmployeeBankInformationAgg;
|
||||
using Company.Domain.RollCallAgg.DomainService;
|
||||
using CompanyManagment.App.Contracts.Bank;
|
||||
using CompanyManagment.App.Contracts.EmployeeBankInformation;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using CompanyManagement.Infrastructure.Excel.SalaryAid;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
using Company.Domain.EmployeeClientTempAgg;
|
||||
using Company.Domain.InstitutionPlanAgg;
|
||||
using Company.Domain.LeftWorkTempAgg;
|
||||
using Company.Domain.TemporaryClientRegistrationAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeClientTemp;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
using Company.Domain.EmployeeAuthorizeTempAgg;
|
||||
using Company.Domain.AdminMonthlyOverviewAgg;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Company.Domain.ContractingPartyBankAccountsAgg;
|
||||
using Company.Domain.PaymentInstrumentAgg;
|
||||
using Company.Domain.PaymentTransactionAgg;
|
||||
using CompanyManagment.App.Contracts.AdminMonthlyOverview;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
using CompanyManagment.App.Contracts.PaymentTransaction;
|
||||
using CompanyManagment.App.Contracts.PaymentCallback;
|
||||
using CompanyManagment.App.Contracts.SepehrPaymentGateway;
|
||||
using Company.Domain.CameraBugReportAgg;
|
||||
@@ -571,6 +693,21 @@ public class PersonalBootstrapper
|
||||
#endregion
|
||||
//=========End Of Main====================================
|
||||
|
||||
|
||||
#region ClassificationScheme
|
||||
|
||||
services.AddTransient<IClassificationSchemeApplication, ClassificationSchemeApplication>();
|
||||
services.AddTransient<IClassificationSchemeRepository, ClassificationSchemeRepository>();
|
||||
|
||||
|
||||
services.AddTransient<IClassificationGroupRepository, ClassificationGroupRepository>();
|
||||
services.AddTransient<IClassificationGroupSalariesRepository, ClassificationGroupSalariesRepository>();
|
||||
services.AddTransient<IClassificationRialCoefficientRepository, ClassificationRialCoefficientRepository>();
|
||||
services.AddTransient<IClassificationEmployeeRepository, ClassificationEmployeeRepository>();
|
||||
|
||||
#endregion
|
||||
//=========End Of Main====================================
|
||||
|
||||
//---File Project------------------------------------
|
||||
|
||||
services.AddTransient<IBoardApplication, BoardApplication>();
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
using CompanyManagment.Application;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ServiceHost.BaseControllers;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Controllers;
|
||||
|
||||
public class ClassificationSchemeController : AdminBaseController
|
||||
{
|
||||
private readonly IClassificationSchemeApplication _classificationSchemeApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
|
||||
public ClassificationSchemeController(IClassificationSchemeApplication classificationSchemeApplication, IAuthHelper authHelper)
|
||||
{
|
||||
_classificationSchemeApplication = classificationSchemeApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرح
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<ClassificationSchemeListDto>> GetList(long workshopId)
|
||||
{
|
||||
var result =await _classificationSchemeApplication.GetClassificationSchemeList(workshopId);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Scheme")]
|
||||
public async Task<ActionResult<OperationResult>> CreateScheme([FromBody] CreateClassificationSchemeDto command)
|
||||
{
|
||||
var result = await _classificationSchemeApplication.CreateClassificationScheme(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetSchemeToEdit")]
|
||||
public async Task<EditClassificationSchemeDto> GetSchemeToEdit(long id)
|
||||
{
|
||||
var result = await _classificationSchemeApplication.GetClassificationScheme(id);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("Scheme")]
|
||||
public async Task<ActionResult<OperationResult>> EditScheme([FromBody] EditClassificationSchemeDto command)
|
||||
{
|
||||
var result =await _classificationSchemeApplication.EditClassificationScheme(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// چگ کردن شرایط حذف طرح
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("CheckToDeleteScheme")]
|
||||
public async Task<CheckStatusToDeleteScheme> CheckToDeleteScheme(long id)
|
||||
{
|
||||
var result =await _classificationSchemeApplication.CheckToDeleteScheme(id);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// حذف طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete]
|
||||
public async Task<ActionResult<OperationResult>> DeleteScheme(long id)
|
||||
{
|
||||
var result = await _classificationSchemeApplication.DeleteScheme(id);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -8,102 +8,101 @@ using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ServiceHost.BaseControllers;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Controllers
|
||||
namespace ServiceHost.Areas.Admin.Controllers;
|
||||
|
||||
public class RegistrationWorkflowController : AdminBaseController
|
||||
{
|
||||
public class RegistrationWorkflowController : AdminBaseController
|
||||
private readonly ITemporaryClientRegistrationApplication _temporaryClientRegistrationApplication;
|
||||
private readonly IInstitutionContractApplication _institutionContractApplication;
|
||||
private readonly IEmployerApplication _employerApplication;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
|
||||
|
||||
public RegistrationWorkflowController(ITemporaryClientRegistrationApplication temporaryClientRegistrationApplication,
|
||||
IInstitutionContractApplication institutionContractApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication)
|
||||
{
|
||||
private readonly ITemporaryClientRegistrationApplication _temporaryClientRegistrationApplication;
|
||||
private readonly IInstitutionContractApplication _institutionContractApplication;
|
||||
private readonly IEmployerApplication _employerApplication;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
|
||||
|
||||
public RegistrationWorkflowController(ITemporaryClientRegistrationApplication temporaryClientRegistrationApplication,
|
||||
IInstitutionContractApplication institutionContractApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication)
|
||||
{
|
||||
_temporaryClientRegistrationApplication = temporaryClientRegistrationApplication;
|
||||
_institutionContractApplication = institutionContractApplication;
|
||||
_employerApplication = employerApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارپوشه ثبت نام
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<List<RegistrationWorkflowMainListViewModel>>> GetList()
|
||||
{
|
||||
var result = await _institutionContractApplication.RegistrationWorkflowMainList();
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpGet("items/{institutionContractId}")]
|
||||
public async Task<ActionResult<List<RegistrationWorkflowItemsViewModel>>> RegistrationWorkflowItems(
|
||||
long institutionContractId)
|
||||
{
|
||||
var result = await _institutionContractApplication.RegistrationWorkflowItems(institutionContractId);
|
||||
return result;
|
||||
}
|
||||
[HttpPost("create-employer")]
|
||||
public async Task<ActionResult<OperationResult>> CreateEmployerForWorkshopDetails([FromBody]CreateEmployerWorkflowRegistration command)
|
||||
{
|
||||
var result = await _employerApplication.CreateWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpGet("create-workshop")]
|
||||
public async Task<ActionResult<InstitutionContractWorkshopDetailViewModel>> GetWorkshopDetails(long workshopDetailsId)
|
||||
{
|
||||
var res =await _institutionContractApplication.GetWorkshopInitialDetails(workshopDetailsId);
|
||||
return res;
|
||||
}
|
||||
|
||||
[HttpPost("create-workshop")]
|
||||
public async Task<ActionResult<OperationResult>> CreateWorkshop(
|
||||
[FromBody]CreateWorkshopWorkflowRegistration command)
|
||||
{
|
||||
var result = await _workshopApplication.CreateWorkshopWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
[HttpPost("auth-employer")]
|
||||
public async Task<ActionResult<OperationResult<AuthenticateUserViewModel>>> AuthenticateEmployer( [FromBody]AuthenticateEmployerWorkflowRequest command)
|
||||
{
|
||||
var result = await _employerApplication.AuthenticateEmployer(command.NationalCode, command.DateOfBirth, command.Mobile);
|
||||
return result;
|
||||
}
|
||||
[HttpPut("edit-employer")]
|
||||
public async Task<ActionResult<OperationResult>> EditEmployerForWorkshopDetails([FromBody]EditEmployerWorkflowRegistration command)
|
||||
{
|
||||
var result = await _employerApplication.EditWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
[HttpGet("edit-employer/{employerId}/{institutionWorkshopDetailsId}")]
|
||||
|
||||
public async Task<ActionResult<EditEmployerWorkflowRegistration>> GetEmployerForEdit(long employerId, long institutionWorkshopDetailsId)
|
||||
{
|
||||
var result = await _employerApplication.GetWorkflowRegistrationForEdit(employerId, institutionWorkshopDetailsId);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما از گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="employerId">شناسه کارفرما</param>
|
||||
/// <param name="institutionWorkshopDetailsId">شناسه جزئیات کارگاه موسسه</param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("delete-employer/{employerId}/{institutionWorkshopDetailsId}")]
|
||||
public async Task<ActionResult<OperationResult>> DeleteEmployerWorkflowRegistration(long employerId, long institutionWorkshopDetailsId)
|
||||
{
|
||||
var result = await _employerApplication.DeleteWorkflowRegistration(employerId, institutionWorkshopDetailsId);
|
||||
return result;
|
||||
}
|
||||
_temporaryClientRegistrationApplication = temporaryClientRegistrationApplication;
|
||||
_institutionContractApplication = institutionContractApplication;
|
||||
_employerApplication = employerApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
}
|
||||
|
||||
public class AuthenticateEmployerWorkflowRequest
|
||||
/// <summary>
|
||||
/// لیست کارپوشه ثبت نام
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<List<RegistrationWorkflowMainListViewModel>>> GetList()
|
||||
{
|
||||
public string NationalCode { get; set; }
|
||||
public string DateOfBirth { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
var result = await _institutionContractApplication.RegistrationWorkflowMainList();
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpGet("items/{institutionContractId}")]
|
||||
public async Task<ActionResult<List<RegistrationWorkflowItemsViewModel>>> RegistrationWorkflowItems(
|
||||
long institutionContractId)
|
||||
{
|
||||
var result = await _institutionContractApplication.RegistrationWorkflowItems(institutionContractId);
|
||||
return result;
|
||||
}
|
||||
[HttpPost("create-employer")]
|
||||
public async Task<ActionResult<OperationResult>> CreateEmployerForWorkshopDetails([FromBody]CreateEmployerWorkflowRegistration command)
|
||||
{
|
||||
var result = await _employerApplication.CreateWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpGet("create-workshop")]
|
||||
public async Task<ActionResult<InstitutionContractWorkshopDetailViewModel>> GetWorkshopDetails(long workshopDetailsId)
|
||||
{
|
||||
var res =await _institutionContractApplication.GetWorkshopInitialDetails(workshopDetailsId);
|
||||
return res;
|
||||
}
|
||||
|
||||
[HttpPost("create-workshop")]
|
||||
public async Task<ActionResult<OperationResult>> CreateWorkshop(
|
||||
[FromBody]CreateWorkshopWorkflowRegistration command)
|
||||
{
|
||||
var result = await _workshopApplication.CreateWorkshopWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
[HttpPost("auth-employer")]
|
||||
public async Task<ActionResult<OperationResult<AuthenticateUserViewModel>>> AuthenticateEmployer( [FromBody]AuthenticateEmployerWorkflowRequest command)
|
||||
{
|
||||
var result = await _employerApplication.AuthenticateEmployer(command.NationalCode, command.DateOfBirth, command.Mobile);
|
||||
return result;
|
||||
}
|
||||
[HttpPut("edit-employer")]
|
||||
public async Task<ActionResult<OperationResult>> EditEmployerForWorkshopDetails([FromBody]EditEmployerWorkflowRegistration command)
|
||||
{
|
||||
var result = await _employerApplication.EditWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
[HttpGet("edit-employer/{employerId}/{institutionWorkshopDetailsId}")]
|
||||
|
||||
public async Task<ActionResult<EditEmployerWorkflowRegistration>> GetEmployerForEdit(long employerId, long institutionWorkshopDetailsId)
|
||||
{
|
||||
var result = await _employerApplication.GetWorkflowRegistrationForEdit(employerId, institutionWorkshopDetailsId);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما از گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="employerId">شناسه کارفرما</param>
|
||||
/// <param name="institutionWorkshopDetailsId">شناسه جزئیات کارگاه موسسه</param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("delete-employer/{employerId}/{institutionWorkshopDetailsId}")]
|
||||
public async Task<ActionResult<OperationResult>> DeleteEmployerWorkflowRegistration(long employerId, long institutionWorkshopDetailsId)
|
||||
{
|
||||
var result = await _employerApplication.DeleteWorkflowRegistration(employerId, institutionWorkshopDetailsId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class AuthenticateEmployerWorkflowRequest
|
||||
{
|
||||
public string NationalCode { get; set; }
|
||||
public string DateOfBirth { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,670 +0,0 @@
|
||||
@using _0_Framework.Application
|
||||
@model CompanyManagment.App.Contracts.Insurance.CreateInsurance
|
||||
@{
|
||||
<style>
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content .modal-footer {
|
||||
padding-top: unset !important;
|
||||
}
|
||||
|
||||
p {
|
||||
direction: ltr !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.error {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#datatable2 {
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
th, td {
|
||||
min-width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
/* panel */
|
||||
.panel {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.panel .panel-heading {
|
||||
padding: 5px 5px 0 5px;
|
||||
}
|
||||
|
||||
.panel .nav-tabs {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* inactive tabs */
|
||||
.nav > li > a {
|
||||
background-color: #f5f5f5;
|
||||
color: #676767;
|
||||
border-color: #dddddd;
|
||||
border-width: 1px;
|
||||
padding: 5px 15px;
|
||||
line-height: 2;
|
||||
-webkit-transition: all 0.75s;
|
||||
-moz-transition: all 0.75s;
|
||||
transition: all 0.75s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.nav > li > a:active {
|
||||
background-color: #f5f5f5;
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.nav > li > a:focus {
|
||||
background-color: #f5f5f5;
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.nav > li > a:hover {
|
||||
background-color: #eeeeee;
|
||||
color: #676767;
|
||||
border-color: #dddddd;
|
||||
}
|
||||
|
||||
/* active tabs */
|
||||
.nav > li.active > a:hover {
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
/* table */
|
||||
|
||||
/*.table > thead > tr > th,
|
||||
.table > tbody > tr > th,
|
||||
.table > tfoot > tr > th {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
border-bottom: 1px solid #F3F3F3;
|
||||
border-top: 1px solid #F3F3F3 !important;
|
||||
line-height: 1.42857;
|
||||
padding: 8px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.table > thead > tr > td,
|
||||
.table > tbody > tr > td,
|
||||
.table > tfoot > tr > td {
|
||||
border-top: 0px solid blue;
|
||||
line-height: 1.42857;
|
||||
padding: 8px;
|
||||
vertical-align: top;
|
||||
background-color: #F3F3F3;
|
||||
}*/
|
||||
/*
|
||||
.table-striped > tbody > tr:nth-child(2n+1) > td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
*/
|
||||
/* buttons */
|
||||
/* .btn-default.btn-outline:active,
|
||||
.btn-default.btn-outline:focus,
|
||||
.btn-default.btn-outline {
|
||||
color: #676767;
|
||||
border-color: #676767;
|
||||
background-color: transparent;
|
||||
border-width: 2px;
|
||||
-webkit-transition: all 0.25s;
|
||||
-moz-transition: all 0.25s;
|
||||
transition: all 0.25s;
|
||||
}
|
||||
|
||||
.btn-default.btn-outline:hover {
|
||||
color: #000000;
|
||||
border-color: #000000;
|
||||
background-color: transparent;
|
||||
border-width: 2px;
|
||||
-webkit-transition: all 0.75s;
|
||||
-moz-transition: all 0.75s;
|
||||
transition: all 0.75s;
|
||||
}
|
||||
*/
|
||||
|
||||
/* panel buttons */
|
||||
/* .btn-group button.btn.btn-outline.btn-default {
|
||||
background-color: #f5f5f5;
|
||||
color: #676767;
|
||||
border-color: #dddddd;
|
||||
border-width: 1px;
|
||||
padding: 5px 15px;
|
||||
line-height: 2;
|
||||
-webkit-transition: all 0.75s;
|
||||
-moz-transition: all 0.75s;
|
||||
transition: all 0.75s;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn-group button.btn.btn-outline.btn-default:focus {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.btn-group button.btn.btn-outline.btn-default:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.btn-group button.btn.btn-outline.btn-default:hover {
|
||||
background-color: #eeeeee;
|
||||
border-width: 1px;
|
||||
-webkit-transition: all 0.75s;
|
||||
-moz-transition: all 0.75s;
|
||||
transition: all 0.75s;
|
||||
}
|
||||
|
||||
.btn-outline.btn-highlight {
|
||||
color: #676767;
|
||||
border-color: #676767;
|
||||
background-color: transparent;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.display-title {
|
||||
font family: verdana, arial, helvetica;
|
||||
color: #008400;
|
||||
}*/
|
||||
|
||||
|
||||
ul.nav.nav-tabs li.btn-group.active > a.btn.btn-default {
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #ffffff;
|
||||
border-right: 0px;
|
||||
margin-right: 0px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
ul.nav.nav-tabs li.btn-group > a.btn.btn-default {
|
||||
border: 1px solid #F5F5F5;
|
||||
border-right: 0px;
|
||||
margin-right: 0px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
ul.nav.nav-tabs > li.btn-group.active > a.btn.dropdown-toggle {
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #ffffff;
|
||||
margin-left: 0px;
|
||||
border-left: 0px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
ul.nav.nav-tabs > li.btn-group > a.btn.dropdown-toggle {
|
||||
border: 1px solid #F5F5F5;
|
||||
margin-left: 0px;
|
||||
border-left: 0px;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
ul.nav.nav-tabs li.btn-group a.btn.dropdown-toggle span.caret {
|
||||
color: #F5F5F5;
|
||||
}
|
||||
|
||||
ul.nav.nav-tabs li.btn-group.active > a.btn.dropdown-toggle > span.caret {
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="Create" id="workshops" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 280px; text-align: center;">
|
||||
ثبت لیست بیمه جدید
|
||||
</legend>
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 pull-right">
|
||||
<select asp-items="@Model.EmployerList" class="sel2" id="selectWorkShopFunc">
|
||||
<option value="0">کارفرما را انتخاب کنید</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<select id="WorkShopId" class="employer">
|
||||
<option value="0" disabled></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<select id="Year" Name="Year" asp-for="Year" class="employer">
|
||||
@for (var i = 1400; i < 1440; i++)
|
||||
{
|
||||
<option value=@i>@i</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<select id="Month" class="employer" asp-for="Month">
|
||||
@{
|
||||
for (var i = 1; i < Tools.MonthNames.Length + 1; i++)
|
||||
{
|
||||
<option value=@i>@Tools.MonthNames[i - 1]</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 pull-right form-group">
|
||||
<select id="selectWorkShops"asp-for="wsItems" multiple="multiple" class="employer">
|
||||
</select>
|
||||
</div>
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;background-color:white">
|
||||
<br/>
|
||||
|
||||
<button type="submit" id="createButtom" class="btn btn-warning btn-rounded waves-effect waves-light">کپی از آخرین لیست ارسالی</button>
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only">نام کارگاه</label>
|
||||
<input class="form-control inpt" asp-for="WorkShopStr" data-val="true" placeholder="نام کارگاه " style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-6 pull-right">
|
||||
<label class="sr-only">کدکارگاه</label>
|
||||
<input class="form-control inpt" readonly asp-for="WorkShopCode"placeholder="کدکارگاه" style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only">ردیف پیمان</label>
|
||||
<input class="form-control inpt" readonly asp-for="RadifPeyman" placeholder="ردیف پیمان " style="width: 100%">
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only">نام کارفرما</label>
|
||||
<input class="form-control inpt" data-val="false" asp-for="EmployerStr" placeholder="نام کارفرما " style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-6 pull-right">
|
||||
<label class="sr-only">آدرس</label>
|
||||
<input class="form-control inpt" asp-for="Address" placeholder="آدرس" style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only">شماره لیست</label>
|
||||
<input class="form-control inpt" asp-for="ListNumber"placeholder="شماره لیست " style="width: 100%">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class=" form-group" style="padding: 0px 0px;background-color:transparent">
|
||||
<ul class="nav nav-tabs tabs" id="myTab">
|
||||
<li class="tab active pull-right " style="background-color:gray">
|
||||
<a href="#dsskar" data-toggle="tab" aria-expanded="false" class=" ac">
|
||||
<h3 style="font-family: 'Web_Yekan' !important; font-size: 18px !important; color: darkred">
|
||||
DSSKAR
|
||||
</h3>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="tab pull-right" style="background-color:gray">
|
||||
<a href="#dskwor" data-toggle="tab" aria-expanded="false" class="active ac">
|
||||
<h3 style="font-family: 'Web_Yekan' !important;font-size: 18px !important;color:darkred">
|
||||
DSKWOR
|
||||
</h3>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active p-t-10" id="dsskar" style="display: flex">
|
||||
@*<div class="row p-t-10 " style="background-color:white">*@
|
||||
<div class="col-md-6 ">
|
||||
<div class="row form-group">
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5 float-left">تعداد نفرات </p>
|
||||
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5 float-right ">جمع روزهای کارکرد</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5" style="float:left">جمع دستمزد روزانه</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5" style="float:right">جمع دستمزد ماهانه</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">جمع مزایای ماهانه مشمول</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="row form-group">
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5 title">مشمول </p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">مشمول و غیر مشمول</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">سهم حق بیمه شده</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">سهم حق کارفرما</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">بیمه بیکاری</p>
|
||||
</div>
|
||||
<div class="row" style="padding: 4px;">
|
||||
<div class="col-xs-7 data">
|
||||
<input class="form-control" type="text" value="" id="example-text-input">
|
||||
</div>
|
||||
<p class="col-xs-5">4% حق بیمه مشاغل سخت و زیان آور</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*</div>*@
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane m-5 p-5" id="dskwor">
|
||||
|
||||
<div class="row" id="ProductCategoriesDiv">
|
||||
<div class="col-md-12">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<table id="datatable2" class="table table-striped table-bordered" style="overflow-x: scroll; overflow-y: scroll; display: block; max-width: -moz-fit-content; max-width: fit-content; ">
|
||||
<thead>
|
||||
<tr style="background-color:cornflowerblue !important;color:white">
|
||||
<th style="font-size: 14px !important; color: white;width:contain !important">ردیف</th>
|
||||
|
||||
<th style="font-size: 14px !important; color: white; width: stretch !important ">شماره بیمه</th>
|
||||
<th style="font-size: 14px !important; color: white" class="sizeSet">نام</th>
|
||||
<th style="font-size: 14px !important; color: white" class="sizeSet">نام خانوادگی</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">جنسیت</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">نام پدر</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">ش شناسنامه</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">محل صدور</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ تولد</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">کدملی</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">روزهای کارکرد</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">دستمزد روزانه</th>
|
||||
<th style="font-size: 14px !important; color: white; width: stretch !important " class="sizeSet">دستمزد ماهانه مشمول</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">مزایای ماهانه مشمول(مستمر)</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">مزایای ماهانه مشمول(غیرمستمر)</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">حق بیمه سهم بیمه شده</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">شغل</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ آغاز بکار</th>
|
||||
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ ترک کار</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@{
|
||||
for (var i = 1; i < 6; i++)
|
||||
{
|
||||
var color = "#a9fcff";
|
||||
if (i % 2 != 0)
|
||||
{
|
||||
color = "#a9fcff";
|
||||
}
|
||||
else
|
||||
{
|
||||
color = "white";
|
||||
}
|
||||
<tr style="background-color:@color">
|
||||
|
||||
<td>@i</td>
|
||||
<td>123456789</td>
|
||||
<td>سیدحسن </td>
|
||||
<td>مصباح</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="pull-left">
|
||||
<button type="submit" id="createButtom" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#selectWorkShopFunc").select2({
|
||||
placeholder: "کارفرما",
|
||||
dir: "rtl",
|
||||
});
|
||||
$("#WorkShopId").select2({
|
||||
placeholder: "کارگاه",
|
||||
dir: "rtl",
|
||||
});
|
||||
$("#Year").select2({
|
||||
placeholder: "سال",
|
||||
dir: "rtl",
|
||||
});
|
||||
$("#Month").select2({
|
||||
placeholder: "ماه",
|
||||
dir: "rtl",
|
||||
});
|
||||
$("#selectWorkShops").select2({
|
||||
placeholder: "کارگاه ها",
|
||||
dir: "rtl",
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.modal-dialog').addClass('modal-lg');
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$("#myTab a").click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
|
||||
});
|
||||
|
||||
// store the currently selected tab in the hash value
|
||||
//$("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
|
||||
// var id = $(e.target).attr("href").substr(1);
|
||||
// window.location.hash = id;
|
||||
//});
|
||||
|
||||
// on load of the page: switch to the currently selected tab
|
||||
var hash = window.location.hash;
|
||||
$(`#myTab a[href="${hash}"]`).tab('show', 'active');
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#selectWorkShopFunc").change(function() {
|
||||
$("#WorkShopId").empty();
|
||||
$("#selectWorkShops").empty();
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/Admin/Company/Insurance?handler=SubtitleList',
|
||||
dataType: 'json',
|
||||
data: { employerId: $("#selectWorkShopFunc").val() },
|
||||
success: function(result) {
|
||||
console.log(result);
|
||||
$("#WorkShopId").append(` <option value="${-1}">کارگاه را انتخاب کنید</option>`);
|
||||
|
||||
//$("#selectWorkShops").append(' <option value="' + -1 + '">' +
|
||||
// "کارگاه را انتخاب کنید" + '</option>');
|
||||
|
||||
$.each(result,
|
||||
function(i, result) {
|
||||
$("#WorkShopId").append(` <option value="${result.id}">${result.workshopName}</option>`);
|
||||
});
|
||||
$.each(result,
|
||||
function(i, result) {
|
||||
$("#selectWorkShops").append(` <option value="${result.id}">${result.workshopName}</option>`);
|
||||
});
|
||||
},
|
||||
error: function(ex) {
|
||||
alert('Error');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#WorkShopId").change(function() {
|
||||
const wsId = $("#WorkShopId").val();
|
||||
const select_num = $("#WorkShopId").index() + 1;
|
||||
console.log(select_num);
|
||||
console.log(wsId);
|
||||
|
||||
// Set selected
|
||||
$('#selectWorkShops').val(wsId);
|
||||
$('#selectWorkShops').select2().trigger('change');
|
||||
|
||||
$("#selectWorkShops").select2({
|
||||
placeholder: "کارگاه ها",
|
||||
dir: "rtl",
|
||||
});
|
||||
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '/Admin/Company/Insurance?handler=LastInsurance',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: { "workShopId": wsId },
|
||||
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if (response == undefined || response == null) {
|
||||
$('#EmployerStr').val("");
|
||||
$('#WorkShopStr').val("");
|
||||
$('#WorkShopCode').val("");
|
||||
$('#RadifPeyman').val("");
|
||||
$('#ListNumber').val("");
|
||||
$('#Address').val("");
|
||||
return false;
|
||||
}
|
||||
$('#EmployerStr').val(response.employerStr);
|
||||
$('#WorkShopStr').val(response.workShopStr);
|
||||
$('#WorkShopCode').val(response.workShopCode);
|
||||
$('#RadifPeyman').val(response.radifPeyman);
|
||||
$('#ListNumber').val(response.listNumber);
|
||||
$('#Address').val(response.address);
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
$.Notification.autoHideNotify('error', 'top center', 'مشکل در دریافت اطلاعات ', response.message);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,210 +0,0 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Insurance.IndexModel
|
||||
|
||||
@{
|
||||
//int i = 1;
|
||||
}
|
||||
|
||||
@{
|
||||
Layout = "Shared/_AdminLayout";
|
||||
ViewData["title"] = "بیمه";
|
||||
<style>
|
||||
.thh0 {
|
||||
width: 8px !important;
|
||||
}
|
||||
|
||||
.thh {
|
||||
width: 40px !important;
|
||||
}
|
||||
|
||||
.thh2 {
|
||||
width: 130px !important;
|
||||
}
|
||||
|
||||
.thhNastionalId {
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
.inpt {
|
||||
width: 100%;
|
||||
border: 1px solid #c7c7c7;
|
||||
}
|
||||
|
||||
.searchpanel {
|
||||
background-color: #747272;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 m-r-10">
|
||||
<p class="pull-right">
|
||||
<a id="btnPopModal" href="#showmodal=@Url.Page("/Company/Insurance/Index", "Create")"
|
||||
class="btn btn-success btn-rounded waves-effect waves-light m-b-5"
|
||||
style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px ">
|
||||
<i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> ایجاد لیست بیمه
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="panel-group panel-group-joined" id="accordion-test">
|
||||
|
||||
|
||||
<div class="panel panel-default" style="border-radius: 15px !important;">
|
||||
<div class="panel-heading" style="background-color: #545353 !important">
|
||||
<h4 class="panel-title" style="color: #edebeb !important; display: inline;">
|
||||
<a data-toggle="collapse" data-parent="#accordion-test" href="#collapseOne" class="collapsed" style="display: inline;">
|
||||
جستجو
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse collapse in ">
|
||||
<div class="panel-body" style="padding-top: 15px; padding-bottom: 15px;">
|
||||
@*===================================================================================================================*@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
|
||||
<form class="form-inline" role="form" method="get" name="search-theme-form" id="search-theme-form" autocomplete="off">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only" asp-for="searchModel.Year"></label>
|
||||
<input class="form-control inpt" asp-for="searchModel.Year" data-val="false" placeholder="سال " style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only" asp-for="searchModel.Month"></label>
|
||||
<input class="form-control inpt" asp-for="searchModel.Month" placeholder="ماه" style="width: 100%">
|
||||
</div>
|
||||
@*<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only" asp-for="searchModel.WorkShop"></label>
|
||||
<input class="form-control inpt" asp-for="searchModel.WorkShop" placeholder="کارگاه " style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-3 pull-right">
|
||||
<label class="sr-only" asp-for="searchModel.Employer"></label>
|
||||
<input class="form-control inpt" asp-for="searchModel.Employer" placeholder="نام کارفرما " style="width: 100%">
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="row" style="margin-top: 15px">
|
||||
<div class="col-lg-9">
|
||||
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light m-b-5"
|
||||
style="border-bottom-left-radius: 0px; border-top-left-radius: 0px; background-color: #950000;
|
||||
border-color: #950000; font-family: 'Web_Yekan' !important; margin-left: -3px">
|
||||
<i class="fa fa-search" style="padding-left: 3px; font-size: 14px;"></i> جستجو
|
||||
</button>
|
||||
<a class="btn btn-info btn-rounded waves-effect waves-light m-b-5"
|
||||
style="border-bottom-right-radius: 0px; border-top-right-radius: 0px; background-color: #545353;
|
||||
border-color: #545353; font-family: 'Web_Yekan' !important;" asp-page="./Index">
|
||||
مشاهده همه
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@*==================================================================Insurance=====*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست بیمه ها</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12">
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 16px !important; width: 5% !important">#</th>
|
||||
<th style="font-size: 16px !important; width: 5% !important; text-align: center"> سال</th>
|
||||
<th style="font-size: 16px !important; text-align: center"> ماه </th>
|
||||
<th style="font-size: 16px !important; text-align: center">نام کارفرما</th>
|
||||
<th style="font-size: 16px !important; text-align: center">نام کارگاه</th>
|
||||
<th style="font-size: 16px !important; text-align: center">سهمیه</th>
|
||||
<th style="font-size: 16px !important; text-align: center">شعبه</th>
|
||||
<th style="font-size: 16px !important; text-align: center">شهر</th>
|
||||
<th style="font-size: 16px !important; text-align: center">مقطوع</th>
|
||||
<th style="font-size: 16px !important; "></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (Model.insurance != null)
|
||||
{
|
||||
@foreach (var item in Model.insurance)
|
||||
{
|
||||
<tr>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Id </td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Year </td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Month </td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Employer</td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.WorkShop</td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Qouta</td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.InsuranceBranch</td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.City</td>
|
||||
<td style="font-size: 14px !important; text-align: center">@item.Fixed</td>
|
||||
<td>
|
||||
<a class="btn btn-danger ionRad pull-left m-rl-5 " onclick="">
|
||||
<i class="fa fa-trash ionSize"></i>
|
||||
</a>
|
||||
<a class="btn btn-warning pull-left m-rl-5"
|
||||
href="#showmodal=@Url.Page("./Index", "Summary")">
|
||||
<i class="fa fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-success pull-left m-rl-5"
|
||||
href="#showmodal=@Url.Page("./Index", "Summary", new { item.Id })">
|
||||
<i class="fa fa-file-text ionSize"></i>
|
||||
</a>
|
||||
<a class="btn btn-info pull-left m-rl-5">
|
||||
<i class="fa fa-save ionSize"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#datatable').dataTable({
|
||||
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.Insurance;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Insurance;
|
||||
|
||||
//public class InsuranceSearchModel
|
||||
//{
|
||||
// public long Id { get; set; }
|
||||
// public int Year { get; set; }
|
||||
// public string Month { get; set; }
|
||||
// public string Employer { get; set; }
|
||||
// public string WorkShop { get; set; }
|
||||
//}
|
||||
public class InsuranceViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public int Year { get; set; }
|
||||
public string Month { get; set; }
|
||||
public string Employer { get; set; }
|
||||
public string WorkShop { get; set; }
|
||||
public string Qouta { get; set; }
|
||||
public string InsuranceCode { get; set; }
|
||||
public string InsuranceBranch { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Fixed { get; set; }
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public static string[] MonthNames =
|
||||
{ "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند" };
|
||||
|
||||
private readonly IEmployerApplication _employerApplication;
|
||||
private readonly IInsuranceApplication _insuranceApplication;
|
||||
private readonly IWorkshopApplication _workShopApplication;
|
||||
|
||||
public List<InsuranceViewModel> insurance;
|
||||
public InsuranceSearchModel searchModel;
|
||||
|
||||
public IndexModel(IInsuranceApplication insuranceApplication, IEmployerApplication employerApplication,
|
||||
IWorkshopApplication workShopApplication)
|
||||
{
|
||||
_insuranceApplication = insuranceApplication;
|
||||
_employerApplication = employerApplication;
|
||||
_workShopApplication = workShopApplication;
|
||||
}
|
||||
|
||||
|
||||
public void OnGet(InsuranceSearchModel searchModel)
|
||||
{
|
||||
var item1 =
|
||||
new InsuranceViewModel
|
||||
{
|
||||
Id = 1,
|
||||
Year = 1401,
|
||||
Month = "مهر",
|
||||
InsuranceCode = "10232156",
|
||||
InsuranceBranch = "شعبه 9",
|
||||
Employer = "شکوفه موتور گیلان",
|
||||
WorkShop = "شکوفه موتور گیلان تهران",
|
||||
Qouta = "عادی",
|
||||
City = "تهران",
|
||||
Fixed = "مقطوع"
|
||||
};
|
||||
var item2 =
|
||||
new InsuranceViewModel
|
||||
{
|
||||
Id = 2,
|
||||
Year = 1401,
|
||||
Month = "مهر",
|
||||
InsuranceCode = "102654498",
|
||||
InsuranceBranch = "شعبه 3",
|
||||
Employer = "محمد حق پرست",
|
||||
WorkShop = "تولیدی درب و پنجره",
|
||||
Qouta = "کمک دولتی",
|
||||
City = "رشت",
|
||||
Fixed = "-"
|
||||
};
|
||||
insurance = new List<InsuranceViewModel>();
|
||||
insurance.Add(item1);
|
||||
insurance.Add(item2);
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreate()
|
||||
{
|
||||
var createInsurance = new CreateInsurance();
|
||||
createInsurance.EmployerList = new SelectList(_employerApplication.GetEmployers(), "Id", "FullName");
|
||||
createInsurance.Year = Convert.ToInt32(DateTime.Now.ToFarsiYear());
|
||||
createInsurance.Month = Convert.ToInt32(DateTime.Now.ToFarsiMonth()) == 1
|
||||
? 12
|
||||
: Convert.ToInt32(DateTime.Now.ToFarsiMonth()) - 1;
|
||||
|
||||
return Partial("./Create", createInsurance);
|
||||
}
|
||||
|
||||
public IActionResult OnGetSubtitleList(long employerId)
|
||||
{
|
||||
var searchModel = new WorkshopSearchModel();
|
||||
var subtitleList = _workShopApplication.Search(new WorkshopSearchModel { EmployerId = employerId }).ToList();
|
||||
return new JsonResult(subtitleList);
|
||||
}
|
||||
|
||||
public IActionResult OnGetLastInsurance(long workShopId)
|
||||
{
|
||||
var query = _insuranceApplication.Search(new InsuranceSearchModel { WorkShopId = workShopId }).Select(x => new
|
||||
{
|
||||
x.EmployerStr,
|
||||
x.WorkShopStr,
|
||||
x.ListNumber,
|
||||
x.Address,
|
||||
WorkShopCode = x.Workshop.ArchiveCode,
|
||||
RadifPeyman = x.Workshop.Id
|
||||
}).LastOrDefault();
|
||||
return new JsonResult(query);
|
||||
}
|
||||
//public IActionResult OnGetSummary()
|
||||
//{
|
||||
// return Partial("./Summary");
|
||||
|
||||
//}
|
||||
|
||||
|
||||
//public IActionResult OnPostCreate(CreateCrossJobGuild command)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//public IActionResult OnGetEdit(long id)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
//public JsonResult OnPostEdit(EditCrossJobGuild command)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
|
||||
//public IActionResult OnGetDetails(long id)
|
||||
//{
|
||||
// var detail = _crossJobGuildApplication.GetDetails(id);
|
||||
// return Partial("Details", detail);
|
||||
//}
|
||||
|
||||
//public IActionResult OnPostRemove(long id)
|
||||
//{
|
||||
// var result = new OperationResult();
|
||||
// return new JsonResult(result);
|
||||
|
||||
//}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
@*@model CompanyManagment.App.Contracts.Insurance.CreateCrossJobGuild*@
|
||||
@{
|
||||
<style>
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content .modal-footer {
|
||||
padding-top: unset !important;
|
||||
}
|
||||
|
||||
p {
|
||||
direction: ltr !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.error {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="Summary" id="workshops" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;background-color:white">
|
||||
<br/>
|
||||
<div class="form-group col-sm-12">
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-lg-2 pull-right">
|
||||
<img src="~/ProductPictures/profilePhotos/2021-12-03-12-29-55-logo.png" style="width: 60px; height: 60px; border-radius: 30px">
|
||||
</div>
|
||||
<div class="col-lg-8 pull-right center">
|
||||
<p style="text-align:center !important;">
|
||||
مشخصات لیست و تاییدیه کارفرماجهت تنظیم و ارسال لیست بیمه کارگاه
|
||||
<br/>
|
||||
پیش نویس لیست بیمه ماه 07 سال 1401
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-2 pull-right" style="text-align:center !important">
|
||||
<p style="font-size:12px">تاریخ چاپ: 1401/11/24</p>
|
||||
<p style="font-size:12px">ساعت چاپ: 19:22</p>
|
||||
<p style="font-size:12px">کاربر: خانم حسین زاده</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;background-color:white">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 pull-right">
|
||||
<p >
|
||||
نام کارفرما : ایاد سهرابی
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-4 pull-right center">
|
||||
<p style="text-align:center !important;">
|
||||
نام کارگاه : آریا چوب
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4 pull-left">
|
||||
<p style="text-align:left !important;">کد کارگاه : 234234535</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br/>
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;background-color:white">
|
||||
<br/>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="pull-left">
|
||||
<button type="submit" id="createButtom" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.modal-dialog').addClass('modal-lg');
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$("#myTab a").click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
|
||||
});
|
||||
|
||||
// store the currently selected tab in the hash value
|
||||
//$("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
|
||||
// var id = $(e.target).attr("href").substr(1);
|
||||
// window.location.hash = id;
|
||||
//});
|
||||
|
||||
// on load of the page: switch to the currently selected tab
|
||||
var hash = window.location.hash;
|
||||
$(`#myTab a[href="${hash}"]`).tab('show', 'active');
|
||||
|
||||
|
||||
</script>
|
||||
@@ -2,482 +2,15 @@
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Workshops.AutoExtensionModel
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
@section Styles{
|
||||
<style>
|
||||
.selectedBtn {
|
||||
background-color: #06ab08 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.erroreManual {
|
||||
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
.zero-ps-code {
|
||||
|
||||
background-color: #eb3434;
|
||||
animation: color-change 800ms linear infinite;
|
||||
}
|
||||
.firstCheckAlert {
|
||||
|
||||
background-color: #eb3434;
|
||||
animation: color-change 800ms linear infinite;
|
||||
}
|
||||
.contractExist {
|
||||
background-color: #ffb715 !important;
|
||||
}
|
||||
.leftInvalid {
|
||||
display: none;
|
||||
}
|
||||
.red{
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@keyframes color-change {
|
||||
0% {
|
||||
background-color: #eb3434;
|
||||
}
|
||||
50% {
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
100% {
|
||||
background-color: #eb3434;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tooltip-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
/* display: inline-block;*/
|
||||
}
|
||||
.tooltip {
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
color: #fff;
|
||||
/* width: 180px;*/
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-family: 'IranSans';
|
||||
padding: 5px 10px;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
/*text-shadow: 1px 1px 2px #111;*/
|
||||
background: #eb3434;
|
||||
border: 1px solid #eb3434;
|
||||
box-shadow: 0 0 3px rgba(0,0,0,0.5);
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
-moz-transition: all .2s ease-in-out;
|
||||
-o-transition: all .2s ease-in-out;
|
||||
/* -ms-transition: all .2s ease-in-out;*/
|
||||
transition: all .2s ease-in-out;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: 23px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltip:before, .tooltip:after {
|
||||
content: '';
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid #eb3434;
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.tooltip-container:hover .tooltip, a:hover .tooltip {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
.pdate{
|
||||
background-color: rgba(255,255,255,0.9) !important;
|
||||
border: 1px solid #bdbdbd !important;
|
||||
direction: ltr;
|
||||
|
||||
}
|
||||
.sizeSet {
|
||||
padding: 2px !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
.ionSize {
|
||||
font-size: 22px !important;
|
||||
top: 2px !important;
|
||||
position: relative;
|
||||
padding: 0px 2px 0px 2px;
|
||||
}
|
||||
.iconSize {
|
||||
min-width: 90px !important;
|
||||
width: 90px;
|
||||
}
|
||||
.rad {
|
||||
border-radius: 8px !important;
|
||||
/* padding: 10px; */
|
||||
padding: 2px 5px 0px 5px;
|
||||
}
|
||||
.select {
|
||||
background-color: #fafafa;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
font-size: 14px;
|
||||
border: 1px solid #c7c7c7 !important;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 10px;
|
||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid #eee;
|
||||
box-shadow: none;
|
||||
text-align: center;
|
||||
}
|
||||
@@media screen and (max-width: 1920px) {
|
||||
.pannelSize {
|
||||
width: 85%
|
||||
}
|
||||
|
||||
.modal-content2 {
|
||||
background-color: whitesmoke;
|
||||
width: 36%;
|
||||
height: 490px;
|
||||
border: 1px solid #a5a5a59e;
|
||||
border-radius: 25px;
|
||||
margin-top: 150px;
|
||||
margin-right: 32%;
|
||||
padding: 0px 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@media screen and (max-width: 1440px) {
|
||||
.pannelSize {
|
||||
width: 80%
|
||||
}
|
||||
.modal-content2 {
|
||||
background-color: whitesmoke;
|
||||
width: 50%;
|
||||
height: 490px;
|
||||
border: 1px solid #a5a5a59e;
|
||||
border-radius: 25px;
|
||||
margin-top: 80px;
|
||||
margin-right: 25%;
|
||||
padding: 0px 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@@media screen and (max-width: 1366px) {
|
||||
.pannelSize {
|
||||
width: 79%
|
||||
}
|
||||
}
|
||||
|
||||
@@media screen and (max-width: 1280px) {
|
||||
.pannelSize {
|
||||
width: 77%
|
||||
}
|
||||
}
|
||||
|
||||
.pannelHead {
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
height: 40px;
|
||||
background: linear-gradient(to right, #016603, #06ab08 50%, #06ab08 50%, #016603);
|
||||
margin: -10px -15px 25px -15px;
|
||||
}
|
||||
|
||||
.pannelHead2 {
|
||||
height: 40px;
|
||||
background: linear-gradient(to right, #9a9a9a, #ffffff 50%, #ffffff 50%, #9a9a9a);
|
||||
margin: -25px -15px 25px -15px;
|
||||
}
|
||||
|
||||
.headText {
|
||||
text-align: center;
|
||||
margin-top: 8px;
|
||||
font-size: 16px;
|
||||
color: #e5e5e5;
|
||||
}
|
||||
|
||||
.inpt {
|
||||
display: inline-block;
|
||||
border-radius: 15px 0px 5px 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.disc {
|
||||
border-radius: 0px 15px 15px 0px;
|
||||
height: 34px;
|
||||
position: absolute;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
.disc:hover {
|
||||
box-shadow: unset;
|
||||
}
|
||||
|
||||
.inputCol {
|
||||
margin-top: 15%;
|
||||
}
|
||||
.redColor {
|
||||
background-color: #ffe8e8 !important;
|
||||
}
|
||||
.greenColor {
|
||||
background-color: #c9eecf !important;
|
||||
}
|
||||
.contractType {
|
||||
border-radius: 5px;
|
||||
width: 60px;
|
||||
border-color: #5b5b5b;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
.contractPeryod {
|
||||
border-radius: 5px;
|
||||
width: 80px;
|
||||
border-color: #5b5b5b;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
|
||||
/*modal2 */
|
||||
|
||||
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
.modal-header {
|
||||
border-bottom: unset !important;
|
||||
padding: unset !important;
|
||||
}
|
||||
|
||||
.close {
|
||||
margin-top: 12px;
|
||||
margin-left: -19px;
|
||||
font-size: 26px;
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
|
||||
.main-title {
|
||||
position: absolute;
|
||||
width: 195px;
|
||||
font-size: 19px;
|
||||
background-color: inherit;
|
||||
left: 50%;
|
||||
top: 6px;
|
||||
margin-left: -100px;
|
||||
text-align: center;
|
||||
color: black;
|
||||
border: 1px solid #00000030;
|
||||
border-radius: 9px;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
.modal2-btns {
|
||||
float: left;
|
||||
padding: 15px;
|
||||
}
|
||||
.modal2-btn {
|
||||
border-radius: 16px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.modal-content2 .main-title {
|
||||
top: 35px;
|
||||
}
|
||||
.modal-content2 label {
|
||||
color: #2c2c2c;
|
||||
font-size: 10px;
|
||||
}
|
||||
.modal .modal-dialoge .modal-content2 .modal-body {
|
||||
padding: 0px 50px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 10px 0px;
|
||||
|
||||
}
|
||||
|
||||
div span.week {
|
||||
border-radius: 5px;
|
||||
padding: 2px 8px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
#shanbeh, #yekshanbeh, #doshanbeh, #seshanbeh, #cheharshanbeh, #panjshanbeh, #jomeh {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#Sh1, #Sh2, #Sh3, #Sh4, #Sh5, #Sh6, #Sh7, #Sh8 {
|
||||
width: 80px;
|
||||
margin-right: 30%;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 10%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
}
|
||||
|
||||
.time2 {
|
||||
width: 32%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
}
|
||||
|
||||
.fild {
|
||||
border: 1px solid #878686;
|
||||
background-color: #e7e7e7;
|
||||
border-radius: 10px;
|
||||
padding: 15px 0 15px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
|
||||
.fild2 {
|
||||
border: 1px solid #878686;
|
||||
background-color: #d9d9d9;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0 10px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 80%;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.fild3 {
|
||||
border: 1px solid #878686;
|
||||
background-color: #e7e7e7;
|
||||
border-radius: 10px;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
hr {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-top: 1px solid #d3d3d3;
|
||||
}
|
||||
|
||||
.checkbox + .checkbox, .radio + .radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.anim {
|
||||
animation-name: animationProgress;
|
||||
}
|
||||
|
||||
@*heder*@
|
||||
.top-Bar {
|
||||
background-color: #c1dcd8;
|
||||
height: 100px;
|
||||
border-radius: 15px;
|
||||
margin: 0px 2px 10px 2px;
|
||||
box-shadow: 0px 1px 15px 0 #749883;
|
||||
|
||||
}
|
||||
.workshopName {
|
||||
color: #fff;
|
||||
background-color: #1b9998;
|
||||
font-size: 15px;
|
||||
border-radius: 15px;
|
||||
height: 25px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.manual {
|
||||
background-color: #efefef;
|
||||
min-height: 160px;
|
||||
border-radius: 15px;
|
||||
width: 49%;
|
||||
box-shadow: 0px 1px 15px 0 #0f8181;
|
||||
}
|
||||
.automatic {
|
||||
background-color: #efefef;
|
||||
min-height: 160px;
|
||||
border-radius: 15px;
|
||||
width: 49%;
|
||||
box-shadow: 0px 1px 15px 0 #0f8181
|
||||
}
|
||||
.discManual {
|
||||
border-radius: 20px 5px 0px 0px;
|
||||
cursor: unset;
|
||||
font-size: 12px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
.inptAutomatic {
|
||||
display: inline-block;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.trueStatusHide {
|
||||
display: none;
|
||||
}
|
||||
.falseStatusHide {
|
||||
display: none;
|
||||
}
|
||||
.progBar {
|
||||
display: none;
|
||||
}
|
||||
#createProcess {
|
||||
background-color: #fdfdfd;
|
||||
height: 100px;
|
||||
border-radius: 15px;
|
||||
margin: 0px 2px 10px 2px;
|
||||
box-shadow: 0px 1px 15px 0 #1ebb5f;
|
||||
}
|
||||
.progress-bar {
|
||||
color: #fff!important;
|
||||
font-size: 17px !important;
|
||||
line-height: 23px !important;
|
||||
border-radius: 10px !important;
|
||||
|
||||
}
|
||||
|
||||
.dayliwage{
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.groupDailyWageDisable{
|
||||
background-color: #e1e1e1;
|
||||
color: #bfbfbf;
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.groupDailyWageEnable {
|
||||
background-color: #d0d0d0;
|
||||
color: #232323;
|
||||
pointer-events:auto;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
</style>
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/assetsadmin/page/workshop/css/AoutoExtention.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
}
|
||||
var i = 1;
|
||||
var zeropscode = "zero-ps-code tooltip-container";
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
|
||||
|
||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Workshops.ClassificationSchemeModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/admintheme/css/workshop-create.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<style>
|
||||
body{
|
||||
|
||||
background-color: #fefefe;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232ebfbf' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.hiddenTab{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.date-input {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button.rounded-pill {
|
||||
border-radius: 5px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div style="max-width: 98%;margin: 0 auto">
|
||||
<div class="col-xs-12" style="float: unset;">
|
||||
<div class="handle-title">
|
||||
<h3 id="titleHead">تنظیمات طرح طبقه بندی مشاغل <span style="color: #a4884b"> > @Model.WorkshopName</span></h3>
|
||||
<a asp-page="./index" class="btn btn-rounded" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12" style="float: unset;">
|
||||
<div class="card card-pattern">
|
||||
<ul class="nav nav-tabs nav-fill wizard" id="myTab" role="tablist">
|
||||
|
||||
<li class="li-wizard step active" id="schemeTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=SchemeTab">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon1" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span> لیست طرح </span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="li-wizard step" id="jobsTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=GroupJobsTab">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon2" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>تعیین مشاغل گروه ها</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="li-wizard step" id="salariesTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=SalariesTab">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon2" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>تعیین دستمزد گروه ها</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="li-wizard step" id="addEmployeesTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=AddEmployeesTab">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon3" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>افزودن پرسنل به طرح</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="partial-tabs" id="partialContainer"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@section Script
|
||||
{
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/AdminTheme/js/numeral.min.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
var workshopId = '@Model.WorkshopId';
|
||||
var schemeId = '@Model.SchemeId';
|
||||
var hasScheme = '@Model.HasScheme.ToString().ToLower()';
|
||||
console.log(hasScheme);
|
||||
|
||||
// پیشفرض: لود تب اول با workshopId
|
||||
loadPartial("/Admin/Company/Workshops/ClassificationScheme?handler=SchemeTab&workshopId=" + workshopId);
|
||||
$("#schemeTab").addClass("active");
|
||||
|
||||
// کلیک روی تبها
|
||||
$("#schemeTab, #jobsTab, #salariesTab, #addEmployeesTab").click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
|
||||
let url = $(this).data("url");
|
||||
|
||||
|
||||
|
||||
switch(this.id){
|
||||
case "schemeTab" :
|
||||
url += "&workshopId=" + workshopId;
|
||||
loadPartial(url);
|
||||
|
||||
$("#schemeTab, #jobsTab, #salariesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
break;
|
||||
case "jobsTab" :
|
||||
if(hasScheme === "true" && schemeId > 0){
|
||||
url += "&schemeId=" + schemeId;
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salariesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
case "salariesTab" :
|
||||
if(hasScheme === "true"){
|
||||
checkEmptyGroup(function (result) {
|
||||
if (result) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'لطفا ابتدا مشاغل تمامی گروه ها را تعیین نمایید');
|
||||
} else {
|
||||
url += "&schemeId=" + schemeId;
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salariesTab, #addEmployeesTab").removeClass("active");
|
||||
$('#salariesTab').addClass("active");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
case "addEmployeesTab" :
|
||||
if(hasScheme === "true"){
|
||||
|
||||
checkEmptyGroup(function (result) {
|
||||
if (result) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'لطفا ابتدا مشاغل تمامی گروه ها را تعیین نمایید');
|
||||
} else {
|
||||
url += "&schemeId=" + schemeId;
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salariesTab").removeClass("active");
|
||||
$('#addEmployeesTab').addClass("active");
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function loadPartial(url) {
|
||||
$.get(url, function (data) {
|
||||
$("#partialContainer").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function checkEmptyGroup(callback) {
|
||||
var url = `/Admin/Company/Workshops/ClassificationScheme?handler=CheckEmptyGroup&schemeId=${schemeId}`;
|
||||
$.get(url, function (data) {
|
||||
callback(data.hasEmptyGroup);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// $(document).ready(function () {
|
||||
// // پیشفرض: لود تب اول
|
||||
// loadPartial("/Admin/Company/Workshops/ClassificationScheme?handler=CreateScheme");
|
||||
// $("#creatScheme").addClass("active"); // تب اول اکتیو بشه
|
||||
|
||||
// // کلیک روی تبها
|
||||
// $("#creatScheme, #createJobs, #createSalaies, #addEmployees").click(function (e) {
|
||||
// e.preventDefault();
|
||||
|
||||
// // حذف active از همه تبها
|
||||
// $("#creatScheme, #createJobs, #createSalaies, #addEmployees").removeClass("active");
|
||||
|
||||
// // اضافه کردن active به تب کلیک شده
|
||||
// $(this).addClass("active");
|
||||
|
||||
// // گرفتن آدرس هندلر بر اساس id
|
||||
// let handlerUrl = "";
|
||||
// if (this.id === "creatScheme")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateScheme";
|
||||
// else if (this.id === "createJobs")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateJobs";
|
||||
// else if (this.id === "createSalaies")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateSalaries";
|
||||
// else if (this.id === "addEmployees")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=AddEmployees";
|
||||
|
||||
// loadPartial(handlerUrl);
|
||||
// });
|
||||
|
||||
// function loadPartial(url) {
|
||||
// $.get(url, function (data) {
|
||||
// $("#partialContainer").html(data);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,685 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.Job;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using CompanyManagment.EFCore.Migrations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
/// <summary>
|
||||
/// صفحه تنظیمات طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public class ClassificationSchemeModel : PageModel
|
||||
{
|
||||
private readonly IClassificationSchemeApplication _classificationSchemeApplication;
|
||||
private readonly IJobApplication _jobApplication;
|
||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||
|
||||
public ClassificationSchemeModel(IClassificationSchemeApplication classificationSchemeApplication, IJobApplication jobApplication, IYearlySalaryApplication yearlySalaryApplication)
|
||||
{
|
||||
_classificationSchemeApplication = classificationSchemeApplication;
|
||||
_jobApplication = jobApplication;
|
||||
_yearlySalaryApplication = yearlySalaryApplication;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا طرح ایجاد شده
|
||||
/// </summary>
|
||||
public bool HasScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long SchemeId { get; set; }
|
||||
public void OnGet(long workshopId, string workshopName)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
WorkshopName = workshopName;
|
||||
var scheme = _classificationSchemeApplication.GetClassificationSchemeList(workshopId).GetAwaiter().GetResult();
|
||||
HasScheme = scheme.HasScheme;
|
||||
SchemeId = scheme.HasScheme ? scheme.ClassificationSchemesList.FirstOrDefault()!.Id : 0;
|
||||
}
|
||||
|
||||
//تب لیست طرح
|
||||
#region ClassificationSchemetTab
|
||||
/// <summary>
|
||||
/// تب ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetSchemeTab(long workshopId)
|
||||
{
|
||||
//دریافت طرح
|
||||
var scheme = _classificationSchemeApplication.GetClassificationSchemeList(workshopId).GetAwaiter().GetResult();
|
||||
scheme.WorkshopId = workshopId;
|
||||
|
||||
return Partial("_ClassificationPartials/ClassificationSchemeTab", scheme);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لود مودال ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCreateScheme(long workshopId)
|
||||
{
|
||||
var model = new CreateClassificationScheme();
|
||||
model.WorkshopId = workshopId;
|
||||
return Partial("_ClassificationPartials/CreateScheme", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//public async Task<JsonResult> OnPostCreateScheme(CreateClassificationScheme command)
|
||||
//{
|
||||
// var result = await _classificationSchemeApplication.CreateClassificationScheme(command);
|
||||
// return new JsonResult(result);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// لود مودال ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEditScheme(long id)
|
||||
{
|
||||
var model = _classificationSchemeApplication.GetClassificationScheme(id).GetAwaiter().GetResult();
|
||||
return Partial("_ClassificationPartials/EditScheme", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
//public async Task<JsonResult> OnPostEditScheme(EditClassificationScheme command)
|
||||
//{
|
||||
// var result = _classificationSchemeApplication.EditClassificationScheme(command).GetAwaiter().GetResult();
|
||||
// return new JsonResult(result);
|
||||
//}
|
||||
#endregion
|
||||
|
||||
//تب تعیین مشاغل
|
||||
#region GroupJobsTab
|
||||
|
||||
/// <summary>
|
||||
/// تب تعیین مشاغل گروه
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetGroupJobsTab(long schemeId)
|
||||
{
|
||||
var groupAndJobs = _classificationSchemeApplication.GetGroupAndJobs(schemeId).GetAwaiter().GetResult();
|
||||
return Partial("_ClassificationPartials/ClassificationGroupJobsTab", groupAndJobs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لود مدال ایجاد یا ویرایش مشاغل گروه
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <param name="groupNo"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCreateOrEditJobs(long groupId, string groupNo)
|
||||
{
|
||||
var model = new ClassificationGroupAndJobModel();
|
||||
model.GroupId = groupId;
|
||||
model.GroupNo = groupNo;
|
||||
model.EditClassificationGroupJob =
|
||||
_classificationSchemeApplication.GetGroupJobs(groupId).GetAwaiter().GetResult();
|
||||
|
||||
return Partial("_ClassificationPartials/CreateOrEditGroupJobs", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جستجو شغل
|
||||
/// </summary>
|
||||
/// <param name="textSearch"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostJobByTextSearch(string textSearch)
|
||||
{
|
||||
var jobs = _jobApplication.JobSearchSelect(textSearch).GetAwaiter().GetResult();
|
||||
|
||||
jobs = jobs.OrderBy(x => x.JobName.Length).ToList().Select(x => new JobViewModel
|
||||
{
|
||||
Id = x.Id,
|
||||
JobName = x.JobName,
|
||||
JobCode = x.JobCode,
|
||||
SearchResultTitle = x.JobName,
|
||||
SearchResultCode = x.JobCode
|
||||
}).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
List = jobs
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// بررسی امکان حذف شغل
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCheckDeleteJob(long id, long groupId)
|
||||
{
|
||||
var checkExist = _classificationSchemeApplication.CheckEmployeeHasThisJob(id, groupId).GetAwaiter().GetResult();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
existEmployeHasThisJob = checkExist,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره مشاغل
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostCreateJob(List<CreateClassificationGroupJob> createJobList, List<long> deleteJobList)
|
||||
{
|
||||
var result = _classificationSchemeApplication.CreateGroupJobs(createJobList, deleteJobList).GetAwaiter().GetResult();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = result,
|
||||
message = result == true ? "عملیات با موفقیت انجام شد" : "خطا در ذخیره اطلاعات",
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region SalariesTab
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// چک میکند که آیا گروه بدون شغل وجود دارد یا نه
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCheckEmptyGroup(long schemeId)
|
||||
{
|
||||
var groupAndJobs = _classificationSchemeApplication.GetGroupAndJobs(schemeId).GetAwaiter().GetResult();
|
||||
|
||||
|
||||
// خروجی: لیست بولین که برای هر گروه مشخص میکند آیا Job دارد یا نه
|
||||
var hasJobsList = groupAndJobs
|
||||
.Select(g => g.EditClassificationGroupJob != null && g.EditClassificationGroupJob.Count > 0)
|
||||
.ToList();
|
||||
|
||||
// حالا میتونی بررسی کنی آیا گروهی بدون Job وجود دارد یا نه:
|
||||
bool hasEmptyGroup = hasJobsList.Contains(false);
|
||||
|
||||
// bool hasEmptyGroup = groupAndJobs.Any(g => g.EditClassificationGroupJob == null || g.EditClassificationGroupJob.Count == 0);
|
||||
return new JsonResult(new
|
||||
{
|
||||
hasEmptyGroup = hasEmptyGroup,
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تب لیست دستمزد ها
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetSalariesTab(long schemeId)
|
||||
{
|
||||
|
||||
var salariesList = _classificationSchemeApplication.GetSalariesTabData(schemeId).GetAwaiter().GetResult();
|
||||
return Partial("_ClassificationPartials/ClassificationGroupSalariesTab", salariesList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///لود مودال ایجاد دستمزدها
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCreateSalaries(long schemeId)
|
||||
{
|
||||
var groupList = _classificationSchemeApplication.GetGroupToCreateSalariesModal(schemeId).GetAwaiter().GetResult();
|
||||
groupList.SchemeId = schemeId;
|
||||
return Partial("_ClassificationPartials/CreateSalariesAndCoefficient", groupList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره دستمزدها
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostCreateSalaries(SalaryAndRialCoefficientModel command)
|
||||
{
|
||||
var result = _classificationSchemeApplication.CreateGroupSalaryAndCoefficient(command).GetAwaiter().GetResult();
|
||||
return new JsonResult(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
var editData = _classificationSchemeApplication.GetEditSalariesData(schemeId, startDate, endDate).GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
return Partial("_ClassificationPartials/EditSalariesAndCoefficient", editData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ثبت تغییرات ویرایش دستمزدها
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostEditSalariesData(SalaryAndRialCoefficientModel command)
|
||||
{
|
||||
var result = _classificationSchemeApplication.EditGroupSalaryAndCoefficient(command).GetAwaiter().GetResult();
|
||||
return new JsonResult(result);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region EmployeesTab
|
||||
|
||||
/// <summary>
|
||||
/// تب افزودن پرسنل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetAddEmployeesTab(long schemeId)
|
||||
{
|
||||
var model = new EmployeeInfoTab
|
||||
{
|
||||
SchemeId = schemeId,
|
||||
};
|
||||
|
||||
//var result = _classificationSchemeApplication.GetEmployeeDataTab(command).GetAwaiter().GetResult();
|
||||
return Partial("_ClassificationPartials/ClassificationEmployeesTab", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت نتیجه جستجو در تب پرسنل
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="fullName"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetAjaxDataLoading(long schemeId, string fullName)
|
||||
{
|
||||
var command = new EmployeeInfoTab
|
||||
{
|
||||
SchemeId = schemeId,
|
||||
FullName = fullName,
|
||||
};
|
||||
var result = _classificationSchemeApplication.GetEmployeeDataTab(command).GetAwaiter().GetResult();
|
||||
if (result.EmployeeInfoList == null || !result.EmployeeInfoList.Any())
|
||||
return new JsonResult(new
|
||||
{
|
||||
hasEmployee = false
|
||||
|
||||
});
|
||||
var personnelList = result.EmployeeInfoList.OrderBy(x => x.Black ? 1 : 0);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
hasEmployee = true,
|
||||
personnelList
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///لود مودال افزودن پرسنل به گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="employeeFullName"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetAddToGroup(long employeeId, long schemeId, string employeeFullName)
|
||||
{
|
||||
var model = new AddEmployeeToGroup();
|
||||
var groups = _classificationSchemeApplication.GetGroups(schemeId).GetAwaiter().GetResult();
|
||||
|
||||
model.SchemeId = schemeId;
|
||||
model.EmployeeId = employeeId;
|
||||
model.EmployeeFullName = employeeFullName;
|
||||
model.ClassificationGroupList = groups;
|
||||
|
||||
|
||||
return Partial("_ClassificationPartials/AddEmployeeToGroup", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره انتخاب گروه و شغل برای پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostAddToGroup(AddEmployeeToGroup command)
|
||||
{
|
||||
|
||||
var result = _classificationSchemeApplication.AddEmployeeToGroup(command).GetAwaiter().GetResult();
|
||||
if (!result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// دریافت لیست مشاغل با ای دی گروه
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetJobList(long schemeId, long groupId)
|
||||
{
|
||||
var jobList = _classificationSchemeApplication.GetGroupJobs(groupId).GetAwaiter().GetResult();
|
||||
return new JsonResult(new
|
||||
{
|
||||
jobs = jobList,
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///لود مودال ویرایش پرسنل گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="employeeFullName"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEditGroupMember(long employeeId, long schemeId, string employeeFullName)
|
||||
{
|
||||
|
||||
var groups = _classificationSchemeApplication.GetGroups(schemeId).GetAwaiter().GetResult();
|
||||
var employeeMemberizeData = _classificationSchemeApplication.GetEmployeeMemberizeData(employeeId).GetAwaiter().GetResult();
|
||||
|
||||
////اگر یک گروه داشت
|
||||
//if (!employeeMemberizeData.HasMultipleGroup)
|
||||
//{
|
||||
// var model = new AddEmployeeToGroup();
|
||||
|
||||
|
||||
// model.SchemeId = schemeId;
|
||||
// model.EmployeeId = employeeId;
|
||||
// model.EmployeeFullName = employeeFullName;
|
||||
|
||||
// if (!employeeMemberizeData.EditEmployeeGroupLists.Any())
|
||||
// return Partial("_ClassificationPartials/EditGroupMember", model);
|
||||
|
||||
// model.ClassificationGroupList = groups;
|
||||
// model.GroupId = employeeMemberizeData.EditEmployeeGroupLists.FirstOrDefault()!.ClassificationGroupId;
|
||||
// model.JobId = employeeMemberizeData.EditEmployeeGroupLists.FirstOrDefault()!.ClassificationGroupJobId;
|
||||
// model.Id = employeeMemberizeData.EditEmployeeGroupLists.FirstOrDefault()!.Id; ;
|
||||
// return Partial("_ClassificationPartials/EditGroupMember", model);
|
||||
//}
|
||||
//اگر چند گروه داشت
|
||||
var multipleModel = new EditEmployeeGroup();
|
||||
multipleModel.EmployeeId = employeeId;
|
||||
multipleModel.SchemeId = schemeId;
|
||||
multipleModel.EmployeeFullName = employeeFullName;
|
||||
multipleModel.EditEmployeeGroupLists = employeeMemberizeData.EditEmployeeGroupLists;
|
||||
multipleModel.ClassificationGroupList = groups;
|
||||
|
||||
|
||||
|
||||
return Partial("_ClassificationPartials/EditMultipleGroupMember", multipleModel);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره ویرایش گروه پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
//public IActionResult OnPostEditGroupMember(AddEmployeeToGroup command)
|
||||
//{
|
||||
|
||||
// var result = _classificationSchemeApplication.EditGroupMember(command).GetAwaiter().GetResult();
|
||||
// if (!result.IsSuccedded)
|
||||
// {
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccess = false,
|
||||
// message = result.Message,
|
||||
// });
|
||||
// }
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccess = true,
|
||||
// message = result.Message,
|
||||
// });
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره ویرایش گروه های چندگانه پرسنل
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostEditMultipleGroupMember([FromBody] List<EditEmployeeGroupList> command)
|
||||
{
|
||||
var result = _classificationSchemeApplication.EditMultipleGroupMember(command).GetAwaiter().GetResult();
|
||||
if (!result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///لود مودال ویرایش پرسنل گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="employeeFullName"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetTransferToNewGroup(long employeeId, long schemeId, string employeeFullName)
|
||||
{
|
||||
|
||||
var groups = _classificationSchemeApplication.GetGroups(schemeId).GetAwaiter().GetResult();
|
||||
var employeeMemberizeData = _classificationSchemeApplication.GetEmployeeMemberizeData(employeeId).GetAwaiter().GetResult();
|
||||
|
||||
|
||||
|
||||
var multipleModel = new EditEmployeeGroup();
|
||||
multipleModel.EmployeeId = employeeId;
|
||||
multipleModel.SchemeId = schemeId;
|
||||
multipleModel.EmployeeFullName = employeeFullName;
|
||||
multipleModel.EditEmployeeGroupLists = employeeMemberizeData.EditEmployeeGroupLists;
|
||||
multipleModel.ClassificationGroupList = groups;
|
||||
|
||||
|
||||
|
||||
return Partial("_ClassificationPartials/TransferEmployeeGroup", multipleModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ذخیره انتقال پرسنل به گروه جدید
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostTransferToNewGroup([FromBody] List<EditEmployeeGroupList> command)
|
||||
{
|
||||
var result = _classificationSchemeApplication.TransferEmployeeToNewGroup(command).GetAwaiter().GetResult();
|
||||
if (!result.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
//تست طرح
|
||||
#region TestScheme
|
||||
|
||||
/// <summary>
|
||||
/// لود مودال تست
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetTestScheme(long schemeId)
|
||||
{
|
||||
var command = new EmployeeInfoTab
|
||||
{
|
||||
SchemeId = schemeId,
|
||||
|
||||
};
|
||||
var result = _classificationSchemeApplication.GetEmployeeDataTab(command).GetAwaiter().GetResult();
|
||||
|
||||
var employeeWithGroup = result.EmployeeInfoList.Where(x => x.HasGroup).ToList();
|
||||
var years =
|
||||
_yearlySalaryApplication.GetYears();
|
||||
var model = new EmployeeInfoTab()
|
||||
{
|
||||
SchemeId = schemeId,
|
||||
EmployeeInfoList = employeeWithGroup,
|
||||
YearlyList = years
|
||||
};
|
||||
|
||||
return Partial("_ClassificationPartials/TestScheme", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه تست
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="year"></param>
|
||||
/// <param name="month"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetComputeTest(long schemeId, long employeeId, string year, string month)
|
||||
{
|
||||
var scheme = _classificationSchemeApplication.GetClassificationSchemeToCompute(schemeId).GetAwaiter().GetResult();
|
||||
var typeOfCoefficient = scheme.TypeOfCoefficient;
|
||||
|
||||
var startDate = $"{year}/{month}/01";
|
||||
var endDate = startDate.FindeEndOfMonth();
|
||||
var startDateGr = startDate.ToGeorgianDateTime();
|
||||
var endDateGr = endDate.ToGeorgianDateTime();
|
||||
double salaryResult = 0;
|
||||
double salary = 0;
|
||||
double coefficient = 0;
|
||||
double rate = 0;
|
||||
string mathModel = "";
|
||||
var employeeMemberizeData = _classificationSchemeApplication.GetEmployeeMemberizeData(employeeId).GetAwaiter().GetResult();
|
||||
var employeeGroupMemberData = new List<(DateTime startGroupDate, DateTime EndGroupDate, string GroupNo)>();
|
||||
var employeeMemberizeDataOrderd = employeeMemberizeData.EditEmployeeGroupLists.OrderByDescending(x => x.StartGroupDate).ToList();
|
||||
if (employeeMemberizeDataOrderd.Any())
|
||||
{
|
||||
|
||||
var lastGroup = employeeMemberizeDataOrderd.FirstOrDefault();
|
||||
foreach (var group in employeeMemberizeDataOrderd)
|
||||
{
|
||||
if (group == lastGroup)
|
||||
{
|
||||
|
||||
employeeGroupMemberData.Add(new ValueTuple<DateTime, DateTime, string>(group.StartGroupDate.Value, endDateGr, group.GroupNo));
|
||||
}
|
||||
else
|
||||
{
|
||||
var endOfGroup = employeeGroupMemberData.Last().startGroupDate.AddDays(-1);
|
||||
employeeGroupMemberData.Add(new ValueTuple<DateTime, DateTime, string>(group.StartGroupDate.Value, endOfGroup, group.GroupNo));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
var groupNo = employeeMemberizeData.EditEmployeeGroupLists.FirstOrDefault()!.GroupNo;
|
||||
var salaryGroupNo = employeeGroupMemberData
|
||||
.FirstOrDefault(x => x.startGroupDate <= endDateGr && x.EndGroupDate >= startDateGr)!.GroupNo;
|
||||
var groupSalaryData = _classificationSchemeApplication.GetEditSalariesData(schemeId, startDate, endDate).GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var salaryData = groupSalaryData.SalariesAndCoefficientList.FirstOrDefault(x => x.GroupNo == salaryGroupNo);
|
||||
if (salaryData != null)
|
||||
{
|
||||
salary = salaryData.GroupSalary;
|
||||
coefficient = groupSalaryData.RialCoefficient;
|
||||
}
|
||||
|
||||
if (typeOfCoefficient != TypeOfCoefficient.RialCoefficient)
|
||||
{
|
||||
coefficient = 0;
|
||||
}
|
||||
|
||||
rate = ClassificationRangeOfGroupRate.GetGroupDistanceRate(salaryGroupNo).DistanceRate;
|
||||
|
||||
if (salaryGroupNo != "1")
|
||||
{
|
||||
salaryResult = (coefficient * rate) + salary;
|
||||
|
||||
mathModel = $"{salaryResult} = {salary} + ( x {rate} {coefficient} )";
|
||||
}
|
||||
else
|
||||
{
|
||||
salaryResult = salary;
|
||||
|
||||
}
|
||||
|
||||
var baseYearResult = _classificationSchemeApplication.BaseYearComputeOneGroup(scheme.ExecutionDateGr,
|
||||
scheme.EndSchemeDateGr, startDateGr, endDateGr, groupNo, employeeId, scheme.WorkshopId).GetAwaiter().GetResult();
|
||||
var baseYearResultFa = baseYearResult.BaseYearResult > 0 ? baseYearResult.BaseYearResult.ToMoney() : "0";
|
||||
var salaryResultFa = salaryResult.ToMoney();
|
||||
|
||||
double baseYearResultRound = baseYearResultFa != "0" ? baseYearResultFa.MoneyToDouble() : 0;
|
||||
double salaryResultRound = salaryResultFa.MoneyToDouble();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
salaryResult = salaryResultFa,
|
||||
salary = salary,
|
||||
rate = rate,
|
||||
coefficient = coefficient,
|
||||
salaryResultDouble = salaryResult,
|
||||
baseYearResult = baseYearResultFa,
|
||||
mabnaDailyWage = (baseYearResultRound + salaryResultRound).ToMoney(),
|
||||
baseYearDataList = baseYearResult.BaseYearDataList,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -617,6 +617,11 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
<input id="isClassified" type="checkbox" asp-for="Command.IsClassified" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||
<label asp-for="Command.IsClassified" style="margin: 0;">فعال سازی طرح طبقه بندی مشاغل</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="form5" style="display: none">
|
||||
|
||||
@@ -10,218 +10,217 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using ServiceHost.Hubs;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
[Authorize]
|
||||
public class CreateWorkshopModel : PageModel
|
||||
{
|
||||
[Authorize]
|
||||
public class CreateWorkshopModel : PageModel
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public CreateWorkshop Command;
|
||||
public SelectList Employers;
|
||||
|
||||
public CreateWorkshopModel(IWorkshopApplication workshopApplication, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper)
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public CreateWorkshop Command;
|
||||
public SelectList Employers;
|
||||
_workshopApplication = workshopApplication;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public CreateWorkshopModel(IWorkshopApplication workshopApplication, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper)
|
||||
public void OnGet()
|
||||
{
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var accounts = _accountRepository.GetAdminAccountsNew();
|
||||
var command = new CreateWorkshop
|
||||
{
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var accounts = _accountRepository.GetAdminAccountsNew();
|
||||
var command = new CreateWorkshop
|
||||
{
|
||||
Employers = _EmployerApplication.GetAllEmployers(),
|
||||
AccountsList = accounts,
|
||||
SeniorContractAccountsList = accounts.Where(x => x.RoleId == 3).ToList(),
|
||||
JuniorContractAccountsList = accounts.Where(x => x.RoleId == 5).ToList(),
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
CutContractEndOfYear = IsActive.None,
|
||||
RotatingShiftCompute = true
|
||||
};
|
||||
Employers = _EmployerApplication.GetAllEmployers(),
|
||||
AccountsList = accounts,
|
||||
SeniorContractAccountsList = accounts.Where(x => x.RoleId == 3).ToList(),
|
||||
JuniorContractAccountsList = accounts.Where(x => x.RoleId == 5).ToList(),
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
CutContractEndOfYear = IsActive.None,
|
||||
RotatingShiftCompute = true
|
||||
};
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
var checkOk = res.Any();
|
||||
int item = 0;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
var checkOk = res.Any();
|
||||
int item = 0;
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
|
||||
string bb = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
bb += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(bb);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (checkOk)
|
||||
{
|
||||
item = codes.Max();
|
||||
}
|
||||
|
||||
int sum = item + 1;
|
||||
string newcode = sum.ToString();
|
||||
command.ArchiveCode = newcode;
|
||||
command.PermissionIds = permissionIds;
|
||||
// command.CurrentAccoutRoleId = currentAccout.RoleId;
|
||||
|
||||
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreate(CreateWorkshop command)
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
bb += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = false;
|
||||
|
||||
int convert = int.Parse(bb);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
if (checkOk)
|
||||
{
|
||||
item = codes.Max();
|
||||
}
|
||||
|
||||
int sum = item + 1;
|
||||
string newcode = sum.ToString();
|
||||
command.ArchiveCode = newcode;
|
||||
command.PermissionIds = permissionIds;
|
||||
// command.CurrentAccoutRoleId = currentAccout.RoleId;
|
||||
|
||||
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreate(CreateWorkshop command)
|
||||
{
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
if (checkNumber)
|
||||
{
|
||||
//if (checkExist)
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
//Thread.Sleep(5000);
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? "" : command.TypeOfInsuranceSend;
|
||||
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Create(command);
|
||||
return new JsonResult(result);
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopName(string searchText)
|
||||
else
|
||||
{
|
||||
var result = _workshopApplication.GetWorkshopByTextSearch(searchText);
|
||||
result = result.OrderBy(x => x.WorkshopFullName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployerName(string searchText)
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
var result = _EmployerApplication.GetEmployerWithFNameOrLName(searchText);
|
||||
result = result.OrderBy(x => x.LName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
if (checkNumber)
|
||||
{
|
||||
//if (checkExist)
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
//Thread.Sleep(5000);
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? "" : command.TypeOfInsuranceSend;
|
||||
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Create(command);
|
||||
return new JsonResult(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopName(string searchText)
|
||||
{
|
||||
var result = _workshopApplication.GetWorkshopByTextSearch(searchText);
|
||||
result = result.OrderBy(x => x.WorkshopFullName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployerName(string searchText)
|
||||
{
|
||||
var result = _EmployerApplication.GetEmployerWithFNameOrLName(searchText);
|
||||
result = result.OrderBy(x => x.LName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Zone.ZoneViewModel
|
||||
@{
|
||||
}
|
||||
@@ -661,6 +661,11 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
<input id="isClassified" type="checkbox" asp-for="Command.IsClassified" class="form-control" style="width: 15px;margin: 0 0 0 10px;"/>
|
||||
<label asp-for="Command.IsClassified" style="margin: 0;">فعال سازی طرح طبقه بندی مشاغل</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="form5" style="display: none">
|
||||
|
||||
@@ -13,71 +13,71 @@ using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.EFCore.Repository;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
[Authorize]
|
||||
public class EditWorkshopModel : PageModel
|
||||
{
|
||||
[Authorize]
|
||||
public class EditWorkshopModel : PageModel
|
||||
public string Message { get; set; }
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public EditWorkshop Command;
|
||||
public SelectList Employers;
|
||||
public RollCallServiceViewModel RollCallService;
|
||||
public bool HasPermissionWorkshopInfo;
|
||||
public bool HasPermissionContract;
|
||||
public bool HasPermissionInsurance;
|
||||
public bool HasPermissionAccount;
|
||||
public List<AccountViewModel> DeactivatedAccounts;
|
||||
|
||||
public EditWorkshopModel(IWorkshopApplication workshopApplication, IWorkshopRepository workshopRepository, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper, IRollCallServiceApplication rollCallServiceApplication)
|
||||
{
|
||||
public string Message { get; set; }
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public EditWorkshop Command;
|
||||
public SelectList Employers;
|
||||
public RollCallServiceViewModel RollCallService;
|
||||
public bool HasPermissionWorkshopInfo;
|
||||
public bool HasPermissionContract;
|
||||
public bool HasPermissionInsurance;
|
||||
public bool HasPermissionAccount;
|
||||
public List<AccountViewModel> DeactivatedAccounts;
|
||||
_workshopApplication = workshopApplication;
|
||||
_workshopRepository = workshopRepository;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
}
|
||||
|
||||
public EditWorkshopModel(IWorkshopApplication workshopApplication, IWorkshopRepository workshopRepository, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper, IRollCallServiceApplication rollCallServiceApplication)
|
||||
public void OnGet(long id)
|
||||
{
|
||||
var permissions = _authHelper.GetPermissions();
|
||||
HasPermissionWorkshopInfo = permissions.Any(x => x == 10326);
|
||||
HasPermissionContract = permissions.Any(x => x == 10323);
|
||||
HasPermissionInsurance = permissions.Any(x => x == 10324);
|
||||
HasPermissionAccount = permissions.Any(x => x == 10330);
|
||||
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
// var currentAccout = _authHelper.CurrentAccountInfo();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_workshopRepository = workshopRepository;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
}
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
|
||||
public void OnGet(long id)
|
||||
{
|
||||
var permissions = _authHelper.GetPermissions();
|
||||
HasPermissionWorkshopInfo = permissions.Any(x => x == 10326);
|
||||
HasPermissionContract = permissions.Any(x => x == 10323);
|
||||
HasPermissionInsurance = permissions.Any(x => x == 10324);
|
||||
HasPermissionAccount = permissions.Any(x => x == 10330);
|
||||
RollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(id);
|
||||
if (RollCallService != null)
|
||||
RollCallService.EndServiceToFarsiDuration = RollCallService.EndServiceStr.ToFarsiDuration2();
|
||||
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
// var currentAccout = _authHelper.CurrentAccountInfo();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var allAccounts = _accountRepository.GetAccountsToEditWorkshop(id);
|
||||
|
||||
RollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(id);
|
||||
if (RollCallService != null)
|
||||
RollCallService.EndServiceToFarsiDuration = RollCallService.EndServiceStr.ToFarsiDuration2();
|
||||
var activeAccounts = allAccounts.Where(x => x.IsActiveString == "true").ToList();
|
||||
|
||||
var allAccounts = _accountRepository.GetAccountsToEditWorkshop(id);
|
||||
DeactivatedAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
|
||||
var activeAccounts = allAccounts.Where(x => x.IsActiveString == "true").ToList();
|
||||
var workshop = _workshopApplication.GetDetails(id);
|
||||
|
||||
DeactivatedAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.Employers = _EmployerApplication.GetAllEmployers();
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(id);
|
||||
|
||||
workshop.Employers = _EmployerApplication.GetAllEmployers();
|
||||
|
||||
workshop.AccountsList = activeAccounts;
|
||||
workshop.AccountsList = activeAccounts;
|
||||
|
||||
var adminAccounts = _accountRepository.GetAdminAccountsNew();
|
||||
workshop.SeniorContractAccountsList = adminAccounts.Where(x => x.RoleId == 3).ToList();
|
||||
@@ -88,182 +88,181 @@ namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
workshop.EmployerIdList = _workshopRepository.GetRelation(id);
|
||||
workshop.AccountIdsList = _workshopRepository.GetWorkshopAccountRelation(id);
|
||||
|
||||
workshop.DeActiveAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.ActiveAccounts = activeAccounts;
|
||||
//workshop.InAccountIdsList = _accountRepository.GetAccounts()
|
||||
// .Where(x => _workshopRepository.GetWorkshopAccountRelation(id).Contains(x.Id))
|
||||
// .ToList();
|
||||
workshop.DeActiveAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.ActiveAccounts = activeAccounts;
|
||||
//workshop.InAccountIdsList = _accountRepository.GetAccounts()
|
||||
// .Where(x => _workshopRepository.GetWorkshopAccountRelation(id).Contains(x.Id))
|
||||
// .ToList();
|
||||
|
||||
workshop.InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle");
|
||||
Message = workshop.ArchiveCode;
|
||||
workshop.PermissionIds = permissionIds;
|
||||
Command = workshop;
|
||||
workshop.InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle");
|
||||
Message = workshop.ArchiveCode;
|
||||
workshop.PermissionIds = permissionIds;
|
||||
Command = workshop;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEdit(EditWorkshop command)
|
||||
{
|
||||
var aaa = command;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEdit(EditWorkshop command)
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(command.Id);
|
||||
var lastNumber = workshop.ArchiveCode;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
var pration = new OperationResult();
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
var aaa = command;
|
||||
if (ModelState.IsValid)
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(command.Id);
|
||||
var lastNumber = workshop.ArchiveCode;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
var pration = new OperationResult();
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null && i.ArchiveCode != lastNumber)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
|
||||
if (checkNumber)
|
||||
{
|
||||
//var EmpoyersSelected = _EmployerRepository.Get(command.EmployerId);
|
||||
//if (EmpoyersSelected.EmployerNo == null)
|
||||
//{
|
||||
// EmpoyersSelected.EditEmployerNo(command.ArchiveCode);
|
||||
//}
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
#region Vafa
|
||||
|
||||
if (command.HasRollCallFreeVip == "ture")
|
||||
{
|
||||
//var todayPersianDate = DateTime.Now.ToFirstDayOfNextMonth();
|
||||
// var financialWorkshop
|
||||
//double amount = Convert.ToDouble(0);
|
||||
|
||||
//var commandSaveRollCall = new CreateRollCallService()
|
||||
//{
|
||||
// AccountId = _authHelper.CurrentAccountId(),
|
||||
// WorkshopId = command.Id,
|
||||
// ServiceType = "VIP",
|
||||
// EndService = command.EndService,
|
||||
// Amount = amount,
|
||||
// MaxPersonValid = -1,
|
||||
// Duration = command.Duration,
|
||||
//};
|
||||
|
||||
//var resultRollCall = _rollCallServiceApplication.Create(commandSaveRollCall);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "false";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Edit(command);
|
||||
|
||||
return new JsonResult(result);
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null && i.ArchiveCode != lastNumber)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
|
||||
if (checkNumber)
|
||||
{
|
||||
//var EmpoyersSelected = _EmployerRepository.Get(command.EmployerId);
|
||||
//if (EmpoyersSelected.EmployerNo == null)
|
||||
//{
|
||||
// EmpoyersSelected.EditEmployerNo(command.ArchiveCode);
|
||||
//}
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
#region Vafa
|
||||
|
||||
if (command.HasRollCallFreeVip == "ture")
|
||||
{
|
||||
//var todayPersianDate = DateTime.Now.ToFirstDayOfNextMonth();
|
||||
// var financialWorkshop
|
||||
//double amount = Convert.ToDouble(0);
|
||||
|
||||
//var commandSaveRollCall = new CreateRollCallService()
|
||||
//{
|
||||
// AccountId = _authHelper.CurrentAccountId(),
|
||||
// WorkshopId = command.Id,
|
||||
// ServiceType = "VIP",
|
||||
// EndService = command.EndService,
|
||||
// Amount = amount,
|
||||
// MaxPersonValid = -1,
|
||||
// Duration = command.Duration,
|
||||
//};
|
||||
|
||||
//var resultRollCall = _rollCallServiceApplication.Create(commandSaveRollCall);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "false";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Edit(command);
|
||||
|
||||
|
||||
return new JsonResult(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -334,7 +334,17 @@
|
||||
<div class="more-buttons flexible-div">
|
||||
<a class="btn pull-left employee-operations">عملیات</a>
|
||||
<div class="buttons-container">
|
||||
<a permission="10317" asp-page="/Company/PersonnelInfo/Index" asp-route-workshopID="@item.Id" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty?"disabled":"")">
|
||||
@if (item.IsClassified)
|
||||
{
|
||||
<a permission="10317" asp-page="./ClassificationScheme" asp-route-workshopId="@item.Id" asp-route-workshopName="@item.WorkshopFullName" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty ? "disabled" : "")" style="background-color: #ec407a; border:#ec407a;">
|
||||
<i class="fa fa-user"></i>
|
||||
<p>
|
||||
طرح طبقه بندی
|
||||
</p>
|
||||
</a>
|
||||
}
|
||||
|
||||
<a permission="10317" asp-page="/Company/PersonnelInfo/Index" asp-route-workshopID="@item.Id" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty ? "disabled" : "")">
|
||||
<i class="fa fa-user"></i>
|
||||
<p>
|
||||
اطلاعات پرسنل
|
||||
@@ -343,17 +353,17 @@
|
||||
@* <a href="#showmodal=@Url.Page("./Index", "ShowPersonnelList", new { id = item.Id })" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty?"disabled":"")"> *@
|
||||
<a permission="10319" asp-page="/Company/ConnectedPersonnels/Index" asp-route-workshopID="@item.Id" class="btn btn-success rad btn-rounded custom-btn-technical @(item.HasBlockContractingParty ? "disabled" : "")">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5439 14C17.8028 14 18.0196 14.1962 18.0454 14.4538C18.0854 14.8539 18.5548 15.0483 18.866 14.7937C19.0663 14.6298 19.3584 14.6443 19.5414 14.8274L19.8393 15.1252C20.0223 15.3083 20.0369 15.6003 19.8729 15.8007C19.6183 16.1119 19.8128 16.5813 20.2128 16.6213C20.4705 16.647 20.6667 16.8638 20.6667 17.1227V17.544C20.6667 17.8028 20.4705 18.0196 20.2129 18.0454C19.8129 18.0854 19.6184 18.5547 19.873 18.8659C20.0369 19.0662 20.0224 19.3582 19.8393 19.5413L19.5414 19.8391C19.3584 20.0222 19.0664 20.0368 18.866 19.8728C18.5548 19.6182 18.0854 19.8127 18.0454 20.2128C18.0196 20.4704 17.8028 20.6667 17.5439 20.6667H17.1227C16.8638 20.6667 16.647 20.4705 16.6213 20.2129C16.5813 19.8128 16.1119 19.6183 15.8007 19.873C15.6003 20.0369 15.3083 20.0223 15.1252 19.8393L14.8274 19.5414C14.6443 19.3584 14.6297 19.0664 14.7937 18.866C15.0483 18.5548 14.8539 18.0854 14.4538 18.0454C14.1962 18.0196 14 17.8028 14 17.5439V17.1228C14 16.8639 14.1962 16.647 14.4539 16.6213C14.854 16.5813 15.0484 16.1118 14.7938 15.8006C14.6298 15.6002 14.6443 15.3081 14.8274 15.125L15.1252 14.8273C15.3083 14.6442 15.6003 14.6296 15.8007 14.7936C16.1119 15.0482 16.5813 14.8538 16.6213 14.4538C16.647 14.1962 16.8638 14 17.1227 14H17.5439ZM17.3333 18.6667C18.0697 18.6667 18.6667 18.0697 18.6667 17.3333C18.6667 16.597 18.0697 16 17.3333 16C16.597 16 16 16.597 16 17.3333C16 18.0697 16.597 18.6667 17.3333 18.6667Z" fill="white" />
|
||||
<circle cx="12" cy="8" r="5" fill="white" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3249 15.0763C12.8883 15.0257 12.4456 15 12 15C10.0188 15 8.09292 15.5085 6.52112 16.4465C5.30069 17.1749 4.34666 18.1307 3.74108 19.2183C3.46638 19.7117 3.79562 20.2902 4.34843 20.4054C7.85678 21.1365 11.4437 21.3594 15 21.074V21H14C12.3431 21 11 19.6569 11 18C11 16.5753 11.9932 15.3825 13.3249 15.0763Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5439 14C17.8028 14 18.0196 14.1962 18.0454 14.4538C18.0854 14.8539 18.5548 15.0483 18.866 14.7937C19.0663 14.6298 19.3584 14.6443 19.5414 14.8274L19.8393 15.1252C20.0223 15.3083 20.0369 15.6003 19.8729 15.8007C19.6183 16.1119 19.8128 16.5813 20.2128 16.6213C20.4705 16.647 20.6667 16.8638 20.6667 17.1227V17.544C20.6667 17.8028 20.4705 18.0196 20.2129 18.0454C19.8129 18.0854 19.6184 18.5547 19.873 18.8659C20.0369 19.0662 20.0224 19.3582 19.8393 19.5413L19.5414 19.8391C19.3584 20.0222 19.0664 20.0368 18.866 19.8728C18.5548 19.6182 18.0854 19.8127 18.0454 20.2128C18.0196 20.4704 17.8028 20.6667 17.5439 20.6667H17.1227C16.8638 20.6667 16.647 20.4705 16.6213 20.2129C16.5813 19.8128 16.1119 19.6183 15.8007 19.873C15.6003 20.0369 15.3083 20.0223 15.1252 19.8393L14.8274 19.5414C14.6443 19.3584 14.6297 19.0664 14.7937 18.866C15.0483 18.5548 14.8539 18.0854 14.4538 18.0454C14.1962 18.0196 14 17.8028 14 17.5439V17.1228C14 16.8639 14.1962 16.647 14.4539 16.6213C14.854 16.5813 15.0484 16.1118 14.7938 15.8006C14.6298 15.6002 14.6443 15.3081 14.8274 15.125L15.1252 14.8273C15.3083 14.6442 15.6003 14.6296 15.8007 14.7936C16.1119 15.0482 16.5813 14.8538 16.6213 14.4538C16.647 14.1962 16.8638 14 17.1227 14H17.5439ZM17.3333 18.6667C18.0697 18.6667 18.6667 18.0697 18.6667 17.3333C18.6667 16.597 18.0697 16 17.3333 16C16.597 16 16 16.597 16 17.3333C16 18.0697 16.597 18.6667 17.3333 18.6667Z" fill="white"/>
|
||||
<circle cx="12" cy="8" r="5" fill="white"/>
|
||||
</svg>
|
||||
|
||||
<p>
|
||||
|
||||
|
||||
تنظیمات فنی پرسنل
|
||||
</p>
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.AddEmployeeToGroup
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
|
||||
<style>
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
width: 276px;
|
||||
left: 47%;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">افزودن پرسنل به گروه</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row m-t-10">
|
||||
<h5 class="modal-title">@Model.EmployeeFullName</h5>
|
||||
</div>
|
||||
<div class="card shadow-sm border-0" style="margin-top: 31px;">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select id="groupList" asp-for="GroupId" class="form-select form-control" onchange="selectGroup(this)">
|
||||
<option value="0">انتخاب گروه</option>
|
||||
@foreach (var item in @Model.ClassificationGroupList)
|
||||
{
|
||||
<option value="@item.GroupId" data-groupno="@item.GroupNo"><span>گروه</span><span> </span><span>@item.GroupNo</span></option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select id="jobList" asp-for="JobId" class="form-select form-control">
|
||||
<option value="0">انتخاب سمت</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div id="groupHiddenInputs">
|
||||
</div>
|
||||
|
||||
<div id="jobHiddenInputs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="EmployeeId" value="@Model.EmployeeId" />
|
||||
<div class="modal-footer border-0">
|
||||
<button type="button" onclick="saveBtn()" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function selectGroup(selectElement) {
|
||||
const selectedOption = selectElement.options[selectElement.selectedIndex];
|
||||
const groupId = selectedOption.value;
|
||||
// const groupNo = selectedOption.getAttribute("data-groupno");
|
||||
// $('#groupHiddenInputs').html('');
|
||||
// const inputs =`
|
||||
// <input type="hidden" name="GroupId" value="${groupId}" />
|
||||
|
||||
// `;
|
||||
// $('#groupHiddenInputs').append(inputs);
|
||||
let schemeId = '@Model.SchemeId';
|
||||
var url = `/Admin/Company/Workshops/ClassificationScheme?handler=JobList&schemeId=${schemeId}&groupId=${groupId}`;
|
||||
|
||||
console.log("Request URL:", url);
|
||||
|
||||
$.get(url, function (data) {
|
||||
// فرض بر این است که data.jobs یک آرایه از آبجکتهایی مثل { jobId, jobName, jobCode } باشد
|
||||
const jobList = $("#jobList");
|
||||
jobList.empty(); // پاک کردن آیتمهای قبلی
|
||||
jobList.append('<option value="0">انتخاب سمت</option>');
|
||||
|
||||
data.jobs.forEach(item => {
|
||||
jobList.append(
|
||||
`<option value="${item.jobId}" data-jobname="${item.jobName}" data-jobcode="${item.jobCode}">
|
||||
${item.jobCode} - ${item.jobName}
|
||||
</option>`
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// function selectJob(selectElement) {
|
||||
|
||||
// const selectedOption = selectElement.options[selectElement.selectedIndex];
|
||||
// const jobId = selectedOption.value;
|
||||
// // const jobname = selectedOption.getAttribute("data-jobname");
|
||||
// // const jobcode = selectedOption.getAttribute("data-jobcode");
|
||||
|
||||
// $('#jobHiddenInputs').html('');
|
||||
// const inputs =`
|
||||
// <input type="hidden" name="jobId" value="${jobId}" />
|
||||
|
||||
// `;
|
||||
// $('#jobHiddenInputs').append(inputs);
|
||||
|
||||
|
||||
// }
|
||||
|
||||
function saveBtn() {
|
||||
const groupSelect = document.getElementById("groupList");
|
||||
const jobSelect = document.getElementById("jobList");
|
||||
|
||||
const groupId = groupSelect.options[groupSelect.selectedIndex].value;
|
||||
const jobId = jobSelect.options[jobSelect.selectedIndex].value;
|
||||
|
||||
if (groupId == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "گروه را انتخاب کنید");
|
||||
return;
|
||||
}
|
||||
|
||||
if (jobId == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "سمت را انتخاب کنید");
|
||||
return;
|
||||
}
|
||||
|
||||
const command = {
|
||||
employeeId: '@Model.EmployeeId',
|
||||
schemeId: '@Model.SchemeId',
|
||||
groupId: Number(groupId),
|
||||
jobId: Number(jobId)
|
||||
};
|
||||
|
||||
|
||||
var urlAjaxToSave = '@Url.Page("/Company/Workshops/ClassificationScheme", "AddToGroup")';
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: urlAjaxToSave,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: command,
|
||||
success: function (response) {
|
||||
if(response.isSuccess){
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
$('.close').click();
|
||||
|
||||
setTimeout(function () {
|
||||
$('#addEmployeesTab').click();
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,705 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.EmployeeInfoTab
|
||||
@{
|
||||
<style>
|
||||
|
||||
.container .searchPannel {
|
||||
background: #fbfbff;
|
||||
border-radius: 20px;
|
||||
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
border: 1px solid #e6e6e6;
|
||||
min-height: 680px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.container .filter {
|
||||
background: #fbfbff;
|
||||
border-radius: 20px;
|
||||
margin: 20px 0px;
|
||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
border: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
padding: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.table > thead > tr > th {
|
||||
border-bottom: 2px #fbfbff !important;
|
||||
background-color: #2dbcbc;
|
||||
color: #fff;
|
||||
font-weight: 200;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td {
|
||||
color: #131313;
|
||||
border-top: 2px solid #fbfbff !important;
|
||||
background-color: #ddf4f4;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
.table > tbody > tr.withdraw > td {
|
||||
background-color: #b5b5b5 !important;
|
||||
}
|
||||
|
||||
tr td:first-child {
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
tr td:last-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
tr:nth-child(even) td {
|
||||
background-color: #b0e0e08f !important;
|
||||
}
|
||||
|
||||
tr th:first-child {
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
tr th:last-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
.successSend {
|
||||
background-color: #b8e3bc;
|
||||
color: #638f6e;
|
||||
padding: 2px 7px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.numbers {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
display: flex;
|
||||
width: 30px;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
@@media screen and (min-width: 1600px) {
|
||||
.table > thead > tr > th {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.date-box {
|
||||
display: flex;
|
||||
background-color: #e7dbff;
|
||||
align-items: center;
|
||||
padding: 7px;
|
||||
border-radius: 10px;
|
||||
margin: 3px;
|
||||
width: 24.6%;
|
||||
color: #131313;
|
||||
}
|
||||
|
||||
.selectTo {
|
||||
background-color: #ceebeb;
|
||||
align-items: center;
|
||||
padding: 7px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.bottomRow {
|
||||
background-color: #e7dbff;
|
||||
align-items: center;
|
||||
padding: 7px;
|
||||
border-radius: 10px;
|
||||
margin: 3px;
|
||||
width: 24.6%
|
||||
}
|
||||
|
||||
.searchAll {
|
||||
background-color: #8892b3;
|
||||
border-color: #8892b3;
|
||||
font-family: 'Web_Yekan' !important;
|
||||
}
|
||||
|
||||
.searchOne {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
background-color: #3da9c6;
|
||||
border-color: #3da9c6;
|
||||
font-family: 'Web_Yekan' !important;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.searchOne:hover, .searchOne:focus, .searchOne:active {
|
||||
background-color: #8fe1e9;
|
||||
border-color: #8fe1e9;
|
||||
}
|
||||
|
||||
.searchAll:hover, .searchAll:focus, .searchAll:active {
|
||||
background-color: #40424b;
|
||||
border-color: #40424b;
|
||||
}
|
||||
|
||||
.searchOne i {
|
||||
padding-left: 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@media only screen and (max-width : 1820px) {
|
||||
.date-box {
|
||||
width: 24.2%
|
||||
}
|
||||
|
||||
.selectTo {
|
||||
width: 24.2%
|
||||
}
|
||||
|
||||
.bottomRow {
|
||||
width: 24.2%
|
||||
}
|
||||
}
|
||||
|
||||
@@media only screen and (max-width : 992px) {
|
||||
.date-box {
|
||||
width: 100%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.selectTo {
|
||||
width: 49%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.contractingParty {
|
||||
width: 100%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.startDate {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.endDate {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%
|
||||
}
|
||||
|
||||
.bottomRow {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%
|
||||
}
|
||||
|
||||
.searchAll {
|
||||
width: 49.5%;
|
||||
}
|
||||
|
||||
.searchOne {
|
||||
width: 49.8%;
|
||||
}
|
||||
}
|
||||
|
||||
@@media only screen and (max-width : 375px) {
|
||||
|
||||
.date-box {
|
||||
width: 100%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.selectTo {
|
||||
width: 49%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.contractingParty {
|
||||
width: 100%;
|
||||
margin: 0px 0px 2px 0px;
|
||||
}
|
||||
|
||||
.startDate {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.endDate {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%
|
||||
}
|
||||
|
||||
.bottomRow {
|
||||
margin: 0px 0px 2px 0px;
|
||||
width: 50%
|
||||
}
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #dfdfdf;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #3c8397;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 40px;
|
||||
}
|
||||
|
||||
.titlePanel {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.btn-print-all {
|
||||
background: #06b6d4;
|
||||
border: 0;
|
||||
padding: 4px 8px;
|
||||
border-radius: 5px;
|
||||
color: #fff;
|
||||
transition: all .1s ease-in;
|
||||
}
|
||||
|
||||
.btn-print-all:hover {
|
||||
background: #0891b2;
|
||||
}
|
||||
|
||||
.btn-print {
|
||||
background: #8892b3;
|
||||
padding: 4px 6px;
|
||||
border-radius: 5px;
|
||||
transition: all .1s ease-in;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
display: flex;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.btn-print:hover {
|
||||
background: #0284c7;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
height: 630px;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
tr.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltiptext {
|
||||
cursor: text;
|
||||
font-size: 1rem;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.new-tooltip {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.new-tooltip .tooltiptext {
|
||||
width: 100px;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: #fff;
|
||||
-webkit-backdrop-filter: blur(1px);
|
||||
backdrop-filter: blur(1px);
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
font-weight: semi-bold;
|
||||
padding: 5px 5px 5px 8px;
|
||||
transition: opacity 0.5s, visibility 0.5s;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 25px;
|
||||
left: -45px;
|
||||
}
|
||||
|
||||
.new-tooltip:hover .tooltiptext {
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.skeleton-loader {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
background: linear-gradient(90deg, #EEEEEE 25%, #DEDEDE 50%, #EEEEEE 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 2s infinite ease-in-out;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 3px
|
||||
}
|
||||
|
||||
@@keyframes loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 991px) {
|
||||
.responsive {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0 10px;
|
||||
}
|
||||
|
||||
.responsive > thead th {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.responsive > tbody td,
|
||||
.responsive > tbody th {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.responsive > tbody > tr:nth-child(even) td,
|
||||
.responsive > tbody > tr:nth-child(even) th {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.responsive > tbody > tr > td {
|
||||
font-size: 11px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-top: 1px solid #fbfbff !important;
|
||||
}
|
||||
|
||||
.responsive > tbody > tr td:first-child {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.responsive > tbody > tr td:last-child {
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
|
||||
[row-header] {
|
||||
position: relative;
|
||||
/* width: 50%;*/
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
[row-header]:before {
|
||||
content: attr(row-header);
|
||||
display: flex;
|
||||
text-align: right;
|
||||
width: 125px;
|
||||
padding-left: 30px;
|
||||
white-space: break-spaces;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.icon-span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 14px;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.icon-span{
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-span svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.add-to-group {
|
||||
background-color: #84cc16;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.edit-group-member {
|
||||
background-color: #009ee2;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.transfer-group-member{
|
||||
background-color: #75aea7;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.job-btn-text{
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
var i = 1;
|
||||
var successSend = "successSend";
|
||||
}
|
||||
|
||||
|
||||
<div class="container filter">
|
||||
<h3 class="panel-title" style="display: inline-block;color: #7a96a6"><i class="fa fa-search" style="padding-left: 3px; font-size: 14px"></i> جستجو</h3>
|
||||
<div class="row" style="padding: 15px 10px">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12 pull-right contractingParty">
|
||||
<div class="form-group selectTo" style="width: 100% !important; margin: 0 auto;">
|
||||
<input style="width: 100%" id="FullName" placeholder="نام پرسنل" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container searchPannel">
|
||||
<div class="titlePanel">
|
||||
<h3 class="panel-title" style="display: inline-block;color: #131313;font-size: 15px;">
|
||||
<i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i>
|
||||
لیست پرسنل
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<div id="loading" style="padding: 0 0 0 5px;">
|
||||
@for (var j = 0; j < 16; j++)
|
||||
{
|
||||
<div class="skeleton-loader"></div>
|
||||
}
|
||||
</div>
|
||||
<div id="RealodData"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let schemeId = '@Model.SchemeId';
|
||||
$("#FullName").keyup(function() {
|
||||
const fullname = $(this).val();
|
||||
|
||||
LoadData(schemeId, fullname);
|
||||
|
||||
});
|
||||
|
||||
LoadData(schemeId, fullname = "");
|
||||
function LoadData(schemeId, fullName) {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: '@Url.Page("/Company/Workshops/ClassificationScheme", "AjaxDataLoading")',
|
||||
type: 'GET',
|
||||
data: {schemeId: schemeId, fullName: fullName},
|
||||
success: function(response) {
|
||||
$('#loading').hide();
|
||||
$('#RealodData').html('');
|
||||
|
||||
var DataTableHtml = '';
|
||||
if (!response.hasEmployee) {
|
||||
DataTableHtml += '<h1 style="height: 600px;display: flex;align-items: center;justify-content: center;">این کارگاه پرسنلی ندارد!</h1>';
|
||||
} else {
|
||||
const data = response.personnelList;
|
||||
var i = 0;
|
||||
DataTableHtml += `<table class="table responsive">
|
||||
<thead>
|
||||
<tr class="sticky">
|
||||
<th>ردیف</th>
|
||||
<th>نام و نام خانوادگی</th>
|
||||
|
||||
<th style="text-align: center;">آخرین تاریخ شروع بکار قرارداد</th>
|
||||
<th style="text-align: center;">تاریخ ترک کار قرارداد</th>
|
||||
<th style="text-align: center;">آخرین تاریخ شروع بکار بیمه</th>
|
||||
<th style="text-align: center;">تاریخ ترک کار بیمه</th>
|
||||
<th style="text-align: center;">وضعیت گروه</th>
|
||||
<th style="text-align: center;">عضویت گروه</th>`;
|
||||
|
||||
DataTableHtml += `<th style="text-align: left;">عملیات</th>`;
|
||||
|
||||
|
||||
DataTableHtml += `</tr>
|
||||
</thead>
|
||||
<tbody class="tb">`;
|
||||
data.forEach(function(item) {
|
||||
DataTableHtml += `
|
||||
<tr class="${item.black ? "withdraw" : ""}">
|
||||
<td row-header="ردیف" style="text-align: center">
|
||||
<span class="numbers">
|
||||
${i += 1}
|
||||
<span class="idPersonnel" style="display: none;">${item.employeeId}</span>
|
||||
</span>
|
||||
</td>
|
||||
<td row-header="نام و نام خانوادگی">${item.fullName}</td>`;
|
||||
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="آخرین تاریخ شروع بکار قرارداد" class="text-center">`;
|
||||
if (item.lastStartContractWork == null || item.lastStartContractWork == "") {
|
||||
DataTableHtml += `<span>-</span>`;
|
||||
} else {
|
||||
DataTableHtml += `${item.lastStartContractWork}`;
|
||||
}
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="تاریخ ترک کار قرارداد" class="text-center">`;
|
||||
if (item.lastLeftContractWork == null || item.lastLeftContractWork == "") {
|
||||
DataTableHtml += `<span>-</span>`;
|
||||
} else {
|
||||
DataTableHtml += `${item.lastLeftContractWork}`;
|
||||
}
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="آخرین تاریخ شروع بکار بیمه" class="text-center">`;
|
||||
if (item.lastStartInsuranceWork == null || item.lastStartInsuranceWork == "") {
|
||||
DataTableHtml += `<span>-</span>`;
|
||||
} else {
|
||||
DataTableHtml += `${item.lastStartInsuranceWork}`;
|
||||
}
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="تاریخ ترک کار بیمه" class="text-center">`;
|
||||
if (item.lastLeftInsuranceWork == null || item.lastLeftInsuranceWork == "") {
|
||||
DataTableHtml += `<span>-</span>`;
|
||||
} else {
|
||||
DataTableHtml += `${item.lastLeftInsuranceWork}`;
|
||||
}
|
||||
|
||||
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="وضعیت گروه" class="text-center">`;
|
||||
if (item.hasGroup) {
|
||||
DataTableHtml += `<span style="background-color: #99d0b0;padding: 5px;border-radius: 5px;">دارای گروه</span>`;
|
||||
} else {
|
||||
DataTableHtml += `<span style="background-color: #ffbfbf;padding: 5px;border-radius: 5px;">فاقد گروه</span>`;
|
||||
}
|
||||
DataTableHtml += `</td>
|
||||
<td row-header="عضویت گروه" class="text-center">`;
|
||||
if (item.hasGroup) {
|
||||
DataTableHtml += `${item.groupNo}`;;
|
||||
} else {
|
||||
DataTableHtml += `<span>-</span>`;
|
||||
}
|
||||
|
||||
DataTableHtml += `<td row-header="عملیات" style="direction: ltr;">`;
|
||||
|
||||
|
||||
if (item.hasGroup)
|
||||
{
|
||||
DataTableHtml += `
|
||||
<span onclick="editGroupMember(${item.employeeId}, '${item.fullName}')" class="icon-span edit-group-member" style="padding: 4px;font-size: 11px;">
|
||||
<a>
|
||||
<span class="job-btn-text">ویرایش</span>
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</a>
|
||||
</span>`;
|
||||
DataTableHtml += `
|
||||
<span onclick="transferToNewGroup(${item.employeeId}, '${item.fullName}')" class="icon-span transfer-group-member" style="padding: 4px;font-size: 11px;">
|
||||
<a>
|
||||
<span class="job-btn-text">انتقال</span>
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</a>
|
||||
</span>`;
|
||||
}
|
||||
else
|
||||
{
|
||||
DataTableHtml += `
|
||||
<span onclick="addToGroup(${item.employeeId}, '${item.fullName}')" class="icon-span add-to-group" style="padding: 4px 18px;font-size: 11px;">
|
||||
<a >
|
||||
<span class="job-btn-text">افزودن به گروه</span>
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</a>
|
||||
</span>`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DataTableHtml += `</td></tr>`;
|
||||
});
|
||||
DataTableHtml += `</tbody></table>`;
|
||||
}
|
||||
|
||||
$('#RealodData').append(DataTableHtml);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function addToGroup(employeeId, fullName){
|
||||
let schemeId = '@Model.SchemeId';
|
||||
|
||||
const parametr = `&employeeId=${employeeId}&schemeId=${schemeId}&employeeFullName=${fullName}`;
|
||||
const url = '#showmodal=@Url.Page("/Company/Workshops/ClassificationScheme", "AddToGroup")';
|
||||
window.location.href = url + parametr;
|
||||
}
|
||||
|
||||
function editGroupMember(employeeId, fullName){
|
||||
let schemeId = '@Model.SchemeId';
|
||||
|
||||
const parametr = `&employeeId=${employeeId}&schemeId=${schemeId}&employeeFullName=${fullName}`;
|
||||
const url = '#showmodal=@Url.Page("/Company/Workshops/ClassificationScheme", "EditGroupMember")';
|
||||
window.location.href = url + parametr;
|
||||
}
|
||||
|
||||
|
||||
function transferToNewGroup(employeeId, fullName){
|
||||
let schemeId = '@Model.SchemeId';
|
||||
const parametr = `&employeeId=${employeeId}&schemeId=${schemeId}&employeeFullName=${fullName}`;
|
||||
const url = '#showmodal=@Url.Page("/Company/Workshops/ClassificationScheme", "TransferToNewGroup")';
|
||||
window.location.href = url + parametr;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,162 @@
|
||||
@model List<CompanyManagment.App.Contracts.ClassificationScheme.ClassificationGroupAndJobModel>
|
||||
@{
|
||||
<style>
|
||||
.tr-table-add {
|
||||
background-color: #dfdfdf;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.tr-table-edit {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.row-number {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 80px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.icon-span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 14px;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.icon-span svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.add-jobs{
|
||||
background-color: #84cc16;
|
||||
color:white;
|
||||
|
||||
}
|
||||
|
||||
.edit-jobs {
|
||||
background-color: #009ee2;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
<div class="card card-pattern m-t-10">
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- گروه 1 تا 10 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemRight in Model.Take(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 @(itemRight.EditClassificationGroupJob.Count < 1 ? "tr-table-add" : "tr-table-edit")" data-groupid="@itemRight.GroupId">
|
||||
|
||||
<div class="col-3 col-md-3">
|
||||
|
||||
<div class="row-number">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemRight.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-6"></div>
|
||||
|
||||
<div class="col-3 col-md-3 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "CreateOrEditJobs" ,new {groupId = itemRight.GroupId , groupNo = itemRight.GroupNo})">
|
||||
<span class="icon-span @(itemRight.EditClassificationGroupJob.Count < 1 ? "add-jobs" : "edit-jobs")" style="padding: 4px;font-size: 11px;">
|
||||
@if (itemRight.EditClassificationGroupJob.Count < 1)
|
||||
{
|
||||
<span class="job-btn-text">افزودن شغل</span>
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="job-btn-text">ویرایش شغل</span>
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>
|
||||
}
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<!-- گروه 11 تا 20 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemLeft in Model.Skip(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 @(itemLeft.EditClassificationGroupJob.Count < 1 ? "tr-table-add" : "tr-table-edit")" data-groupid="@itemLeft.GroupId">
|
||||
|
||||
<div class="col-3 col-md-3">
|
||||
|
||||
<div class="row-number">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemLeft.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-6"></div>
|
||||
|
||||
<div class="col-3 col-md-3 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "CreateOrEditJobs" ,new {groupId = itemLeft.GroupId , groupNo = itemLeft.GroupNo})">
|
||||
<span class="icon-span @(itemLeft.EditClassificationGroupJob.Count < 1 ? "add-jobs" : "edit-jobs")" style="padding: 4px;font-size: 11px;">
|
||||
@if (itemLeft.EditClassificationGroupJob.Count < 1)
|
||||
{
|
||||
<span class="job-btn-text">افزودن شغل</span>
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="job-btn-text">ویرایش شغل</span>
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>
|
||||
}
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.SalaryAndRialCoefficientTab
|
||||
@{
|
||||
|
||||
<style>
|
||||
.card-scroll {
|
||||
/* ارتفاع از بالا تا پایین صفحه، با در نظر گرفتن فاصله از پایین */
|
||||
height: calc(100vh - 270px); /* فاصله از بالا یا هدر */
|
||||
margin-bottom: 10px; /* فاصله از پایین صفحه */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-scroll .card-content {
|
||||
flex: 1; /* پر کردن فضای باقیمانده */
|
||||
overflow-y: auto; /* فقط وقتی نیاز شد اسکرول بده */
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.head-table {
|
||||
font-size: 14px;
|
||||
background-color: #2dbcbc;
|
||||
padding: 4px 1px;
|
||||
border-radius: 5px;
|
||||
color: aliceblue;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.tr-table {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 4px 1px;
|
||||
margin-bottom: 5px;
|
||||
font-family: "IranText" !important;
|
||||
|
||||
}
|
||||
|
||||
.row-number {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.icon-span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 14px;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.icon-span svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.addSalaries{
|
||||
|
||||
font-size: 16px;
|
||||
align-self: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
int rowIndex = 1;
|
||||
}
|
||||
<div class="card card-pattern m-t-10 card-scroll">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card-content">
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row" style="margin-bottom: 10px">
|
||||
<a class="btn btn-success addSalaries" href="#showmodal=@Url.Page("./ClassificationScheme", "CreateSalaries" ,new {schemeId = @Model.SchemeId})">
|
||||
افزودن دستمزدها
|
||||
</a>
|
||||
</div>
|
||||
<!-- هدر -->
|
||||
<div class="row fw-bold mb-2 head-table">
|
||||
<div class="col-2 col-md-1">ردیف</div>
|
||||
<div class="col-10 col-md-2">سال</div>
|
||||
<div class="col-6 col-md-2">تاریخ شروع</div>
|
||||
<div class="col-6 col-md-2">تاریخ پایان</div>
|
||||
<div class="col-6 col-md-2" style="direction:ltr"> ضریب ریالی </div>
|
||||
<div class="col-12 col-md-3" style="float:left; direction:ltr">عملیات</div>
|
||||
</div>
|
||||
|
||||
@if (!Model.HasAnySalaries)
|
||||
{
|
||||
<h2 style="color: #c2b8b4;text-align: center;margin-top: 55px;">
|
||||
هنوز هیچ دستمزدی افزده نشده است
|
||||
</h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- لیست -->
|
||||
@foreach (var item in Model.SalaryAndRialCoefficientTabDataList)
|
||||
{
|
||||
<div class="row align-items-center p-2 tr-table">
|
||||
|
||||
<div class="col-2 col-md-1"><div class="row-number">@rowIndex</div></div>
|
||||
<div class="col-10 col-md-2">@item.Year</div>
|
||||
<div class="col-6 col-md-2">
|
||||
@item.StartDateFa
|
||||
</div>
|
||||
<div class="col-6 col-md-2">@item.EndDateFa</div>
|
||||
<div class="col-6 col-md-2" style="direction:ltr">@item.RialCoefficientStr</div>
|
||||
@{
|
||||
rowIndex++;
|
||||
}
|
||||
<div class="col-12 col-md-3 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
|
||||
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "EditSalariesData" ,new {schemeId = Model.SchemeId, startDate = item.StartDateFa, endDate = item.EndDateFa})">
|
||||
<span class="icon-span" style="background-color:#ade7f2">
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
<a href="#">
|
||||
<span class="icon-span" style="background-color: #ade7f2;padding: 4px;font-size: 11px;color: #009ee2;">
|
||||
جزئیات
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.ClassificationSchemeListDto
|
||||
|
||||
@{
|
||||
int index = 1;
|
||||
<style>
|
||||
.head-table{
|
||||
font-size: 14px;
|
||||
background-color: #2dbcbc;
|
||||
padding: 4px 1px;
|
||||
border-radius: 5px;
|
||||
color: aliceblue;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.tr-table{
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 4px 1px;
|
||||
}
|
||||
|
||||
.row-number{
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.icon-span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 14px;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.icon-span svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
}
|
||||
<div class="card card-pattern m-t-10">
|
||||
|
||||
@if (!Model.HasScheme)
|
||||
{
|
||||
|
||||
|
||||
<a class="btn btn-success"
|
||||
style="border-radius:5px;" href="#showmodal=@Url.Page("./ClassificationScheme", "CreateScheme" ,new {workshopId = @Model.WorkshopId})">
|
||||
@* <i class="fa fa-user-plus" aria-hidden="true" style="margin: 0px 5px;"></i> *@
|
||||
|
||||
<span class="icon-span">
|
||||
|
||||
<svg width="19" height="19" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span style="margin-right:4px">ایجاد طرح</span>
|
||||
</span>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="row fw-bold mb-2 head-table">
|
||||
<div class="col-2 col-md-1">ردیف</div>
|
||||
<div class="col-10 col-md-3">نام طراح</div>
|
||||
<div class="col-6 col-md-2">تاریخ شمول</div>
|
||||
<div class="col-6 col-md-3">تاریخ اجرا</div>
|
||||
<div class="col-12 col-md-3" style="float:left; direction:ltr">عملیات</div>
|
||||
</div>
|
||||
|
||||
<!-- لیست -->
|
||||
@foreach (var item in Model.ClassificationSchemesList)
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table">
|
||||
|
||||
<div class="col-2 col-md-1"><div class="row-number">@index</div></div>
|
||||
<div class="col-10 col-md-3">@item.DesignerFullName</div>
|
||||
<div class="col-6 col-md-2">@item.IncludingDateFa</div>
|
||||
<div class="col-6 col-md-3">@item.ExecutionDateFa</div>
|
||||
@{
|
||||
index++;
|
||||
}
|
||||
<div class="col-12 col-md-3 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<a href="#"
|
||||
style="border-radius:5px;" >
|
||||
<span class="icon-span" style="background-color:#ddd3e0">
|
||||
<svg width="19" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "EditScheme" ,new {id = item.Id})">
|
||||
<span class="icon-span" style="background-color:#ade7f2">
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
<a href="#">
|
||||
<span class="icon-span" style="background-color: #ade7f2;padding: 4px;font-size: 11px;color: #009ee2;">
|
||||
بازنگری
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
@if (Model.HasScheme)
|
||||
{
|
||||
<div class="card card-pattern m-t-10">
|
||||
<a class="btn btn-success"
|
||||
style="border-radius:5px;" href="#showmodal=@Url.Page("./ClassificationScheme", "TestScheme" ,new {schemeId = @Model.ClassificationSchemesList.FirstOrDefault()!.Id})">
|
||||
@* <i class="fa fa-user-plus" aria-hidden="true" style="margin: 0px 5px;"></i> *@
|
||||
|
||||
<span class="icon-span">
|
||||
|
||||
<svg width="19" height="19" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span style="margin-right:4px">تست طرح</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,576 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.ClassificationGroupAndJobModel
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@{
|
||||
|
||||
|
||||
<link href="@Href("~/DadmehrSelect/dad-mehr-select.css")" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
|
||||
.modal .modal-dialog .modal-content{
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
.name-right{
|
||||
position:inherit !important;
|
||||
}
|
||||
|
||||
.dadmehr-select-search .options li{
|
||||
padding: 4px 12px;
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);
|
||||
border-top: none;
|
||||
border-radius: 7px;
|
||||
background-color: #e8e8e8;
|
||||
cursor: pointer;
|
||||
color: #504f4f;
|
||||
}
|
||||
|
||||
.dadmehr-select-search .custom-select{
|
||||
|
||||
borderRadius: 5px!important;
|
||||
border-top-right-radius : 5px;
|
||||
|
||||
}
|
||||
|
||||
.job-item{
|
||||
background-color: #bdeae9;
|
||||
|
||||
|
||||
flex: 0 0 calc(33.333% - 8px); /* دقیقاً سهتا در هر سطر */
|
||||
box-sizing: border-box;
|
||||
direction: rtl;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start; /* آیتمها در یک راستا از بالا */
|
||||
padding: 6px 10px;
|
||||
border-radius: 5px;
|
||||
min-height: 36px; /* برای ارتفاع یکنواخت */
|
||||
}
|
||||
|
||||
.tr-job {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.arrowselected{
|
||||
background-color: #69a3a3 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> تعیین مشاغل گروه @Model.GroupNo </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
<div class=" dadmehr-select-search" onclick="inputFocus(this)">
|
||||
<div class="custom-select text-right">
|
||||
<ul class="ul-search single text-right" data-url="@Url.Page("/Company/Workshops/ClassificationScheme", "JobByTextSearch")">
|
||||
|
||||
|
||||
<li>
|
||||
<input id="searchingJob" placeholder="جستجوی شغل..." job-id="" onkeyup="searchText(event, this, '@Url.Page("/Company/Workshops/ClassificationScheme", "JobByTextSearch")', true)" class="text-right input-text" />
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<ul class="result options text-right">
|
||||
</ul>
|
||||
</div>
|
||||
<span class="span-input"></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="shadow-sm border-0 m-t-10">
|
||||
<button onclick="addJobs()" class="btn btn-success" style="position: relative;border-radius: 10px; padding:1px 5px;">
|
||||
<span class="icon-span" style="padding: 4px;font-size: 11px;">
|
||||
|
||||
|
||||
<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="job-btn-text" >افزودن شغل</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm border-0 m-t-10" style="height:300px; overflow-y:scroll">
|
||||
<div class="card-body">
|
||||
<div class="align-items-center mb-2 p-2 tr-table tr-job">
|
||||
@if (Model.EditClassificationGroupJob.Count > 0)
|
||||
{
|
||||
@foreach (var item in Model.EditClassificationGroupJob)
|
||||
{
|
||||
|
||||
|
||||
<div class="col-xs-12 col-md-4 job-item">
|
||||
<span>@item.JobName</span>
|
||||
<span> </span>
|
||||
<span>-</span>
|
||||
<span> </span>
|
||||
<span>@item.JobCode</span>
|
||||
<input type="hidden" data-id="@item.Id" job-id="@item.JobId" job-code="@item.JobCode" job-name="@item.JobName" name="job-data"/>
|
||||
|
||||
<a href="#" class="delete-job-already-added" style="float: left;">
|
||||
<span class="icon-span" style="background-color:#ddd3e0">
|
||||
<svg width="19" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@* <input type="hidden" asp-for="WorkshopId" value="@Model.GroupId" /> *@
|
||||
<div class="modal-footer border-0">
|
||||
<button type="button" onclick="saveBtn()" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill closeModal" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
//ذخیره لیست مشاغل
|
||||
function saveBtn(){
|
||||
var createJobList = [];
|
||||
var deleteJobList =[];
|
||||
let jobItems = document.querySelectorAll(".job-item-data");
|
||||
let deletedJobItems = document.querySelectorAll(".deleted-job");
|
||||
let groupNo = '@Model.GroupNo';
|
||||
let groupId = '@Model.GroupId';
|
||||
//افزودن مشاغل جدید به مدل
|
||||
jobItems.forEach((jobItem) => {
|
||||
|
||||
const createClassificationGroupJob = {};
|
||||
|
||||
createClassificationGroupJob.JobId = Number($(jobItem).attr("job-id"));
|
||||
createClassificationGroupJob.JobName = $(jobItem).attr("job-name");
|
||||
createClassificationGroupJob.JobCode = $(jobItem).attr("job-code");
|
||||
createClassificationGroupJob.ClassificationGroupId = Number(groupId);
|
||||
createClassificationGroupJob.GroupNo = groupNo;
|
||||
console.log(createClassificationGroupJob);
|
||||
createJobList.push(createClassificationGroupJob);
|
||||
});
|
||||
|
||||
deletedJobItems.forEach((deletedItem) => {
|
||||
let deletItemId = Number($(deletedItem).val());
|
||||
deleteJobList.push(deletItemId);
|
||||
});
|
||||
let alreadyCreated = document.querySelectorAll(".job-item");
|
||||
let createNewCount = Number(createJobList.length);
|
||||
let deleteCount = Number(deleteJobList);
|
||||
let alreadyCreatedCount = Number(alreadyCreated.length);
|
||||
|
||||
if(createNewCount == 0 && deleteCount == 0 && alreadyCreatedCount == 0){
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "هیچ شغلی اضافه نشده است");
|
||||
}else{
|
||||
var createJobUrlAjax = '@Url.Page("/Company/Workshops/ClassificationScheme", "CreateJob")';
|
||||
let targetDiv = $(`div[data-groupid='${groupId}']`);
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: createJobUrlAjax,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { createJobList , deleteJobList},
|
||||
success: function (response) {
|
||||
if(response.isSuccess){
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
if (targetDiv.hasClass('tr-table-add')) {
|
||||
targetDiv.removeClass('tr-table-add').addClass('tr-table-edit');
|
||||
|
||||
// پیدا کردن span با کلاس add-jobs درون همون div
|
||||
let spanAdd = targetDiv.find('span.add-jobs');
|
||||
spanAdd.find('svg').remove();
|
||||
spanAdd.append(`<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>`)
|
||||
|
||||
// اگر span مورد نظر وجود داشت، کلاس و متنش رو تغییر بده
|
||||
if (spanAdd.length) {
|
||||
spanAdd.removeClass('add-jobs').addClass('edit-jobs');
|
||||
|
||||
// تغییر متن داخل span فرزند (که نوشته "افزودن شغل" است)
|
||||
spanAdd.find('span').text('ویرایش شغل');
|
||||
}
|
||||
}
|
||||
|
||||
if(createNewCount == 0 && alreadyCreatedCount == 0){
|
||||
if (targetDiv.hasClass('tr-table-edit')) {
|
||||
targetDiv.removeClass('tr-table-edit').addClass('tr-table-add');
|
||||
|
||||
// پیدا کردن span با کلاس add-jobs درون همون div
|
||||
let spanAdd = targetDiv.find('span.edit-jobs');
|
||||
|
||||
spanAdd.find('svg').remove();
|
||||
spanAdd.append(`<svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>`)
|
||||
|
||||
// اگر span مورد نظر وجود داشت، کلاس و متنش رو تغییر بده
|
||||
if (spanAdd.length) {
|
||||
spanAdd.removeClass('edit-jobs').addClass('add-jobs');
|
||||
|
||||
// تغییر متن داخل span فرزند (که نوشته "ویرایش شغل" است)
|
||||
spanAdd.find('span').text('افزودن شغل');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('.closeModal').click();
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//حذف شغل اضافه شده جدید
|
||||
$(document).on('click', '.delete-job-new-added', function (e) {
|
||||
e.preventDefault();
|
||||
$(this).closest('.job-item').remove();
|
||||
});
|
||||
|
||||
//حذف شغلی که قبلا در دیتابیس ذخیره شده بود
|
||||
$(document).on('click', '.delete-job-already-added', function (e) {
|
||||
e.preventDefault();
|
||||
let current = $(e.currentTarget);
|
||||
var checkDeleteUrlAjax = '@Url.Page("/Company/Workshops/ClassificationScheme", "CheckDeleteJob")';
|
||||
let id = Number($(this).siblings('input[name="job-data"]').attr('data-id'));
|
||||
let groupId = Number('@Model.GroupId');
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: checkDeleteUrlAjax,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "id": id , "groupId" : groupId},
|
||||
success: function (response) {
|
||||
if (response.checkExist) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ',
|
||||
'پرسنل یا پرسنلهایی در این گروه وجود دارند که این سمت به آنها اختصاص داده شده');
|
||||
} else {
|
||||
if ($(`input.deleted-job[value='${id}']`).length === 0){
|
||||
$('.tr-job').append(`<input type="hidden" class="deleted-job" name="deletedjob" value="${id}" />`);
|
||||
}
|
||||
|
||||
|
||||
current.closest('.job-item').remove();
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//افزودن شغل
|
||||
function addJobs() {
|
||||
|
||||
let jobHiddenInput = $('.span-input').find('.selectedJob');
|
||||
|
||||
|
||||
|
||||
// اگر وجود داشت
|
||||
if (jobHiddenInput.length > 0) {
|
||||
let jobItems = document.querySelectorAll(".job-item-data");
|
||||
// خواندن مقادیر از اتریبیوتها
|
||||
let jobName = jobHiddenInput.attr('selectedJob-name');
|
||||
let jobCode = jobHiddenInput.attr('selectedJob-code');
|
||||
let jobId = jobHiddenInput.attr('selectedJob-id');
|
||||
var checkExist = false;
|
||||
|
||||
|
||||
jobItems.forEach((jobItem) => {
|
||||
if($(jobItem).attr("job-id") == jobId){
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'این شغل قبلا اضافه شده است');
|
||||
checkExist = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if(checkExist == false){
|
||||
let html = `
|
||||
<div class="col-xs-12 job-item">
|
||||
<span>${jobName}</span>
|
||||
<span> </span>
|
||||
<span>-</span>
|
||||
<span> </span>
|
||||
<span>${jobCode}</span>
|
||||
<input class="job-item-data" type="hidden"
|
||||
job-id="${jobId}"
|
||||
job-code="${jobCode}"
|
||||
job-name="${jobName}"
|
||||
name="job-data"/>
|
||||
<a href="#" class="delete-job-new-added" style="float: left;">
|
||||
<span class="icon-span" style="background-color:#ddd3e0">
|
||||
<svg width="19" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
</div>`;
|
||||
|
||||
// افزودن به div مقصد
|
||||
$('.tr-job').append(html);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function inputFocus(element) {
|
||||
$(element).find('ul.ul-search').find('.input-text').focus();
|
||||
}
|
||||
//جستوی مشاغل
|
||||
function searchText(e,element, urlPost, hasCode) {
|
||||
|
||||
var code = e.code;
|
||||
|
||||
if (code != "ArrowDown" && code != "ArrowUp" && code != "Enter") {
|
||||
|
||||
var text = $(element).val();
|
||||
|
||||
textlength = text.length;
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').html('');
|
||||
if (text != "") {
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').html('');
|
||||
$(element).parent().parent().parent('.custom-select').children('ul.result').show();
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: urlPost,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "textSearch": text },
|
||||
success: function (response) {
|
||||
index = 0;
|
||||
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').html('');
|
||||
if (response.list.length > 0) {
|
||||
var ids = [];
|
||||
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').find("li.select-item:not(.hasinput)").remove();
|
||||
|
||||
$('.custom-select').children('ul.ul-search').find('span.items-selected').each(function (x) {
|
||||
ids.push(Number($(this).attr('data-value')));
|
||||
});
|
||||
$.each(response.list, function (i, item) {
|
||||
if (jQuery.inArray(item.id, ids) == -1) {
|
||||
if (hasCode) {
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').append('<li class="select-item" onclick="selectItemSearch(this)" data-code="' + item.searchResultCode + '" data-name="' + item.searchResultTitle + '" data-value="' + item.id + '"><span class="name-right">' + item.searchResultTitle + ' - ' + item.searchResultCode + '</span></li>');
|
||||
$('.code-left').each(function () {
|
||||
var spanContent = $(this).text();
|
||||
if (/\D/.test(spanContent)) { // Check if the content of the span contains non-digits
|
||||
$(this).css('color', 'red');
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').append('<li class="select-item" onclick="selectItemSearch(this)" data-name="' + item.searchResultTitle + '" data-value="' + item.id + '"><span class="name-right">' + item.searchResultTitle + '</span></li>');
|
||||
}
|
||||
}
|
||||
});
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').find("li.select-item:not(.hasinput)").first().focus();
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').find("li.select-item:not(.hasinput)").first().addClass('arrowselected');
|
||||
}
|
||||
else {
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').html('');
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').append('<li class="select-item"><span>هیچ نتیجه ای یافت نشد</span></li>');
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$(element).parent().parent().parent('.custom-select').children('.result').find("li.select-item:not(.hasinput)").remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var selectItemSearch = function (element) {
|
||||
$('.selectedJob').remove();
|
||||
|
||||
let activeTabPane = $('.card-body');
|
||||
var name = activeTabPane.find(element).attr("data-name");
|
||||
var code = activeTabPane.find(element).attr("data-code");
|
||||
var value = activeTabPane.find(element).attr("data-value");
|
||||
//وقنی اسکرول بالا رفت اینطور شود
|
||||
//$(element).parent().parent('.custom-select').children('ul.result').removeClass('posistion-static');
|
||||
//$(element).parent().parent('.custom-select').children('ul.result').removeClass('posistion-absolute');
|
||||
activeTabPane.find(element).parent().parent().children('ul.ul-search').find('input').val(name + ' - ' + code);
|
||||
activeTabPane.find(element).parent().parent().children('ul.ul-search').find('input').attr("job-id", value);
|
||||
// activeTabPane.find(element).parent().parent().children('ul.ul-search').find('input').parent('li').remove();
|
||||
activeTabPane.find(element).parent().parent('.custom-select').children('ul.result').hide();
|
||||
$('.span-input')
|
||||
.append('<input class="selectedJob" type="hidden" selectedJob-id="' + value + '" selectedJob-code="' + code + '" selectedJob-name="' + name + '" name="selectedjob-data"/>');
|
||||
|
||||
// activeTabPane.find(element).parent().parent().children('ul.ul-search').find('.singleItem').remove();
|
||||
|
||||
|
||||
// if (code == 'undefined' || code == null) {
|
||||
// activeTabPane.find(element).parent().parent().children('ul.ul-search').append('<li onclick="openSearchResult(this)" class="singleItem"><span data-value="' + value + '" >' + name + '</li>');
|
||||
// }
|
||||
// else
|
||||
// activeTabPane.find(element).parent().parent().children('ul.ul-search').append('<li onclick="openSearchResultByCode(this)" class="singleItem"><span class="value" data-value="' + value + '" >' + name + '</span>|<span class="code" data-code="' + code + '" >' + code + '</span></li>');
|
||||
|
||||
//$(element).parent().parent().children('ul.ul-search').append('<li> <input onkeyup="searchText(this)" onkeypress="searchTextResize(this)" class="text-right input-text" /></li>');
|
||||
}
|
||||
|
||||
$(document).on('input', '#searchingJob', function () {
|
||||
var value = $(this).val().trim();
|
||||
|
||||
if (value === "") {
|
||||
$('.selectedJob').remove();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).click(
|
||||
function (e) {
|
||||
// console.log($(e.target).attr('class'));
|
||||
var classElement = $(e.target).parent().attr('class');
|
||||
if (classElement != "input-text-single" && classElement != "select-item hasinput" && classElement != "del-selected" && classElement != "singleItem" && classElement != "select-item" && classElement !="result options text-right" ) {
|
||||
$(".dadmehr-select-search").find('.result').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function handleClick(event) {
|
||||
const customSelect = $(event.target).closest(".custom-select input");
|
||||
const divOffset = customSelect.offset();
|
||||
$(".options").css("top", divOffset.top - 5);
|
||||
if ($(window).width() < 1550) {
|
||||
$(".options").css("top", divOffset.top + 10);
|
||||
// console.log(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
document.onkeydown = function (e) {
|
||||
|
||||
var ul = $('.dadmehr-select-search').find('.result');
|
||||
|
||||
if (ul.is(":visible")) {
|
||||
|
||||
switch (e.which) {
|
||||
case 38: // Up arrow
|
||||
e.preventDefault();
|
||||
ul.find("li").removeClass('arrowselected');
|
||||
if ((index - 1) >= 0) {
|
||||
index--;
|
||||
ul.find("li.select-item:eq(" + index + ")").addClass('arrowselected');
|
||||
ul.scrollTop(index * (ul.find("li.select-item:eq(" + index + ")").outerHeight()+5));
|
||||
ul.find("li.arrowselected").focus();
|
||||
} else {
|
||||
index = -1;
|
||||
}
|
||||
|
||||
break;
|
||||
case 40: // Down arrow
|
||||
e.preventDefault();
|
||||
if ((index + 1) < ul.find("li").length) {
|
||||
|
||||
|
||||
ul.find("li.select-item").removeClass('arrowselected');
|
||||
index++;
|
||||
//console.log(index);
|
||||
console.log(index);
|
||||
ul.find("li.select-item:eq(" + index + ")").addClass('arrowselected');
|
||||
ul.scrollTop(index * (ul.find("li.select-item:eq(" + index + ")").outerHeight()+5));
|
||||
ul.find("li.arrowselected").focus();
|
||||
console.log(index * ul.find("li.select-item:eq(" + index + ")").outerHeight());
|
||||
console.log(ul.find("li.select-item:eq(" + index + ")").outerHeight());
|
||||
|
||||
}
|
||||
break;
|
||||
case 13: // Enter
|
||||
if (index > -1) {
|
||||
var selectItem = ul.find('li.arrowselected');
|
||||
selectItemSearch(selectItem);
|
||||
}
|
||||
index = -1;
|
||||
//proposalList.empty();
|
||||
//params.onSubmit(input.val());
|
||||
break;
|
||||
case 9: // Tab
|
||||
if (index > -1) {
|
||||
var selectItem = ul.find('li.arrowselected');
|
||||
selectItemSearch(selectItem);
|
||||
}
|
||||
index = -1;
|
||||
//proposalList.empty();
|
||||
//params.onSubmit(input.val());
|
||||
break;
|
||||
case 27: // Esc button
|
||||
index = -1;
|
||||
//proposalList.empty();
|
||||
//input.val('');
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.SalaryAndRialCoefficientModel
|
||||
@{
|
||||
<style>
|
||||
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.row-number-salaries {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 82px;
|
||||
height: 31px;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
.tr-table-salaries {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
var groupIndex = 0;
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ایجاد دستمزدها</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="CreateSalaries" method="post" autocomplete="off" novalidate="novalidate"
|
||||
data-ajax="true" data-action="salariesTab" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ شروع</label>
|
||||
<input type="text" asp-for="StartDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="StartDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ پایان</label>
|
||||
<input type="text" asp-for="EndDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="EndDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
|
||||
{
|
||||
<div class="lineDiv"></div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="RialCoefficient" class="form-label" style="float: left;"> ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<input asp-for="RialCoefficient" class="form-control" />
|
||||
<span asp-validation-for="RialCoefficient" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
|
||||
|
||||
<div class="row m-t-10">
|
||||
|
||||
<!-- گروه 1 تا 10 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemRight in Model.SalariesAndCoefficientList.Take(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemRight.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemRight.GroupNo" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemRight.ClassificationGroupId" />
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemRight.GroupSalaryStr" />
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemRight.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
<!-- گروه 11 تا 20 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemLeft in Model.SalariesAndCoefficientList.Skip(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemLeft.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemLeft.GroupNo" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemLeft.ClassificationGroupId" />
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemLeft.GroupSalaryStr" />
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemLeft.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" id="schemeId" asp-for="@Model.SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="TypeOfCoefficient" value="TypeOfCoefficient" />
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
$('.amount').on('input',
|
||||
function() {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
var contractAmount = $(this);
|
||||
//setting format
|
||||
numeral.defaultFormat("0,0 تومان");
|
||||
contractAmount.on("keyup",
|
||||
function(e) {
|
||||
contractAmount.val(numeral(contractAmount.val()).format());
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,92 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.CreateClassificationScheme
|
||||
@{
|
||||
<style>
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content{
|
||||
padding-bottom : 10px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ایجاد طرح جدید</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="CreateScheme" method="post" autocomplete="off"
|
||||
data-ajax="true" data-action="Refresh" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerFullName" class="form-label">نام طراح</label>
|
||||
<input asp-for="DesignerFullName" class="form-control" />
|
||||
<span asp-validation-for="DesignerFullName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerPhone" class="form-label">شماره تماس طراح</label>
|
||||
<input asp-for="DesignerPhone" class="form-control" />
|
||||
<span asp-validation-for="DesignerPhone" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row m-t-10" >
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="IncludingDateFa" class="form-label">تاریخ شمول طرح</label>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control date-input"/>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="ExecutionDateFa" class="form-label">تاریخ اجرای طرح</label>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control date-input"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="TypeOfCoefficient" class="form-label" style="float: left;">نوع محاسبه ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select asp-for="TypeOfCoefficient" class="form-select form-control">
|
||||
<option value="@((int)TypeOfCoefficient.RialCoefficient)">ضریب ریالی طرح</option>
|
||||
<option value="@((int)TypeOfCoefficient.JobOrganization)">ضریب شورای عالی کار</option>
|
||||
</select>
|
||||
<span asp-validation-for="TypeOfCoefficient" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="WorkshopId" value="@Model.WorkshopId"/>
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,304 @@
|
||||
@using CompanyManagment.App.Contracts.GroupPlanJobItem
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.EditEmployeeGroup
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
|
||||
<style>
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.modal-title{
|
||||
width: 276px;
|
||||
left: 47%;
|
||||
}
|
||||
|
||||
.icon-sapan-delete {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 2px;
|
||||
border-radius: 5px;
|
||||
padding: 7px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">افزودن پرسنل به گروه</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row m-t-10">
|
||||
<h5 class="modal-title">@Model.EmployeeFullName</h5>
|
||||
</div>
|
||||
<div class="card shadow-sm border-0" style="margin-top: 31px;">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-6 col-md-4 mb-3"><label>گروه</label></div>
|
||||
<div class="col-xs-6 col-md-4 mb-3"><label>سمت</label></div>
|
||||
<div class="col-xs-12 col-md-4 mb-3"><label>تاریخ شروع</label></div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
@foreach (var groupItem in @Model.EditEmployeeGroupLists)
|
||||
{
|
||||
|
||||
<div class="row m-t-10 tr-transfer">
|
||||
|
||||
<div class="col-xs-6 col-md-4 mb-3">
|
||||
|
||||
<select data-selectGroup-id="@groupItem.Id" data-selectGroupJobId="@groupItem.ClassificationGroupJobId" asp-for="@groupItem.ClassificationGroupId" class="form-select form-control" onchange="selectGroup(this)">
|
||||
<option value="0">انتخاب گروه</option>
|
||||
@foreach (var item in Model.ClassificationGroupList)
|
||||
{
|
||||
<option value="@item.GroupId" data-groupno="@item.GroupNo"><span>گروه</span><span> </span><span>@item.GroupNo</span></option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4 mb-3">
|
||||
|
||||
<select data-selectjob-id="@groupItem.Id" asp-for="@groupItem.ClassificationGroupJobId" class="form-select form-control">
|
||||
<option value="0">انتخاب سمت</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-11 col-md-3 mb-3">
|
||||
|
||||
|
||||
<input data-startdate-id="@groupItem.Id" type="text" asp-for="@groupItem.StartGroupDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="@groupItem.StartGroupDateFa" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-1 col-md-1">
|
||||
<a onclick="removeTr(this)"
|
||||
style="border-radius:5px; cursor:pointer;">
|
||||
<span class="icon-sapan-delete" style="background-color:#ddd3e0">
|
||||
<svg width="21" height="21" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" asp-for="SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="EmployeeId" value="@Model.EmployeeId" />
|
||||
|
||||
<div class="modal-footer border-0">
|
||||
<button type="button" onclick="saveBtn()" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".date-input").mask("0000/00/00");
|
||||
let schemeId = '@Model.SchemeId';
|
||||
|
||||
|
||||
// روی همه سلکتهایی که data-selectGroup-id دارند اجرا میکنیم
|
||||
$('select[data-selectGroup-id]').each(function () {
|
||||
const $groupSelect = $(this);
|
||||
const selectGroupId = $groupSelect.data('selectgroup-id');
|
||||
const $jobSelect = $(`select[data-selectjob-id="${selectGroupId}"]`);
|
||||
const selectGroupJobId = $groupSelect.attr('data-selectGroupJobId');
|
||||
|
||||
// گرفتن مقدار انتخابشده
|
||||
const groupId = $groupSelect.val();
|
||||
|
||||
// اگر مقدار گروه 0 نبود، بریم سراغ واکشی سمتها
|
||||
if (groupId && groupId !== "0") {
|
||||
const url = `/Admin/Company/Workshops/ClassificationScheme?handler=JobList&schemeId=${schemeId}&groupId=${groupId}`;
|
||||
|
||||
$.get(url, function (data) {
|
||||
$jobSelect.empty();
|
||||
$jobSelect.append('<option value="0">انتخاب سمت</option>');
|
||||
|
||||
data.jobs.forEach(item => {
|
||||
const selected = (item.jobId == selectGroupJobId) ? 'selected="selected"' : '';
|
||||
$jobSelect.append(`
|
||||
<option ${selected} value="${item.jobId}"
|
||||
data-jobname="${item.jobName}"
|
||||
data-jobcode="${item.jobCode}">
|
||||
${item.jobCode} - ${item.jobName}
|
||||
</option>
|
||||
`);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function removeTr(selectElement){
|
||||
$(selectElement).closest('.tr-transfer').remove();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function selectGroup(element) {
|
||||
let schemeId = '@Model.SchemeId';
|
||||
const $groupSelect = $(element);
|
||||
const selectGroupId = $groupSelect.data('selectgroup-id');
|
||||
const $jobSelect = $(`select[data-selectjob-id="${selectGroupId}"]`);
|
||||
const groupId = $groupSelect.val();
|
||||
const selectGroupJobId = $groupSelect.attr('data-selectGroupJobId');
|
||||
if (!groupId || groupId === "0") {
|
||||
$jobSelect.empty().append('<option value="0">انتخاب سمت</option>');
|
||||
return;
|
||||
}
|
||||
|
||||
const url = `/Admin/Company/Workshops/ClassificationScheme?handler=JobList&schemeId=${schemeId}&groupId=${groupId}`;
|
||||
|
||||
$.get(url, function (data) {
|
||||
$jobSelect.empty();
|
||||
$jobSelect.append('<option value="0">انتخاب سمت</option>');
|
||||
|
||||
data.jobs.forEach(item => {
|
||||
const selected = (item.jobId == selectGroupJobId) ? 'selected="selected"' : '';
|
||||
$jobSelect.append(`
|
||||
<option ${selected} value="${item.jobId}"
|
||||
data-jobname="${item.jobName}"
|
||||
data-jobcode="${item.jobCode}">
|
||||
${item.jobCode} - ${item.jobName}
|
||||
</option>
|
||||
`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function saveBtn() {
|
||||
let groupOrJobEmpty = false;
|
||||
var command = [];
|
||||
$('select[data-selectgroup-id]').each(function () {
|
||||
const $groupSelect = $(this);
|
||||
const selectGroupId = $groupSelect.data('selectgroup-id');
|
||||
const $jobSelect = $(`select[data-selectjob-id="${selectGroupId}"]`);
|
||||
const startDate = $(`input[data-startdate-id="${selectGroupId}"]`).val();
|
||||
|
||||
|
||||
// گرفتن option انتخابشده از هر select
|
||||
const $selectedGroupOption = $groupSelect.find('option:selected');
|
||||
const $selectedJobOption = $jobSelect.find('option:selected');
|
||||
|
||||
// حالا میتونی هم value هم متن هم data-* رو بخونی
|
||||
const groupId = $selectedGroupOption.val();
|
||||
const groupText = $selectedGroupOption.text();
|
||||
// const groupNo = $selectedGroupOption.data('groupno');
|
||||
|
||||
const jobId = $selectedJobOption.val();
|
||||
|
||||
if (groupId == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "گروه را انتخاب کنید");
|
||||
groupOrJobEmpty = true;
|
||||
}
|
||||
|
||||
if (jobId == 0) {
|
||||
const alarm = ' سمت' + ' ' + groupText + ' ' + 'را انتخاب کنید '
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', alarm);
|
||||
groupOrJobEmpty = true;
|
||||
}
|
||||
// const jobText = $selectedJobOption.text();
|
||||
// const jobName = $selectedJobOption.data('jobname');
|
||||
// const jobCode = $selectedJobOption.data('jobcode');
|
||||
|
||||
// console.log(`GroupId = ${groupId} JobId = ${jobId} selectGroupId = ${selectGroupId} startDate = ${startDate} endDate = ${endDate}`);
|
||||
|
||||
const editEmployeeGroupList = {
|
||||
id: Number(selectGroupId),
|
||||
employeeId: '@Model.EmployeeId',
|
||||
schemeId: '@Model.SchemeId',
|
||||
classificationGroupId: Number(groupId),
|
||||
classificationGroupJobId: Number(jobId),
|
||||
StartGroupDateFa: startDate,
|
||||
|
||||
};
|
||||
// console.log(editEmployeeGroupList);
|
||||
command.push(editEmployeeGroupList);
|
||||
});
|
||||
|
||||
if(!groupOrJobEmpty){
|
||||
const editEmployeeGroupList = {
|
||||
id: 0,
|
||||
employeeId: '@Model.EmployeeId',
|
||||
schemeId: '@Model.SchemeId',
|
||||
};
|
||||
command.push(editEmployeeGroupList);
|
||||
var urlAjaxToSave = '@Url.Page("/Company/Workshops/ClassificationScheme", "EditMultipleGroupMember")';
|
||||
|
||||
$.ajax({
|
||||
|
||||
type: 'POST',
|
||||
url: urlAjaxToSave,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: JSON.stringify(command),
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if(response.isSuccess){
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
$('.close').click();
|
||||
|
||||
setTimeout(function () {
|
||||
$('#addEmployeesTab').click();
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.SalaryAndRialCoefficientModel
|
||||
@{
|
||||
<style>
|
||||
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.row-number-salaries {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 82px;
|
||||
height: 31px;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
.tr-table-salaries {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
var groupIndex = 0;
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ایجاد دستمزدها</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="EditSalariesData" method="post" autocomplete="off" novalidate="novalidate"
|
||||
data-ajax="true" data-action="salariesTab" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ شروع</label>
|
||||
<input type="text" asp-for="StartDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="StartDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ پایان</label>
|
||||
<input type="text" asp-for="EndDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="EndDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
|
||||
{
|
||||
<div class="lineDiv"></div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="RialCoefficient" class="form-label" style="float: left;"> ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<input asp-for="RialCoefficient" class="form-control" />
|
||||
<span asp-validation-for="RialCoefficient" class="text-danger"></span>
|
||||
<input type="hidden" asp-for="CoefficientId" value="@Model.CoefficientId"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
|
||||
|
||||
<div class="row m-t-10">
|
||||
|
||||
<!-- گروه 1 تا 10 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemRight in Model.SalariesAndCoefficientList.Take(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemRight.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].Id" value="@itemRight.Id"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemRight.GroupNo"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemRight.ClassificationGroupId"/>
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemRight.GroupSalaryStr"/>
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemRight.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
<!-- گروه 11 تا 20 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemLeft in Model.SalariesAndCoefficientList.Skip(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemLeft.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].Id" value="@itemLeft.Id" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemLeft.GroupNo"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemLeft.ClassificationGroupId"/>
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemLeft.GroupSalaryStr"/>
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemLeft.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" id="schemeId" asp-for="@Model.SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="TypeOfCoefficient" value="TypeOfCoefficient" />
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
$('.amount').on('input',
|
||||
function() {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
var contractAmount = $(this);
|
||||
//setting format
|
||||
numeral.defaultFormat("0,0 تومان");
|
||||
contractAmount.on("keyup",
|
||||
function(e) {
|
||||
contractAmount.val(numeral(contractAmount.val()).format());
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.EditClassificationScheme
|
||||
|
||||
@{
|
||||
<style>
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> ویرایش طرح </h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="EditScheme" method="post" autocomplete="off"
|
||||
data-ajax="true" data-action="Refresh" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerFullName" class="form-label">نام طراح</label>
|
||||
<input asp-for="DesignerFullName" class="form-control" />
|
||||
<span asp-validation-for="DesignerFullName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerPhone" class="form-label">شماره تماس طراح</label>
|
||||
<input asp-for="DesignerPhone" class="form-control" />
|
||||
<span asp-validation-for="DesignerPhone" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="IncludingDateFa" class="form-label">تاریخ شمول طرح</label>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control date-input"/>
|
||||
<span asp-validation-for="IncludingDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="ExecutionDateFa" class="form-label">تاریخ اجرای طرح</label>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control date-input"/>
|
||||
<span asp-validation-for="ExecutionDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="TypeOfCoefficient" class="form-label" style="float: left;">نوع محاسبه ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select asp-for="TypeOfCoefficient" class="form-select form-control">
|
||||
<option value="@((int)TypeOfCoefficient.RialCoefficient)">ضریب ریالی طرح</option>
|
||||
<option value="@((int)TypeOfCoefficient.JobOrganization)">ضریب شورای عالی کار</option>
|
||||
</select>
|
||||
<span asp-validation-for="TypeOfCoefficient" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="WorkshopId" value="@Model.WorkshopId" />
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,390 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.EmployeeInfoTab
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
<style>
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
.items {
|
||||
flex: 0 0 calc(33.333% - 8px); /* دقیقاً سهتا در هر سطر */
|
||||
box-sizing: border-box;
|
||||
direction: rtl;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start; /* آیتمها در یک راستا از بالا */
|
||||
padding: 6px 10px;
|
||||
border-radius: 5px;
|
||||
min-height: 36px; /* برای ارتفاع یکنواخت */
|
||||
}
|
||||
|
||||
.hiddenCompute {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.trTable {
|
||||
background-color: cadetblue;
|
||||
color: aliceblue;
|
||||
border-radius: 5px;
|
||||
padding: 3px;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
|
||||
.st {
|
||||
background: #cecece;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
direction: rtl;
|
||||
font-family: "IranSans", sans-serif;
|
||||
margin: 5px 0px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
.st .header {
|
||||
background: #26826d;
|
||||
color: #fff;
|
||||
padding: 10px 14px;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable {
|
||||
padding: 4px 9px;
|
||||
margin: 0;
|
||||
display: block;
|
||||
margin: 3px 3px;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable .content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable.green {
|
||||
background: forestgreen;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.red {
|
||||
background: #d9534f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.teal {
|
||||
background: #155c5c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.orange {
|
||||
background: orangered;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-family: 'IranText' !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">تست طرح</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
<div class="lineDiv"></div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select id="employeeListSelect" asp-for="EmployeeId" class="form-select form-control">
|
||||
<option value="0">انتخاب پرسنل </option>
|
||||
@foreach (var item in @Model.EmployeeInfoList)
|
||||
{
|
||||
<option value="@item.EmployeeId"><span>@item.FullName</span></option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="monthListSelect" asp-for="FullName" style="width: 100% !important">
|
||||
<option value="0"> ماه</option>
|
||||
<option value="01"> فروردین</option>
|
||||
<option value="02"> اردیبهشت</option>
|
||||
<option value="03"> خرداد</option>
|
||||
<option value="04"> تیر</option>
|
||||
<option value="05"> مرداد</option>
|
||||
<option value="06"> شهریور</option>
|
||||
<option value="07"> مهر</option>
|
||||
<option value="08"> آبان</option>
|
||||
<option value="09"> آذر</option>
|
||||
<option value="10"> دی</option>
|
||||
<option value="11"> بهمن</option>
|
||||
<option value="12"> اسفند</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control " id="yearListSelect" asp-for="FullName" style="width: 100% !important">
|
||||
<option value="0"> سال </option>
|
||||
@foreach (string itemi in @Model.YearlyList)
|
||||
{
|
||||
<option style="font-family: 'IranSans' !important;" value="@itemi"> @itemi </option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
انتخاب تاریخ
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<span class="compute hiddenCompute" style="direction:ltr; display: flex; padding-left:13px;gap:9px;">
|
||||
|
||||
|
||||
<span>
|
||||
<h4> فرمول محاسبه مزد</h4>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-left:13px;gap:9px">
|
||||
|
||||
<span>
|
||||
<h4> مزد شغل</h4>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align center">
|
||||
<div class="col-xs-6">
|
||||
<span class="compute hiddenCompute" style="direction:ltr; display: flex; padding-left:13px;gap:9px;">
|
||||
<span>
|
||||
<h2>(</h2>
|
||||
</span><span id="coeficient"></span>
|
||||
<span>
|
||||
<h2>x</h2>
|
||||
</span><span id="rate"></span>
|
||||
<span>
|
||||
<h2>)</h2>
|
||||
</span>
|
||||
<span>
|
||||
<h2>+</h2>
|
||||
</span><span id="salary"></span>
|
||||
<span>
|
||||
<h2>=</h2>
|
||||
</span><span id="salaryResultDouble"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-left:13px;gap:9px">
|
||||
<span id="salaryResult"></span><span><h3>ریال</h3></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv compute hiddenCompute"></div>
|
||||
|
||||
<div class="row" style="text-align center; justify-items: center">
|
||||
|
||||
<div class="st hiddenCompute" style="width:98% !important">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-right:8px;gap:9px">
|
||||
<span ><h4>پایه سنوات</h4></span>
|
||||
</span>
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-right:8px;gap:9px">
|
||||
<span id="baseYearResult"></span>
|
||||
<span>
|
||||
<h3>ریال</h3></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="lineDiv compute hiddenCompute"></div>
|
||||
<div class="row">
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-right:8px;gap:9px">
|
||||
<span ><h4>مزد مبنا</h4></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="row" style="text-align center">
|
||||
<span class="compute hiddenCompute" style="display: flex; padding-right:8px;gap:9px">
|
||||
<span id="mabnaDailyWage"></span><span><h3>ریال</h3></span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="lineDiv compute hiddenCompute"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer border-0">
|
||||
<button type="button" onclick="computeTest()" class="btn btn-success px-4 rounded-pill">تست</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
});
|
||||
|
||||
|
||||
function computeTest(selectElement) {
|
||||
|
||||
const employeeSelect = document.getElementById("employeeListSelect");
|
||||
const monthSelect = document.getElementById("monthListSelect");
|
||||
const yearSelect = document.getElementById("yearListSelect");
|
||||
|
||||
const employeeId = employeeSelect.options[employeeSelect.selectedIndex].value;
|
||||
const year = yearSelect.options[yearSelect.selectedIndex].value;
|
||||
const month = monthSelect.options[monthSelect.selectedIndex].value;
|
||||
|
||||
if (employeeSelect == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "پرسنل را انتخاب کنید");
|
||||
return;
|
||||
}
|
||||
|
||||
if (year == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "سال را انتخاب کنید");
|
||||
return;
|
||||
}
|
||||
if (month == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "ماه را انتخاب کنید");
|
||||
return;
|
||||
}
|
||||
|
||||
let schemeId = '@Model.SchemeId';
|
||||
var url = `/Admin/Company/Workshops/ClassificationScheme?handler=ComputeTest&schemeId=${schemeId}&employeeId=${employeeId}&year=${year}&month=${month}`;
|
||||
|
||||
// console.log("Request URL:", url);
|
||||
|
||||
$.get(url, function (data) {
|
||||
$('.compute').removeClass('hiddenCompute');
|
||||
$('.st').removeClass('hiddenCompute');
|
||||
|
||||
$('#coeficient').empty();
|
||||
$('#coeficient').append(`<h2>${data.coefficient}</h2>`);
|
||||
$('#rate').empty();
|
||||
$('#rate').append(`<h2>${data.rate}</h2>`);
|
||||
$('#salary').empty();
|
||||
$('#salary').append(`<h2>${data.salary}</h2>`);
|
||||
$('#salaryResultDouble').empty();
|
||||
$('#salaryResultDouble').append(`<h2>${data.salaryResultDouble}</h2>`);
|
||||
$('#salaryResult').empty();
|
||||
$('#salaryResult').append(`<h2>${data.salaryResult}</h2>`);
|
||||
|
||||
$('#baseYearResult').empty();
|
||||
$('#baseYearResult').append(`<h2>${data.baseYearResult}</h2>`);
|
||||
$('#mabnaDailyWage').empty();
|
||||
$('#mabnaDailyWage').append(`<h2>${data.mabnaDailyWage}</h2>`);
|
||||
|
||||
$('.st').empty();
|
||||
|
||||
if(data.baseYearResult != "0"){
|
||||
$('.st').append(`
|
||||
<div class="header">محاسبه پایه سنوات</div>
|
||||
`);
|
||||
data.baseYearDataList.forEach(item => {
|
||||
|
||||
if(item.hasStartWork){
|
||||
$('.st').append(`
|
||||
|
||||
<div class="trTable green">
|
||||
<div class="content">
|
||||
<div class="date">${item.baseYearPayDay}<span> </span><span> </span>${item.groupNo}</div>
|
||||
<div>شروع بکار</div>
|
||||
</div>
|
||||
</div>`);
|
||||
}else if(item.hasLeftWork){
|
||||
$('.st').append(`
|
||||
|
||||
<div class="trTable red">
|
||||
<div class="content">
|
||||
<div class="date">${item.baseYearPayDay}<span> </span><span> </span>${item.groupNo}</div>
|
||||
<div>ترک کار</div>
|
||||
</div>
|
||||
</div>`);
|
||||
}else{
|
||||
|
||||
if(item.baseYearPayDay == "-"){
|
||||
|
||||
$('.st').append(`
|
||||
<div class="trTable orange">
|
||||
<div class="content">
|
||||
<div>
|
||||
|
||||
<span class="date">${item.baseYearPayDay}</span> <span>فقط ارتقاء</span>
|
||||
<span> </span><span> </span><span> </span>${item.groupNo} <span> </span><span> </span>
|
||||
|
||||
</div>
|
||||
<div class="date">${item.baseYear}</div>
|
||||
</div>
|
||||
</div>`);
|
||||
}else{
|
||||
|
||||
$('.st').append(`
|
||||
<div class="trTable teal">
|
||||
<div class="content">
|
||||
<div class="date">${item.baseYearPayDay}<span> </span><span> </span>${item.groupNo}</div>
|
||||
|
||||
<div class="date">${item.baseYear}</div>
|
||||
</div>
|
||||
</div>`);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}else{
|
||||
$('.st').append(`
|
||||
<div class="trTable">
|
||||
<div class="trTable teal">
|
||||
<div class="content">
|
||||
<div>پایه سنوات ندارد</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,424 @@
|
||||
@using CompanyManagment.App.Contracts.GroupPlanJobItem
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.EditEmployeeGroup
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
|
||||
<style>
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.modal-title{
|
||||
width: 276px;
|
||||
left: 47%;
|
||||
}
|
||||
.icon-sapan-delete{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 2px;
|
||||
border-radius: 5px;
|
||||
padding: 7px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> انتقال پرسنل به گروه جدید</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row m-t-10">
|
||||
<h5 class="modal-title">@Model.EmployeeFullName</h5>
|
||||
</div>
|
||||
<div class="card shadow-sm border-0" style="margin-top: 31px;">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-6 col-md-4 mb-3"><label>گروه</label></div>
|
||||
<div class="col-xs-6 col-md-4 mb-3"><label>سمت</label></div>
|
||||
<div class="col-xs-12 col-md-4 mb-3"><label>تاریخ شروع</label></div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
@foreach (var groupItem in @Model.EditEmployeeGroupLists)
|
||||
{
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-6 col-md-4 mb-3">
|
||||
|
||||
<select disabled="disabled" data-selectGroup-id="@groupItem.Id" data-selectGroupJobId="@groupItem.ClassificationGroupJobId" asp-for="@groupItem.ClassificationGroupId" class="form-select form-control" onchange="selectGroup(this)">
|
||||
<option value="0">انتخاب گروه</option>
|
||||
@foreach (var item in Model.ClassificationGroupList)
|
||||
{
|
||||
<option value="@item.GroupId" data-groupno="@item.GroupNo"><span>گروه</span><span> </span><span>@item.GroupNo</span></option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4 mb-3">
|
||||
|
||||
<select disabled="disabled" data-selectjob-id="@groupItem.Id" asp-for="@groupItem.ClassificationGroupJobId" class="form-select form-control">
|
||||
<option value="0">انتخاب سمت</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-4 mb-3">
|
||||
|
||||
|
||||
<input disabled="disabled" data-startdate-id="@groupItem.Id" type="text" asp-for="@groupItem.StartGroupDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="@groupItem.StartGroupDateFa" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
}
|
||||
|
||||
|
||||
<div id="transfer">
|
||||
|
||||
</div>
|
||||
|
||||
<span class="icon-span transfer-group-member" style="padding: 7px;font-size: 14px; margin-top: 10px;">
|
||||
<a onclick="appendtransferToNewGroup()">
|
||||
@* <svg width="19" height="18" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg> *@
|
||||
|
||||
<span class="job-btn-text">انتقال</span>
|
||||
<svg width="20px" height="20px" viewBox="-11.26 -11.26 49.32 49.32" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="matrix(-1, 0, 0, 1, 0, 0)rotate(0)" stroke="#000000" stroke-width="0.00026804">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.053608"></g>
|
||||
<g id="SVGRepo_iconCarrier"> <g id="Group_37" data-name="Group 37" transform="translate(-108.142 -942.014)">
|
||||
<path id="Path_17" data-name="Path 17" d="M109.642,968.818a1.5,1.5,0,0,1-1.5-1.5v-23.8a1.5,1.5,0,0,1,2.25-1.3l20.616,11.9a1.5,1.5,0,0,1,0,2.6l-20.616,11.9A1.5,1.5,0,0,1,109.642,968.818Zm1.5-22.707V964.72l16.116-9.3Z" fill="#ffffff"></path>
|
||||
</g> </g>
|
||||
</svg>
|
||||
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" asp-for="SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="EmployeeId" value="@Model.EmployeeId" />
|
||||
|
||||
<div class="modal-footer border-0">
|
||||
<button type="button" onclick="saveBtn()" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".date-input").mask("0000/00/00");
|
||||
let schemeId = '@Model.SchemeId';
|
||||
|
||||
|
||||
// روی همه سلکتهایی که data-selectGroup-id دارند اجرا میکنیم
|
||||
$('select[data-selectGroup-id]').each(function () {
|
||||
const $groupSelect = $(this);
|
||||
const selectGroupId = $groupSelect.data('selectgroup-id');
|
||||
const $jobSelect = $(`select[data-selectjob-id="${selectGroupId}"]`);
|
||||
const selectGroupJobId = $groupSelect.attr('data-selectGroupJobId');
|
||||
|
||||
// گرفتن مقدار انتخابشده
|
||||
const groupId = $groupSelect.val();
|
||||
|
||||
// اگر مقدار گروه 0 نبود، بریم سراغ واکشی سمتها
|
||||
if (groupId && groupId !== "0") {
|
||||
const url = `/Admin/Company/Workshops/ClassificationScheme?handler=JobList&schemeId=${schemeId}&groupId=${groupId}`;
|
||||
|
||||
$.get(url, function (data) {
|
||||
$jobSelect.empty();
|
||||
$jobSelect.append('<option value="0">انتخاب سمت</option>');
|
||||
|
||||
data.jobs.forEach(item => {
|
||||
const selected = (item.jobId == selectGroupJobId) ? 'selected="selected"' : '';
|
||||
$jobSelect.append(`
|
||||
<option ${selected} value="${item.jobId}"
|
||||
data-jobname="${item.jobName}"
|
||||
data-jobcode="${item.jobCode}">
|
||||
${item.jobCode} - ${item.jobName}
|
||||
</option>
|
||||
`);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function appendtransferToNewGroup() {
|
||||
let groupList = @Html.Raw(System.Text.Json.JsonSerializer.Serialize(Model.ClassificationGroupList));
|
||||
|
||||
let appendData = '';
|
||||
|
||||
appendData += `<div class="row m-t-10 tr-transfer">`;
|
||||
appendData += `<div class="col-xs-6 col-md-4 mb-3">`;
|
||||
appendData += `<select name="classificationGroupId" class="form-select form-control" onchange="selectGroup(this)">`;
|
||||
appendData += `<option value="0">انتخاب گروه</option>`;
|
||||
|
||||
groupList.forEach(function(item) {
|
||||
appendData += `<option value='${item.GroupId}' data-groupno='${item.GroupNo}'>گروه ${item.GroupNo}</option>`;
|
||||
|
||||
|
||||
});
|
||||
|
||||
appendData += `</select></div>`;
|
||||
appendData += `<div class="col-xs-6 col-md-4 mb-3">`;
|
||||
appendData += `<select data-selectjob-id="" name="classificationGroupJobId" class="form-select form-control">
|
||||
<option value="0">انتخاب سمت</option>
|
||||
</select>`;
|
||||
appendData += `</div>`;
|
||||
appendData += `<div class="col-xs-11 col-md-3 mb-3">
|
||||
<input data-startdate-id="" placeholder="تاریخ انتقال" type="text" name=StartGroupDateFa" class="form-control date-input" data-val="false" />
|
||||
</div>
|
||||
<div class="col-xs-1 col-md-1">
|
||||
<a onclick="removeTr(this)"
|
||||
style="border-radius:5px; cursor:pointer;">
|
||||
<span class="icon-sapan-delete" style="background-color:#ddd3e0">
|
||||
<svg width="21" height="21" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="lineDiv" style="margin-top: 43px;"> </div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
$('#transfer').append(appendData);
|
||||
}
|
||||
|
||||
function removeTr(selectElement){
|
||||
$(selectElement).closest('.tr-transfer').remove();
|
||||
|
||||
}
|
||||
|
||||
function selectGroup(selectElement) {
|
||||
let schemeId = '@Model.SchemeId';
|
||||
|
||||
|
||||
// پیدا کردن select دوم در همان row
|
||||
const $row = $(selectElement).closest('.row');
|
||||
const $jobSelect = $row.find('select[data-selectjob-id]');
|
||||
const groupId = selectElement.value;
|
||||
console.log('groupId:', groupId);
|
||||
|
||||
|
||||
|
||||
|
||||
const url = `/Admin/Company/Workshops/ClassificationScheme?handler=JobList&schemeId=${schemeId}&groupId=${groupId}`;
|
||||
|
||||
// ارسال به بکاند
|
||||
$.get(url, function (data) {
|
||||
$jobSelect.empty();
|
||||
$jobSelect.append('<option value="0">انتخاب سمت</option>');
|
||||
|
||||
data.jobs.forEach(item => {
|
||||
console.log(item.jobName);
|
||||
$jobSelect.append(`
|
||||
<option value="${item.jobId}"
|
||||
data-jobname="${item.jobName}"
|
||||
data-jobcode="${item.jobCode}">
|
||||
${item.jobCode} - ${item.jobName}
|
||||
</option>
|
||||
`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveBtn(){
|
||||
const command = [];
|
||||
let rowValid = true;
|
||||
|
||||
$('.tr-transfer').each(function () {
|
||||
const $row = $(this);
|
||||
|
||||
const groupId = $row.find('select[name="classificationGroupId"]').val();
|
||||
const jobId = $row.find('select[name="classificationGroupJobId"]').val();
|
||||
const startDate = $row.find('input[data-startdate-id]').val();
|
||||
|
||||
// اگر یکی از فیلدها خالی بود، از اضافه کردن صرفنظر کن
|
||||
if (groupId == 0) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "گروه را انتخاب کنید");
|
||||
rowValid = false;
|
||||
}
|
||||
|
||||
if (jobId == 0) {
|
||||
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', 'سمت را انتخاب کنید');
|
||||
rowValid = false;
|
||||
}
|
||||
if(startDate === ""){
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', 'تاریخ انتقال خالی است');
|
||||
rowValid = false;
|
||||
}
|
||||
|
||||
const editEmployeeGroupList = {
|
||||
|
||||
employeeId: '@Model.EmployeeId',
|
||||
schemeId: '@Model.SchemeId',
|
||||
classificationGroupId: Number(groupId),
|
||||
classificationGroupJobId: Number(jobId),
|
||||
startGroupDateFa: startDate,
|
||||
|
||||
};
|
||||
console.log(editEmployeeGroupList);
|
||||
command.push(editEmployeeGroupList);
|
||||
});
|
||||
|
||||
if(rowValid){
|
||||
var urlAjaxToSave = '@Url.Page("/Company/Workshops/ClassificationScheme", "TransferToNewGroup")';
|
||||
|
||||
$.ajax({
|
||||
|
||||
type: 'POST',
|
||||
url: urlAjaxToSave,
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: JSON.stringify(command),
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if(response.isSuccess){
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
$('.close').click();
|
||||
|
||||
setTimeout(function () {
|
||||
$('#addEmployeesTab').click();
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
//console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// function saveBtn() {
|
||||
// let groupOrJobEmpty = false;
|
||||
// var command = [];
|
||||
// $('select[data-selectgroup-id]').each(function () {
|
||||
// const $groupSelect = $(this);
|
||||
// const selectGroupId = $groupSelect.data('selectgroup-id');
|
||||
// const $jobSelect = $(`select[data-selectjob-id="${selectGroupId}"]`);
|
||||
// const startDate = $(`input[data-startdate-id="${selectGroupId}"]`).val();
|
||||
// const endDate = $(`input[data-enddate-id="${selectGroupId}"]`).val();
|
||||
|
||||
// // گرفتن option انتخابشده از هر select
|
||||
// const $selectedGroupOption = $groupSelect.find('option:selected');
|
||||
// const $selectedJobOption = $jobSelect.find('option:selected');
|
||||
|
||||
// // حالا میتونی هم value هم متن هم data-* رو بخونی
|
||||
// const groupId = $selectedGroupOption.val();
|
||||
// const groupText = $selectedGroupOption.text();
|
||||
// // const groupNo = $selectedGroupOption.data('groupno');
|
||||
|
||||
// const jobId = $selectedJobOption.val();
|
||||
|
||||
// if (groupId == 0) {
|
||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', "گروه را انتخاب کنید");
|
||||
// groupOrJobEmpty = true;
|
||||
// }
|
||||
|
||||
// if (jobId == 0) {
|
||||
// const alarm = ' سمت' + ' ' + groupText + ' ' + 'را انتخاب کنید '
|
||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم', alarm);
|
||||
// groupOrJobEmpty = true;
|
||||
// }
|
||||
// // const jobText = $selectedJobOption.text();
|
||||
// // const jobName = $selectedJobOption.data('jobname');
|
||||
// // const jobCode = $selectedJobOption.data('jobcode');
|
||||
|
||||
// // console.log(`GroupId = ${groupId} JobId = ${jobId} selectGroupId = ${selectGroupId} startDate = ${startDate} endDate = ${endDate}`);
|
||||
|
||||
// const editEmployeeGroupList = {
|
||||
// id: Number(selectGroupId),
|
||||
// employeeId: '@Model.EmployeeId',
|
||||
// schemeId: '@Model.SchemeId',
|
||||
// classificationGroupId: Number(groupId),
|
||||
// classificationGroupJobId: Number(jobId),
|
||||
// StartGroupDateFa: startDate,
|
||||
// endGroupDateFa: endDate,
|
||||
// };
|
||||
// // console.log(editEmployeeGroupList);
|
||||
// command.push(editEmployeeGroupList);
|
||||
// });
|
||||
|
||||
// if(!groupOrJobEmpty){
|
||||
// var urlAjaxToSave = '@Url.Page("/Company/Workshops/ClassificationScheme", "EditMultipleGroupMember")';
|
||||
|
||||
// $.ajax({
|
||||
|
||||
// type: 'POST',
|
||||
// url: urlAjaxToSave,
|
||||
// headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
// data: JSON.stringify(command),
|
||||
// contentType: 'application/json; charset=utf-8',
|
||||
// dataType: 'json',
|
||||
// success: function (response) {
|
||||
// if(response.isSuccess){
|
||||
// $.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
// $('.close').click();
|
||||
|
||||
// setTimeout(function () {
|
||||
// $('#addEmployeesTab').click();
|
||||
|
||||
|
||||
|
||||
// }, 1000);
|
||||
// }else{
|
||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', response.message);
|
||||
// }
|
||||
|
||||
// },
|
||||
// failure: function (response) {
|
||||
// //console.log(5, response);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,345 +1,8 @@
|
||||
@model CompanyManagment.App.Contracts.WorkingHoursTemp.CreateWorkingHoursTemp
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
<style>
|
||||
|
||||
.modal2-btns {
|
||||
float: left;
|
||||
padding: 15px;
|
||||
}
|
||||
.modal2-btn {
|
||||
border-radius: 16px;
|
||||
font-size: 12px;
|
||||
|
||||
|
||||
}
|
||||
.modal-content .main-title {
|
||||
top: 35px;
|
||||
}
|
||||
.modal-content label {
|
||||
color: #2c2c2c;
|
||||
font-size: 10px;
|
||||
}
|
||||
.modal .modal-dialog .modal-content .modal-body {
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 5px 0px !important;
|
||||
height: 585px;
|
||||
|
||||
}
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding: 0px 20px !important;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
div span.week {
|
||||
border-radius: 5px;
|
||||
padding: 2px 8px;
|
||||
margin-right: 15px;
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
#shanbeh, #yekshanbeh, #doshanbeh, #seshanbeh, #cheharshanbeh, #panjshanbeh, #jomeh {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#Sh1, #Sh2, #Sh3, #Sh4, #Sh5, #Sh6, #Sh7, #Sh8 {
|
||||
width: 80px;
|
||||
margin-right: 21%;
|
||||
border-radius: 15px;
|
||||
}
|
||||
#Sh4 {
|
||||
height: 57px;
|
||||
line-height: 3.5;
|
||||
margin-right: 3% !important;
|
||||
width: 240px !important;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 10%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
}
|
||||
|
||||
.time2 {
|
||||
width: 32%;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #47c848 !important;
|
||||
}
|
||||
|
||||
.fild {
|
||||
border: 1px solid #878686;
|
||||
background-color: #e7e7e7;
|
||||
border-radius: 10px;
|
||||
padding: 15px 0 15px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
|
||||
.fild2 {
|
||||
border: 1px solid #878686;
|
||||
background-color: #d9d9d9;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0 10px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 80%;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.fild3 {
|
||||
border: 1px solid #878686;
|
||||
background-color: #e7e7e7;
|
||||
border-radius: 10px;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
.fild4 {
|
||||
border: 1px solid #878686;
|
||||
background-color: #f3f3f3;
|
||||
border-radius: 10px;
|
||||
padding: 15px 0 15px 0;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin: 5px 0px;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
hr {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-top: 1px solid #d3d3d3;
|
||||
}
|
||||
|
||||
.checkbox + .checkbox, .radio + .radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.rest {
|
||||
width: 67px;
|
||||
text-align: center;
|
||||
}
|
||||
.rsetHeader {
|
||||
|
||||
border-right: 1px solid #9a9a9a;
|
||||
border-left: 1px solid #9a9a9a;
|
||||
padding: 0px 20px 0px 23px;
|
||||
}
|
||||
.shiftDisplayNone {
|
||||
display: none;
|
||||
}
|
||||
.tabHeader {
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
height: 34px;
|
||||
background-color: #e6f7e9 !important;
|
||||
padding: 0px 5px !important;
|
||||
}
|
||||
.nav.nav-tabs > li > a, .nav.tabs-vertical > li > a {
|
||||
line-height: 30px;
|
||||
}
|
||||
.tab-a {
|
||||
height: 30px;
|
||||
border-radius: 10px 10px 0px 0px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
.nav-tabs > li.active > a,
|
||||
.nav-tabs > li.active > a:focus,
|
||||
.nav-tabs > li.active > a:hover, .tabs-vertical > li.active > a,
|
||||
.tabs-vertical > li.active > a:focus,
|
||||
.tabs-vertical > li.active > a:hover{
|
||||
color: #07851d !important;
|
||||
|
||||
}
|
||||
.modal-moving {
|
||||
|
||||
-webkit-animation-duration: 4s;
|
||||
-webkit-animation-name: modal-move;
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
|
||||
animation-duration: 4s;
|
||||
animation-fill-mode: forwards;
|
||||
animation-name: modal-move;
|
||||
}
|
||||
@@-webkit-keyframes modal-move {
|
||||
from {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
to {
|
||||
right: 150px;
|
||||
}
|
||||
}
|
||||
@@-moz-keyframes modal-move {
|
||||
from {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
to {
|
||||
right: 180px;
|
||||
}
|
||||
}
|
||||
@@keyframes modal-move {
|
||||
from {
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
to {
|
||||
right: 150px;
|
||||
}
|
||||
}
|
||||
.call {
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.green-text {
|
||||
color: #28ff35;
|
||||
}
|
||||
.yelow-text {
|
||||
color: #ffdc56;
|
||||
}
|
||||
|
||||
.modal-body2 {
|
||||
background-color: #f2fbfb;
|
||||
width: 100%;
|
||||
height: 615px;
|
||||
border-radius: 25px;
|
||||
position: absolute;
|
||||
}
|
||||
.rotateHead {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
background-color: #eb950a;
|
||||
box-shadow: 1px 1px 5px 2px rgb(0 0 0 / 19%);
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.rotateItems{
|
||||
width: 100%;
|
||||
margin-top: 3px;
|
||||
height: 17px;
|
||||
|
||||
box-shadow: 1px 1px 5px 2px rgb(0 0 0 / 19%);
|
||||
border-radius: 10px;
|
||||
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
.rotateParntModal {
|
||||
height: 600px !important;
|
||||
}
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
#copyToOtherWeeks {
|
||||
width: 75px;
|
||||
padding: 1px !important;
|
||||
background-color: #fccd1c !important;
|
||||
margin: 0px 4px 3px 20px !important;
|
||||
font-size: 9px !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
.copyTooltip-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
/* display: inline-block;*/
|
||||
}
|
||||
.copyTooltip {
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
color: #fff;
|
||||
/* width: 180px;*/
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-family: 'IranSans';
|
||||
padding: 5px 10px;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
/*text-shadow: 1px 1px 2px #111;*/
|
||||
background: #eb3434;
|
||||
border: 1px solid #eb3434;
|
||||
box-shadow: 0 0 3px rgba(0,0,0,0.5);
|
||||
-webkit-transition: all .2s ease-in-out;
|
||||
-moz-transition: all .2s ease-in-out;
|
||||
-o-transition: all .2s ease-in-out;
|
||||
/* -ms-transition: all .2s ease-in-out;*/
|
||||
transition: all .2s ease-in-out;
|
||||
-webkit-transform: scale(0);
|
||||
-moz-transform: scale(0);
|
||||
-o-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
position: absolute;
|
||||
right: -2px;
|
||||
bottom: 23px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.copyTooltip:before, .copyTooltip:after {
|
||||
content: '';
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px solid #eb3434;
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.copyTooltip-container:hover .copyTooltip, a:hover .copyTooltip {
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.weekAlert {
|
||||
|
||||
|
||||
animation: colorChange 800ms linear infinite;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434;
|
||||
border: 1px solid #eb3434;
|
||||
}
|
||||
|
||||
|
||||
@@keyframes colorChange {
|
||||
0% {
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434;
|
||||
border: 1px solid #eb3434;
|
||||
}
|
||||
50% {
|
||||
box-shadow: inset 0 0 2px #e5e5e5, 0 0 5px #e5e5e5;
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
}
|
||||
100% {
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434;
|
||||
border: 1px solid #eb3434;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/assetsadmin/page/workshop/css/clock.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="/AdminTheme/assets/css/TypoGraphy.css" rel="stylesheet">
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user