|
|
|
@@ -64,33 +64,49 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
private readonly ILeftWorkInsuranceRepository _leftWorkInsuranceRepository;
|
|
|
|
private readonly ILeftWorkInsuranceRepository _leftWorkInsuranceRepository;
|
|
|
|
private readonly IFaceEmbeddingService _faceEmbeddingService;
|
|
|
|
private readonly IFaceEmbeddingService _faceEmbeddingService;
|
|
|
|
|
|
|
|
|
|
|
|
public EmployeeAplication(IEmployeeRepository employeeRepository, CompanyContext context, IWorkshopRepository workShopRepository, IWebHostEnvironment webHostEnvironment, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication, IRollCallEmployeeRepository rollCallEmployeeRepository, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IEmployeeDocumentsRepository employeeDocumentsRepository, IEmployeeBankInformationApplication employeeBankInformationApplication, ILeftWorkTempRepository leftWorkTempRepository, IUidService uidService, ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository, IPersonnelCodeRepository personnelCodeRepository, IEmployeeClientTempRepository employeeClientTempRepository, ICustomizeWorkshopGroupSettingsRepository customizeWorkshopGroupSettingsRepository, ILeftWorkRepository leftWorkRepository, IEmployeeAuthorizeTempRepository employeeAuthorizeTempRepository, ILeftWorkInsuranceRepository leftWorkInsuranceRepository, IFaceEmbeddingService faceEmbeddingService) : base(context)
|
|
|
|
public EmployeeAplication(IEmployeeRepository employeeRepository, CompanyContext context,
|
|
|
|
{
|
|
|
|
IWorkshopRepository workShopRepository, IWebHostEnvironment webHostEnvironment,
|
|
|
|
_context = context;
|
|
|
|
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication,
|
|
|
|
_WorkShopRepository = workShopRepository;
|
|
|
|
IRollCallEmployeeRepository rollCallEmployeeRepository,
|
|
|
|
_webHostEnvironment = webHostEnvironment;
|
|
|
|
ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication,
|
|
|
|
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
|
|
|
IEmployeeDocumentsApplication employeeDocumentsApplication,
|
|
|
|
_rollCallEmployeeRepository = rollCallEmployeeRepository;
|
|
|
|
IEmployeeDocumentsRepository employeeDocumentsRepository,
|
|
|
|
_customizeWorkshopSettingsApplication = customizeWorkshopSettingsApplication;
|
|
|
|
IEmployeeBankInformationApplication employeeBankInformationApplication,
|
|
|
|
_employeeDocumentsApplication = employeeDocumentsApplication;
|
|
|
|
ILeftWorkTempRepository leftWorkTempRepository, IUidService uidService,
|
|
|
|
_employeeBankInformationApplication = employeeBankInformationApplication;
|
|
|
|
ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository,
|
|
|
|
_leftWorkTempRepository = leftWorkTempRepository;
|
|
|
|
IPersonnelCodeRepository personnelCodeRepository, IEmployeeClientTempRepository employeeClientTempRepository,
|
|
|
|
_uidService = uidService;
|
|
|
|
ICustomizeWorkshopGroupSettingsRepository customizeWorkshopGroupSettingsRepository,
|
|
|
|
_customizeWorkshopEmployeeSettingsRepository = customizeWorkshopEmployeeSettingsRepository;
|
|
|
|
ILeftWorkRepository leftWorkRepository, IEmployeeAuthorizeTempRepository employeeAuthorizeTempRepository,
|
|
|
|
_personnelCodeRepository = personnelCodeRepository;
|
|
|
|
ILeftWorkInsuranceRepository leftWorkInsuranceRepository,
|
|
|
|
_employeeClientTempRepository = employeeClientTempRepository;
|
|
|
|
IFaceEmbeddingService faceEmbeddingService) : base(context)
|
|
|
|
_leftWorkRepository = leftWorkRepository;
|
|
|
|
{
|
|
|
|
_employeeAuthorizeTempRepository = employeeAuthorizeTempRepository;
|
|
|
|
_context = context;
|
|
|
|
_leftWorkInsuranceRepository = leftWorkInsuranceRepository;
|
|
|
|
_WorkShopRepository = workShopRepository;
|
|
|
|
_EmployeeRepository = employeeRepository;
|
|
|
|
_webHostEnvironment = webHostEnvironment;
|
|
|
|
_faceEmbeddingService = faceEmbeddingService;
|
|
|
|
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
|
|
|
}
|
|
|
|
_rollCallEmployeeRepository = rollCallEmployeeRepository;
|
|
|
|
|
|
|
|
_customizeWorkshopSettingsApplication = customizeWorkshopSettingsApplication;
|
|
|
|
|
|
|
|
_employeeDocumentsApplication = employeeDocumentsApplication;
|
|
|
|
|
|
|
|
_employeeBankInformationApplication = employeeBankInformationApplication;
|
|
|
|
|
|
|
|
_leftWorkTempRepository = leftWorkTempRepository;
|
|
|
|
|
|
|
|
_uidService = uidService;
|
|
|
|
|
|
|
|
_customizeWorkshopEmployeeSettingsRepository = customizeWorkshopEmployeeSettingsRepository;
|
|
|
|
|
|
|
|
_personnelCodeRepository = personnelCodeRepository;
|
|
|
|
|
|
|
|
_employeeClientTempRepository = employeeClientTempRepository;
|
|
|
|
|
|
|
|
_leftWorkRepository = leftWorkRepository;
|
|
|
|
|
|
|
|
_employeeAuthorizeTempRepository = employeeAuthorizeTempRepository;
|
|
|
|
|
|
|
|
_leftWorkInsuranceRepository = leftWorkInsuranceRepository;
|
|
|
|
|
|
|
|
_EmployeeRepository = employeeRepository;
|
|
|
|
|
|
|
|
_faceEmbeddingService = faceEmbeddingService;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public OperationResult Create(CreateEmployee command)
|
|
|
|
public OperationResult Create(CreateEmployee command)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var opration = new OperationResult();
|
|
|
|
var opration = new OperationResult();
|
|
|
|
if (_EmployeeRepository.Exists(x =>
|
|
|
|
if (_EmployeeRepository.Exists(x =>
|
|
|
|
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null && x.IsActiveString == "true"))
|
|
|
|
x.LName == command.LName && x.NationalCode == command.NationalCode &&
|
|
|
|
|
|
|
|
!string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null &&
|
|
|
|
|
|
|
|
x.IsActiveString == "true"))
|
|
|
|
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
|
|
|
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
|
|
|
|
|
|
|
|
|
|
|
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber !=null))
|
|
|
|
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber !=null))
|
|
|
|
@@ -182,13 +198,13 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nationalCodValid = false;
|
|
|
|
nationalCodValid = false;
|
|
|
|
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
|
|
|
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception)
|
|
|
|
catch (Exception)
|
|
|
|
@@ -198,6 +214,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return opration.Failed("لطفا کد ملی 10 رقمی وارد کنید");
|
|
|
|
return opration.Failed("لطفا کد ملی 10 رقمی وارد کنید");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode))
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
@@ -210,24 +227,31 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
var dateOfBirth = command.DateOfBirth != null
|
|
|
|
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
? command.DateOfBirth.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
|
|
|
|
var dateOfIssue = command.DateOfIssue != null
|
|
|
|
|
|
|
|
? command.DateOfIssue.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var employeeData = new Employee(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
var employeeData = new Employee(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
dateOfIssue,
|
|
|
|
dateOfIssue,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality, command.IdNumberSerial, command.IdNumberSeri,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
|
|
|
|
|
|
|
command.IdNumberSerial, command.IdNumberSeri,
|
|
|
|
command.Phone, command.Address,
|
|
|
|
command.Phone, command.Address,
|
|
|
|
command.State, command.City, command.MaritalStatus, command.MilitaryService, command.LevelOfEducation,
|
|
|
|
command.State, command.City, command.MaritalStatus, command.MilitaryService, command.LevelOfEducation,
|
|
|
|
command.FieldOfStudy, command.BankCardNumber,
|
|
|
|
command.FieldOfStudy, command.BankCardNumber,
|
|
|
|
command.BankBranch, command.InsuranceCode, command.InsuranceHistoryByYear,
|
|
|
|
command.BankBranch, command.InsuranceCode, command.InsuranceHistoryByYear,
|
|
|
|
command.InsuranceHistoryByMonth, command.NumberOfChildren, command.OfficePhone, command.MclsUserName, command.MclsPassword, command.EserviceUserName, command.EservicePassword,
|
|
|
|
command.InsuranceHistoryByMonth, command.NumberOfChildren, command.OfficePhone, command.MclsUserName,
|
|
|
|
|
|
|
|
command.MclsPassword, command.EserviceUserName, command.EservicePassword,
|
|
|
|
command.TaxOfficeUserName, command.TaxOfficepassword, command.SanaUserName, command.SanaPassword);
|
|
|
|
command.TaxOfficeUserName, command.TaxOfficepassword, command.SanaUserName, command.SanaPassword);
|
|
|
|
|
|
|
|
|
|
|
|
if (command.IsAuthorized)
|
|
|
|
if (command.IsAuthorized)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
employeeData.Authorized();
|
|
|
|
employeeData.Authorized();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_EmployeeRepository.Create(employeeData);
|
|
|
|
_EmployeeRepository.Create(employeeData);
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -244,7 +268,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return opration.Failed("رکورد مورد نظر یافت نشد");
|
|
|
|
return opration.Failed("رکورد مورد نظر یافت نشد");
|
|
|
|
|
|
|
|
|
|
|
|
if (_EmployeeRepository.Exists(x =>
|
|
|
|
if (_EmployeeRepository.Exists(x =>
|
|
|
|
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id && x.IsActiveString == "true"))
|
|
|
|
x.LName == command.LName && x.NationalCode == command.NationalCode &&
|
|
|
|
|
|
|
|
!string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id && x.IsActiveString == "true"))
|
|
|
|
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
|
|
|
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
|
|
|
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber != null && x.id != command.Id))
|
|
|
|
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber != null && x.id != command.Id))
|
|
|
|
// return opration.Failed("شماره شناسنامه وارد شده تکراری است");
|
|
|
|
// return opration.Failed("شماره شناسنامه وارد شده تکراری است");
|
|
|
|
@@ -339,6 +364,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return opration.Failed("لطفا کد ملی 10 رقمی وارد کنید");
|
|
|
|
return opration.Failed("لطفا کد ملی 10 رقمی وارد کنید");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode && x.id != command.Id))
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode && x.id != command.Id))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
@@ -349,8 +375,12 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
var dateOfBirth = command.DateOfBirth != null
|
|
|
|
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
? command.DateOfBirth.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
|
|
|
|
var dateOfIssue = command.DateOfIssue != null
|
|
|
|
|
|
|
|
? command.DateOfIssue.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
employee.Edit(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
employee.Edit(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
dateOfIssue,
|
|
|
|
dateOfIssue,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
|
|
|
@@ -435,7 +465,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var opration = new OperationResult();
|
|
|
|
var opration = new OperationResult();
|
|
|
|
|
|
|
|
|
|
|
|
var employeeData = new EmployeeInsuranceRecord(command.EmployeeId, command.WorkShopId, command.DateOfStart, command.DateOfEnd);
|
|
|
|
var employeeData = new EmployeeInsuranceRecord(command.EmployeeId, command.WorkShopId, command.DateOfStart,
|
|
|
|
|
|
|
|
command.DateOfEnd);
|
|
|
|
|
|
|
|
|
|
|
|
_EmployeeRepository.CreateEmployeeInsuranceRecord(employeeData);
|
|
|
|
_EmployeeRepository.CreateEmployeeInsuranceRecord(employeeData);
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
@@ -444,6 +475,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public OperationResult EditEmployeeInsuranceRecord(EditEmployeeInsuranceRecord command)
|
|
|
|
public OperationResult EditEmployeeInsuranceRecord(EditEmployeeInsuranceRecord command)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var opration = new OperationResult();
|
|
|
|
var opration = new OperationResult();
|
|
|
|
@@ -455,6 +487,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void RemoveEmployeeInsuranceRecord(long Id)
|
|
|
|
public void RemoveEmployeeInsuranceRecord(long Id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_EmployeeRepository.RemoveEmployeeInsuranceRecord(Id);
|
|
|
|
_EmployeeRepository.RemoveEmployeeInsuranceRecord(Id);
|
|
|
|
@@ -468,12 +501,14 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return opration.Failed("خطا در انتخاب کارگاه");
|
|
|
|
return opration.Failed("خطا در انتخاب کارگاه");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var ws = _WorkShopRepository.GetDetails(eir.WorkShopId);
|
|
|
|
var ws = _WorkShopRepository.GetDetails(eir.WorkShopId);
|
|
|
|
if (string.IsNullOrWhiteSpace(eir.DateOfStart))
|
|
|
|
if (string.IsNullOrWhiteSpace(eir.DateOfStart))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return opration.Failed("تاریخ شروع نمی تواند خالی باشد - " + ws.WorkshopFullName);
|
|
|
|
return opration.Failed("تاریخ شروع نمی تواند خالی باشد - " + ws.WorkshopFullName);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(eir.DateOfEnd))
|
|
|
|
if (!string.IsNullOrWhiteSpace(eir.DateOfEnd))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (eir.DateOfEnd.ToGeorgianDateTime() < eir.DateOfStart.ToGeorgianDateTime())
|
|
|
|
if (eir.DateOfEnd.ToGeorgianDateTime() < eir.DateOfStart.ToGeorgianDateTime())
|
|
|
|
@@ -490,6 +525,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
return opration.Succcedded();
|
|
|
|
return opration.Succcedded();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public OperationResult ValidationEmployeeInsuranceRecord(List<CreateEmployeeInsuranceRecord> eir_lst)
|
|
|
|
public OperationResult ValidationEmployeeInsuranceRecord(List<CreateEmployeeInsuranceRecord> eir_lst)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var opration = new OperationResult();
|
|
|
|
var opration = new OperationResult();
|
|
|
|
@@ -509,16 +545,19 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return opration.Failed("خطا در تداخل تاریخ - " + wshop.WorkshopFullName);
|
|
|
|
return opration.Failed("خطا در تداخل تاریخ - " + wshop.WorkshopFullName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(q[i].DateOfEnd.ToString()))
|
|
|
|
if (string.IsNullOrEmpty(q[i].DateOfEnd.ToString()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
count++;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (count > 1)
|
|
|
|
if (count > 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return opration.Failed("تاریخ ترک کار را وارد نمایید ");
|
|
|
|
return opration.Failed("تاریخ ترک کار را وارد نمایید ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return opration.Succcedded();
|
|
|
|
return opration.Succcedded();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -532,11 +571,13 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return opration.Failed("خطا در انتخاب پرسنل");
|
|
|
|
return opration.Failed("خطا در انتخاب پرسنل");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var employee = _EmployeeRepository.GetDetails(employeeId);
|
|
|
|
var employee = _EmployeeRepository.GetDetails(employeeId);
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.FName))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.FName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(نام)" + Environment.NewLine;
|
|
|
|
error += "(نام)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.LName))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.LName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(نام خانوادگی)" + Environment.NewLine;
|
|
|
|
error += "(نام خانوادگی)" + Environment.NewLine;
|
|
|
|
@@ -546,22 +587,27 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(کد ملی)" + Environment.NewLine;
|
|
|
|
error += "(کد ملی)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.PlaceOfIssue))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.PlaceOfIssue))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(شهر محل تولد)" + Environment.NewLine;
|
|
|
|
error += "(شهر محل تولد)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.DateOfBirth))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.DateOfBirth))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(تاریخ تولد)" + Environment.NewLine;
|
|
|
|
error += "(تاریخ تولد)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.IdNumber))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.IdNumber))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(شماره شناسنامه)" + Environment.NewLine;
|
|
|
|
error += "(شماره شناسنامه)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.InsuranceCode))
|
|
|
|
if (string.IsNullOrWhiteSpace(employee.InsuranceCode))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
error += "(شماره بیمه)" + Environment.NewLine;
|
|
|
|
error += "(شماره بیمه)" + Environment.NewLine;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(error))
|
|
|
|
if (!string.IsNullOrWhiteSpace(error))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var note = "آیتم های زیر برای ثبت سابقه الزامی می باشد" + Environment.NewLine + error;
|
|
|
|
var note = "آیتم های زیر برای ثبت سابقه الزامی می باشد" + Environment.NewLine + error;
|
|
|
|
@@ -610,7 +656,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
InsuranceCode = x.InsuranceCode,
|
|
|
|
InsuranceCode = x.InsuranceCode,
|
|
|
|
IsActiveString = x.IsActiveString,
|
|
|
|
IsActiveString = x.IsActiveString,
|
|
|
|
IsActive = x.IsActive,
|
|
|
|
IsActive = x.IsActive,
|
|
|
|
PersonnelCode = _context.PersonnelCodeSet.FirstOrDefault(p => p.EmployeeId == x.Id && p.WorkshopId == searchModel.WorkshopId)?.PersonnelCode
|
|
|
|
PersonnelCode = _context.PersonnelCodeSet
|
|
|
|
|
|
|
|
.FirstOrDefault(p => p.EmployeeId == x.Id && p.WorkshopId == searchModel.WorkshopId)?.PersonnelCode
|
|
|
|
}).ToList();
|
|
|
|
}).ToList();
|
|
|
|
//w2.Stop();
|
|
|
|
//w2.Stop();
|
|
|
|
//Console.WriteLine("efore :" + w2.ElapsedMilliseconds);
|
|
|
|
//Console.WriteLine("efore :" + w2.ElapsedMilliseconds);
|
|
|
|
@@ -619,6 +666,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -663,6 +711,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopNationalCode(command.NationalCode, command.WorkshopId))
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopNationalCode(command.NationalCode, command.WorkshopId))
|
|
|
|
return opration.Failed("کد ملی وارد شده تکراری است");
|
|
|
|
return opration.Failed("کد ملی وارد شده تکراری است");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_EmployeeRepository.Exists(x => x.InsuranceCode == command.InsuranceCode && x.InsuranceCode != null))
|
|
|
|
if (_EmployeeRepository.Exists(x => x.InsuranceCode == command.InsuranceCode && x.InsuranceCode != null))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshoppInsuranceCode(command.InsuranceCode, command.WorkshopId))
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshoppInsuranceCode(command.InsuranceCode, command.WorkshopId))
|
|
|
|
@@ -789,13 +838,17 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode && x.id != command.Id))
|
|
|
|
if (_EmployeeRepository.Exists(x => x.NationalCode == command.NationalCode && x.id != command.Id))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopNationalCodeEmployeeId(command.NationalCode, command.WorkshopId, command.Id))
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopNationalCodeEmployeeId(command.NationalCode,
|
|
|
|
|
|
|
|
command.WorkshopId, command.Id))
|
|
|
|
return opration.Failed("کد ملی وارد شده تکراری است");
|
|
|
|
return opration.Failed("کد ملی وارد شده تکراری است");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(command.InsuranceCode) && _EmployeeRepository.Exists(x => x.InsuranceCode == command.InsuranceCode && x.id != command.Id))
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(command.InsuranceCode) &&
|
|
|
|
|
|
|
|
_EmployeeRepository.Exists(x => x.InsuranceCode == command.InsuranceCode && x.id != command.Id))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
nationalcodeIsOk = false;
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopInsuranceCodeEmployeeId(command.InsuranceCode, command.WorkshopId, command.Id))
|
|
|
|
if (_EmployeeRepository.ExistsEmployeeWorkshopInsuranceCodeEmployeeId(command.InsuranceCode,
|
|
|
|
|
|
|
|
command.WorkshopId, command.Id))
|
|
|
|
return opration.Failed("کد بیمه وارد شده تکراری است");
|
|
|
|
return opration.Failed("کد بیمه وارد شده تکراری است");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -877,8 +930,12 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
string initial = "1300/10/11";
|
|
|
|
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
var dateOfBirth = command.DateOfBirth != null
|
|
|
|
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
|
|
|
? command.DateOfBirth.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
|
|
|
|
var dateOfIssue = command.DateOfIssue != null
|
|
|
|
|
|
|
|
? command.DateOfIssue.ToGeorgianDateTime()
|
|
|
|
|
|
|
|
: initial.ToGeorgianDateTime();
|
|
|
|
employee.Edit(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
employee.Edit(command.FName, command.LName, command.FatherName, dateOfBirth,
|
|
|
|
dateOfIssue,
|
|
|
|
dateOfIssue,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
|
|
|
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
|
|
|
@@ -898,14 +955,17 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public EditEmployee GetDetailsForClient(long id, long workshopId)
|
|
|
|
public EditEmployee GetDetailsForClient(long id, long workshopId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var employee = _EmployeeRepository.GetDetails(id);
|
|
|
|
var employee = _EmployeeRepository.GetDetails(id);
|
|
|
|
employee.PersonelCode = _context.PersonnelCodeSet.FirstOrDefault(p => p.EmployeeId == id && p.WorkshopId == workshopId)?.PersonnelCode;
|
|
|
|
employee.PersonelCode = _context.PersonnelCodeSet
|
|
|
|
|
|
|
|
.FirstOrDefault(p => p.EmployeeId == id && p.WorkshopId == workshopId)?.PersonnelCode;
|
|
|
|
return employee;
|
|
|
|
return employee;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region NewByHeydari
|
|
|
|
#region NewByHeydari
|
|
|
|
|
|
|
|
|
|
|
|
public List<EmployeeViewModel> SearchForMain(EmployeeSearchModel searchModel)
|
|
|
|
public List<EmployeeViewModel> SearchForMain(EmployeeSearchModel searchModel)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var res = _EmployeeRepository.SearchForMain(searchModel);
|
|
|
|
var res = _EmployeeRepository.SearchForMain(searchModel);
|
|
|
|
@@ -917,6 +977,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -926,7 +987,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (nationalCode.NationalCodeValid() != "valid")
|
|
|
|
if (nationalCode.NationalCodeValid() != "valid")
|
|
|
|
return new();
|
|
|
|
return new();
|
|
|
|
var workshopEmployeesWithLeftWork = _EmployeeRepository.GetWorkingEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode, DateTime.Now.Date);
|
|
|
|
var workshopEmployeesWithLeftWork =
|
|
|
|
|
|
|
|
_EmployeeRepository.GetWorkingEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode,
|
|
|
|
|
|
|
|
DateTime.Now.Date);
|
|
|
|
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
|
|
|
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -934,9 +997,12 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (nationalCode.NationalCodeValid() != "valid")
|
|
|
|
if (nationalCode.NationalCodeValid() != "valid")
|
|
|
|
return new();
|
|
|
|
return new();
|
|
|
|
var workshopEmployeesWithLeftWork = _EmployeeRepository.GetWorkedEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode, DateTime.Now.Date);
|
|
|
|
var workshopEmployeesWithLeftWork =
|
|
|
|
|
|
|
|
_EmployeeRepository.GetWorkedEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode,
|
|
|
|
|
|
|
|
DateTime.Now.Date);
|
|
|
|
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
|
|
|
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<EmployeeViewModel> GetWorkingEmployeesByWorkshopId(long workshopId)
|
|
|
|
public List<EmployeeViewModel> GetWorkingEmployeesByWorkshopId(long workshopId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _EmployeeRepository.GetWorkingEmployeesByWorkshopId(workshopId);
|
|
|
|
return _EmployeeRepository.GetWorkingEmployeesByWorkshopId(workshopId);
|
|
|
|
@@ -980,6 +1046,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Mahan
|
|
|
|
#region Mahan
|
|
|
|
|
|
|
|
|
|
|
|
public OperationResult CreateEmployeeByClient(CreateEmployeeByClient command)
|
|
|
|
public OperationResult CreateEmployeeByClient(CreateEmployeeByClient command)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OperationResult op = new();
|
|
|
|
OperationResult op = new();
|
|
|
|
@@ -1028,20 +1095,23 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
_EmployeeRepository.SaveChanges();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (employee == null)
|
|
|
|
if (employee == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("خطای سیستمی. لطفا دوباره تلاش کنید . درصورت تکرار این مشکل با تیم پشتیبان تماس بگیرید");
|
|
|
|
return op.Failed("خطای سیستمی. لطفا دوباره تلاش کنید . درصورت تکرار این مشکل با تیم پشتیبان تماس بگیرید");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_leftWorkTempRepository.Exists(x =>
|
|
|
|
if (_leftWorkTempRepository.Exists(x =>
|
|
|
|
x.EmployeeId == employee.id && x.WorkshopId == command.WorkshopId && x.LeftWorkType == LeftWorkTempType.StartWork))
|
|
|
|
x.EmployeeId == employee.id && x.WorkshopId == command.WorkshopId &&
|
|
|
|
|
|
|
|
x.LeftWorkType == LeftWorkTempType.StartWork))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("این پرسنل در کارگاه شما قبلا افزوده شده است و در انتظار تایید میباشد");
|
|
|
|
return op.Failed("این پرسنل در کارگاه شما قبلا افزوده شده است و در انتظار تایید میباشد");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var startLeftWork = command.StartLeftWork.ToGeorgianDateTime();
|
|
|
|
var startLeftWork = command.StartLeftWork.ToGeorgianDateTime();
|
|
|
|
|
|
|
|
|
|
|
|
var leftWorkViewModel = _leftWorkRepository.GetLastLeftWorkByEmployeeIdAndWorkshopId(command.WorkshopId, employee.id);
|
|
|
|
var leftWorkViewModel =
|
|
|
|
|
|
|
|
_leftWorkRepository.GetLastLeftWorkByEmployeeIdAndWorkshopId(command.WorkshopId, employee.id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PersonnelCodeDomain personnelCode = null;
|
|
|
|
PersonnelCodeDomain personnelCode = null;
|
|
|
|
@@ -1125,8 +1195,10 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
rollCallEmployee.HasImage();
|
|
|
|
rollCallEmployee.HasImage();
|
|
|
|
_rollCallEmployeeRepository.Create(rollCallEmployee);
|
|
|
|
_rollCallEmployeeRepository.Create(rollCallEmployee);
|
|
|
|
_rollCallEmployeeRepository.SaveChanges();
|
|
|
|
_rollCallEmployeeRepository.SaveChanges();
|
|
|
|
string employeeFullName = employee.FName + " " + employee.LName;
|
|
|
|
string employeeFullName = employee.FName + " " + employee.LName;
|
|
|
|
var res = _faceEmbeddingService.GenerateEmbeddingsAsync(employee.id,command.WorkshopId,employeeFullName, filePath1,filePath2).GetAwaiter().GetResult();
|
|
|
|
var res = _faceEmbeddingService
|
|
|
|
|
|
|
|
.GenerateEmbeddingsAsync(employee.id, command.WorkshopId, employeeFullName, filePath1, filePath2)
|
|
|
|
|
|
|
|
.GetAwaiter().GetResult();
|
|
|
|
if (!res.IsSuccedded)
|
|
|
|
if (!res.IsSuccedded)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed(res.Message);
|
|
|
|
return op.Failed(res.Message);
|
|
|
|
@@ -1212,7 +1284,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
command.EmployeeDocumentItems = command.EmployeeDocumentItems ?? [];
|
|
|
|
command.EmployeeDocumentItems = command.EmployeeDocumentItems ?? [];
|
|
|
|
|
|
|
|
|
|
|
|
var employeeDocumentResult = _employeeDocumentsApplication.AddRangeEmployeeDocumentItemsByClient(command.WorkshopId,
|
|
|
|
var employeeDocumentResult = _employeeDocumentsApplication.AddRangeEmployeeDocumentItemsByClient(
|
|
|
|
|
|
|
|
command.WorkshopId,
|
|
|
|
employee.id, command.EmployeeDocumentItems);
|
|
|
|
employee.id, command.EmployeeDocumentItems);
|
|
|
|
|
|
|
|
|
|
|
|
if (employeeDocumentResult.IsSuccedded == false)
|
|
|
|
if (employeeDocumentResult.IsSuccedded == false)
|
|
|
|
@@ -1262,6 +1335,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
byte[] bytes = Convert.FromBase64String(subBase64);
|
|
|
|
byte[] bytes = Convert.FromBase64String(subBase64);
|
|
|
|
System.IO.File.WriteAllBytes(filePath, bytes);
|
|
|
|
System.IO.File.WriteAllBytes(filePath, bytes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<OperationResult<EmployeeByNationalCodeInWorkshopViewModel>>
|
|
|
|
public async Task<OperationResult<EmployeeByNationalCodeInWorkshopViewModel>>
|
|
|
|
ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(string nationalCode, string birthDate, long workshopId)
|
|
|
|
ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(string nationalCode, string birthDate, long workshopId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1285,8 +1359,10 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
if (personalInfo.ResponseContext.Status.Code == 14)
|
|
|
|
if (personalInfo.ResponseContext.Status.Code == 14)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید", new EmployeeByNationalCodeInWorkshopViewModel() { AuthorizedCanceled = true });
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید",
|
|
|
|
|
|
|
|
new EmployeeByNationalCodeInWorkshopViewModel() { AuthorizedCanceled = true });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (personalInfo.ResponseContext.Status.Code != 0)
|
|
|
|
if (personalInfo.ResponseContext.Status.Code != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
@@ -1305,10 +1381,13 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0" ? identityInfo.NationalId : identityInfo.ShenasnamehNumber;
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0"
|
|
|
|
|
|
|
|
? identityInfo.NationalId
|
|
|
|
|
|
|
|
: identityInfo.ShenasnamehNumber;
|
|
|
|
|
|
|
|
|
|
|
|
var newEmployee = new Employee(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, apiBirthDate,
|
|
|
|
var newEmployee = new Employee(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, apiBirthDate,
|
|
|
|
dateOfIssue, null, identityInfo.NationalId, idNumber, gender, "ایرانی", identityInfo.ShenasnameSerial, identityInfo.ShenasnameSeri);
|
|
|
|
dateOfIssue, null, identityInfo.NationalId, idNumber, gender, "ایرانی", identityInfo.ShenasnameSerial,
|
|
|
|
|
|
|
|
identityInfo.ShenasnameSeri);
|
|
|
|
newEmployee.Authorized();
|
|
|
|
newEmployee.Authorized();
|
|
|
|
await _EmployeeRepository.CreateAsync(newEmployee);
|
|
|
|
await _EmployeeRepository.CreateAsync(newEmployee);
|
|
|
|
await _EmployeeRepository.SaveChangesAsync();
|
|
|
|
await _EmployeeRepository.SaveChangesAsync();
|
|
|
|
@@ -1324,7 +1403,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_leftWorkTempRepository.ExistsIgnoreQueryFilter(x =>
|
|
|
|
if (_leftWorkTempRepository.ExistsIgnoreQueryFilter(x =>
|
|
|
|
x.EmployeeId == employee.id && x.WorkshopId == workshopId && x.LeftWorkType == LeftWorkTempType.StartWork))
|
|
|
|
x.EmployeeId == employee.id && x.WorkshopId == workshopId &&
|
|
|
|
|
|
|
|
x.LeftWorkType == LeftWorkTempType.StartWork))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("این پرسنل در کارگاه شما قبلا افزوده شده است و در انتظار تایید میباشد");
|
|
|
|
return op.Failed("این پرسنل در کارگاه شما قبلا افزوده شده است و در انتظار تایید میباشد");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1346,14 +1426,17 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0" ? identityInfo.NationalId : identityInfo.ShenasnamehNumber;
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0"
|
|
|
|
|
|
|
|
? identityInfo.NationalId
|
|
|
|
|
|
|
|
: identityInfo.ShenasnamehNumber;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
employee.Edit(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, apiBirthDate,
|
|
|
|
employee.Edit(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, apiBirthDate,
|
|
|
|
employee.DateOfIssue, employee.PlaceOfIssue, identityInfo.NationalId, idNumber,
|
|
|
|
employee.DateOfIssue, employee.PlaceOfIssue, identityInfo.NationalId, idNumber,
|
|
|
|
gender, "ایرانی", employee.Phone, employee.Address, employee.State, employee.City,
|
|
|
|
gender, "ایرانی", employee.Phone, employee.Address, employee.State, employee.City,
|
|
|
|
employee.MaritalStatus, employee.MilitaryService, employee.LevelOfEducation,
|
|
|
|
employee.MaritalStatus, employee.MilitaryService, employee.LevelOfEducation,
|
|
|
|
employee.FieldOfStudy, employee.BankCardNumber, employee.BankBranch, employee.InsuranceCode, employee.InsuranceHistoryByYear,
|
|
|
|
employee.FieldOfStudy, employee.BankCardNumber, employee.BankBranch, employee.InsuranceCode,
|
|
|
|
|
|
|
|
employee.InsuranceHistoryByYear,
|
|
|
|
employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
|
|
|
employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
|
|
|
employee.OfficePhone, employee.MclsUserName, employee.MclsPassword,
|
|
|
|
employee.OfficePhone, employee.MclsUserName, employee.MclsPassword,
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
@@ -1384,7 +1467,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
Gender = employee.Gender,
|
|
|
|
Gender = employee.Gender,
|
|
|
|
Nationality = employee.Nationality,
|
|
|
|
Nationality = employee.Nationality,
|
|
|
|
EmployeeLName = employee.LName
|
|
|
|
EmployeeLName = employee.LName
|
|
|
|
}); ;
|
|
|
|
});
|
|
|
|
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (leftWorkViewModel.LeftWorkDate >= DateTime.Now || !leftWorkViewModel.HasLeft)
|
|
|
|
if (leftWorkViewModel.LeftWorkDate >= DateTime.Now || !leftWorkViewModel.HasLeft)
|
|
|
|
@@ -1436,17 +1520,18 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
Picture1 = picture1,
|
|
|
|
Picture1 = picture1,
|
|
|
|
Picture2 = picture2,
|
|
|
|
Picture2 = picture2,
|
|
|
|
PersonnelCode = personnelCode,
|
|
|
|
PersonnelCode = personnelCode,
|
|
|
|
EmployeeBankInfos = bankInformationViewModel.BankInformation.Select(x => new EmployeeByNationalCodeEmployeeBankInfoViewModel
|
|
|
|
EmployeeBankInfos = bankInformationViewModel.BankInformation.Select(x =>
|
|
|
|
{
|
|
|
|
new EmployeeByNationalCodeEmployeeBankInfoViewModel
|
|
|
|
ShebaNumber = x.ShebaNumber,
|
|
|
|
{
|
|
|
|
IsDefault = x.IsDefault,
|
|
|
|
ShebaNumber = x.ShebaNumber,
|
|
|
|
CardNumber = x.CardNumber,
|
|
|
|
IsDefault = x.IsDefault,
|
|
|
|
BankAccountNumber = x.BankAccountNumber,
|
|
|
|
CardNumber = x.CardNumber,
|
|
|
|
BankId = x.BankId,
|
|
|
|
BankAccountNumber = x.BankAccountNumber,
|
|
|
|
BankLogoMediaId = x.BankLogoMediaId,
|
|
|
|
BankId = x.BankId,
|
|
|
|
BankLogoPath = x.BankLogoPath,
|
|
|
|
BankLogoMediaId = x.BankLogoMediaId,
|
|
|
|
BankName = x.BankName
|
|
|
|
BankLogoPath = x.BankLogoPath,
|
|
|
|
}).ToList(),
|
|
|
|
BankName = x.BankName
|
|
|
|
|
|
|
|
}).ToList(),
|
|
|
|
EmployeeDocument = new EmployeeByNationalCodeEmployeeDocumentViewModel
|
|
|
|
EmployeeDocument = new EmployeeByNationalCodeEmployeeDocumentViewModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
EducationalDegree = employeeDocumentsViewModel.EducationalDegree,
|
|
|
|
EducationalDegree = employeeDocumentsViewModel.EducationalDegree,
|
|
|
|
@@ -1500,6 +1585,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("جنسیت وارد شده نامعتبر است");
|
|
|
|
return op.Failed("جنسیت وارد شده نامعتبر است");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (command.BirthDate.TryToGeorgianDateTime(out var birthDateGr) == false)
|
|
|
|
if (command.BirthDate.TryToGeorgianDateTime(out var birthDateGr) == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("تاریخ تولد وارد شده نامعتبر است");
|
|
|
|
return op.Failed("تاریخ تولد وارد شده نامعتبر است");
|
|
|
|
@@ -1536,7 +1622,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var employeeClientTemp = _employeeClientTempRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId);
|
|
|
|
var employeeClientTemp =
|
|
|
|
|
|
|
|
_employeeClientTempRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId);
|
|
|
|
|
|
|
|
|
|
|
|
employeeClientTemp?.Edit(command.MaritalStatus);
|
|
|
|
employeeClientTemp?.Edit(command.MaritalStatus);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1563,6 +1650,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
employee.TaxOfficepassword, employee.SanaUserName, employee.SanaPassword);
|
|
|
|
employee.TaxOfficepassword, employee.SanaUserName, employee.SanaPassword);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
await _EmployeeRepository.SaveChangesAsync();
|
|
|
|
await _EmployeeRepository.SaveChangesAsync();
|
|
|
|
|
|
|
|
|
|
|
|
return op.Succcedded();
|
|
|
|
return op.Succcedded();
|
|
|
|
@@ -1573,7 +1661,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return await _EmployeeRepository.WorkedEmployeesInWorkshopSelectList(workshopId);
|
|
|
|
return await _EmployeeRepository.WorkedEmployeesInWorkshopSelectList(workshopId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode, string birthDate)
|
|
|
|
public async Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode,
|
|
|
|
|
|
|
|
string birthDate)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var op = new OperationResult<EmployeeDataFromApiViewModel>();
|
|
|
|
var op = new OperationResult<EmployeeDataFromApiViewModel>();
|
|
|
|
var birthDateGr = birthDate.ToGeorgianDateTime();
|
|
|
|
var birthDateGr = birthDate.ToGeorgianDateTime();
|
|
|
|
@@ -1585,20 +1674,23 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
if (employee.IsAuthorized == false)
|
|
|
|
if (employee.IsAuthorized == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
|
|
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
|
|
|
|
|
|
|
|
|
|
|
if (apiResult == null)
|
|
|
|
if (apiResult == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
|
|
|
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (apiResult.ResponseContext.Status.Code is 14 or 3)
|
|
|
|
if (apiResult.ResponseContext.Status.Code is 14 or 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
|
|
|
return op.Failed("این پرسنل در بانک اطلاعات موجود میباشد");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (apiResult.ResponseContext.Status.Code != 0)
|
|
|
|
if (apiResult.ResponseContext.Status.Code != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var basicInfo = apiResult.BasicInformation;
|
|
|
|
var basicInfo = apiResult.BasicInformation;
|
|
|
|
var identityInfo = apiResult.IdentificationInformation;
|
|
|
|
var identityInfo = apiResult.IdentificationInformation;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1609,12 +1701,15 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
_ => throw new AggregateException()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0" ? identityInfo.NationalId : identityInfo.ShenasnamehNumber;
|
|
|
|
var idNumber = identityInfo.ShenasnamehNumber == "0"
|
|
|
|
|
|
|
|
? identityInfo.NationalId
|
|
|
|
|
|
|
|
: identityInfo.ShenasnamehNumber;
|
|
|
|
employee.Edit(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, birthDateGr,
|
|
|
|
employee.Edit(basicInfo.FirstName, basicInfo.LastName, basicInfo.FatherName, birthDateGr,
|
|
|
|
employee.DateOfIssue, employee.PlaceOfIssue, identityInfo.NationalId, idNumber,
|
|
|
|
employee.DateOfIssue, employee.PlaceOfIssue, identityInfo.NationalId, idNumber,
|
|
|
|
gender, "ایرانی", employee.Phone, employee.Address, employee.State, employee.City,
|
|
|
|
gender, "ایرانی", employee.Phone, employee.Address, employee.State, employee.City,
|
|
|
|
employee.MaritalStatus, employee.MilitaryService, employee.LevelOfEducation,
|
|
|
|
employee.MaritalStatus, employee.MilitaryService, employee.LevelOfEducation,
|
|
|
|
employee.FieldOfStudy, employee.BankCardNumber, employee.BankBranch, employee.InsuranceCode, employee.InsuranceHistoryByYear,
|
|
|
|
employee.FieldOfStudy, employee.BankCardNumber, employee.BankBranch, employee.InsuranceCode,
|
|
|
|
|
|
|
|
employee.InsuranceHistoryByYear,
|
|
|
|
employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
|
|
|
employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
|
|
|
employee.OfficePhone, employee.MclsUserName, employee.MclsPassword,
|
|
|
|
employee.OfficePhone, employee.MclsUserName, employee.MclsPassword,
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
|
|
|
@@ -1649,15 +1744,18 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return op.Succcedded(data);
|
|
|
|
return op.Succcedded(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
|
|
|
var apiResult = await _uidService.GetPersonalInfo(nationalCode, birthDate);
|
|
|
|
if (apiResult == null)
|
|
|
|
if (apiResult == null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید", new EmployeeDataFromApiViewModel() { AuthorizedCanceled = true });
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید",
|
|
|
|
|
|
|
|
new EmployeeDataFromApiViewModel() { AuthorizedCanceled = true });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (apiResult.ResponseContext.Status.Code is 14 or 3)
|
|
|
|
if (apiResult.ResponseContext.Status.Code is 14 or 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید", new EmployeeDataFromApiViewModel() { AuthorizedCanceled = true });
|
|
|
|
return op.Failed("سامانه احراز هویت در دسترس نمیباشد لطفا اطلاعات پرسنل را به صورت دستی وارد کنید",
|
|
|
|
|
|
|
|
new EmployeeDataFromApiViewModel() { AuthorizedCanceled = true });
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1665,10 +1763,12 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (apiResult.ResponseContext.Status.Code != 0)
|
|
|
|
if (apiResult.ResponseContext.Status.Code != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return op.Failed("اطلاعات وارد شده نامعتبر میباشد");
|
|
|
|
return op.Failed("اطلاعات وارد شده نامعتبر میباشد");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var basicInfo = apiResult.BasicInformation;
|
|
|
|
var basicInfo = apiResult.BasicInformation;
|
|
|
|
var identityInfo = apiResult.IdentificationInformation;
|
|
|
|
var identityInfo = apiResult.IdentificationInformation;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1676,7 +1776,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BirthDate = identityInfo.BirthDate,
|
|
|
|
BirthDate = identityInfo.BirthDate,
|
|
|
|
NationalCode = identityInfo.NationalId,
|
|
|
|
NationalCode = identityInfo.NationalId,
|
|
|
|
IdNumber = identityInfo.ShenasnamehNumber == "0" ? identityInfo.NationalId : identityInfo.ShenasnamehNumber,
|
|
|
|
IdNumber = identityInfo.ShenasnamehNumber == "0"
|
|
|
|
|
|
|
|
? identityInfo.NationalId
|
|
|
|
|
|
|
|
: identityInfo.ShenasnamehNumber,
|
|
|
|
FatherName = basicInfo.FatherName,
|
|
|
|
FatherName = basicInfo.FatherName,
|
|
|
|
FName = basicInfo.FirstName,
|
|
|
|
FName = basicInfo.FirstName,
|
|
|
|
Gender = basicInfo.GenderEnum,
|
|
|
|
Gender = basicInfo.GenderEnum,
|
|
|
|
@@ -1685,7 +1787,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
IdNumberSerial = identityInfo.ShenasnameSerial
|
|
|
|
IdNumberSerial = identityInfo.ShenasnameSerial
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var newAuthorizeTemp = new EmployeeAuthorizeTemp(data.Gender, data.FName, data.LName, data.FatherName, birthDateGr, data.NationalCode, data.IdNumber, data.IdNumberSerial, data.IdNumberSeri);
|
|
|
|
var newAuthorizeTemp = new EmployeeAuthorizeTemp(data.Gender, data.FName, data.LName, data.FatherName,
|
|
|
|
|
|
|
|
birthDateGr, data.NationalCode, data.IdNumber, data.IdNumberSerial, data.IdNumberSeri);
|
|
|
|
await _employeeAuthorizeTempRepository.CreateAsync(newAuthorizeTemp);
|
|
|
|
await _employeeAuthorizeTempRepository.CreateAsync(newAuthorizeTemp);
|
|
|
|
await _employeeAuthorizeTempRepository.SaveChangesAsync();
|
|
|
|
await _employeeAuthorizeTempRepository.SaveChangesAsync();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1700,9 +1803,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
|
|
|
|
|
|
|
|
#region Api
|
|
|
|
#region Api
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText,long id)
|
|
|
|
public async Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText, long id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _EmployeeRepository.GetSelectList(searchText,id );
|
|
|
|
return await _EmployeeRepository.GetSelectList(searchText, id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel)
|
|
|
|
public async Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel)
|
|
|
|
@@ -1710,5 +1813,10 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
|
|
|
return await _EmployeeRepository.GetList(searchModel);
|
|
|
|
return await _EmployeeRepository.GetList(searchModel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
public Task<List<GetEmployeeClientListViewModel>> GetEmployeeClientList(GetEmployeeClientListSearchModel searchModel,long workshopId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _EmployeeRepository.GetEmployeeClientList(searchModel, workshopId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|