Compare commits
91 Commits
Feature/ac
...
WorskhopCl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f93991db96 | ||
|
|
bca3e1dd42 | ||
|
|
c7e22e4ca6 | ||
|
|
7386bd5750 | ||
|
|
5c8a521f8e | ||
|
|
22973fe47b | ||
|
|
48c83e648d | ||
|
|
494b80c461 | ||
|
|
7cdb431d98 | ||
|
|
f7ae463544 | ||
|
|
1913147f89 | ||
|
|
77798eaccb | ||
|
|
f17c1f0d8e | ||
|
|
bd4f2d18f5 | ||
|
|
0bbed013d2 | ||
|
|
3455c8a786 | ||
|
|
9981116caa | ||
|
|
10e7400611 | ||
|
|
23c99e60d5 | ||
|
|
490393acbc | ||
|
|
c6874b33cf | ||
|
|
596e21b712 | ||
|
|
e9c3176dfc | ||
|
|
4a956a1397 | ||
|
|
fc3053dd17 | ||
|
|
bb79380ce5 | ||
| aad1645edd | |||
| af1388f0d7 | |||
| 4d0cf13d40 | |||
| 6584558e6a | |||
| ed5681256d | |||
| 7a58423eb3 | |||
| 70164ae498 | |||
| db225fea18 | |||
|
|
849369fea3 | ||
| 2bbe616127 | |||
|
|
283f66ab32 | ||
| f64e6ac176 | |||
| 9095ed28e1 | |||
| 04ec2ed5a4 | |||
|
|
c7f5310c56 | ||
| 7b3d1f527c | |||
|
|
abf00884a4 | ||
|
|
50718eda93 | ||
| dbbee73e2a | |||
| 21df40af3b | |||
|
|
f50fdd7f91 | ||
|
|
a3dc27f08e | ||
|
|
055ce2b2a7 | ||
|
|
87cde91ad0 | ||
|
|
55f62da928 | ||
|
|
5a7f233568 | ||
|
|
9d83de947f | ||
|
|
f4c3aa1889 | ||
| 8fb10ba5b0 | |||
|
|
d0928804ee | ||
|
|
67f199e86f | ||
|
|
8171e06965 | ||
|
|
bfa8688c38 | ||
|
|
85936cad63 | ||
|
|
6f805d9abe | ||
| 914a7def53 | |||
| 7777ad52de | |||
| b8b8d9c3c4 | |||
|
|
04710e321a | ||
|
|
b9ff14757b | ||
| f387d0c535 | |||
| ffc6969ee7 | |||
|
|
66c903045f | ||
| c3bbd9af98 | |||
| 72435f2d47 | |||
|
|
b245023dd2 | ||
|
|
8044d64d5e | ||
|
|
1ef86d5e9c | ||
|
|
b3cf56eb1c | ||
|
|
20dbd0121f | ||
|
|
7d3a1dad71 | ||
|
|
b5fc98a47b | ||
|
|
29fed23805 | ||
|
|
a26f079969 | ||
|
|
77458978b5 | ||
|
|
7e3f7d1dcf | ||
|
|
c40b457d1f | ||
|
|
a344c3f3a6 | ||
|
|
8f76b8c082 | ||
|
|
584425b3af | ||
|
|
2f60883ea2 | ||
|
|
df1e6f62b8 | ||
|
|
856ed38f08 | ||
|
|
4a3515ad65 | ||
|
|
49b84b50a5 |
2
.github/workflows/dotnet-developPublish.yml
vendored
2
.github/workflows/dotnet-developPublish.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
|
||||
-verb:sync `
|
||||
-source:contentPath="$publishFolder" `
|
||||
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName="Administrator",password="R2rNpdnetP3j>q5b18",authType="Basic" `
|
||||
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName=".\deployuser",password="R2rNpdnetP3j>q5b18",authType="Basic" `
|
||||
-allowUntrusted `
|
||||
-enableRule:AppOffline
|
||||
|
||||
|
||||
@@ -21,19 +21,4 @@
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Application\UID\UidService.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Application\AuthorizedPerson\AuthorizedPersonApplication.cs" />
|
||||
<Compile Remove="Application\AuthorizedPerson\IAuthorizedPersonApplication.cs" />
|
||||
<Compile Remove="Domain\AuthorizedPersonAgg\IAuthorizedPersonRepository.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Domain\AuthorizedPersonAgg\" />
|
||||
<Folder Include="InfraStructure\AuthorizedPerson\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -477,26 +506,42 @@ public static class Tools
|
||||
string bb = string.Empty;
|
||||
bool isNegative = false;
|
||||
|
||||
for (int x = 0; x < myMoney.Length; x++)
|
||||
try
|
||||
{
|
||||
if (char.IsDigit(myMoney[x]))
|
||||
if (!string.IsNullOrWhiteSpace(myMoney))
|
||||
{
|
||||
bb += myMoney[x];
|
||||
}
|
||||
else if (myMoney[x] == '-' && bb.Length == 0)
|
||||
{
|
||||
// اگر علامت منفی قبل از اولین عدد آمد، در نظر بگیر
|
||||
isNegative = true;
|
||||
}
|
||||
}
|
||||
for (int x = 0; x < myMoney.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(myMoney[x]))
|
||||
{
|
||||
bb += myMoney[x];
|
||||
}
|
||||
else if (myMoney[x] == '-' && bb.Length == 0)
|
||||
{
|
||||
// اگر علامت منفی قبل از اولین عدد آمد، در نظر بگیر
|
||||
isNegative = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
double res = double.Parse(bb);
|
||||
return isNegative ? -res : res;
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
double res = double.Parse(bb);
|
||||
return isNegative ? -res : res;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
79
0_Framework/Application/UID/UidService.cs
Normal file
79
0_Framework/Application/UID/UidService.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace _0_Framework.Application.UID;
|
||||
|
||||
public class UidService : IUidService
|
||||
{
|
||||
private readonly HttpClient _httpClient;
|
||||
private const string BaseUrl = "https://json-api.uid.ir/api/inquiry/";
|
||||
|
||||
public UidService()
|
||||
{
|
||||
_httpClient = new HttpClient()
|
||||
{
|
||||
BaseAddress = new Uri(BaseUrl)
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode, string birthDate)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
BirthDate = birthDate,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
try
|
||||
{
|
||||
var requestResult = await _httpClient.PostAsync("person/v2", contentType);
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<PersonalInfoResponse>();
|
||||
if (responseResult.BasicInformation != null)
|
||||
{
|
||||
responseResult.BasicInformation.FirstName = responseResult.BasicInformation.FirstName?.ToPersian();
|
||||
responseResult.BasicInformation.LastName = responseResult.BasicInformation.LastName?.ToPersian();
|
||||
responseResult.BasicInformation.FatherName = responseResult.BasicInformation.FatherName?.ToPersian();
|
||||
}
|
||||
|
||||
return responseResult;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
return new PersonalInfoResponse(new UidBasicInformation(),
|
||||
new IdentificationInformation(default, default, default, default, default), new RegistrationStatus(),
|
||||
new ResponseContext(new UidStatus(14, "")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode, string phoneNumber)
|
||||
{
|
||||
var request = new PersonalInfoRequest
|
||||
{
|
||||
MobileNumber = phoneNumber,
|
||||
NationalId = nationalCode,
|
||||
RequestContext = new UidRequestContext()
|
||||
};
|
||||
var json = JsonConvert.SerializeObject(request);
|
||||
var contentType = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var requestResult = await _httpClient.PostAsync("mobile/owner/v2", contentType);
|
||||
if (!requestResult.IsSuccessStatusCode)
|
||||
return null;
|
||||
|
||||
var responseResult = await requestResult.Content.ReadFromJsonAsync<MatchMobileWithNationalCodeResponse>();
|
||||
return responseResult;
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,14 @@ namespace _0_Framework.InfraStructure;
|
||||
|
||||
public static class QueryableExtensions
|
||||
{
|
||||
public static IQueryable<T> ApplyPagination<T>(this IQueryable<T> query, int page, int pageSize)
|
||||
public static IQueryable<T> ApplyPagination<T>(this IQueryable<T> query, int page, int pageSize = 30)
|
||||
{
|
||||
if (page <= 0) page = 1;
|
||||
if (pageSize <= 0) pageSize = 10;
|
||||
|
||||
return query.Skip((page - 1) * pageSize).Take(pageSize);
|
||||
}
|
||||
public static IEnumerable<T> ApplyPagination<T>(this IEnumerable<T> source, int page, int pageSize)
|
||||
public static IEnumerable<T> ApplyPagination<T>(this IEnumerable<T> source, int page, int pageSize = 30)
|
||||
{
|
||||
if (page <= 0) page = 1;
|
||||
if (pageSize <= 0) pageSize = 10;
|
||||
|
||||
@@ -64,6 +64,4 @@ public interface IAccountApplication
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public bool CheckExistClientAccount(string userName);
|
||||
List<AccountViewModel> GetAdminAccountsNew();
|
||||
|
||||
}
|
||||
@@ -799,8 +799,4 @@ public class AccountApplication : IAccountApplication
|
||||
return _accountRepository.CheckExistClientAccount(userName);
|
||||
}
|
||||
|
||||
public List<AccountViewModel> GetAdminAccountsNew()
|
||||
{
|
||||
return _accountRepository.GetAdminAccountsNew();
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.AuthorizedPersonAgg;
|
||||
|
||||
public class AuthorizedPerson : EntityBase
|
||||
{
|
||||
public string NationalCode { get; private set; }
|
||||
public string FirstName { get; private set; }
|
||||
public string LastName { get; private set; }
|
||||
public string FatherName { get; private set; }
|
||||
public string BirthDate { get; private set; }
|
||||
public string Gender { get; private set; }
|
||||
public string DeathStatus { get; private set; }
|
||||
public string ShenasnameSeri { get; private set; }
|
||||
public string ShenasnameSerial { get; private set; }
|
||||
public string ShenasnamehNumber { get; private set; }
|
||||
public bool IsVerified { get; private set; }
|
||||
public DateTime? VerificationDate { get; private set; }
|
||||
|
||||
public AuthorizedPerson(string nationalCode, string firstName, string lastName, string fatherName,
|
||||
string birthDate, string gender, string deathStatus, string shenasnameSeri,
|
||||
string shenasnameSerial, string shenasnamehNumber)
|
||||
{
|
||||
NationalCode = nationalCode;
|
||||
FirstName = firstName;
|
||||
LastName = lastName;
|
||||
FatherName = fatherName;
|
||||
BirthDate = birthDate;
|
||||
Gender = gender;
|
||||
DeathStatus = deathStatus;
|
||||
ShenasnameSeri = shenasnameSeri;
|
||||
ShenasnameSerial = shenasnameSerial;
|
||||
ShenasnamehNumber = shenasnamehNumber;
|
||||
IsVerified = true;
|
||||
VerificationDate = DateTime.Now;
|
||||
}
|
||||
|
||||
public void UpdatePersonalInfo(string firstName, string lastName, string fatherName,
|
||||
string gender, string deathStatus)
|
||||
{
|
||||
FirstName = firstName;
|
||||
LastName = lastName;
|
||||
FatherName = fatherName;
|
||||
Gender = gender;
|
||||
DeathStatus = deathStatus;
|
||||
VerificationDate = DateTime.Now;
|
||||
}
|
||||
|
||||
protected AuthorizedPerson() { }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.AuthorizedPersonAgg;
|
||||
|
||||
public interface IAuthorizedPersonRepository : IRepository<long, AuthorizedPerson>
|
||||
{
|
||||
AuthorizedPerson GetByNationalCode(string nationalCode);
|
||||
bool ExistsByNationalCode(string nationalCode);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
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>
|
||||
|
||||
public ClassificationEmployee(long workshopId, long employeeId, long classificationSchemeId, long classificationGroupId, long classificationGroupJobId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
EmployeeId = employeeId;
|
||||
ClassificationSchemeId = classificationSchemeId;
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
ClassificationGroupJobId = classificationGroupJobId;
|
||||
|
||||
}
|
||||
|
||||
/// <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="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="classificationSchemeId"></param>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="classificationGroupJobId"></param>
|
||||
public void Edit(long classificationGroupId, long classificationGroupJobId)
|
||||
{
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
ClassificationGroupJobId = classificationGroupJobId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,25 @@
|
||||
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<ClassificationEmployee> GetEmployeeMemberizeData(long employeeId);
|
||||
}
|
||||
@@ -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,42 @@
|
||||
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<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationScheme> GetClassificationScheme(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);
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Company.Domain.ClassifiedSalaryAgg
|
||||
{
|
||||
public class ClassifiedSalary : EntityBase
|
||||
{
|
||||
//test
|
||||
//test//test
|
||||
public ClassifiedSalary(double group1, double group2, double group3, double group4, double group5, double group6, double group7, double group8, double group9, double group10, double group11, double group12, double group13, double group14, double group15, double group16, double group17, double group18, double group19, double group20, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
Group1 = group1;
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
||||
EditPersonalContractingParty GetDetailsToEdit(long id);
|
||||
string GetFullName(long id);
|
||||
List<PersonalContractingPartyViewModel> Search(PersonalContractingPartySearchModel searchModel2);
|
||||
int GetLastNewArchiveCode();
|
||||
int GetLastArchiveCode();
|
||||
#region Mahan
|
||||
|
||||
List<string> SearchByName(string name);
|
||||
|
||||
@@ -73,16 +73,12 @@ public class PersonalContractingParty : EntityBase
|
||||
/// آیا از طریق ای پی ای احراز هویت شده است
|
||||
/// </summary>
|
||||
public bool IsAuthenticated { get; private set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// سمت و صاحب امضاء اوراق (فقط برای طرف حقوقی)
|
||||
/// </summary>
|
||||
public string LegalPosition { get; private set; }
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -98,7 +94,7 @@ public class PersonalContractingParty : EntityBase
|
||||
public PersonalContractingParty(string fName, string lName, string nationalcode, string idNumber,
|
||||
/*string legalName,*/ string registerId, string nationalId, string isLegal,
|
||||
string phone, string agentPhone, string address,long representativeId,
|
||||
string representativeFullName, int archiveCode, string state,string city, string zone, string sureName,string legalPosition=null)
|
||||
string representativeFullName, int archiveCode, string state,string city, string zone, string sureName)
|
||||
{
|
||||
|
||||
FName = fName;
|
||||
@@ -124,7 +120,8 @@ public class PersonalContractingParty : EntityBase
|
||||
IsActiveString = "true";
|
||||
IsBlock = "false";
|
||||
BlockTimes = 0;
|
||||
LegalPosition = legalPosition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +151,7 @@ public class PersonalContractingParty : EntityBase
|
||||
}
|
||||
|
||||
public void EditLegal(string lName, string registerId, string nationalId, string phone, string agentPhone, string address, long representativeId, string representativeFullName, int archiveCode,
|
||||
string state, string city, string zone, string sureName,string legalPosition = null)
|
||||
string state, string city, string zone, string sureName)
|
||||
{
|
||||
|
||||
LName = lName;
|
||||
@@ -171,8 +168,6 @@ public class PersonalContractingParty : EntityBase
|
||||
State = state;
|
||||
City = city;
|
||||
Zone = zone;
|
||||
if (legalPosition != null)
|
||||
LegalPosition = legalPosition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class Contract : EntityBase
|
||||
public Contract(long personnelCode, long employeeId, long employerId,
|
||||
long workshopIds, long yearlySalaryId, DateTime contarctStart, DateTime contractEnd, string dayliWage,
|
||||
string archiveCode, DateTime getWorkDate, DateTime setContractDate, string jobType,
|
||||
string contractType, string workshopAddress1, string workshopAddress2, string consumableItems, long jobTypeId, string housingAllowance, string agreementSalary, string workingHoursWeekly, string familyAllowance, string contractPeriod)
|
||||
string contractType, string workshopAddress1, string workshopAddress2, string consumableItems, long jobTypeId, string housingAllowance, string agreementSalary, string workingHoursWeekly, string familyAllowance, string contractPeriod, double dailySalaryAffected, double baseYearAffected, double dailySalaryUnAffected, double baseYearUnAffected, bool hasManualDailyWage, string dailyWageType)
|
||||
{
|
||||
PersonnelCode = personnelCode;
|
||||
EmployeeId = employeeId;
|
||||
@@ -45,6 +45,19 @@ public class Contract : EntityBase
|
||||
WorkingHoursWeekly = workingHoursWeekly;
|
||||
FamilyAllowance = familyAllowance;
|
||||
ContractPeriod = contractPeriod;
|
||||
|
||||
//پراپرتی های جدید برای دستمزد دلخواه
|
||||
#region NewManualDailyWage
|
||||
DailySalaryAffected = dailySalaryAffected;
|
||||
BaseYearAffected = baseYearAffected;
|
||||
DailySalaryUnAffected = dailySalaryUnAffected;
|
||||
BaseYearUnAffected = baseYearUnAffected;
|
||||
HasManualDailyWage = hasManualDailyWage;
|
||||
DailyWageType = dailyWageType;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Signature = "0";
|
||||
|
||||
|
||||
@@ -65,7 +78,42 @@ public class Contract : EntityBase
|
||||
public DateTime SetContractDate { get; private set; }
|
||||
public string JobType { get; private set; }
|
||||
public string ContractType { get; private set; }
|
||||
/// <summary>
|
||||
/// مزد تجمیعی یعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public string DayliWage { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
public string IsActiveString { get; private set; }
|
||||
public string ArchiveCode { get; private set; }
|
||||
public string WorkshopAddress1 { get; private set; }
|
||||
@@ -89,6 +137,7 @@ public class Contract : EntityBase
|
||||
|
||||
public Contract()
|
||||
{
|
||||
|
||||
WorkingHoursList = new List<WorkingHours>();
|
||||
}
|
||||
public void Edit(long pesrsonnelCode, long employeeId, long employerId, long workshopId, long yearlySalaryId,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
@@ -9,6 +10,24 @@ namespace Company.Domain.ContractAgg;
|
||||
|
||||
public interface IContractRepository : IRepository<long, Contract>
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="yearlySalaryId"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="contractStart"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> GetManualDailWageList(long workshopId, long employeeId,
|
||||
DateTime contractStart);
|
||||
EditContract GetDetails(long id);
|
||||
EditContract GetContractByStartEnd(DateTime start, DateTime end, long workshopId, long employeeId);
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ public class FinancialStatment : EntityBase
|
||||
ContractingPartyId = contractingPartyId;
|
||||
ContractingPartyName = contractingPartyName;
|
||||
PublicId = Guid.NewGuid();
|
||||
FinancialTransactionList = [];
|
||||
}
|
||||
|
||||
public FinancialStatment()
|
||||
@@ -38,12 +37,4 @@ public class FinancialStatment : EntityBase
|
||||
{
|
||||
PublicId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public void AddFinancialTransaction(FinancialTransaction financialTransaction)
|
||||
{
|
||||
if (financialTransaction == null)
|
||||
throw new ArgumentNullException(nameof(financialTransaction));
|
||||
FinancialTransactionList.Add(financialTransaction);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -47,9 +47,4 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
|
||||
|
||||
Task<PagedResult<GetInstitutionContractListItemsViewModel>> GetList(InstitutionContractListSearchModel searchModel);
|
||||
Task<GetInstitutionContractListStatsViewModel> GetListStats(InstitutionContractListSearchModel searchModel);
|
||||
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||
Task<InstitutionContractWorkshopDetail> GetInstitutionWorkshopDetails(long institutionWorkshopDetailsId);
|
||||
Task<InstitutionContract> GetIncludeWorkshopDetailsAsync(long institutionContractId);
|
||||
void UpdateStatusIfNeeded(long institutionContractId);
|
||||
}
|
||||
@@ -1,22 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.InstitutionContractContactInfoAgg;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
namespace Company.Domain.InstitutionContractAgg;
|
||||
|
||||
public class InstitutionContract : EntityBase
|
||||
{
|
||||
public InstitutionContract(string contractNo, long representativeId, string representativeName,
|
||||
long contractingPartyId,
|
||||
public InstitutionContract(string contractNo, long representativeId, string representativeName, long contractingPartyId,
|
||||
string contractingPartyName, DateTime contractDateGr, string contractDateFa, string state, string city,
|
||||
string address, DateTime contractStartGr, string contractStartFa, DateTime contractEndGr,
|
||||
string contractEndFa, double contractAmount, double dailyCompenseation, double obligation,
|
||||
double totalAmount, int extensionNo, string workshopManualCount, string employeeManualCount, string description,
|
||||
string officialCompany, string typeOfcontract, string hasValueAddedTax, double valueAddedTax)
|
||||
double totalAmount, int extensionNo, string workshopManualCount, string employeeManualCount, string description, string officialCompany,string typeOfcontract, string hasValueAddedTax, double valueAddedTax)
|
||||
{
|
||||
ContractNo = contractNo;
|
||||
RepresentativeId = representativeId;
|
||||
@@ -48,10 +43,6 @@ public class InstitutionContract : EntityBase
|
||||
TypeOfContract = typeOfcontract;
|
||||
HasValueAddedTax = hasValueAddedTax;
|
||||
ValueAddedTax = valueAddedTax;
|
||||
Status = InstitutionContractStatus.Incomplete;
|
||||
ContactInfoList = [];
|
||||
WorkshopDetails = [];
|
||||
Installments = [];
|
||||
}
|
||||
|
||||
public string ContractNo { get; private set; }
|
||||
@@ -64,24 +55,21 @@ public class InstitutionContract : EntityBase
|
||||
public string ContractDateFa { get; private set; }
|
||||
public string State { get; private set; }
|
||||
public string City { get; private set; }
|
||||
|
||||
public string Address { get; private set; }
|
||||
|
||||
//public long ContactInfoId { get; private set; }
|
||||
public DateTime ContractStartGr { get; private set; }
|
||||
public string ContractStartFa { get; private set; }
|
||||
public DateTime ContractEndGr { get; private set; }
|
||||
public string ContractEndFa { get; private set; }
|
||||
|
||||
|
||||
// مبلغ قرارداد
|
||||
public double ContractAmount { get; private set; }
|
||||
|
||||
|
||||
//خسارت روزانه
|
||||
public double DailyCompenseation { get; private set; }
|
||||
|
||||
//وجه التزام
|
||||
public double Obligation { get; private set; }
|
||||
|
||||
// مبلغ کل قرارداد
|
||||
public double TotalAmount { get; private set; }
|
||||
public string WorkshopManualCount { get; private set; }
|
||||
@@ -94,33 +82,28 @@ public class InstitutionContract : EntityBase
|
||||
public string TypeOfContract { get; private set; }
|
||||
public string HasValueAddedTax { get; set; }
|
||||
public double ValueAddedTax { get; set; }
|
||||
public InstitutionContractStatus Status { get; private set; }
|
||||
|
||||
public List<InstitutionContractWorkshopDetail> WorkshopDetails { get; set; }
|
||||
|
||||
public List<InstitutionContractContactInfo> ContactInfoList { get; set; }
|
||||
|
||||
public List<InstitutionContractInstallment> Installments { get; set; }
|
||||
|
||||
public InstitutionContract()
|
||||
{
|
||||
ContactInfoList = [];
|
||||
WorkshopDetails = [];
|
||||
Installments = [];
|
||||
|
||||
ContactInfoList = new List<InstitutionContractContactInfo>();
|
||||
}
|
||||
|
||||
public void Edit(DateTime contractDateGr, string contractDateFa, string state, string city, string address,
|
||||
DateTime contractStartGr, string contractStartFa, DateTime contractEndGr, string contractEndFa,
|
||||
double contractAmount, double dailyCompenseation, double obligation, double totalAmount,
|
||||
string workshopManualCount, string employeeManualCount, string description, string officialCompany,
|
||||
string workshopManualCount, string employeeManualCount, string description, string officialCompany,
|
||||
string typeOfcontract, double valueAddedTax, string hasValueAddedTax)
|
||||
{
|
||||
|
||||
ContractDateGr = contractDateGr;
|
||||
ContractDateFa = contractDateFa;
|
||||
State = state;
|
||||
City = city;
|
||||
Address = address;
|
||||
|
||||
|
||||
ContractStartGr = contractStartGr;
|
||||
ContractStartFa = contractStartFa;
|
||||
ContractEndGr = contractEndGr;
|
||||
@@ -141,11 +124,13 @@ public class InstitutionContract : EntityBase
|
||||
|
||||
public void Active()
|
||||
{
|
||||
|
||||
this.IsActiveString = "true";
|
||||
}
|
||||
|
||||
public void DeActive()
|
||||
{
|
||||
|
||||
this.IsActiveString = "false";
|
||||
}
|
||||
|
||||
@@ -163,177 +148,4 @@ public class InstitutionContract : EntityBase
|
||||
{
|
||||
this.Signature = "0";
|
||||
}
|
||||
|
||||
public void Complete()
|
||||
{
|
||||
Status = InstitutionContractStatus.Completed;
|
||||
}
|
||||
|
||||
public void SetWorkshopDetails(List<InstitutionContractWorkshopDetail> commandWorkshops)
|
||||
{
|
||||
WorkshopDetails = commandWorkshops;
|
||||
}
|
||||
|
||||
public void SetInstallments(List<InstitutionContractInstallment> installments)
|
||||
{
|
||||
Installments = installments;
|
||||
}
|
||||
}
|
||||
|
||||
public class InstitutionContractWorkshopDetail:EntityBase
|
||||
{
|
||||
public InstitutionContractWorkshopDetail(string workshopName, bool hasRollCallPlan,
|
||||
bool hasCustomizeCheckoutPlan, bool hasContractPlan,bool hasContractPlanInPerson,bool hasInsurancePlan,bool hasInsurancePlanInPerson,
|
||||
int personnelCount, double price)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
HasRollCallPlan = hasRollCallPlan;
|
||||
HasCustomizeCheckoutPlan = hasCustomizeCheckoutPlan;
|
||||
HasContractPlan = hasContractPlan;
|
||||
HasContractPlanInPerson = hasContractPlanInPerson;
|
||||
HasInsurancePlan = hasInsurancePlan;
|
||||
HasInsurancePlanInPerson = hasInsurancePlanInPerson;
|
||||
PersonnelCount = personnelCount;
|
||||
WorkshopCreated = false;
|
||||
Price = price;
|
||||
Employers = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// شناسه کارگاه
|
||||
/// </summary>
|
||||
public long? WorkshopId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن حضور و غیاب
|
||||
/// </summary>
|
||||
public bool HasRollCallPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن فیش غیر رسمی
|
||||
/// </summary>
|
||||
public bool HasCustomizeCheckoutPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه
|
||||
/// </summary>
|
||||
public bool HasContractPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه حضوری
|
||||
/// </summary>
|
||||
public bool HasContractPlanInPerson { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن بیمه
|
||||
/// </summary>
|
||||
public bool HasInsurancePlan { get; private set; }
|
||||
/// <summary>
|
||||
/// پلن بیمه حضوری
|
||||
/// </summary>
|
||||
public bool HasInsurancePlanInPerson { get; private set; }
|
||||
|
||||
public int PersonnelCount { get; private set; }
|
||||
|
||||
public bool WorkshopCreated { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد نهاد مرتبط
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Navigation property to InstitutionContract
|
||||
/// </summary>
|
||||
public InstitutionContract InstitutionContract { get; private set; }
|
||||
|
||||
public double Price { get; private set; }
|
||||
|
||||
|
||||
private InstitutionContractWorkshopDetail()
|
||||
{
|
||||
}
|
||||
public List<InstitutionContractWorkshopDetailEmployer> Employers { get; private set; } = new();
|
||||
|
||||
public void SetEmployers(List<long> employerIds)
|
||||
{
|
||||
Employers.Clear();
|
||||
foreach (var employerId in employerIds)
|
||||
{
|
||||
Employers.Add(new InstitutionContractWorkshopDetailEmployer(id, employerId));
|
||||
}
|
||||
}
|
||||
public void AddEmployer(long employerId)
|
||||
{
|
||||
if (Employers.Exists(x => x.EmployerId == employerId))
|
||||
return;
|
||||
|
||||
Employers.Add(new InstitutionContractWorkshopDetailEmployer(id, employerId));
|
||||
}
|
||||
|
||||
public void Edit(bool hasAttendancePlan, bool hasUnofficialPayslipPlan, bool hasContractSettlementPlan)
|
||||
{
|
||||
HasRollCallPlan = hasAttendancePlan;
|
||||
HasCustomizeCheckoutPlan = hasUnofficialPayslipPlan;
|
||||
HasContractPlan = hasContractSettlementPlan;
|
||||
}
|
||||
|
||||
public void SetWorkshopId(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
WorkshopCreated = true;
|
||||
}
|
||||
}
|
||||
|
||||
public enum InstitutionContractStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// ناتمام - قرارداد هنوز تکمیل نشده و نیاز به انجام کارهای بیشتر دارد
|
||||
/// </summary>
|
||||
Incomplete = 0,
|
||||
|
||||
/// <summary>
|
||||
/// تکمیل شده - قرارداد به طور کامل انجام شده و نهایی شده است
|
||||
/// </summary>
|
||||
Completed = 1
|
||||
}
|
||||
|
||||
public class InstitutionContractInstallment
|
||||
{
|
||||
public InstitutionContractInstallment(DateTime installmentDateGr, double amount,
|
||||
string description)
|
||||
{
|
||||
InstallmentDateGr = installmentDateGr;
|
||||
InstallmentDateFa = installmentDateGr.ToFarsi();
|
||||
Amount = amount;
|
||||
Description = description;
|
||||
}
|
||||
|
||||
public long Id { get; private set; }
|
||||
public DateTime InstallmentDateGr { get; private set; }
|
||||
public string InstallmentDateFa { get; private set; }
|
||||
public double Amount { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
|
||||
public long InstitutionContractId { get; private set; }
|
||||
|
||||
public InstitutionContract InstitutionContract { get; private set; }
|
||||
}
|
||||
public class InstitutionContractWorkshopDetailEmployer : EntityBase
|
||||
{
|
||||
public long InstitutionContractWorkshopDetailId { get; private set; }
|
||||
public long EmployerId { get; private set; }
|
||||
|
||||
public InstitutionContractWorkshopDetailEmployer(long institutionContractWorkshopDetailId, long employerId)
|
||||
{
|
||||
InstitutionContractWorkshopDetailId = institutionContractWorkshopDetailId;
|
||||
EmployerId = employerId;
|
||||
}
|
||||
|
||||
private InstitutionContractWorkshopDetailEmployer() { }
|
||||
}
|
||||
@@ -67,6 +67,8 @@ public interface IInsuranceListRepository:IRepository<long, InsuranceList>
|
||||
Task<InsuranceListTabsCountViewModel> GetTabCounts(InsuranceListSearchModel searchModel);
|
||||
|
||||
#endregion
|
||||
|
||||
Task<List<InsuranceListViewModel>> GetNotCreatedWorkshop(InsuranceListSearchModel searchModel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using _0_Framework.Domain;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using CompanyManagment.App.Contracts.Law;
|
||||
|
||||
namespace Company.Domain.LawAgg
|
||||
{
|
||||
public interface ILawRepository : IRepository<long, Law>
|
||||
{
|
||||
Task<Law> GetWithItems(long id);
|
||||
Task<List<Law>> GetActive();
|
||||
Task<LawViewModel> GetByType(LawType type);
|
||||
Task<List<LawViewModel>> GetList(LawSearchModel searchModel);
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.Law;
|
||||
using System.Text.Json;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Company.Domain.LawAgg
|
||||
{
|
||||
public class Law : EntityBase
|
||||
{
|
||||
private Law(){}
|
||||
public string Title { get; private set; }
|
||||
public bool IsActive { get; private set; }
|
||||
public List<LawItem> Items { get; private set; }
|
||||
public LawType Type { get; private set; }
|
||||
public string HeadTitle { get; private set; }
|
||||
public string NotificationsJson { get; private set; }
|
||||
|
||||
[NotMapped]
|
||||
public List<string> Notifications
|
||||
{
|
||||
get => string.IsNullOrEmpty(NotificationsJson)
|
||||
? new List<string>()
|
||||
: JsonSerializer.Deserialize<List<string>>(NotificationsJson);
|
||||
set => NotificationsJson = JsonSerializer.Serialize(value);
|
||||
}
|
||||
|
||||
public Law(string title, LawType lawType, List<string> notifications, string headTitle )
|
||||
{
|
||||
Title = title;
|
||||
IsActive = true;
|
||||
Items = new List<LawItem>();
|
||||
Type = lawType;
|
||||
Notifications = notifications ?? new List<string>();
|
||||
HeadTitle = headTitle;
|
||||
}
|
||||
|
||||
public void Edit(string title)
|
||||
{
|
||||
Title = title;
|
||||
}
|
||||
|
||||
public void AddItem(string header, string details, int orderNumber)
|
||||
{
|
||||
Items.Add(new LawItem(header, details, orderNumber));
|
||||
}
|
||||
|
||||
|
||||
public void SetItem(List<LawItem> items)
|
||||
{
|
||||
Items = items ?? new List<LawItem>();
|
||||
}
|
||||
public void RemoveItem(int orderNumber)
|
||||
{
|
||||
var item = Items.Find(x => x.OrderNumber == orderNumber);
|
||||
if (item != null)
|
||||
Items.Remove(item);
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
{
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
public void Deactivate()
|
||||
{
|
||||
IsActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
public class LawItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Header { get; private set; }
|
||||
public string Details { get; private set; }
|
||||
public int OrderNumber { get; private set; }
|
||||
public long LawId { get; set; }
|
||||
|
||||
protected LawItem() { }
|
||||
|
||||
public LawItem(string header, string details, int orderNumber)
|
||||
{
|
||||
Header = header;
|
||||
Details = details;
|
||||
OrderNumber = orderNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public interface ILeaveRepository : IRepository<long, Leave>
|
||||
|
||||
bool CheckContractExist(DateTime myDate,long employeeId, long workshopId);
|
||||
|
||||
LeavErrorViewModel CheckErrors(DateTime startLeav, DateTime endLeav, long employeeId, long workshopId);
|
||||
LeavErrorViewModel CheckErrors(DateTime startLeav, DateTime endLeav, long employeeId, long workshopId,bool isInvalid);
|
||||
LeaveViewModel LeavOnChekout(DateTime starContract, DateTime endContract, long employeeId, long workshopId);
|
||||
List<LeaveMainViewModel> searchClient(LeaveSearchModel searchModel);
|
||||
LeavePrintViewModel PrintOne(long id);
|
||||
|
||||
@@ -8,7 +8,9 @@ public class Leave: EntityBase
|
||||
{
|
||||
public Leave(DateTime startLeave, DateTime endLeave,
|
||||
string leaveHourses, long workshopId, long employeeId,
|
||||
string paidLeaveType, string leaveType, string employeeFullName, string workshopName, bool isAccepted, string decription, int year, int month, TimeSpan shiftDuration, bool hasShiftDuration)
|
||||
string paidLeaveType, string leaveType, string employeeFullName, string workshopName,
|
||||
bool isAccepted, string decription, int year, int month, TimeSpan shiftDuration,
|
||||
bool hasShiftDuration,bool isInvalid)
|
||||
{
|
||||
StartLeave = startLeave;
|
||||
EndLeave = endLeave;
|
||||
@@ -25,6 +27,7 @@ public class Leave: EntityBase
|
||||
Month = month;
|
||||
ShiftDuration = shiftDuration;
|
||||
HasShiftDuration = hasShiftDuration;
|
||||
IsInvalid = isInvalid;
|
||||
}
|
||||
|
||||
public DateTime StartLeave { get; private set; }
|
||||
@@ -43,6 +46,10 @@ public class Leave: EntityBase
|
||||
|
||||
public TimeSpan ShiftDuration { get; private set; }
|
||||
public bool HasShiftDuration { get; private set; }
|
||||
/// <summary>
|
||||
///آیا فاقد اعتبار است. فاقد اعتبار ها فقط برای فیش های غیررسمی مورد استفاده قرار میگیرند
|
||||
/// </summary>
|
||||
public bool IsInvalid { get; private set; }
|
||||
|
||||
public void Edit(DateTime startLeave, DateTime endLeave,
|
||||
string leaveHourses, long workshopId, long employeeId,
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Company.Domain.RollCallAgg;
|
||||
|
||||
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||
{
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||
|
||||
@@ -21,8 +21,6 @@ public class ContractingPartyTemp : EntityBase
|
||||
IdNumberSerial = idNumberSerial;
|
||||
Gender = gender;
|
||||
DateOfBirth = dateOfBirth;
|
||||
PublicId = Guid.NewGuid();
|
||||
Status = ContractingPartyTempStatus.InComplete;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -93,34 +91,10 @@ public class ContractingPartyTemp : EntityBase
|
||||
/// </summary>
|
||||
public string Address { get; private set; }
|
||||
|
||||
public ContractingPartyTempStatus Status { get; set; }
|
||||
|
||||
public string VerifyCode { get; set; }
|
||||
public DateTime VerifyCodeSentDateTime { get; set; }
|
||||
|
||||
public Guid PublicId { get; set; }
|
||||
|
||||
public void UpdateAddress(string state, string city, string address)
|
||||
{
|
||||
this.State = state;
|
||||
this.City = city;
|
||||
this.Address = address;
|
||||
}
|
||||
|
||||
public void SetCompleted()
|
||||
{
|
||||
Status = ContractingPartyTempStatus.Completed;
|
||||
}
|
||||
|
||||
public void SetVerifyCode(string verifyCode)
|
||||
{
|
||||
VerifyCode = verifyCode;
|
||||
VerifyCodeSentDateTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ContractingPartyTempStatus
|
||||
{
|
||||
InComplete,
|
||||
Completed
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
|
||||
public interface IInstitutionContractContactInfoTempRepository : IRepository<long, InstitutionContractContactInfoTemp>
|
||||
{
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework_b.Domain;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
@@ -18,5 +17,10 @@ public interface IInstitutionContractTempRepository : IRepository<long, Institut
|
||||
/// <returns></returns>
|
||||
Task<InstitutionContractTempViewModel> GetInstitutionContractTemp(long id,long contractingPartyTempId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
||||
/// جهت نمایش در کارپوشه
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<RegistrationWorkflowMainList>> GetAllCompletedRegistration();
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
|
||||
public class InstitutionContractContactInfoTemp : EntityBase
|
||||
{
|
||||
public InstitutionContractContactInfoTemp(string phoneType, string position, string phoneNumber,
|
||||
string fullName, long institutionContractTempId, bool sendSms)
|
||||
{
|
||||
PhoneType = phoneType;
|
||||
Position = position;
|
||||
PhoneNumber = phoneNumber;
|
||||
FullName = fullName;
|
||||
InstitutionContractTempId = institutionContractTempId;
|
||||
SendSms = sendSms;
|
||||
}
|
||||
|
||||
public string PhoneType { get; private set; }
|
||||
public long InstitutionContractTempId { get; private set; }
|
||||
public string Position { get; private set; }
|
||||
public string PhoneNumber { get; private set; }
|
||||
public string FullName { get; private set; }
|
||||
public bool SendSms { get; private set; }
|
||||
public InstitutionContractTemp InstitutionContractTemp { get; set; }
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application.UID;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
|
||||
public class InstitutionContractTemp : EntityBase
|
||||
{
|
||||
public InstitutionContractTemp(long contractingPartyTempId, string paymentModel, string periodModel, double totalPayment, DateTime contractStartGr, DateTime contractEndGr, string officialCompany, double valueAddedTax, string verifyCode, InstitutionContractTempStatus registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
public InstitutionContractTemp(long contractingPartyTempId, string paymentModel, string periodModel, double totalPayment, DateTime contractStartGr, DateTime contractEndGr, string officialCompany, double valueAddedTax, string verifyCode, string registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
{
|
||||
ContractingPartyTempId = contractingPartyTempId;
|
||||
PaymentModel = paymentModel;
|
||||
@@ -24,7 +22,6 @@ public class InstitutionContractTemp : EntityBase
|
||||
MessageId = messageId;
|
||||
SendVerifyCodeTime = sendVerifyCodeTime;
|
||||
VerifyCodeEndTime = verifyCodeEndTime;
|
||||
PublicId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -90,7 +87,7 @@ public class InstitutionContractTemp : EntityBase
|
||||
/// -
|
||||
/// Completed ثبت نام تکمیل شده
|
||||
/// </summary>
|
||||
public InstitutionContractTempStatus RegistrationStatus { get; private set; }
|
||||
public string RegistrationStatus { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پیامک ارسال شده
|
||||
@@ -107,16 +104,8 @@ public class InstitutionContractTemp : EntityBase
|
||||
/// </summary>
|
||||
public DateTime? VerifyCodeEndTime{ get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی عمومی
|
||||
/// برای نمایش در آدرس
|
||||
/// </summary>
|
||||
public Guid PublicId { get; set; }
|
||||
|
||||
public List<InstitutionContractContactInfoTemp> ContactInfoList { get; set; }
|
||||
|
||||
|
||||
public void Edit(long contractingPartyTempId, string paymentModel, string periodModel, double totalPayment, DateTime contractStartGr, DateTime contractEndGr, string officialCompany, double valueAddedTax, string verifyCode, InstitutionContractTempStatus registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
public void Edit(long contractingPartyTempId, string paymentModel, string periodModel, double totalPayment, DateTime contractStartGr, DateTime contractEndGr, string officialCompany, double valueAddedTax, string verifyCode, string registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
{
|
||||
ContractingPartyTempId = contractingPartyTempId;
|
||||
PaymentModel = paymentModel;
|
||||
@@ -133,7 +122,7 @@ public class InstitutionContractTemp : EntityBase
|
||||
VerifyCodeEndTime = verifyCodeEndTime;
|
||||
}
|
||||
|
||||
public void Update(string verifyCode, InstitutionContractTempStatus registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
public void Update(string verifyCode, string registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||
{
|
||||
VerifyCode = verifyCode;
|
||||
RegistrationStatus = registrationStatus;
|
||||
@@ -142,10 +131,9 @@ public class InstitutionContractTemp : EntityBase
|
||||
VerifyCodeEndTime = verifyCodeEndTime;
|
||||
}
|
||||
|
||||
public void ChangeRegistrationStatus(InstitutionContractTempStatus registrationStatus)
|
||||
public void ChangeRegistrationStatus(string registrationStatus)
|
||||
{
|
||||
RegistrationStatus = registrationStatus;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,13 +76,14 @@ public class Workshop : EntityBase
|
||||
|
||||
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Workshop(string workshopName,string workshopSureName, string insuranceCode, string typeOfOwnership, string archiveCode, string agentName, string agentPhone,
|
||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||
string agreementNumber, bool fixedSalary, string population,long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay, bool totalPaymentHide,
|
||||
bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout,
|
||||
IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout,long contractingPartyId)
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -133,7 +134,6 @@ public class Workshop : EntityBase
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
RotatingShiftCompute = rotatingShiftCompute;
|
||||
IsStaticCheckout = isStaticCheckout;
|
||||
ContractingPartyId = contractingPartyId;
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
@@ -233,8 +242,6 @@ public class Workshop : EntityBase
|
||||
/// </summary>
|
||||
public bool IsStaticCheckout { get; private set; }
|
||||
|
||||
public long ContractingPartyId { get; private set; }
|
||||
|
||||
public Workshop()
|
||||
{
|
||||
RollCallServicesList = new List<RollCallService>();
|
||||
@@ -346,10 +353,4 @@ public class Workshop : EntityBase
|
||||
this.IsActiveString = "false";
|
||||
ArchiveCode = "b-" + archiveCode;
|
||||
}
|
||||
}
|
||||
|
||||
public enum WorkshopRegistrationStatus
|
||||
{
|
||||
NotRegistered = 0,
|
||||
Registered = 1
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using System.Threading.Tasks;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
namespace Company.Domain.YearlySalaryAgg;
|
||||
|
||||
@@ -17,11 +18,39 @@ public interface IYearlySalaryRepository : IRepository<long, YearlySalary>
|
||||
void TestDayliFeeCompute();
|
||||
List<string> GetYears();
|
||||
List<YearlySalaryViewModel> GetYearlySalary();
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه فیش حقوقی
|
||||
/// </summary>
|
||||
/// <param name="contract"></param>
|
||||
/// <param name="checkoutStart"></param>
|
||||
/// <param name="checkoutEnd"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetCheckoutDailyWage(EditContract contract, DateTime checkoutStart, DateTime checkoutEnd);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه بر اساس تاریخ شروع و پایان
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <returns></returns>
|
||||
Task<(double dailyWage, long yearlySalaryId)> GetDailyWageByStartEnd(DateTime start, DateTime end);
|
||||
|
||||
MontlywageBunosYearsViewModel GetMontlyBunosYears(TimeSpan weeklyTime, DateTime contractStart,DateTime contractEnd, double daylyWage, string weeklyWorkingTime, int officialholiday, int friday, string totalHoursH, string totalHorsM, string basic, int fridayStartToEnd, double dayliFeeComplete, bool hasRollCall, bool holidaysWorking,string shiftWork);
|
||||
double GetLeavePay(DateTime contractStart, DateTime contractEnd, double daylyWage, double consumableItem, double housingAllowance, double familyAllowance , string weeklyWorkingTime, int officialholiday, int friday, string totalHoursH, string totalHorsM);
|
||||
double GetOverTimeWorking(double dayliWage, string overTimeWorkH, string overTimeWorkM);
|
||||
double GetOverNightWorking(double dayliWage, string overNightWorkH, string overNightWorkM, string weeklyWorkingTime, int officialholiday, int friday, DateTime contractStart, DateTime contractEnd, string totalHoursH, string totalHorsM);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// متد ارتقاء مزد دلخواه
|
||||
/// </summary>
|
||||
/// <param name="newContractStart"></param>
|
||||
/// <param name="lastContractStart"></param>
|
||||
/// <param name="lastContractManualDailyWage"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> UpgradeManualDailyWage(DateTime newContractStart, DateTime lastContractStart,
|
||||
double lastContractManualDailyWage);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات و لیست پایه سنوات های پرسنل
|
||||
/// </summary>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace CompanyManagment.App.Contracts.AuthorizedPerson;
|
||||
|
||||
public class AuthorizedPersonViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string NationalCode { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string FatherName { get; set; }
|
||||
public string BirthDate { get; set; }
|
||||
public string Gender { get; set; }
|
||||
public string DeathStatus { get; set; }
|
||||
public string ShenasnameSeri { get; set; }
|
||||
public string ShenasnameSerial { get; set; }
|
||||
public string ShenasnamehNumber { get; set; }
|
||||
public bool IsVerified { get; set; }
|
||||
public string VerificationDate { get; set; }
|
||||
public string CreationDate { get; set; }
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace CompanyManagment.App.Contracts.AuthorizedPerson;
|
||||
|
||||
public class CreateAuthorizedPerson
|
||||
{
|
||||
public string NationalCode { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string FatherName { get; set; }
|
||||
public string BirthDate { get; set; }
|
||||
public string Gender { get; set; }
|
||||
public string DeathStatus { get; set; }
|
||||
public string ShenasnameSeri { get; set; }
|
||||
public string ShenasnameSerial { get; set; }
|
||||
public string ShenasnamehNumber { get; set; }
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.AuthorizedPerson;
|
||||
|
||||
public interface IAuthorizedPersonApplication
|
||||
{
|
||||
OperationResult Create(CreateAuthorizedPerson command);
|
||||
OperationResult CreateFromUidResponse(CreateAuthorizedPerson command);
|
||||
AuthorizedPersonViewModel GetByNationalCode(string nationalCode);
|
||||
List<AuthorizedPersonViewModel> Search(string nationalCode = null, string firstName = null, string lastName = null);
|
||||
bool ExistsByNationalCode(string nationalCode);
|
||||
}
|
||||
@@ -160,4 +160,37 @@ public class CreateCheckout
|
||||
public TimeSpan TotalPaidLeave { get; set; }
|
||||
public TimeSpan TotalSickLeave { get; set; }
|
||||
|
||||
public bool HasLeft { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; 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,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 ClassificationSchemePartialModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیا طرح دارد
|
||||
/// </summary>
|
||||
public bool HasScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرح
|
||||
/// </summary>
|
||||
public List<EditClassificationScheme> 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,63 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
public class CreateClassificationScheme
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime IncludingDateGr { get; set; }
|
||||
|
||||
/// <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,12 @@
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
public class EditClassificationScheme : CreateClassificationScheme
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرح
|
||||
/// </summary>
|
||||
public long Id { 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,167 @@
|
||||
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<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateClassificationScheme(CreateClassificationScheme command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات طرح برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<EditClassificationScheme> GetClassificationScheme(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditClassificationScheme(EditClassificationScheme 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> EditGroupMember(AddEmployeeToGroup command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<AddEmployeeToGroup> 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);
|
||||
|
||||
}
|
||||
@@ -61,9 +61,23 @@ public class ComputingViewModel
|
||||
/// </summary>
|
||||
public TimeSpan EmployeeMandatoryHours { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مجموع مرخصی های پرسنل در این فیش حقوقی
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
//public TimeSpan TotalLeaveOnThisCheckout { get; set; }
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
//public List<string> holidays;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Contract;
|
||||
/// <summary>
|
||||
/// نمایش نحوه محاسبه پایه سنوات و دستمزد روزانه
|
||||
/// </summary>
|
||||
public class ContractDailyWageAndBaseYearReport
|
||||
{
|
||||
/// <summary>
|
||||
/// لیست داده های محاسبه پایه سنوات
|
||||
/// </summary>
|
||||
public BaseYearDataViewModel BaseYearDataViewModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات متاثر از ساعت کار
|
||||
/// </summary>
|
||||
public string BaseYearAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه متاثر از ساعت کار
|
||||
/// </summary>
|
||||
public string DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه بدون تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه تجمیعی
|
||||
/// </summary>
|
||||
public string DailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ قراداد
|
||||
/// </summary>
|
||||
public string ContractDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public List<UpgradeManualDailyWageList> UpgradeManualDailyWageLists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پرسنل
|
||||
/// </summary>
|
||||
public string EmployeeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا با متد جدید محاسبه شده
|
||||
/// </summary>
|
||||
public bool OldComputeMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا محاسبات با مقادیر ذخیره شده مغایرت دارد
|
||||
/// </summary>
|
||||
public bool Contradiction { get; set; }
|
||||
}
|
||||
@@ -140,7 +140,36 @@ public class CreateContract
|
||||
public string ConvertMonth { get; set; }
|
||||
public string FormStep { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
public List<ContractViweModel> Contracts { get; set; }
|
||||
public List<WorkshopViewModel> Workshops { get; set; }
|
||||
public List<EmployerViewModel> Employers { get; set; }
|
||||
|
||||
@@ -7,6 +7,14 @@ namespace CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
public interface IContractApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="yearlySalaryId"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart);
|
||||
OperationResult Create(CreateContract command);
|
||||
OperationResult CreateNew(createContractModel command);
|
||||
OperationResult Edit(EditContract command);
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
/// <summary>
|
||||
/// ویو مدل رتقاء دستمزد روزانه و لیست ارتقاء
|
||||
/// </summary>
|
||||
public class UpgradeManualDailyWageModel
|
||||
{
|
||||
/// <summary>
|
||||
/// دستمزد روزانه
|
||||
/// </summary>
|
||||
public double DailyWage{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public List<UpgradeManualDailyWageList> UpgradeManualDailyWageLists { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public class UpgradeManualDailyWageList
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شروع و پایان بازه ارتقاء
|
||||
/// </summary>
|
||||
public string StartEndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه
|
||||
/// </summary>
|
||||
public string DailyWage { get; set; }
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
|
||||
@@ -128,282 +125,4 @@ public interface IEmployerApplication
|
||||
|
||||
#endregion
|
||||
|
||||
Task<OperationResult> CreateWorkflowRegistration(CreateEmployerWorkflowRegistration command);
|
||||
/// <summary>
|
||||
/// ویرایش کارفرما در گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditWorkflowRegistration(EditEmployerWorkflowRegistration command);
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما از گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="employerId">شناسه کارفرما</param>
|
||||
/// <param name="institutionWorkshopDetailsId">شناسه جزئیات کارگاه موسسه</param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> DeleteWorkflowRegistration(long employerId, long institutionWorkshopDetailsId);
|
||||
|
||||
Task<OperationResult<AuthenticateUserViewModel>> AuthenticateEmployer(string nationalCode, string dateOfBirth, string mobile);
|
||||
}
|
||||
|
||||
public class AuthenticateUserViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سری شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumberSeri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سریال شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumberSerial { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
|
||||
/// </summary>
|
||||
public class CreateEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقیقی
|
||||
/// </summary>
|
||||
public CreateRealEmployerWorkflowRegistration RealEmployer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقوقی
|
||||
/// </summary>
|
||||
public CreateLegalEmployerWorkflowRegistration LegalEmployer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع حقوقی
|
||||
/// </summary>
|
||||
public LegalType LegalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه جزئیات کارگاه موسسه
|
||||
/// </summary>
|
||||
public long InstitutionWorkshopDetailsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد موسسه
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرمای حقوقی در گردش کار - شامل اطلاعات شرکت و مدیرعامل
|
||||
/// </summary>
|
||||
public class CreateLegalEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی شرکت
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoNationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoIdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoFName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoLName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoFatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoDateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoPlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoDateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره موبایل
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string TelephoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سیستم دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرمای حقیقی در گردش کار - شامل اطلاعات شخصی کارفرما
|
||||
/// </summary>
|
||||
public class CreateRealEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد
|
||||
/// </summary>
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره موبایل
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه
|
||||
/// </summary>
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه
|
||||
/// </summary>
|
||||
public string DateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سیستم دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string Telephone { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ویرایش کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
|
||||
/// </summary>
|
||||
public class EditEmployerWorkflowRegistration : CreateEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه کارفرما
|
||||
/// </summary>
|
||||
public long EmployerId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,316 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Security.AccessControl;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// نوع حقوقی طرف قرارداد (حقیقی یا حقوقی)
|
||||
/// </summary>
|
||||
public LegalType ContractingPartyLegalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات شخص حقیقی
|
||||
/// </summary>
|
||||
public CreateInstitutionContractRealPartyRequest RealParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات شخص حقوقی
|
||||
/// </summary>
|
||||
public CreateInstitutionContractLegalPartyRequest LegalParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مدت زمان قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractDuration Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آدرس
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات تماس
|
||||
/// </summary>
|
||||
public List<CreateContactInfo> ContactInfos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارگاههای مورد نظر برای قرارداد
|
||||
/// </summary>
|
||||
public List<CreateInstitutionContractWorkshopDetail> Workshops { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد (فارسی)
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
public long RepresentativeId { get; set; }
|
||||
public string TypeOfContract { get; set; }
|
||||
public string ContractDateFa { get; set; }
|
||||
public string ContractStartFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ خسارت روزانه
|
||||
/// </summary>
|
||||
public double DailyCompensation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وجه التزام
|
||||
/// </summary>
|
||||
public double Obligation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات
|
||||
/// </summary>
|
||||
public string ContractEndFa { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string State { get; set; }
|
||||
public string City { get; set; }
|
||||
public string OfficialCompany { get; set; }
|
||||
public string HasValueAddedTax { get; set; }
|
||||
public string ContractAmountString { get; set; }
|
||||
public string DailyCompenseationString { get; set; }
|
||||
public string ObligationString { get; set; }
|
||||
public string TotalAmountString { get; set; }
|
||||
public string ValueAddedTaxStr { get; set; }
|
||||
public string WorkshopManualCount { get; set; }
|
||||
public string EmployeeManualCount { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ کل قرارداد
|
||||
/// </summary>
|
||||
public double TotalAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا قرارداد اقساطی است؟
|
||||
/// </summary>
|
||||
public bool IsInstallment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مالیات ارزش افزوده
|
||||
/// </summary>
|
||||
public double TaxAmount { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// مدت زمان قرارداد نهاد
|
||||
/// </summary>
|
||||
public enum InstitutionContractDuration
|
||||
{
|
||||
/// <summary>
|
||||
/// یک ماهه
|
||||
/// </summary>
|
||||
OneMonth = 1,
|
||||
|
||||
/// <summary>
|
||||
/// سه ماهه
|
||||
/// </summary>
|
||||
ThreeMonths = 3,
|
||||
|
||||
/// <summary>
|
||||
/// شش ماهه
|
||||
/// </summary>
|
||||
SixMonths = 6,
|
||||
|
||||
/// <summary>
|
||||
/// دوازده ماهه
|
||||
/// </summary>
|
||||
TwelveMonths = 12
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارگاه در درخواست ایجاد قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractWorkshopDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه کارگاه (اختیاری - در صورت وجود کارگاه از قبل)
|
||||
/// </summary>
|
||||
public long? WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن حضور و غیاب
|
||||
/// </summary>
|
||||
public bool HasRollCallPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن فیش غیر رسمی
|
||||
/// </summary>
|
||||
public bool HasCustomizeCheckoutPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه
|
||||
/// </summary>
|
||||
public bool HasContractPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه حضوری
|
||||
/// </summary>
|
||||
public bool HasContractPlanInPerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن بیمه
|
||||
/// </summary>
|
||||
public bool HasInsurancePlan { get; set; }
|
||||
/// <summary>
|
||||
/// پلن بیمه حضوری
|
||||
/// </summary>
|
||||
public bool HasInsurancePlanInPerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد پرسنل کارگاه
|
||||
/// </summary>
|
||||
public int PersonnelCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ
|
||||
/// </summary>
|
||||
public double Price { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد طرف حقیقی در قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractRealPartyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد فارسی
|
||||
/// </summary>
|
||||
public string BirthDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه موقت طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد طرف حقوقی در قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractLegalPartyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی شرکت
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن شرکت
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه موقت طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی نماینده قانونی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد نماینده قانونی فارسی
|
||||
/// </summary>
|
||||
public string BirthDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام نماینده قانونی
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی نماینده قانونی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر نماینده قانونی
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه نماینده قانونی
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت نماینده قانونی
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سمت نماینده قانونی در شرکت
|
||||
/// </summary>
|
||||
public string Position { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت نماینده قانونی
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
public int ExtensionNo { get; set; }
|
||||
}
|
||||
@@ -3,5 +3,4 @@ namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
public class EditInstitutionContractRequest:CreateInstitutionContractRequest
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
@@ -77,12 +77,10 @@ public class GetInstitutionContractListItemsViewModel
|
||||
/// <summary>
|
||||
/// وضعیت قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus ListStatus { get; set; }
|
||||
public InstitutionContractStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا منقضی شده است
|
||||
/// </summary>
|
||||
public bool IsExpired { get; set; }
|
||||
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
@@ -11,149 +10,53 @@ using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
/// <summary>
|
||||
/// رابط اپلیکیشن قراردادهای مؤسسه
|
||||
/// مدیریت عملیات مربوط به قراردادهای مالی مؤسسات
|
||||
/// </summary>
|
||||
public interface IInstitutionContractApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد جدید
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات قرارداد جدید</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Create(CreateInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// تمدید قرارداد موجود
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات قرارداد برای تمدید</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Extension(CreateInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش قرارداد موجود
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات جدید قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Edit(EditInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت جزئیات قرارداد برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>اطلاعات قرارداد</returns>
|
||||
EditInstitutionContract GetDetails(long id);
|
||||
|
||||
/// <summary>
|
||||
/// جستجو در قراردادها
|
||||
/// </summary>
|
||||
/// <param name="searchModel">مدل جستجو</param>
|
||||
/// <returns>لیست قراردادها</returns>
|
||||
List<InstitutionContractViewModel> Search(InstitutionContractSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// جستجوی جدید در قراردادها
|
||||
/// </summary>
|
||||
/// <param name="searchModel">مدل جستجو</param>
|
||||
/// <returns>لیست قراردادها</returns>
|
||||
List<InstitutionContractViewModel> NewSearch(InstitutionContractSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات قرارداد های مالی فعال
|
||||
/// دریافت اطلاعات قزداد های مالی فعال
|
||||
///دارای کارگاه
|
||||
/// جهت ست کردن سرویس ها از طریق اکسل
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<InstitutionContractViewModel> GetInstitutionContractToSetServicesExcelImport();
|
||||
|
||||
/// <summary>
|
||||
/// چاپ مجموعه قراردادها
|
||||
/// </summary>
|
||||
/// <param name="id">لیست شناسه قراردادها</param>
|
||||
/// <returns>لیست قراردادها برای چاپ</returns>
|
||||
List<InstitutionContractViewModel> PrintAll(List<long> id);
|
||||
|
||||
/// <summary>
|
||||
/// چاپ یک قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>اطلاعات قرارداد برای چاپ</returns>
|
||||
InstitutionContractViewModel PrintOne(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Active(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult DeActive(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن قرارداد (حالت آبی)
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult DeActiveBlue(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن تمام اتصالات قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult DeActiveAllConnections(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن مجدد تمام اتصالات قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult ReActiveAllConnections(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن مجدد تمام قراردادها بعد از ایجاد قرارداد جدید
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyId">شناسه طرف قرارداد</param>
|
||||
void ReActiveAllAfterCreateNew(long contractingPartyId);
|
||||
|
||||
/// <summary>
|
||||
/// حذف قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
|
||||
void RemoveContract(long id);
|
||||
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult Sign(long id);
|
||||
|
||||
/// <summary>
|
||||
/// لغو امضای قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
|
||||
OperationResult UnSign(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد حساب کاربری برای طرف قرارداد
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyid">شناسه طرف قرارداد</param>
|
||||
/// <param name="accountId">شناسه حساب کاربری</param>
|
||||
void CreateContractingPartyAccount(long contractingPartyid, long accountId);
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه مبلغ قرارداد بر اساس تعداد افراد
|
||||
/// </summary>
|
||||
/// <param name="countPerson">تعداد افراد</param>
|
||||
/// <returns>مبلغ قرارداد</returns>
|
||||
double GetcontractAmount(int countPerson);
|
||||
|
||||
#region Api
|
||||
@@ -179,14 +82,12 @@ public interface IInstitutionContractApplication
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateAsync(CreateInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditAsync(EditInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// تمدید قرارداد
|
||||
/// </summary>
|
||||
@@ -194,108 +95,39 @@ public interface IInstitutionContractApplication
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> ExtensionَAsync(CreateInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
||||
/// جهت نمایش در کارپوشه
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||
/// <summary>
|
||||
/// دریافت آیتم های کارپوشه ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="institutionContractId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class GetInstitutionContractListStatsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// مجموع بدهی قراردادهای مؤسسه
|
||||
/// این ویژگی بدهیهای قراردادهای مربوطه را تجمیع میکند و
|
||||
/// یک معیار واحد برای اندازهگیری تعهدات مالی ارائه میدهد
|
||||
/// Represents the total outstanding debt of institution contracts.
|
||||
/// This property aggregates the liabilities of the respective contracts and provides
|
||||
/// a single metric to measure financial obligations.
|
||||
/// </summary>
|
||||
public double TotalDebt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموع ارزش پولی مرتبط با قراردادهای مؤسسه
|
||||
/// این ویژگی مبلغ کل قراردادهای مربوطه را برای
|
||||
/// گزارشگیری و تجزیه و تحلیل مالی تجمیع میکند
|
||||
/// Represents the total monetary value associated with institution contracts.
|
||||
/// This property consolidates the aggregate amount from relevant contracts
|
||||
/// for financial reporting and analysis.
|
||||
/// </summary>
|
||||
public double TotalAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموعهای از تعداد قراردادهای مؤسسه دستهبندی شده بر اساس وضعیت
|
||||
/// این ویژگی تعداد قراردادها را برای هر وضعیت تعریف شده در
|
||||
/// شمارش InstitutionContractStatus ارائه میدهد که امکان تجزیه و تحلیل و نظارت بر توزیع قراردادها را فراهم میکند
|
||||
/// Represents a collection of counts for institution contracts categorized by their status.
|
||||
/// This property provides the count of contracts for each status defined in the
|
||||
/// InstitutionContractStatus enumeration, enabling analysis and monitoring of contract distribution.
|
||||
/// </summary>
|
||||
public List<InstitutionContractStatusCount> Counts { get; set; }
|
||||
public List<InstitutionContractStatusCount> Counts { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// شمارش وضعیت قراردادهای مؤسسه
|
||||
/// نمایش تعداد قراردادها برای هر وضعیت خاص
|
||||
/// </summary>
|
||||
public class InstitutionContractStatusCount
|
||||
{
|
||||
/// <summary>
|
||||
/// وضعیت لیست قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus ListStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد قراردادها در این وضعیت
|
||||
/// </summary>
|
||||
public InstitutionContractStatus Status { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست تمدید قرارداد مؤسسه
|
||||
/// شامل اطلاعات قرارداد قبلی برای فرآیند تمدید
|
||||
/// </summary>
|
||||
public class ExtenstionInstitutionContractRequest : EditInstitutionContractRequest
|
||||
public class ExtenstionInstitutionContractRequest:EditInstitutionContractRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه قرارداد قبلی که قرار است تمدید شود
|
||||
/// </summary>
|
||||
public long PreviousContractId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// مدل نمایش اقساط قرارداد مؤسسه
|
||||
/// شامل اطلاعات مربوط به هر قسط از قرارداد
|
||||
/// </summary>
|
||||
public class InstitutionContractInstallmentViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه یکتای قسط
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ میلادی قسط
|
||||
/// </summary>
|
||||
public DateTime InstallmentDateGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ فارسی قسط
|
||||
/// </summary>
|
||||
public string InstallmentDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قسط
|
||||
/// </summary>
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات قسط
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد مؤسسه مربوط به این قسط
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class InstitutionContractListSearchModel :PaginationRequest
|
||||
/// <summary>
|
||||
/// تب
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus? Status { get; set; }
|
||||
public InstitutionContractStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فعال / غیرفعال
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public enum InstitutionContractListStatus
|
||||
public enum InstitutionContractStatus
|
||||
{
|
||||
Active,
|
||||
Deactive,
|
||||
@@ -8,5 +8,5 @@ public enum InstitutionContractListStatus
|
||||
Block,
|
||||
Free,
|
||||
PendingForRenewal,
|
||||
WithoutWorkshop
|
||||
WithoutWorkshop,
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public class RegistrationWorkflowMainListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه قرارداد موسسه
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد کارگاههای انجام شده
|
||||
/// </summary>
|
||||
public int DoneWorkshops { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد کارگاههای انجام نشده
|
||||
/// </summary>
|
||||
public int UnDoneWorkshops { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد کل کارگاهها
|
||||
/// </summary>
|
||||
public int TotalWorkshops { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ
|
||||
/// </summary>
|
||||
public double Amount { get; set; }
|
||||
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// مدل نمایش آیتمهای گردش کار ثبت نام
|
||||
/// </summary>
|
||||
public class RegistrationWorkflowItemsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// لیست کارفرمایان
|
||||
/// </summary>
|
||||
public List<RegistrationWorkflowItemsEmployerViewModel> Employers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد پرسنل
|
||||
/// </summary>
|
||||
public int PersonnelCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// قیمت
|
||||
/// </summary>
|
||||
public double Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت انجام شدن
|
||||
/// </summary>
|
||||
public bool IsDone { get; set; }
|
||||
|
||||
public long WorkshopDetailsId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// مدل نمایش کارفرما در آیتمهای گردش کار ثبت نام
|
||||
/// </summary>
|
||||
public class RegistrationWorkflowItemsEmployerViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام و نام خانوادگی
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList;
|
||||
|
||||
@@ -47,4 +48,6 @@ public interface IInsuranceListApplication
|
||||
Task<InsuranceListTabsCountViewModel> GetTabCounts(InsuranceListSearchModel searchModel);
|
||||
|
||||
#endregion
|
||||
|
||||
Task<List<InsuranceListViewModel>> GetNotCreatedWorkshop(InsuranceListSearchModel searchModel);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using _0_Framework.Application;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.AccessControl;
|
||||
using System.Threading.Tasks;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Law
|
||||
{
|
||||
public interface ILawApplication
|
||||
{
|
||||
OperationResult Create(CreateLaw command);
|
||||
OperationResult Edit(EditLaw command);
|
||||
OperationResult Activate(long id);
|
||||
OperationResult Deactivate(long id);
|
||||
OperationResult ActivateByType(LawType type);
|
||||
OperationResult DeactivateByType(LawType type);
|
||||
EditLaw GetDetails(long id);
|
||||
Task<List<LawViewModel>> GetList(LawSearchModel searchModel);
|
||||
Task<LawViewModel> GetLawWithItems(long id);
|
||||
Task<LawViewModel> GetLawByType(LawType type);
|
||||
OperationResult UpsertLaw(EditLaw command);
|
||||
}
|
||||
|
||||
public class LawSearchModel
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
|
||||
public enum LawType
|
||||
{
|
||||
/// <summary>
|
||||
/// ثبت نام
|
||||
/// </summary>
|
||||
Register
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Law
|
||||
{
|
||||
public class LawViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
}
|
||||
|
||||
public class LawItemViewModel
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public string Details { get; set; }
|
||||
// public int OrderNumber { get; set; }
|
||||
}
|
||||
|
||||
public class CreateLaw
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class EditLaw
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -37,4 +37,5 @@ public class CreateLeave
|
||||
public List<CustomizeRotatingShiftsViewModel> RotatingShifts { get; set; }
|
||||
public bool HasRollCall { get; set; }
|
||||
public CustomizeRotatingShiftsViewModel SelectedShift { get; set; }
|
||||
public bool IsInvallid { get; set; }
|
||||
}
|
||||
@@ -14,5 +14,8 @@ namespace CompanyManagment.App.Contracts.Leave
|
||||
public string LeftWorlErrMessage { get; set; }
|
||||
public bool HasNotContract { get; set; }
|
||||
public string ContractErrMessage { get; set; }
|
||||
|
||||
public bool HasHolidayError { get; set; }
|
||||
public string HolidayErrorMessage { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,5 @@ public class LeavePrintViewModel
|
||||
public string MonthGr { get; set; }
|
||||
public int PrintCounter { get; set; }
|
||||
public List<EmprViewModel> EmployerList { get; set; }
|
||||
public bool IsInvalid { get; set; }
|
||||
}
|
||||
|
||||
@@ -20,4 +20,5 @@ public class LeaveSearchModel
|
||||
public int Year { get; set; }
|
||||
public int Month { get; set; }
|
||||
public int PageIndex { get; set; }
|
||||
public bool IsInvalid { get; set; }
|
||||
}
|
||||
@@ -27,4 +27,5 @@ public class LeaveViewModel
|
||||
|
||||
public TimeSpan ShiftDuration { get; set; }
|
||||
public bool HasShiftDuration { get; set; }
|
||||
public bool IsInvalid { get; set; }
|
||||
}
|
||||
@@ -8,7 +8,8 @@ namespace CompanyManagment.App.Contracts.RollCall;
|
||||
public interface IRollCallMandatoryApplication
|
||||
{
|
||||
bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// گزارش نوبت کاری حضور غیاب
|
||||
|
||||
@@ -67,7 +67,7 @@ public class CreateInstitutionContractTemp
|
||||
/// -
|
||||
/// Completed ثبت نام تکمیل شده
|
||||
/// </summary>
|
||||
public InstitutionContractTempStatus RegistrationStatus { get; set; }
|
||||
public string RegistrationStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پیامک ارسال شده
|
||||
|
||||
@@ -16,7 +16,20 @@ public class CreateWorkshopTemp
|
||||
/// ای دی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل مبالغ سرویس ها برای کارگاه
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double WorkshopServicesAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل مبالغ سرویس ها برای کارگاه
|
||||
/// فارسی
|
||||
/// </summary>
|
||||
public string WorkshopServicesAmountStr { get; set; }
|
||||
|
||||
|
||||
#region ServiceSelection
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
@@ -19,7 +16,7 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// <param name="mobile"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult<ContractingPartyTempViewModel>> CreateContractingPartyTemp(string nationalCode, string dateOfBirth, string mobile);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تکمیل اطلاعات
|
||||
/// </summary>
|
||||
@@ -55,25 +52,11 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// دریافت مبالغ بررسی و پرداخت
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <param name="duration"></param>
|
||||
/// <param name="periodModel"></param>
|
||||
/// <param name="paymentModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId,
|
||||
InstitutionContractDuration duration = InstitutionContractDuration.TwelveMonths, string paymentModel = "OneTime", string contractStartType = "currentMonth");
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مبالغ بررسی و پرداخت با لیست کارگاه ها
|
||||
/// این متد برای زمانی است که کارگاه ها در مرحله ثبت نام موقت هستند
|
||||
/// و هنوز در دیتابیس ثبت نشده اند
|
||||
/// </summary>
|
||||
/// <param name="totalPaymentMonth"></param>
|
||||
/// <param name="duration"></param>
|
||||
/// <param name="hasInPersonContract"></param>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <param name="paymentModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(double totalPaymentMonth,
|
||||
InstitutionContractDuration duration , bool hasInPersonContract);
|
||||
string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth");
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد یا ویرایش قرارداد موقت
|
||||
@@ -111,14 +94,10 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> PayOffCompleted(long contractingPartyTempId);
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ارسال لینک تایید قوانین و مقررات به طرف حساب
|
||||
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
||||
/// جهت نمایش در کارپوشه
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> SendAgreementLink(long contractingPartyTempId);
|
||||
}
|
||||
|
||||
Task<List<RegistrationWorkflowMainList>> RegistrationWorkflowMainList();
|
||||
}
|
||||
@@ -3,14 +3,4 @@
|
||||
public class InstitutionContractTempViewModel : CreateInstitutionContractTemp
|
||||
{
|
||||
public long Id { get; set; }
|
||||
}
|
||||
|
||||
public enum InstitutionContractTempStatus
|
||||
{
|
||||
BeforeSendVerifyCode,
|
||||
VerifyCodeSent,
|
||||
PendingToCompletion,
|
||||
ReceivedCodeFromClient,
|
||||
Completed
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
public class RegistrationWorkflowMainList
|
||||
{
|
||||
/// <summary>
|
||||
/// آی دی طرف حساب ثبت شده موقت
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,22 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
public class ReviewAndPaymentViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// جمع کل
|
||||
/// double
|
||||
/// </summary>
|
||||
public double SumOfWorkshopsPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تخفیف
|
||||
/// جمع کل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string Discount { get; set; }
|
||||
public string SumOfWorkshopsPaymentPaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مقدار جمع مبلغ کارگاه ها
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// Double
|
||||
/// </summary>
|
||||
public string SumOfWorkshopsPayment { get; set; }
|
||||
public double OneTimeWithoutTaxPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
@@ -24,44 +32,118 @@ public class ReviewAndPaymentViewModel
|
||||
/// </summary>
|
||||
public string OneTimeWithoutTaxPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double OneTimeTotalPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string OneTimeTotalPaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات ماهانه
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyWithoutTaxPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyWithoutTaxPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل ماهانه
|
||||
/// string
|
||||
/// مبلغ پرداخت کامل
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyTotalPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyTotalPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مالیات بر ارزش افزوده
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double ValueAddedTaxDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مالیات بر ارزش افزوده
|
||||
/// string
|
||||
/// </summary>
|
||||
public string ValueAddedTaxStr { get; set; }
|
||||
public string ValueAddedTaxSt { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// بازه قرداد
|
||||
/// با عدد مشخص میشود
|
||||
/// مثلا یک ماه عدد 1
|
||||
/// </summary>
|
||||
public string PeriodModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// OneTime پرداخت یکجا
|
||||
/// -
|
||||
/// Monthly پرداخت ماهانه
|
||||
/// </summary>
|
||||
public string PaymentModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارگاه های ایجاد شده
|
||||
/// </summary>
|
||||
public List<WorkshopTempViewModel> WorkshopTempViewList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست اقساط ماهیانه
|
||||
/// </summary>
|
||||
public List<MonthlyInstallment> MonthlyInstallments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شروع قرارداد - شمسی
|
||||
/// </summary>
|
||||
public string ContractStartFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شروع قرارداد - میلادی
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public DateTime ContractStartGr { get; set; }
|
||||
public string ContractStartCurrentMonthFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartCurrentMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractStartNextMonthFa{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartNextMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان قرارداد
|
||||
@@ -76,8 +158,4 @@ public class ReviewAndPaymentViewModel
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractEndFa { get; set; }
|
||||
|
||||
public string DailyCompensation { get; set; }
|
||||
public string Obligation { get; set; }
|
||||
public string DiscountedAmountForOneMonth { get; set; }
|
||||
}
|
||||
@@ -3,16 +3,4 @@
|
||||
public class WorkshopTempViewModel : CreateWorkshopTemp
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل مبالغ سرویس ها برای کارگاه
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double WorkshopServicesAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع کل مبالغ سرویس ها برای کارگاه
|
||||
/// فارسی
|
||||
/// </summary>
|
||||
public string WorkshopServicesAmountStr { get; set; }
|
||||
}
|
||||
@@ -311,4 +311,9 @@ public class CreateWorkingHoursTemp
|
||||
public string WeeklyWorkingTime { get; set; }
|
||||
public long ContractId { get; set; }
|
||||
public long WorknigHoursId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
}
|
||||
@@ -151,6 +151,5 @@ public class CreateWorkshop
|
||||
/// تصفیه حساب بصورت استاتیک محاصبه شود
|
||||
/// </summary>
|
||||
public bool IsStaticCheckout { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
|
||||
public class AutoExtensionEmployeeListDto
|
||||
{
|
||||
@@ -32,6 +34,17 @@ public class AutoExtensionEmployeeListDto
|
||||
public bool EmployeeHasCreateContract { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr => "0";
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage => "0";
|
||||
|
||||
|
||||
public string ContarctStart { get; set; }
|
||||
public string ContractEnd { get; set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
@@ -90,167 +89,4 @@ public interface IWorkshopApplication
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
Task<ActionResult<OperationResult>> CreateWorkshopWorkflowRegistration(CreateWorkshopWorkflowRegistration command);
|
||||
}
|
||||
|
||||
public class CreateWorkshopWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// شناس<D8A7><D8B3> جزئیات کارگاه قرارداد مؤسسه
|
||||
/// </summary>
|
||||
public long InstitutionContractWorkshopDetailId { get; set; }
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
/// <summary>
|
||||
/// نام مستعار
|
||||
/// </summary>
|
||||
public string SureName { get; set; }
|
||||
/// <summary>
|
||||
/// نوع مالکیت
|
||||
/// </summary>
|
||||
public string TypeOfOwnership { get; set; }
|
||||
/// <summary>
|
||||
/// کد بایگانی
|
||||
/// </summary>
|
||||
public string ArchiveCode { get; set; }
|
||||
/// <summary>
|
||||
/// نام نماینده
|
||||
/// </summary>
|
||||
public string AgentName { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string Province { get; set; }
|
||||
/// <summary>
|
||||
/// آدرس
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه حساب کارشناس ارشد قرارداد
|
||||
/// </summary>
|
||||
public long SeniorContractAccountId { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه حساب کارشناس قرارداد
|
||||
/// </summary>
|
||||
public long JuniorContractAccountId { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه حساب کارشناس ارشد بیمه
|
||||
/// </summary>
|
||||
public long SeniorInsuranceAccountId { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه حساب کارشناس بیمه
|
||||
/// </summary>
|
||||
public long JuniorInsuranceAccountId { get; set; }
|
||||
/// <summary>
|
||||
/// باز بودن در تعطیلات
|
||||
/// </summary>
|
||||
public bool OpenInHolidays { get; set; }
|
||||
/// <summary>
|
||||
/// محاسبه نوبت کاری در فیش حقوقی
|
||||
/// </summary>
|
||||
public bool RotatingShiftCompute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد
|
||||
/// </summary>
|
||||
public bool CreateContract { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء قراداد
|
||||
/// </summary>
|
||||
public bool SignContract { get; set; }
|
||||
/// <summary>
|
||||
/// ایجات تصف<D8B5><D981>ه حساب
|
||||
/// </summary>
|
||||
public bool CreateCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// امضاء تصفیه حساب
|
||||
/// </summary>
|
||||
public bool SignCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// تصفیه حساب بصورت استاتیک محاصبه شود
|
||||
/// </summary>
|
||||
public bool IsStaticCheckout { get; set; }
|
||||
/// <summary>
|
||||
/// اگر قرارداد بیش از یک ماه باشد و گزینه انتخاب شده منتهی به پایان سال باشد
|
||||
/// این آیتم
|
||||
/// True
|
||||
/// است
|
||||
/// </summary>
|
||||
public IsActive CutContractEndOfYear { get; set; }
|
||||
/// <summary>
|
||||
/// سرویس تصفیه حساب سفارشی
|
||||
/// </summary>
|
||||
public string HasCustomizeCheckoutService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه اضافه کار فیش حقوقی در لیست بیمه
|
||||
/// </summary>
|
||||
public bool InsuranceCheckoutOvertime { get; set; }
|
||||
/// <summary>
|
||||
/// محاسبه حق اولاد در لیست بیمه
|
||||
/// </summary>
|
||||
public bool InsuranceCheckoutFamilyAllowance { get; set; }
|
||||
/// <summary>
|
||||
/// حضور و غیاب رایگان ویژه
|
||||
/// </summary>
|
||||
public string HasRollCallFreeVip { get; set; }
|
||||
/// <summary>
|
||||
/// مدت قرارداد
|
||||
/// </summary>
|
||||
public string ContractTerm { get; set; }
|
||||
/// <summary>
|
||||
/// مخفی کردن کل پرداخت
|
||||
/// </summary>
|
||||
public bool TotalPaymentHide { get; set; }
|
||||
/// <summary>
|
||||
/// نوع ارسال بیمه
|
||||
/// </summary>
|
||||
public string TypeOfInsuranceSend { get; set; }
|
||||
/// <summary>
|
||||
/// کد بیمه
|
||||
/// </summary>
|
||||
public string InsuranceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مشمول دستمزد مقطوع
|
||||
/// </summary>
|
||||
public bool FixedSalary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// صنف
|
||||
/// </summary>
|
||||
public long InsuranceJobId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمعیت شهر
|
||||
/// </summary>
|
||||
public string Population { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تماس نماینده کارگاه
|
||||
/// </summary>
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
public string TypeOfContract { get; set; }
|
||||
/// <summary>
|
||||
/// ردیف پیمان
|
||||
/// </summary>
|
||||
public string AgreementNumber { get; set; }
|
||||
|
||||
public string ComputeOptions { get; set; }
|
||||
public bool AddYearsPay { get; set; }
|
||||
public bool AddLeavePay { get; set; }
|
||||
public string BonusesOptions { get; set; }
|
||||
public string YearsOptions { get; set; }
|
||||
}
|
||||
@@ -38,6 +38,46 @@ public class createContractModel
|
||||
|
||||
public long YearlySalaryId { get; set; }
|
||||
public long EmployerId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
}
|
||||
@@ -24,6 +24,11 @@ public class BaseYearDataViewModel
|
||||
/// </summary>
|
||||
public double BaseYearResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اولین روز شروع بکار
|
||||
/// </summary>
|
||||
public string FirstWorkDayInLeftWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست تمام پایه سنوات های محاسبه شده
|
||||
/// </summary>
|
||||
@@ -64,4 +69,29 @@ public class BaseYearDataList
|
||||
/// سالی که در آن پایه سنوات تعلق گرفته
|
||||
/// </summary>
|
||||
public string Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///روزی که پایه سنوات تعلق گرفته
|
||||
///یا شروع بکار. ترک کار
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string BaseYearPayDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// روزی که پایه سنوات تعلق گرفته
|
||||
///یا شروع بکار. ترک کار
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime BaseYearPayDayGr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آیا تاریخ شروع بکار دارد
|
||||
/// </summary>
|
||||
public bool HasStartWork { get; set; }
|
||||
/// <summary>
|
||||
/// آیا تاریخ پایان کار دارد
|
||||
/// </summary>
|
||||
public bool HasLeftWork { get; set; }
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.YearlySalary;
|
||||
|
||||
@@ -14,6 +16,35 @@ public interface IYearlySalaryApplication
|
||||
OperationResult Err();
|
||||
EditYearlySalary GetDetails(long id);
|
||||
List<YearlySalaryViewModel> GetYearlySalary();
|
||||
|
||||
/// <summary>
|
||||
/// متد ارتقاء مزد دلخواه
|
||||
/// </summary>
|
||||
/// <param name="newContractStart"></param>
|
||||
/// <param name="lastContractStart"></param>
|
||||
/// <param name="lastContractManualDailyWage"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> UpgradeManualDailyWage(DateTime newContractStart, DateTime lastContractStart,
|
||||
double lastContractManualDailyWage);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات و لیست پایه سنوات های پرسنل
|
||||
/// </summary>
|
||||
/// <param name="contractStart"></param>
|
||||
/// <param name="contractEnd"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="leftWorkList"></param>
|
||||
/// <returns></returns>
|
||||
Task<BaseYearDataViewModel> BaseYearComputeByContractId(long contractId);
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه بر اساس تاریخ شروع و پایان
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <returns></returns>
|
||||
Task<(double dailyWage, long yearlySalaryId)> GetDailyWageByStartEnd(DateTime start, DateTime end);
|
||||
|
||||
List<YearlySalaryViewModel> Search(YearlySalarySearchModel searchModel);
|
||||
EditYearlySalary GetDetailsBySearchModel(YearlySalarySearchModel searchModel);
|
||||
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.AuthorizedPersonAgg;
|
||||
using CompanyManagment.App.Contracts.AuthorizedPerson;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class AuthorizedPersonApplication : IAuthorizedPersonApplication
|
||||
{
|
||||
private readonly IAuthorizedPersonRepository _authorizedPersonRepository;
|
||||
|
||||
public AuthorizedPersonApplication(IAuthorizedPersonRepository authorizedPersonRepository)
|
||||
{
|
||||
_authorizedPersonRepository = authorizedPersonRepository;
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateAuthorizedPerson command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
|
||||
if (_authorizedPersonRepository.ExistsByNationalCode(command.NationalCode))
|
||||
return operation.Failed("شخص با این کد ملی قبلاً ثبت شده است");
|
||||
|
||||
var authorizedPerson = new AuthorizedPerson(
|
||||
command.NationalCode, command.FirstName, command.LastName,
|
||||
command.FatherName, command.BirthDate, command.Gender,
|
||||
command.DeathStatus, command.ShenasnameSeri,
|
||||
command.ShenasnameSerial, command.ShenasnamehNumber);
|
||||
|
||||
_authorizedPersonRepository.Create(authorizedPerson);
|
||||
_authorizedPersonRepository.SaveChanges();
|
||||
|
||||
return operation.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult CreateFromUidResponse(CreateAuthorizedPerson command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
|
||||
var existingPerson = _authorizedPersonRepository.GetByNationalCode(command.NationalCode);
|
||||
if (existingPerson != null)
|
||||
{
|
||||
existingPerson.UpdatePersonalInfo(command.FirstName, command.LastName,
|
||||
command.FatherName, command.Gender, command.DeathStatus);
|
||||
_authorizedPersonRepository.SaveChanges();
|
||||
return operation.Succcedded();
|
||||
}
|
||||
|
||||
var authorizedPerson = new AuthorizedPerson(
|
||||
command.NationalCode, command.FirstName, command.LastName,
|
||||
command.FatherName, command.BirthDate, command.Gender,
|
||||
command.DeathStatus, command.ShenasnameSeri,
|
||||
command.ShenasnameSerial, command.ShenasnamehNumber);
|
||||
|
||||
_authorizedPersonRepository.Create(authorizedPerson);
|
||||
_authorizedPersonRepository.SaveChanges();
|
||||
|
||||
return operation.Succcedded();
|
||||
}
|
||||
|
||||
public AuthorizedPersonViewModel GetByNationalCode(string nationalCode)
|
||||
{
|
||||
var authorizedPerson = _authorizedPersonRepository.GetByNationalCode(nationalCode);
|
||||
if (authorizedPerson == null) return null;
|
||||
|
||||
return new AuthorizedPersonViewModel
|
||||
{
|
||||
Id = authorizedPerson.id,
|
||||
NationalCode = authorizedPerson.NationalCode,
|
||||
FirstName = authorizedPerson.FirstName,
|
||||
LastName = authorizedPerson.LastName,
|
||||
FatherName = authorizedPerson.FatherName,
|
||||
BirthDate = authorizedPerson.BirthDate,
|
||||
Gender = authorizedPerson.Gender,
|
||||
DeathStatus = authorizedPerson.DeathStatus,
|
||||
ShenasnameSeri = authorizedPerson.ShenasnameSeri,
|
||||
ShenasnameSerial = authorizedPerson.ShenasnameSerial,
|
||||
ShenasnamehNumber = authorizedPerson.ShenasnamehNumber,
|
||||
IsVerified = authorizedPerson.IsVerified,
|
||||
VerificationDate = authorizedPerson.VerificationDate?.ToString("yyyy/MM/dd HH:mm"),
|
||||
CreationDate = authorizedPerson.CreationDate.ToString("yyyy/MM/dd HH:mm")
|
||||
};
|
||||
}
|
||||
|
||||
public List<AuthorizedPersonViewModel> Search(string nationalCode = null, string firstName = null, string lastName = null)
|
||||
{
|
||||
var allPersons = _authorizedPersonRepository.Get();
|
||||
|
||||
var filteredPersons = allPersons.Where(x =>
|
||||
(string.IsNullOrEmpty(nationalCode) || x.NationalCode.Contains(nationalCode)) &&
|
||||
(string.IsNullOrEmpty(firstName) || x.FirstName.Contains(firstName)) &&
|
||||
(string.IsNullOrEmpty(lastName) || x.LastName.Contains(lastName)))
|
||||
.Select(x => new AuthorizedPersonViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
NationalCode = x.NationalCode,
|
||||
FirstName = x.FirstName,
|
||||
LastName = x.LastName,
|
||||
FatherName = x.FatherName,
|
||||
BirthDate = x.BirthDate,
|
||||
Gender = x.Gender,
|
||||
DeathStatus = x.DeathStatus,
|
||||
ShenasnameSeri = x.ShenasnameSeri,
|
||||
ShenasnameSerial = x.ShenasnameSerial,
|
||||
ShenasnamehNumber = x.ShenasnamehNumber,
|
||||
IsVerified = x.IsVerified,
|
||||
VerificationDate = x.VerificationDate?.ToString("yyyy/MM/dd HH:mm"),
|
||||
CreationDate = x.CreationDate.ToString("yyyy/MM/dd HH:mm")
|
||||
}).ToList();
|
||||
|
||||
return filteredPersons;
|
||||
}
|
||||
|
||||
public bool ExistsByNationalCode(string nationalCode)
|
||||
{
|
||||
return _authorizedPersonRepository.ExistsByNationalCode(nationalCode);
|
||||
}
|
||||
}
|
||||
@@ -152,17 +152,38 @@ public class CheckoutApplication : ICheckoutApplication
|
||||
var housingAllowance = command.HousingAllowance.MoneyToDouble();
|
||||
//حق تاهل
|
||||
var marriedAllowance = command.MarriedAllowance.MoneyToDouble();
|
||||
var MontlyYearsBunos =
|
||||
_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
var monthlyWage = MontlyYearsBunos.MontlyWage;
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//var MontlyYearsBunos =
|
||||
//_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
|
||||
#region Salary
|
||||
|
||||
var totalDays = (command.ContractEndGr - command.ContractStartGr).TotalDays + 1;
|
||||
|
||||
var mandatoryDays = totalDays - command.FridayStarttoEnd - command.officialholiday;
|
||||
|
||||
if (!command.HasRollCall && command.ShiftWork != "4")
|
||||
mandatoryDays = totalDays - command.FridayStarttoEnd;
|
||||
var monthlyWage = command.DailySalaryAffected * totalDays;
|
||||
|
||||
//پایه سنوات
|
||||
var bacicYears = command.BaseYearAffected * totalDays;
|
||||
#endregion
|
||||
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//عیدی و پاداش
|
||||
var bunos = command.BonusesPay;
|
||||
//پایه سنوات
|
||||
var bacicYears = MontlyYearsBunos.BasicYears;
|
||||
var sumOfWorkingDays = MontlyYearsBunos.SumOfWorkingDay;
|
||||
|
||||
//فاطمه احمدژاد === موقت عیدی و پاداش و سنوات حساب نشه
|
||||
if (command.EmployeeId == 45104 && command.WorkshopId == 315)
|
||||
{
|
||||
years = 0;
|
||||
|
||||
bunos = 0;
|
||||
}
|
||||
|
||||
var sumOfWorkingDays = $"{totalDays}";
|
||||
if (command.friday > 0)
|
||||
{
|
||||
var fridayPercent = dayliWage * 40 / 100;
|
||||
@@ -200,11 +221,11 @@ public class CheckoutApplication : ICheckoutApplication
|
||||
.Select(x => new CheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa, x.CalculationDateTimeGe, x.CalculationDateTimeFa, x.Id)).ToList();
|
||||
|
||||
command.SalaryAidDeduction = salaryAids.Sum(x => x.Amount.MoneyToDouble());
|
||||
|
||||
|
||||
|
||||
var loanInstallments = _rollCallMandatoryRepository.LoanInstallmentForCheckout(command.EmployeeId,
|
||||
command.WorkshopId, command.ContractStartGr, command.ContractEndGr)
|
||||
.Select(x => new CheckoutLoanInstallment(x.Amount, x.Month, x.Year, x.IsActive, x.RemainingAmount, x.LoanAmount, x.Id)).ToList();
|
||||
command.WorkshopId, command.ContractStartGr, command.HasLeft ? DateTime.MaxValue : command.ContractEndGr)
|
||||
.Select(x =>
|
||||
new CheckoutLoanInstallment(x.Amount, x.Month, x.Year, x.IsActive, x.RemainingAmount, x.LoanAmount, x.Id)).ToList();
|
||||
|
||||
command.InstallmentDeduction = loanInstallments.Sum(x => x.AmountForMonth.MoneyToDouble());
|
||||
|
||||
|
||||
408
CompanyManagment.Application/ClassificationSchemeApplication.cs
Normal file
408
CompanyManagment.Application/ClassificationSchemeApplication.cs
Normal file
@@ -0,0 +1,408 @@
|
||||
using System;
|
||||
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<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId)
|
||||
{
|
||||
return _classificationSchemeRepository.ClassificationSchemePartialModel(workshopId);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateClassificationScheme(CreateClassificationScheme 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 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 Task<EditClassificationScheme> GetClassificationScheme(long id)
|
||||
{
|
||||
return _classificationSchemeRepository.GetClassificationScheme(id);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> EditClassificationScheme(EditClassificationScheme 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.GetClassificationScheme(command.SchemeId).GetAwaiter().GetResult();
|
||||
|
||||
var create = new ClassificationEmployee(scheme.WorkshopId, command.EmployeeId, command.SchemeId,
|
||||
command.GroupId, command.JobId);
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||
/// </summary>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<AddEmployeeToGroup> GetEmployeeMemberizeData(long employeeId)
|
||||
{
|
||||
var result = new AddEmployeeToGroup();
|
||||
var res = await _classificationEmployeeRepository.GetEmployeeMemberizeData(employeeId);
|
||||
result.EmployeeId = employeeId;
|
||||
result.GroupId = res.ClassificationGroupId;
|
||||
result.JobId = res.ClassificationGroupJobId;
|
||||
result.Id = res.id;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,11 @@ public class ContractApplication : IContractApplication
|
||||
}
|
||||
|
||||
|
||||
public async Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart)
|
||||
{
|
||||
return await _contractRepository.GetManualDailWage(workshopId, employeeId, yearlySalaryId, contractStart);
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateContract command)
|
||||
{
|
||||
var yearlysalaryList = _yearlySalaryRepository.GetYearlySalary();
|
||||
@@ -142,7 +147,9 @@ public class ContractApplication : IContractApplication
|
||||
yearlySalarId,
|
||||
start, end, command.DayliWage, command.ArchiveCode, getWorkdate, setContractDate,
|
||||
command.JobType, command.ContractType, command.WorkshopAddress1, command.WorkshopAddress2,
|
||||
command.ConsumableItems, command.JobTypeId, command.HousingAllowance, command.AgreementSalary, command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod);
|
||||
command.ConsumableItems, command.JobTypeId, command.HousingAllowance, command.AgreementSalary,
|
||||
command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod,command.DailySalaryAffected,
|
||||
command.BaseYearAffected, command.DailySalaryUnAffected,command.BaseYearUnAffected, command.HasManualDailyWage, command.DailyWageType);
|
||||
|
||||
_contractRepository.Create(makeContract);
|
||||
_contractRepository.SaveChanges();
|
||||
@@ -356,7 +363,9 @@ public class ContractApplication : IContractApplication
|
||||
command.YearlySalaryId,
|
||||
start, end, command.DayliWage, command.ArchiveCode, getWorkdate, setContractDate,
|
||||
command.JobName, command.ContractType, command.WorkshopAddress1, command.WorkshopAddress2,
|
||||
command.ConsumableItems, command.JobId, command.HousingAllowance, "0", command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod);
|
||||
command.ConsumableItems, command.JobId, command.HousingAllowance, "0", command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod,
|
||||
command.DailySalaryAffected,
|
||||
command.BaseYearAffected, command.DailySalaryUnAffected, command.BaseYearUnAffected, command.HasManualDailyWage, command.DailyWageType);
|
||||
_contractRepository.Create(makeContract);
|
||||
_contractRepository.SaveChanges();
|
||||
|
||||
|
||||
@@ -319,7 +319,10 @@ namespace CompanyManagment.Application
|
||||
|
||||
if (workshopId == 170)
|
||||
{
|
||||
var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository.GetEmployeeSettingsByGroupSettingsId(117).Select(x => x.EmployeeId).ToList();
|
||||
var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository
|
||||
.GetEmployeeSettingsByGroupSettingsId(117)
|
||||
.Select(x => x.EmployeeId)
|
||||
.Where(x=> workshopLeftWorksInMonth.Select(l=>l.EmployeeId).Contains(x)).ToList();
|
||||
foreach (var employeesId in exceptionEmployeeIds)
|
||||
{
|
||||
|
||||
|
||||
@@ -249,7 +249,10 @@ namespace CompanyManagment.Application
|
||||
|
||||
if (workshopId == 170)
|
||||
{
|
||||
var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository.GetEmployeeSettingsByGroupSettingsId(117).Select(x => x.EmployeeId).ToList();
|
||||
var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository
|
||||
.GetEmployeeSettingsByGroupSettingsId(117)
|
||||
.Select(x => x.EmployeeId)
|
||||
.Where(x=> workshopLeftWorksInMonth.Select(l=>l.EmployeeId).Contains(x)).ToList();
|
||||
foreach (var employeesId in exceptionEmployeeIds)
|
||||
{
|
||||
|
||||
|
||||
@@ -179,8 +179,13 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
else
|
||||
{
|
||||
|
||||
nationalCodValid = false;
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
|
||||
|
||||
nationalCodValid = false;
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -313,8 +318,15 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
else
|
||||
{
|
||||
|
||||
nationalCodValid = false;
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
if (command.Nationality == "ایرانی")
|
||||
{
|
||||
nationalCodValid = false;
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
else
|
||||
{
|
||||
nationalCodValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -1632,11 +1644,11 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
if (apiResult.ResponseContext.Status.Code == 3)
|
||||
{
|
||||
return op.Failed("کد ملی نامعتبر است");
|
||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||
}
|
||||
if (apiResult.ResponseContext.Status.Code != 0)
|
||||
{
|
||||
return op.Failed("کد ملی و تاریخ تولد با هم همخانی ندارند");
|
||||
return op.Failed("اطلاعات وارد شده نامعتبر میباشد");
|
||||
}
|
||||
var basicInfo = apiResult.BasicInformation;
|
||||
var identityInfo = apiResult.IdentificationInformation;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user