Compare commits
354 Commits
Feature/In
...
Feature/ro
| Author | SHA1 | Date | |
|---|---|---|---|
| d1ac8e49ba | |||
| c10ae17f8c | |||
| c13ad3a8a7 | |||
| e0c247d07b | |||
| 1a3558df52 | |||
| 25c7b67eb5 | |||
| 19b390b17d | |||
| d3cd7e5b3c | |||
| 3d86ba401f | |||
| 6a6e2e532a | |||
| ca6638d6a3 | |||
| 608fb824dc | |||
| 4686151bbb | |||
| d7fae42e4f | |||
| 2cfe480733 | |||
|
|
c574ce534d | ||
| 174edbf87d | |||
| a827470831 | |||
| c9b61c3fc6 | |||
| 45002b88c4 | |||
| 0bacb24aa2 | |||
| 7fd8851f71 | |||
| bc6ae854f8 | |||
| 68f1f81b53 | |||
| d4c2ab939e | |||
| 5822005b68 | |||
| 53aeb60861 | |||
| c2a08d9c33 | |||
| 85e2481680 | |||
| b711e803a9 | |||
| 232a834dc9 | |||
| 55f7b4f7c0 | |||
| c5b521bc50 | |||
| acdd7de4f6 | |||
| 78458f24e5 | |||
| fde58a7c75 | |||
|
|
dbddccf011 | ||
| 488454d354 | |||
| 4126a7370f | |||
| 7aff8ba59f | |||
| 7d6b57affd | |||
| 950f2884ac | |||
| 2edf150ef6 | |||
| df9c268959 | |||
| 3c6303e817 | |||
| 23386fda76 | |||
| 119f4496cd | |||
| ce4fc33daa | |||
| f5d95b21b0 | |||
| 6e83904e11 | |||
| 1f7785581c | |||
| 9140f1ea0b | |||
| 81e6094817 | |||
| e5c0a7db58 | |||
| d44a9224be | |||
| c8018948c2 | |||
| a5e68cbd90 | |||
| 37a6920a74 | |||
| db40ab567c | |||
| 5f324a6fa1 | |||
| d1703ad20e | |||
| 2f38470746 | |||
| 23c02abe65 | |||
| 475142744f | |||
| 230cde7c15 | |||
| 13a2cd78cd | |||
| 4aa3c10466 | |||
| 91fc560355 | |||
| 8acb25dd67 | |||
| 9297bdefb5 | |||
| 61b326aed4 | |||
|
|
397280d0a2 | ||
| 5975a92aa1 | |||
| 0cec7c0cce | |||
| be6cb6430f | |||
| f863fb065f | |||
| 76aa1eae88 | |||
| d0b29e7643 | |||
| f1106deff9 | |||
| 94a5741906 | |||
| 221d06a0fc | |||
| 2b993fb746 | |||
| 756e06cc2f | |||
|
|
5b3c7e471e | ||
|
|
330a3ca839 | ||
| 7c4cf1e2ed | |||
| 1d2c4f26f1 | |||
| 761ac352df | |||
| ecfb7af386 | |||
| 92fd8d6b0e | |||
| 4f68d141e8 | |||
| a0e2b969c0 | |||
| 8efffe8b75 | |||
| fdf7fa0d3c | |||
| 5cde26e7f3 | |||
| b448c43bb7 | |||
| 987e5acca4 | |||
| 9ebbe00a95 | |||
| b576a8dd6b | |||
| 69279b320c | |||
| a360a20478 | |||
| aad1645edd | |||
| 4d0cf13d40 | |||
| 6584558e6a | |||
| 561f742eb5 | |||
| 560ea04f33 | |||
| a1a361a09c | |||
| ccd99c5184 | |||
| f29fac2631 | |||
| 4707c389ae | |||
| a403b9f960 | |||
| 6a0abf2545 | |||
| 83ef2a1177 | |||
| 3fa05b99dd | |||
| c5d6dcbbc3 | |||
| d70ea10d2d | |||
| bd331c8afe | |||
| 9f7d267afb | |||
| 7abbd489bb | |||
| 35811775f3 | |||
| b78a06e743 | |||
| 4ce82679ff | |||
| e1161245cf | |||
| 8e83b32856 | |||
| 8eeec345d1 | |||
| 780a610e91 | |||
| e095f4e07d | |||
| 4a3ac6e096 | |||
| a1ad139730 | |||
| dbe7aebf37 | |||
| 7eca8226b3 | |||
| 8912215bbc | |||
| 6c5f224fda | |||
| 437f419c2d | |||
| fc1258e985 | |||
| 6d0072c8ac | |||
| 76013946bd | |||
| 024b8cfaa9 | |||
| b8c738bd14 | |||
| 126cbff54f | |||
| 2e97d3238d | |||
| ea0be6b865 | |||
| 896c891f70 | |||
| 11207a785c | |||
| bfb7f4e38c | |||
| b5465f5501 | |||
| bcb42cc05e | |||
| ee9f802486 | |||
| 72d082d5f2 | |||
| 983f629cd6 | |||
| 0e3e783c5c | |||
| 136a9775ea | |||
| a6fdfd13f9 | |||
| 9bf8153d95 | |||
| 8893b53d9a | |||
| e49f635b4e | |||
| 04d9b84eb6 | |||
| 39d887c4c3 | |||
| 2e0d005ab9 | |||
| f90bb3dfc6 | |||
| 2d0365bc6e | |||
| dba90c9a3f | |||
| 0e360836f7 | |||
| 0753095415 | |||
| 7725384a87 | |||
| 94f16c8a49 | |||
| f5c3e6351c | |||
| 6bfc0a8d67 | |||
| 413bd3aad9 | |||
| 031f05937d | |||
| 84060e83f5 | |||
| 0acb691c54 | |||
| 90c6eef199 | |||
| 52f310353f | |||
| 71f7b05490 | |||
| 7681f4e95b | |||
| 681ac6eb1a | |||
| 349b96ba08 | |||
| c38aa29009 | |||
| 2b6864c024 | |||
| cf2849e47e | |||
| c0cbf20450 | |||
| 75cc5a3e5f | |||
| 6603427845 | |||
| 3d12f3b4d2 | |||
| c87d734b5a | |||
| b47759244e | |||
| 7905dff7c6 | |||
| 0ebca7c613 | |||
| 57dae3d8f1 | |||
| 81d78affa0 | |||
| 32e118d6f7 | |||
| 68748ab8a6 | |||
| 58152ae2d6 | |||
| f51c42a359 | |||
| 0373a7e6be | |||
| 957284be7f | |||
| c01bc80608 | |||
| 27109b3472 | |||
| d1f64dd1b0 | |||
| 9beed6cf45 | |||
| 868bb3f17a | |||
| 56cce8c93d | |||
| c13a77e53d | |||
| 523cbc744b | |||
| e53f3a721a | |||
| 79b14ec958 | |||
| bd72dada76 | |||
| df00f5cbac | |||
| e79dabbb2d | |||
| f527c59603 | |||
| 112369c2a5 | |||
| 518719a6b8 | |||
| 53eab1be67 | |||
| 90ee299b87 | |||
| e6e81cd1c9 | |||
|
|
21aa17d856 | ||
| b8d6911756 | |||
| 2e8f098937 | |||
| c9cae74cd4 | |||
|
|
abe8774d6f | ||
|
|
eab0441f00 | ||
| 13250d9f62 | |||
| e77eb217f7 | |||
| 39200da4b5 | |||
| 49050a8990 | |||
| 9474f3ff1a | |||
| ad4cffffcd | |||
|
|
18e559f1ae | ||
|
|
e1dfd8c8e1 | ||
|
|
b1c9b2669d | ||
|
|
116f40d87d | ||
|
|
6a982a80f7 | ||
|
|
604ac76a1a | ||
|
|
5a1d2640c3 | ||
|
|
de0e21f98b | ||
|
|
80ed1e9469 | ||
|
|
0609c66e0a | ||
|
|
add5b8ef8e | ||
|
|
c5091c53a4 | ||
|
|
3f1664a844 | ||
|
|
fdc5ea950f | ||
|
|
39d62eb02d | ||
|
|
a42ef19470 | ||
|
|
7ae7d8fc07 | ||
|
|
2bc7766ba1 | ||
|
|
d780f24b36 | ||
|
|
d7b49f8fc3 | ||
|
|
14480eb683 | ||
|
|
882a295413 | ||
|
|
785e364efc | ||
|
|
bd83ed3880 | ||
|
|
fae3c7cbd3 | ||
|
|
052b94a66e | ||
|
|
369757aebe | ||
|
|
38d8e88fd6 | ||
|
|
bcedb0d690 | ||
|
|
3662502db1 | ||
|
|
0701b334e4 | ||
|
|
631bf3a920 | ||
|
|
874bce1113 | ||
|
|
1f897fa0c9 | ||
|
|
5f7c27e45c | ||
|
|
824a80d1fe | ||
|
|
9e2ec49247 | ||
|
|
f5137d0bab | ||
|
|
881bdfa7ae | ||
|
|
e063870b36 | ||
|
|
fe8335af55 | ||
|
|
5c3119d3d2 | ||
|
|
0c56240158 | ||
|
|
2e703c49f7 | ||
|
|
e9dbfb411a | ||
|
|
40a02dbede | ||
|
|
030ce880f8 | ||
|
|
2b8cc9d05a | ||
|
|
0136e219a1 | ||
|
|
60ed37b965 | ||
|
|
5355e74830 | ||
|
|
87609773e5 | ||
|
|
6112e969b6 | ||
|
|
3e4c57d813 | ||
|
|
efc510a09b | ||
|
|
a6c1ae7971 | ||
|
|
8bf707056e | ||
|
|
ee72c95d55 | ||
|
|
f4f8ab8272 | ||
|
|
1c6def5d70 | ||
|
|
87e0181a8d | ||
|
|
66d566847e | ||
|
|
dbfffafbee | ||
|
|
969a707000 | ||
|
|
57b625f3b2 | ||
|
|
62572a9b64 | ||
|
|
6d0b7de149 | ||
|
|
34d8e068df | ||
|
|
3a1dfa7e11 | ||
|
|
866725e3b4 | ||
|
|
7772bff9f4 | ||
|
|
033461641a | ||
|
|
83a251ad3b | ||
|
|
cdf282a17a | ||
|
|
4bc3fd2fbc | ||
|
|
c826c3614d | ||
|
|
b8ea59b814 | ||
|
|
f82d0d5925 | ||
|
|
701ebaeb96 | ||
|
|
a1d57b291c | ||
|
|
e7d43316ad | ||
|
|
bdc5ccae13 | ||
|
|
d37ad552df | ||
|
|
9c04fd439d | ||
|
|
2b3067dab2 | ||
|
|
86682a28e2 | ||
|
|
5720c30f7a | ||
|
|
c90a68a8cc | ||
|
|
a71205aa2b | ||
|
|
641dcc1767 | ||
|
|
b1a15bfa54 | ||
|
|
d4f9c810ea | ||
|
|
09574150b6 | ||
|
|
7ccf600885 | ||
|
|
170a0ddba0 | ||
|
|
33a736ab5d | ||
|
|
e34fef37d7 | ||
|
|
23723e4b7a | ||
|
|
859f8ea8ca | ||
|
|
3744b5f470 | ||
|
|
db78fb1cd4 | ||
|
|
8bde7aa3d1 | ||
|
|
76e5a93ee5 | ||
|
|
469a8808d1 | ||
|
|
d3157780ea | ||
|
|
2d2dc24280 | ||
|
|
362b306c48 | ||
|
|
b0c02d47c4 | ||
|
|
6869ccb436 | ||
|
|
605fe16ced | ||
|
|
dfb78db2fa | ||
|
|
f0daa0b283 | ||
|
|
82f68d1bbe | ||
|
|
48c2186110 | ||
|
|
72fe632516 | ||
|
|
2a315ff7ae | ||
|
|
204355acd6 | ||
|
|
e1ac481dc3 | ||
|
|
8fd3930393 | ||
|
|
b2694ca281 | ||
|
|
7cb3551dc8 | ||
|
|
c048e89da8 | ||
|
|
5902472b86 | ||
|
|
9aa8855a46 | ||
|
|
9556be42ea | ||
|
|
3ebaeb645c |
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" `
|
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
|
||||||
-verb:sync `
|
-verb:sync `
|
||||||
-source:contentPath="$publishFolder" `
|
-source:contentPath="$publishFolder" `
|
||||||
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName=".\deployuser",password="R2rNpdnetP3j>q5b18",authType="Basic" `
|
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName="Administrator",password="R2rNpdnetP3j>q5b18",authType="Basic" `
|
||||||
-allowUntrusted `
|
-allowUntrusted `
|
||||||
-enableRule:AppOffline
|
-enableRule:AppOffline
|
||||||
|
|
||||||
|
|||||||
@@ -21,4 +21,19 @@
|
|||||||
|
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
||||||
|
|||||||
@@ -3,4 +3,6 @@
|
|||||||
public class AppSettingConfiguration
|
public class AppSettingConfiguration
|
||||||
{
|
{
|
||||||
public string Domain { get; set; }
|
public string Domain { get; set; }
|
||||||
|
public string ClientDomain =>"client"+Domain;
|
||||||
|
public string AdminDomain =>"admin"+Domain;
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,11 @@ public interface ISmsService
|
|||||||
#region Mahan
|
#region Mahan
|
||||||
|
|
||||||
Task<double> GetCreditAmount();
|
Task<double> GetCreditAmount();
|
||||||
|
|
||||||
|
public Task<bool> SendInstitutionVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId);
|
||||||
|
|
||||||
|
public Task<bool> SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName,
|
||||||
|
long contractingPartyId, long institutionContractId);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
7
0_Framework/Application/Sms/OtpResultViewModel.cs
Normal file
7
0_Framework/Application/Sms/OtpResultViewModel.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace _0_Framework.Application.Sms;
|
||||||
|
|
||||||
|
public class OtpResultViewModel
|
||||||
|
{
|
||||||
|
public int ExpireTimeSec { get; set; }
|
||||||
|
public int ReSendTimeSec { get; set; }
|
||||||
|
}
|
||||||
@@ -1512,6 +1512,14 @@ public static class Tools
|
|||||||
#region Mahan
|
#region Mahan
|
||||||
|
|
||||||
|
|
||||||
|
public static bool IsvalidIban(this string iban)
|
||||||
|
{
|
||||||
|
return Regex.IsMatch(iban, @"^IR[0-9]{24}$");
|
||||||
|
}
|
||||||
|
public static bool IsValidCardNumber(this string cardNumber)
|
||||||
|
{
|
||||||
|
return Regex.IsMatch(cardNumber, @"^[0-9]{16}$");
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// این متد حروف عربی را به فارسی در میاورد. مثال: علي را به علی تبدیل میکند
|
/// این متد حروف عربی را به فارسی در میاورد. مثال: علي را به علی تبدیل میکند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -110,6 +110,53 @@ public interface IUidService
|
|||||||
{
|
{
|
||||||
Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode , string birthDate);
|
Task<PersonalInfoResponse> GetPersonalInfo(string nationalCode , string birthDate);
|
||||||
Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode , string phoneNumber);
|
Task<MatchMobileWithNationalCodeResponse> IsMachPhoneWithNationalCode(string nationalCode , string phoneNumber);
|
||||||
|
Task<IbanInquiryResponse> IbanInquiry (string iban);
|
||||||
|
Task<AccountToIbanResponse> AccountToIban(string accountNumber, UidBanks bank);
|
||||||
|
Task<CardToNumberResponse> CardToIban(string cardNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CardToNumberResponse:UidBaseResponse
|
||||||
|
{
|
||||||
|
public string Iban { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AccountToIbanResponse:UidBaseResponse
|
||||||
|
{
|
||||||
|
public string Iban { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IbanInquiryResponse:UidBaseResponse
|
||||||
|
{
|
||||||
|
public IbanInquiryAccountBasicInformation AccountBasicInformation { get; set; }
|
||||||
|
[JsonProperty("owners")]
|
||||||
|
public List<IbanInquiryOwner> Owners { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IbanInquiryAccountBasicInformation
|
||||||
|
{
|
||||||
|
public string Iban { get; set; }
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
public IbanInquiryBankInformation BankInformation { get; set; }
|
||||||
|
public string AccountStatus { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IbanInquiryBankInformation
|
||||||
|
{
|
||||||
|
public string BankName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IbanInquiryOwner
|
||||||
|
{
|
||||||
|
[JsonProperty("firstName")]
|
||||||
|
public string FirstName { get; set; }
|
||||||
|
[JsonProperty("lastName")]
|
||||||
|
public string LastName { get; set; }
|
||||||
|
[JsonProperty("nationalIdentifier")]
|
||||||
|
public string NationalIdentifier { get; set; }
|
||||||
|
[JsonProperty("customerType")]
|
||||||
|
public string CustomerType { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MatchMobileWithNationalCodeResponse
|
public class MatchMobileWithNationalCodeResponse
|
||||||
@@ -118,4 +165,7 @@ public class MatchMobileWithNationalCodeResponse
|
|||||||
|
|
||||||
public ResponseContext ResponseContext { get; set; }
|
public ResponseContext ResponseContext { get; set; }
|
||||||
}
|
}
|
||||||
|
public class UidBaseResponse
|
||||||
|
{
|
||||||
|
public ResponseContext ResponseContext { get; set; }
|
||||||
|
}
|
||||||
|
|||||||
117
0_Framework/Application/UID/UidBanks.cs
Normal file
117
0_Framework/Application/UID/UidBanks.cs
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace _0_Framework.Application.UID;
|
||||||
|
|
||||||
|
public enum UidBanks
|
||||||
|
{
|
||||||
|
[Description("بانک دی")]
|
||||||
|
BANK_DEY = 66,
|
||||||
|
|
||||||
|
[Description("بانک سپه")]
|
||||||
|
BANK_SEPAH = 15,
|
||||||
|
|
||||||
|
[Description("بانک شهر")]
|
||||||
|
BANK_SHAHR = 61,
|
||||||
|
|
||||||
|
[Description("بانک ملت")]
|
||||||
|
BANK_MELAT = 12,
|
||||||
|
|
||||||
|
[Description("بانک ملی")]
|
||||||
|
BANK_MELLI = 17,
|
||||||
|
|
||||||
|
[Description("بانک رفاه کارگران")]
|
||||||
|
BANK_REFAH = 13,
|
||||||
|
|
||||||
|
[Description("بانک سینا")]
|
||||||
|
BANK_SINA = 59,
|
||||||
|
|
||||||
|
[Description("بانک مسکن")]
|
||||||
|
BANK_MASKAN = 14,
|
||||||
|
|
||||||
|
[Description("بانک آینده")]
|
||||||
|
BANK_AYANDEH = 62,
|
||||||
|
|
||||||
|
[Description("بانک انصار")]
|
||||||
|
BANK_ANSAR = 63,
|
||||||
|
|
||||||
|
[Description("بانک تجارت")]
|
||||||
|
BANK_TEJARAT = 18,
|
||||||
|
|
||||||
|
[Description("بانک رسالت")]
|
||||||
|
BANK_RESALAT = 70,
|
||||||
|
|
||||||
|
[Description("بانک سامان")]
|
||||||
|
BANK_SAMAN = 56,
|
||||||
|
|
||||||
|
[Description("بانک مرکزی")]
|
||||||
|
BANK_MARKAZI = 10,
|
||||||
|
|
||||||
|
[Description("بانک سرمایه")]
|
||||||
|
BANK_SARMAYEH = 58,
|
||||||
|
|
||||||
|
[Description("بانک صادرات")]
|
||||||
|
BANK_SADERAT = 19,
|
||||||
|
|
||||||
|
[Description("بانک قوامین")]
|
||||||
|
BANK_GHAVAMIN = 52,
|
||||||
|
|
||||||
|
[Description("بانک پارسیان")]
|
||||||
|
BANK_PARSIAN = 54,
|
||||||
|
|
||||||
|
[Description("بانک کشاورزی")]
|
||||||
|
BANK_KESHAVARZI = 16,
|
||||||
|
|
||||||
|
[Description("بانک گردشگری")]
|
||||||
|
BANK_GARDESHGARI = 64,
|
||||||
|
|
||||||
|
[Description("پست بانک")]
|
||||||
|
BANK_POST_BANK = 21,
|
||||||
|
|
||||||
|
[Description("بانک پاسارگاد")]
|
||||||
|
BANK_PASARGAD = 57,
|
||||||
|
|
||||||
|
[Description("بانک کارآفرین")]
|
||||||
|
BANK_KARAFARIN = 53,
|
||||||
|
|
||||||
|
[Description("بانک خاورمیانه")]
|
||||||
|
BANK_KHAVARMIANEH = 78,
|
||||||
|
|
||||||
|
[Description("بانک ایران زمین")]
|
||||||
|
BANK_IRAN_ZAMIN = 69,
|
||||||
|
|
||||||
|
[Description("بانک مهر اقتصاد")]
|
||||||
|
BANK_MEHR_EQTESAD = 79,
|
||||||
|
|
||||||
|
[Description("بانک صنعت و معدن")]
|
||||||
|
BANK_SANAT_MADAN = 11,
|
||||||
|
|
||||||
|
[Description("بانک اقتصاد نوین")]
|
||||||
|
BANK_EGHTESAD_NOVIN = 55,
|
||||||
|
|
||||||
|
[Description("بانک توسعه تعاون")]
|
||||||
|
BANK_TOSSE_TAAVON = 22,
|
||||||
|
|
||||||
|
[Description("بانک توسعه صادرات")]
|
||||||
|
BANK_TOSSE_SADERAT = 20,
|
||||||
|
|
||||||
|
[Description("بانک ایران و ونزوئلا")]
|
||||||
|
BANK_IRAN_VENEZUELA = 95,
|
||||||
|
|
||||||
|
[Description("بانک حکمت ایرانیان")]
|
||||||
|
BANK_HEKMAT_IRANIAN = 65,
|
||||||
|
|
||||||
|
[Description("بانک قرض الحسنه مهر")]
|
||||||
|
BANK_GHARZOLHASANEH_MEHR = 60,
|
||||||
|
|
||||||
|
[Description("موسسه مالی و اعتباری ملل")]
|
||||||
|
BANK_MOASSASE_MELLAL = 75,
|
||||||
|
|
||||||
|
[Description("موسسه مالی و اعتباری نور")]
|
||||||
|
BANK_MOASSASE_NOOR = 80,
|
||||||
|
|
||||||
|
[Description("موسسه مالی و اعتباری کوثر")]
|
||||||
|
BANK_MOASSASE_KOSAR = 73,
|
||||||
|
|
||||||
|
[Description("موسسه مالی و اعتباری توسعه")]
|
||||||
|
BANK_MOASSASE_TOSSE = 51
|
||||||
|
}
|
||||||
27
0_Framework/Application/UID/UidBanksExtension.cs
Normal file
27
0_Framework/Application/UID/UidBanksExtension.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace _0_Framework.Application.UID
|
||||||
|
{
|
||||||
|
public static class UidBanksExtension
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت نام فارسی بانک
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="bank">بانک</param>
|
||||||
|
/// <returns>نام فارسی بانک</returns>
|
||||||
|
public static string GetPersianName(this UidBanks bank)
|
||||||
|
{
|
||||||
|
var fieldInfo = bank.GetType().GetField(bank.ToString());
|
||||||
|
|
||||||
|
if (fieldInfo == null)
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
var attribute = (DescriptionAttribute)Attribute.GetCustomAttribute(
|
||||||
|
fieldInfo, typeof(DescriptionAttribute));
|
||||||
|
|
||||||
|
return attribute?.Description ?? bank.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace _0_Framework.Exceptions;
|
namespace _0_Framework.Exceptions;
|
||||||
|
|
||||||
@@ -14,5 +15,13 @@ public class BadRequestException:Exception
|
|||||||
Details = details;
|
Details = details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BadRequestException(string message, Dictionary<string, object?> extra) :
|
||||||
|
base(message)
|
||||||
|
{
|
||||||
|
Extra = extra;
|
||||||
|
}
|
||||||
|
|
||||||
public string Details { get; }
|
public string Details { get; }
|
||||||
|
public Dictionary<string,object> Extra { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Diagnostics;
|
using Microsoft.AspNetCore.Diagnostics;
|
||||||
@@ -24,37 +25,42 @@ public class CustomExceptionHandler : IExceptionHandler
|
|||||||
"Error Message: {exceptionMessage}, Time of occurrence {time}",
|
"Error Message: {exceptionMessage}, Time of occurrence {time}",
|
||||||
exception.Message, DateTime.UtcNow);
|
exception.Message, DateTime.UtcNow);
|
||||||
|
|
||||||
(string Detail, string Title, int StatusCode) details = exception switch
|
(string Detail, string Title, int StatusCode, Dictionary<string, object>? Extra) details = exception switch
|
||||||
{
|
{
|
||||||
InternalServerException =>
|
InternalServerException =>
|
||||||
(
|
(
|
||||||
exception.Message,
|
exception.Message,
|
||||||
exception.GetType().Name,
|
exception.GetType().Name,
|
||||||
context.Response.StatusCode = StatusCodes.Status500InternalServerError
|
context.Response.StatusCode = StatusCodes.Status500InternalServerError,
|
||||||
|
null
|
||||||
),
|
),
|
||||||
BadRequestException =>
|
BadRequestException bre =>
|
||||||
(
|
(
|
||||||
exception.Message,
|
exception.Message,
|
||||||
exception.GetType().Name,
|
exception.GetType().Name,
|
||||||
context.Response.StatusCode = StatusCodes.Status400BadRequest
|
context.Response.StatusCode = StatusCodes.Status400BadRequest,
|
||||||
|
bre.Extra
|
||||||
),
|
),
|
||||||
NotFoundException =>
|
NotFoundException =>
|
||||||
(
|
(
|
||||||
exception.Message,
|
exception.Message,
|
||||||
exception.GetType().Name,
|
exception.GetType().Name,
|
||||||
context.Response.StatusCode = StatusCodes.Status404NotFound
|
context.Response.StatusCode = StatusCodes.Status404NotFound,
|
||||||
|
null
|
||||||
),
|
),
|
||||||
UnAuthorizeException =>
|
UnAuthorizeException =>
|
||||||
(
|
(
|
||||||
exception.Message,
|
exception.Message,
|
||||||
exception.GetType().Name,
|
exception.GetType().Name,
|
||||||
context.Response.StatusCode = StatusCodes.Status401Unauthorized
|
context.Response.StatusCode = StatusCodes.Status401Unauthorized,
|
||||||
|
null
|
||||||
),
|
),
|
||||||
_ =>
|
_ =>
|
||||||
(
|
(
|
||||||
exception.Message,
|
exception.Message,
|
||||||
exception.GetType().Name,
|
exception.GetType().Name,
|
||||||
context.Response.StatusCode = StatusCodes.Status500InternalServerError
|
context.Response.StatusCode = StatusCodes.Status500InternalServerError,
|
||||||
|
null
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,9 +69,12 @@ public class CustomExceptionHandler : IExceptionHandler
|
|||||||
Title = details.Title,
|
Title = details.Title,
|
||||||
Detail = details.Detail,
|
Detail = details.Detail,
|
||||||
Status = details.StatusCode,
|
Status = details.StatusCode,
|
||||||
Instance = context.Request.Path
|
Instance = context.Request.Path,
|
||||||
|
Extensions = details.Extra ?? new Dictionary<string, object>()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
problemDetails.Extensions.Add("traceId", context.TraceIdentifier);
|
problemDetails.Extensions.Add("traceId", context.TraceIdentifier);
|
||||||
|
|
||||||
await context.Response.WriteAsJsonAsync(problemDetails, cancellationToken: cancellationToken);
|
await context.Response.WriteAsJsonAsync(problemDetails, cancellationToken: cancellationToken);
|
||||||
|
|||||||
8
0_Framework/InfraStructure/Mongo/MongoDbConfig.cs
Normal file
8
0_Framework/InfraStructure/Mongo/MongoDbConfig.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace _0_Framework.InfraStructure.Mongo;
|
||||||
|
|
||||||
|
public class MongoDbConfig
|
||||||
|
{
|
||||||
|
public string ConnectionString { get; set; } = null!;
|
||||||
|
|
||||||
|
public string DatabaseName { get; set; } = null!;
|
||||||
|
}
|
||||||
@@ -64,4 +64,6 @@ public interface IAccountApplication
|
|||||||
/// <param name="userName"></param>
|
/// <param name="userName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool CheckExistClientAccount(string userName);
|
public bool CheckExistClientAccount(string userName);
|
||||||
|
List<AccountViewModel> GetAdminAccountsNew();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -799,4 +799,8 @@ public class AccountApplication : IAccountApplication
|
|||||||
return _accountRepository.CheckExistClientAccount(userName);
|
return _accountRepository.CheckExistClientAccount(userName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<AccountViewModel> GetAdminAccountsNew()
|
||||||
|
{
|
||||||
|
return _accountRepository.GetAdminAccountsNew();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework_b.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.AuthorizedBankDetailsAgg
|
||||||
|
{
|
||||||
|
public class AuthorizedBankDetails : EntityBase
|
||||||
|
{
|
||||||
|
private AuthorizedBankDetails()
|
||||||
|
{
|
||||||
|
OwnersList = new List<AuthorizedBankDetailsOwner>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuthorizedBankDetails(string cardNumber, string accountNumber, string ban, string bankName, List<AuthorizedBankDetailsOwner> ownersList)
|
||||||
|
{
|
||||||
|
CardNumber = cardNumber;
|
||||||
|
AccountNumber = accountNumber;
|
||||||
|
IBan = ban;
|
||||||
|
BankName = bankName;
|
||||||
|
OwnersList = ownersList ?? new List<AuthorizedBankDetailsOwner>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CardNumber { get; private set; }
|
||||||
|
public string AccountNumber { get; private set; }
|
||||||
|
public string IBan { get; private set; }
|
||||||
|
public string BankName { get; private set; }
|
||||||
|
public List<AuthorizedBankDetailsOwner> OwnersList { get; private set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AuthorizedBankDetailsOwner // Value Object - not inheriting from EntityBase
|
||||||
|
{
|
||||||
|
private AuthorizedBankDetailsOwner() { }
|
||||||
|
|
||||||
|
public AuthorizedBankDetailsOwner(string fName, string lName, string nationalIdentifier, string customerType)
|
||||||
|
{
|
||||||
|
FName = fName;
|
||||||
|
LName = lName;
|
||||||
|
NationalIdentifier = nationalIdentifier;
|
||||||
|
CustomerType = customerType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FName { get; private set; }
|
||||||
|
public string LName { get; private set; }
|
||||||
|
public string NationalIdentifier { get; private set; }
|
||||||
|
public string CustomerType { get; private set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using _0_Framework_b.Domain;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Company.Application.Contracts.AuthorizedBankDetails;
|
||||||
|
|
||||||
|
namespace Company.Domain.AuthorizedBankDetailsAgg
|
||||||
|
{
|
||||||
|
public interface IAuthorizedBankDetailsRepository : IRepository<long, AuthorizedBankDetails>
|
||||||
|
{
|
||||||
|
EditAuthorizedBankDetails GetDetails(long id);
|
||||||
|
List<AuthorizedBankDetailsViewModel> Search(AuthorizedBankDetailsSearchModel searchModel);
|
||||||
|
AuthorizedBankDetailsViewModel GetByIban(string iban);
|
||||||
|
}
|
||||||
|
}
|
||||||
51
Company.Domain/AuthorizedPersonAgg/AuthorizedPerson.cs
Normal file
51
Company.Domain/AuthorizedPersonAgg/AuthorizedPerson.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
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() { }
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.AuthorizedPersonAgg;
|
||||||
|
|
||||||
|
public interface IAuthorizedPersonRepository : IRepository<long, AuthorizedPerson>
|
||||||
|
{
|
||||||
|
AuthorizedPerson GetByNationalCode(string nationalCode);
|
||||||
|
bool ExistsByNationalCode(string nationalCode);
|
||||||
|
}
|
||||||
@@ -18,4 +18,8 @@
|
|||||||
<Folder Include="CheckoutAgg\ValueObjects\" />
|
<Folder Include="CheckoutAgg\ValueObjects\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MongoDB.Bson" Version="3.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
|||||||
EditPersonalContractingParty GetDetailsToEdit(long id);
|
EditPersonalContractingParty GetDetailsToEdit(long id);
|
||||||
string GetFullName(long id);
|
string GetFullName(long id);
|
||||||
List<PersonalContractingPartyViewModel> Search(PersonalContractingPartySearchModel searchModel2);
|
List<PersonalContractingPartyViewModel> Search(PersonalContractingPartySearchModel searchModel2);
|
||||||
int GetLastArchiveCode();
|
int GetLastNewArchiveCode();
|
||||||
#region Mahan
|
#region Mahan
|
||||||
|
|
||||||
List<string> SearchByName(string name);
|
List<string> SearchByName(string name);
|
||||||
@@ -74,4 +74,6 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
|||||||
Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id);
|
Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id);
|
||||||
Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id);
|
Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id);
|
||||||
|
|
||||||
|
Task<PersonalContractingParty> GetByNationalCode(string nationalCode);
|
||||||
|
Task<PersonalContractingParty> GetByRegisterId(string registerId);
|
||||||
}
|
}
|
||||||
@@ -73,12 +73,27 @@ public class PersonalContractingParty : EntityBase
|
|||||||
/// آیا از طریق ای پی ای احراز هویت شده است
|
/// آیا از طریق ای پی ای احراز هویت شده است
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsAuthenticated { get; private set; }
|
public bool IsAuthenticated { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// جنسیت
|
/// جنسیت
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Gender Gender { get; private set; }
|
public Gender Gender { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سمت و صاحب امضاء اوراق (فقط برای طرف حقوقی)
|
||||||
|
/// </summary>
|
||||||
|
public string LegalPosition { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام مدیر عامل (فقط برای طرف حقوقی)
|
||||||
|
/// </summary>
|
||||||
|
public string CeoFName { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام خانوادگی مدیر عامل (فقط برای طرف حقوقی)
|
||||||
|
/// </summary>
|
||||||
|
public string CeoLName { get; private set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -94,7 +109,8 @@ public class PersonalContractingParty : EntityBase
|
|||||||
public PersonalContractingParty(string fName, string lName, string nationalcode, string idNumber,
|
public PersonalContractingParty(string fName, string lName, string nationalcode, string idNumber,
|
||||||
/*string legalName,*/ string registerId, string nationalId, string isLegal,
|
/*string legalName,*/ string registerId, string nationalId, string isLegal,
|
||||||
string phone, string agentPhone, string address,long representativeId,
|
string phone, string agentPhone, string address,long representativeId,
|
||||||
string representativeFullName, int archiveCode, string state,string city, string zone, string sureName)
|
string representativeFullName, int archiveCode, string state,string city,
|
||||||
|
string zone, string sureName,string ceoFName,string ceoLName,string legalPosition=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
FName = fName;
|
FName = fName;
|
||||||
@@ -120,8 +136,9 @@ public class PersonalContractingParty : EntityBase
|
|||||||
IsActiveString = "true";
|
IsActiveString = "true";
|
||||||
IsBlock = "false";
|
IsBlock = "false";
|
||||||
BlockTimes = 0;
|
BlockTimes = 0;
|
||||||
|
LegalPosition = legalPosition;
|
||||||
|
CeoFName = ceoFName;
|
||||||
|
CeoLName = ceoLName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -151,7 +168,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,
|
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 state, string city, string zone, string sureName,string legalPosition = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
LName = lName;
|
LName = lName;
|
||||||
@@ -168,6 +185,8 @@ public class PersonalContractingParty : EntityBase
|
|||||||
State = state;
|
State = state;
|
||||||
City = city;
|
City = city;
|
||||||
Zone = zone;
|
Zone = zone;
|
||||||
|
if (legalPosition != null)
|
||||||
|
LegalPosition = legalPosition;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -203,7 +222,8 @@ public class PersonalContractingParty : EntityBase
|
|||||||
IsAuthenticated = true;
|
IsAuthenticated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Authentication(string fName, string lName, string fatherName,string idNumber, string idNumberSeri, string idNumberSerial, string dateOfBirth, Gender gender)
|
public void Authentication(string fName, string lName, string fatherName,string idNumber,
|
||||||
|
string idNumberSeri, string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
||||||
{
|
{
|
||||||
this.FName = fName;
|
this.FName = fName;
|
||||||
this.LName = lName;
|
this.LName = lName;
|
||||||
@@ -214,6 +234,22 @@ public class PersonalContractingParty : EntityBase
|
|||||||
this.IdNumber = idNumber;
|
this.IdNumber = idNumber;
|
||||||
this.Gender = gender;
|
this.Gender = gender;
|
||||||
this.IsAuthenticated = true;
|
this.IsAuthenticated = true;
|
||||||
|
Phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LegalAuthentication(string fName, string lName, string fatherName,string idNumber, string idNumberSeri,
|
||||||
|
string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
||||||
|
{
|
||||||
|
CeoFName = fName;
|
||||||
|
CeoLName = lName;
|
||||||
|
this.FatherName = fatherName;
|
||||||
|
this.IdNumberSeri = idNumberSeri;
|
||||||
|
this.IdNumberSerial = idNumberSerial;
|
||||||
|
this.DateOfBirth = !string.IsNullOrWhiteSpace(dateOfBirth) ? dateOfBirth.ToGeorgianDateTime() : null;
|
||||||
|
this.IdNumber = idNumber;
|
||||||
|
this.Gender = gender;
|
||||||
|
this.IsAuthenticated = true;
|
||||||
|
Phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterComplete(string fatherName, string idNumberSeri, string idNumberSerial, DateTime dateOfBirth, Gender gender)
|
public void RegisterComplete(string fatherName, string idNumberSeri, string idNumberSerial, DateTime dateOfBirth, Gender gender)
|
||||||
|
|||||||
@@ -79,4 +79,5 @@ public interface IEmployeeRepository : IRepository<long, Employee>
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId);
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,7 @@ public class FinancialStatment : EntityBase
|
|||||||
ContractingPartyId = contractingPartyId;
|
ContractingPartyId = contractingPartyId;
|
||||||
ContractingPartyName = contractingPartyName;
|
ContractingPartyName = contractingPartyName;
|
||||||
PublicId = Guid.NewGuid();
|
PublicId = Guid.NewGuid();
|
||||||
|
FinancialTransactionList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public FinancialStatment()
|
public FinancialStatment()
|
||||||
@@ -37,4 +38,12 @@ public class FinancialStatment : EntityBase
|
|||||||
{
|
{
|
||||||
PublicId = Guid.NewGuid();
|
PublicId = Guid.NewGuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddFinancialTransaction(FinancialTransaction financialTransaction)
|
||||||
|
{
|
||||||
|
if (financialTransaction == null)
|
||||||
|
throw new ArgumentNullException(nameof(financialTransaction));
|
||||||
|
FinancialTransactionList.Add(financialTransaction);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,4 +23,5 @@ public interface IFinancialStatmentRepository : IRepository<long, FinancialStatm
|
|||||||
Task<GetFinancialStatementBalanceAmount> GetBalanceAmount(long id);
|
Task<GetFinancialStatementBalanceAmount> GetBalanceAmount(long id);
|
||||||
Task<double> GetClientDebtAmount(long accountId);
|
Task<double> GetClientDebtAmount(long accountId);
|
||||||
Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,FinancialStatementSearchModel searchModel);
|
Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,FinancialStatementSearchModel searchModel);
|
||||||
|
Task<FinancialStatment> GetByContractingPartyId(long contractingPartyId);
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ using _0_Framework.Application;
|
|||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
using CompanyManagment.App.Contracts.Workshop;
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace Company.Domain.InstitutionContractAgg;
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
@@ -47,4 +48,33 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
|
|||||||
|
|
||||||
Task<PagedResult<GetInstitutionContractListItemsViewModel>> GetList(InstitutionContractListSearchModel searchModel);
|
Task<PagedResult<GetInstitutionContractListItemsViewModel>> GetList(InstitutionContractListSearchModel searchModel);
|
||||||
Task<GetInstitutionContractListStatsViewModel> GetListStats(InstitutionContractListSearchModel searchModel);
|
Task<GetInstitutionContractListStatsViewModel> GetListStats(InstitutionContractListSearchModel searchModel);
|
||||||
|
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||||
|
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||||
|
Task<InstitutionContractWorkshopInitial> GetInstitutionWorkshopInitialDetails(long institutionWorkshopInitialId);
|
||||||
|
Task<InstitutionContract> GetIncludeWorkshopDetailsAsync(long institutionContractId);
|
||||||
|
void UpdateStatusIfNeeded(long institutionContractId);
|
||||||
|
Task<GetInstitutionVerificationDetailsViewModel> GetVerificationDetails(Guid id);
|
||||||
|
Task<InstitutionContract> GetByPublicIdAsync(Guid id);
|
||||||
|
|
||||||
|
#region Extension
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionInquiryResult> GetExtensionInquiry(long previousContractId);
|
||||||
|
Task<InstitutionContractExtensionWorkshopsResponse> GetExtensionWorkshops(InstitutionContractExtensionWorkshopsRequest request);
|
||||||
|
Task<InstitutionContractExtensionPlanResponse> GetExtensionInstitutionPlan(InstitutionContractExtensionPlanRequest request);
|
||||||
|
Task<InstitutionContractExtensionPaymentResponse> GetExtensionPaymentMethod(InstitutionContractExtensionPaymentRequest request);
|
||||||
|
Task<OperationResult> ExtensionComplete(InstitutionContractExtensionCompleteRequest request);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Upgrade(Amendment)
|
||||||
|
|
||||||
|
Task<InstitutionContractAmendmentWorkshopsResponse> GetAmendmentWorkshops(long institutionContractId);
|
||||||
|
Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request);
|
||||||
|
|
||||||
|
Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(InstitutionContractAmendmentTempWorkshopViewModel request);
|
||||||
|
Task RemoveAmendmentWorkshops(Guid workshopTempId);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected);
|
||||||
|
Task<List<InstitutionContractPrintViewModel>> PrintAllAsync(List<long> ids);
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,24 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using Company.Domain.InstitutionContractContactInfoAgg;
|
using Company.Domain.InstitutionContractContactInfoAgg;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
namespace Company.Domain.InstitutionContractAgg;
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
public class InstitutionContract : EntityBase
|
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 contractingPartyName, DateTime contractDateGr, string contractDateFa, string state, string city,
|
||||||
string address, DateTime contractStartGr, string contractStartFa, DateTime contractEndGr,
|
string address, DateTime contractStartGr, string contractStartFa, DateTime contractEndGr,
|
||||||
string contractEndFa, double contractAmount, double dailyCompenseation, double obligation,
|
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,
|
||||||
|
List<InstitutionContractWorkshopInitial> workshopDetails, long lawId)
|
||||||
{
|
{
|
||||||
ContractNo = contractNo;
|
ContractNo = contractNo;
|
||||||
RepresentativeId = representativeId;
|
RepresentativeId = representativeId;
|
||||||
@@ -43,67 +50,123 @@ public class InstitutionContract : EntityBase
|
|||||||
TypeOfContract = typeOfcontract;
|
TypeOfContract = typeOfcontract;
|
||||||
HasValueAddedTax = hasValueAddedTax;
|
HasValueAddedTax = hasValueAddedTax;
|
||||||
ValueAddedTax = valueAddedTax;
|
ValueAddedTax = valueAddedTax;
|
||||||
|
VerificationStatus = InstitutionContractVerificationStatus.PendingForVerify;
|
||||||
|
ContactInfoList = [];
|
||||||
|
Installments = [];
|
||||||
|
WorkshopGroup = new InstitutionContractWorkshopGroup(id, workshopDetails);
|
||||||
|
PublicId = Guid.NewGuid();
|
||||||
|
LawId = lawId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long LawId { get; private set; }
|
||||||
|
|
||||||
public string ContractNo { get; private set; }
|
public string ContractNo { get; private set; }
|
||||||
|
|
||||||
public long RepresentativeId { get; private set; }
|
public long RepresentativeId { get; private set; }
|
||||||
|
|
||||||
public string RepresentativeName { get; private set; }
|
public string RepresentativeName { get; private set; }
|
||||||
|
|
||||||
public long ContractingPartyId { get; private set; }
|
public long ContractingPartyId { get; private set; }
|
||||||
|
|
||||||
public string ContractingPartyName { get; private set; }
|
public string ContractingPartyName { get; private set; }
|
||||||
|
|
||||||
public DateTime ContractDateGr { get; private set; }
|
public DateTime ContractDateGr { get; private set; }
|
||||||
|
|
||||||
public string ContractDateFa { get; private set; }
|
public string ContractDateFa { get; private set; }
|
||||||
|
|
||||||
public string State { get; private set; }
|
public string State { get; private set; }
|
||||||
|
|
||||||
public string City { get; private set; }
|
public string City { get; private set; }
|
||||||
|
|
||||||
public string Address { get; private set; }
|
public string Address { get; private set; }
|
||||||
|
|
||||||
//public long ContactInfoId { get; private set; }
|
//public long ContactInfoId { get; private set; }
|
||||||
public DateTime ContractStartGr { get; private set; }
|
public DateTime ContractStartGr { get; private set; }
|
||||||
|
|
||||||
public string ContractStartFa { get; private set; }
|
public string ContractStartFa { get; private set; }
|
||||||
|
|
||||||
public DateTime ContractEndGr { get; private set; }
|
public DateTime ContractEndGr { get; private set; }
|
||||||
|
|
||||||
public string ContractEndFa { get; private set; }
|
public string ContractEndFa { get; private set; }
|
||||||
|
|
||||||
// مبلغ قرارداد
|
// مبلغ قرارداد
|
||||||
public double ContractAmount { get; private set; }
|
public double ContractAmount { get; private set; }
|
||||||
|
|
||||||
//خسارت روزانه
|
//خسارت روزانه
|
||||||
public double DailyCompenseation { get; private set; }
|
public double DailyCompenseation { get; private set; }
|
||||||
|
|
||||||
//وجه التزام
|
//وجه التزام
|
||||||
public double Obligation { get; private set; }
|
public double Obligation { get; private set; }
|
||||||
|
|
||||||
// مبلغ کل قرارداد
|
// مبلغ کل قرارداد
|
||||||
public double TotalAmount { get; private set; }
|
public double TotalAmount { get; private set; }
|
||||||
|
|
||||||
public string WorkshopManualCount { get; private set; }
|
public string WorkshopManualCount { get; private set; }
|
||||||
|
|
||||||
public string EmployeeManualCount { get; private set; }
|
public string EmployeeManualCount { get; private set; }
|
||||||
|
|
||||||
public string IsActiveString { get; private set; }
|
public string IsActiveString { get; private set; }
|
||||||
|
|
||||||
public int ExtensionNo { get; private set; }
|
public int ExtensionNo { get; private set; }
|
||||||
|
|
||||||
public string Description { get; private set; }
|
public string Description { get; private set; }
|
||||||
|
|
||||||
public string Signature { get; private set; }
|
public string Signature { get; private set; }
|
||||||
|
|
||||||
public string OfficialCompany { get; private set; }
|
public string OfficialCompany { get; private set; }
|
||||||
|
|
||||||
public string TypeOfContract { get; private set; }
|
public string TypeOfContract { get; private set; }
|
||||||
public string HasValueAddedTax { get; set; }
|
|
||||||
public double ValueAddedTax { get; set; }
|
public string HasValueAddedTax { get; private set; }
|
||||||
|
|
||||||
|
public double ValueAddedTax { get; private set; }
|
||||||
|
|
||||||
|
public Guid PublicId { get; private set; }
|
||||||
|
|
||||||
|
public string VerifyCode { get; private set; }
|
||||||
|
public DateTime VerifyCodeCreation { get; private set; }
|
||||||
|
public string VerifierFullName { get; private set; }
|
||||||
|
public string VerifierPhoneNumber { get; private set; }
|
||||||
|
|
||||||
|
[NotMapped] public bool VerifyCodeExpired => VerifyCodeCreation.Add(ExpireTime) <= DateTime.Now;
|
||||||
|
|
||||||
|
[NotMapped] public bool CanResendVerifyCode => VerifyCodeCreation.Add(ReSendTime) <= DateTime.Now;
|
||||||
|
|
||||||
|
[NotMapped] public TimeSpan ExpireTime => TimeSpan.FromMinutes(5);
|
||||||
|
|
||||||
|
|
||||||
|
[NotMapped] public TimeSpan ReSendTime => TimeSpan.FromMinutes(2);
|
||||||
|
|
||||||
|
public bool IsInstallment { get; set; }
|
||||||
|
|
||||||
|
public InstitutionContractVerificationStatus VerificationStatus { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContractWorkshopGroup WorkshopGroup { get; private set; }
|
||||||
|
|
||||||
public List<InstitutionContractContactInfo> ContactInfoList { get; set; }
|
public List<InstitutionContractContactInfo> ContactInfoList { get; set; }
|
||||||
|
|
||||||
|
public List<InstitutionContractInstallment> Installments { get; set; }
|
||||||
|
|
||||||
|
public List<InstitutionContractAmendment> Amendments { get; private set; }
|
||||||
|
|
||||||
public InstitutionContract()
|
public InstitutionContract()
|
||||||
{
|
{
|
||||||
|
ContactInfoList = [];
|
||||||
ContactInfoList = new List<InstitutionContractContactInfo>();
|
Installments = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Edit(DateTime contractDateGr, string contractDateFa, string state, string city, string address,
|
public void Edit(DateTime contractDateGr, string contractDateFa, string state, string city, string address,
|
||||||
DateTime contractStartGr, string contractStartFa, DateTime contractEndGr, string contractEndFa,
|
DateTime contractStartGr, string contractStartFa, DateTime contractEndGr, string contractEndFa,
|
||||||
double contractAmount, double dailyCompenseation, double obligation, double totalAmount,
|
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)
|
string typeOfcontract, double valueAddedTax, string hasValueAddedTax)
|
||||||
{
|
{
|
||||||
|
|
||||||
ContractDateGr = contractDateGr;
|
ContractDateGr = contractDateGr;
|
||||||
ContractDateFa = contractDateFa;
|
ContractDateFa = contractDateFa;
|
||||||
State = state;
|
State = state;
|
||||||
City = city;
|
City = city;
|
||||||
Address = address;
|
Address = address;
|
||||||
|
|
||||||
ContractStartGr = contractStartGr;
|
ContractStartGr = contractStartGr;
|
||||||
ContractStartFa = contractStartFa;
|
ContractStartFa = contractStartFa;
|
||||||
ContractEndGr = contractEndGr;
|
ContractEndGr = contractEndGr;
|
||||||
@@ -124,13 +187,11 @@ public class InstitutionContract : EntityBase
|
|||||||
|
|
||||||
public void Active()
|
public void Active()
|
||||||
{
|
{
|
||||||
|
|
||||||
this.IsActiveString = "true";
|
this.IsActiveString = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeActive()
|
public void DeActive()
|
||||||
{
|
{
|
||||||
|
|
||||||
this.IsActiveString = "false";
|
this.IsActiveString = "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,4 +209,182 @@ public class InstitutionContract : EntityBase
|
|||||||
{
|
{
|
||||||
this.Signature = "0";
|
this.Signature = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Verified()
|
||||||
|
{
|
||||||
|
VerificationStatus = InstitutionContractVerificationStatus.Verified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPendingWorkflow()
|
||||||
|
{
|
||||||
|
VerificationStatus = InstitutionContractVerificationStatus.PendingWorkflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetInstallments(List<InstitutionContractInstallment> installments)
|
||||||
|
{
|
||||||
|
Installments = installments;
|
||||||
|
IsInstallment = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
|
||||||
|
{
|
||||||
|
VerifyCode = code;
|
||||||
|
VerifyCodeCreation = DateTime.Now;
|
||||||
|
VerifierFullName = verifierFullName;
|
||||||
|
VerifierPhoneNumber = verifierPhoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetWorkshopGroup(InstitutionContractWorkshopGroup workshopGroup)
|
||||||
|
{
|
||||||
|
WorkshopGroup = workshopGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAmount(double totalAmount, double tax, double oneMonthPayment)
|
||||||
|
{
|
||||||
|
ContractAmount = oneMonthPayment;
|
||||||
|
TotalAmount = totalAmount;
|
||||||
|
ValueAddedTax = tax;
|
||||||
|
HasValueAddedTax = tax > 0 ? "true" : "false";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearGroup()
|
||||||
|
{
|
||||||
|
WorkshopGroup = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractAmendment : EntityBase
|
||||||
|
{
|
||||||
|
private InstitutionContractAmendment(){}
|
||||||
|
public InstitutionContractAmendment(long institutionContractId,
|
||||||
|
List<InstitutionContractInstallment> installments, double amount, bool hasInstallment,
|
||||||
|
InstitutionContractAmendmentChange amendmentChange, long lawId)
|
||||||
|
{
|
||||||
|
InstitutionContractId = institutionContractId;
|
||||||
|
Installments = installments is { Count: > 0} ? installments : [];
|
||||||
|
Amount = amount;
|
||||||
|
HasInstallment = hasInstallment;
|
||||||
|
AmendmentChanges = [amendmentChange];
|
||||||
|
LawId = lawId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long InstitutionContractId { get; set; }
|
||||||
|
public InstitutionContract InstitutionContract { get; set; }
|
||||||
|
public List<InstitutionContractInstallment> Installments { get; set; }
|
||||||
|
public double Amount { get; set; }
|
||||||
|
public bool HasInstallment { get; set; }
|
||||||
|
public string VerifyCode { get; set; }
|
||||||
|
public DateTime VerificationCreation { get; set; }
|
||||||
|
public List<InstitutionContractAmendmentChange> AmendmentChanges { get; set; }
|
||||||
|
|
||||||
|
public long LawId { get; set; }
|
||||||
|
|
||||||
|
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
|
||||||
|
{
|
||||||
|
VerifyCode = code;
|
||||||
|
VerifyCodeCreation = DateTime.Now;
|
||||||
|
VerifierFullName = verifierFullName;
|
||||||
|
VerifierPhoneNumber = verifierPhoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string VerifierPhoneNumber { get; private set; }
|
||||||
|
|
||||||
|
public string VerifierFullName { get; private set; }
|
||||||
|
|
||||||
|
public DateTime VerifyCodeCreation { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentChange : EntityBase
|
||||||
|
{
|
||||||
|
private InstitutionContractAmendmentChange() { }
|
||||||
|
private InstitutionContractAmendmentChange(long institutionContractAmendmentId,
|
||||||
|
InstitutionContractAmendment institutionContractAmendment, InstitutionContractAmendmentChangeType changeType,
|
||||||
|
DateTime changeDateGr, bool? hasRollCallPlan, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan,
|
||||||
|
bool? hasContractPlanInPerson, bool? hasInsurancePlan, bool? hasInsurancePlanInPerson, int? personnelCount,
|
||||||
|
long? workshopDetailsId)
|
||||||
|
{
|
||||||
|
InstitutionContractAmendmentId = institutionContractAmendmentId;
|
||||||
|
InstitutionContractAmendment = institutionContractAmendment;
|
||||||
|
ChangeType = changeType;
|
||||||
|
ChangeDateGr = changeDateGr;
|
||||||
|
HasRollCallPlan = hasRollCallPlan;
|
||||||
|
HasCustomizeCheckoutPlan = hasCustomizeCheckoutPlan;
|
||||||
|
HasContractPlan = hasContractPlan;
|
||||||
|
HasContractPlanInPerson = hasContractPlanInPerson;
|
||||||
|
HasInsurancePlan = hasInsurancePlan;
|
||||||
|
HasInsurancePlanInPerson = hasInsurancePlanInPerson;
|
||||||
|
PersonnelCount = personnelCount;
|
||||||
|
WorkshopDetailsId = workshopDetailsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long InstitutionContractAmendmentId { get; private set; }
|
||||||
|
public InstitutionContractAmendment InstitutionContractAmendment { get; private set; }
|
||||||
|
public InstitutionContractAmendmentChangeType ChangeType { get; private set; }
|
||||||
|
public DateTime ChangeDateGr { 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; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public int? PersonnelCount { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long? WorkshopDetailsId { get; private set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum InstitutionContractAmendmentChangeType
|
||||||
|
{
|
||||||
|
PersonCount,
|
||||||
|
Services,
|
||||||
|
WorkshopCreated
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum InstitutionContractVerificationStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// در انتظار تایید
|
||||||
|
/// </summary>
|
||||||
|
PendingForVerify = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// در انتظار کارپوشه
|
||||||
|
/// </summary>
|
||||||
|
PendingWorkflow = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تایید شده
|
||||||
|
/// </summary>
|
||||||
|
Verified = 2
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
|
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 long? InstitutionContractAmendmentId { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContract InstitutionContract { get; private set; }
|
||||||
|
public InstitutionContractAmendment InstitutionContractAmendment { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopBase:EntityBase
|
||||||
|
{
|
||||||
|
protected InstitutionContractWorkshopBase(){}
|
||||||
|
public InstitutionContractWorkshopBase(string workshopName, bool hasRollCallPlan,bool hasRollCallPlanInPerson,
|
||||||
|
bool hasCustomizeCheckoutPlan, bool hasContractPlan,bool hasContractPlanInPerson,bool hasInsurancePlan,bool hasInsurancePlanInPerson,
|
||||||
|
int personnelCount, double price )
|
||||||
|
{
|
||||||
|
WorkshopName = workshopName;
|
||||||
|
Services = new WorkshopServices(hasInsurancePlan, hasInsurancePlanInPerson,
|
||||||
|
hasContractPlan, hasContractPlanInPerson, hasRollCallPlan, hasRollCallPlanInPerson,hasCustomizeCheckoutPlan);
|
||||||
|
PersonnelCount = personnelCount;
|
||||||
|
Price = price;
|
||||||
|
Employers = [];
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// شناسه کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long? WorkshopId { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; private set; }
|
||||||
|
|
||||||
|
public WorkshopServices Services { get; set; } = new (false, false,
|
||||||
|
false, false, false,
|
||||||
|
false, false);
|
||||||
|
public int PersonnelCount { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شناسه قرارداد نهاد مرتبط
|
||||||
|
/// </summary>
|
||||||
|
public long InstitutionContractId { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public double Price { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
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(employerId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void AddEmployer(long employerId)
|
||||||
|
{
|
||||||
|
if (Employers.Exists(x => x.EmployerId == employerId))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Employers.Add(new InstitutionContractWorkshopDetailEmployer(employerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ⚡️ Equality Implementation
|
||||||
|
public override bool Equals(object? obj)
|
||||||
|
{
|
||||||
|
if (obj is not InstitutionContractWorkshopBase other)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return WorkshopName == other.WorkshopName &&
|
||||||
|
PersonnelCount == other.PersonnelCount &&
|
||||||
|
Price == other.Price &&
|
||||||
|
Services == other.Services;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(WorkshopName, PersonnelCount, Price, Services);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework_b.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopCurrent:InstitutionContractWorkshopBase
|
||||||
|
{
|
||||||
|
private InstitutionContractWorkshopCurrent(){}
|
||||||
|
public InstitutionContractWorkshopCurrent(string workshopName, bool hasRollCallPlan,
|
||||||
|
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
||||||
|
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
||||||
|
int personnelCount, double price,long institutionContractWorkshopGroupId,InstitutionContractWorkshopGroup workshopGroup,long workshopId) : base(workshopName, hasRollCallPlan,
|
||||||
|
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan,
|
||||||
|
hasContractPlanInPerson, hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price)
|
||||||
|
{
|
||||||
|
InstitutionContractWorkshopGroupId = institutionContractWorkshopGroupId;
|
||||||
|
WorkshopGroup = workshopGroup;
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
}
|
||||||
|
public long InstitutionContractWorkshopGroupId { get; private set; }
|
||||||
|
public InstitutionContractWorkshopGroup WorkshopGroup { get; private set; }
|
||||||
|
public long InitialWorkshopId { get; private set; }
|
||||||
|
public InstitutionContractWorkshopInitial WorkshopInitial { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using _0_Framework_b.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopGroup : EntityBase
|
||||||
|
{
|
||||||
|
private InstitutionContractWorkshopGroup()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public long InstitutionContractId { get; private set; }
|
||||||
|
public InstitutionContract InstitutionContract { get; set; }
|
||||||
|
public List<InstitutionContractWorkshopInitial> InitialWorkshops { get; private set; }
|
||||||
|
public List<InstitutionContractWorkshopCurrent> CurrentWorkshops { get; private set; }
|
||||||
|
public DateTime LastModifiedDate { get; private set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool HasChanges =>
|
||||||
|
!InitialWorkshops.Cast<InstitutionContractWorkshopBase>()
|
||||||
|
.SequenceEqual(CurrentWorkshops.Cast<InstitutionContractWorkshopBase>());
|
||||||
|
|
||||||
|
public InstitutionContractWorkshopGroup(long institutionContractId,
|
||||||
|
List<InstitutionContractWorkshopInitial> initialDetails)
|
||||||
|
{
|
||||||
|
InstitutionContractId = institutionContractId;
|
||||||
|
var initialWorkshops = initialDetails.ToList();
|
||||||
|
InitialWorkshops = initialWorkshops.ToList();
|
||||||
|
LastModifiedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateCurrentWorkshops(List<InstitutionContractWorkshopCurrent> updatedDetails)
|
||||||
|
{
|
||||||
|
CurrentWorkshops = updatedDetails.ToList();
|
||||||
|
LastModifiedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopInitial:InstitutionContractWorkshopBase
|
||||||
|
{
|
||||||
|
private InstitutionContractWorkshopInitial(){}
|
||||||
|
public InstitutionContractWorkshopInitial(string workshopName, bool hasRollCallPlan,
|
||||||
|
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
||||||
|
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
||||||
|
int personnelCount, double price) : base(workshopName, hasRollCallPlan,
|
||||||
|
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan, hasContractPlanInPerson,
|
||||||
|
hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price)
|
||||||
|
{
|
||||||
|
WorkshopCreated = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long InstitutionContractWorkshopGroupId { get; private set; }
|
||||||
|
public InstitutionContractWorkshopGroup WorkshopGroup { get; private set; }
|
||||||
|
public bool WorkshopCreated { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContractWorkshopCurrent? WorkshopCurrent { get; private set; }
|
||||||
|
public long? InstitutionContractWorkshopCurrentId { get; private set; }
|
||||||
|
|
||||||
|
public void SetWorkshopId(long workshopId)
|
||||||
|
{
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
WorkshopCreated = true;
|
||||||
|
WorkshopCurrent = new InstitutionContractWorkshopCurrent(WorkshopName,Services.RollCall,Services.RollCallInPerson,
|
||||||
|
Services.CustomizeCheckout,Services.Contract,Services.ContractInPerson,Services.Insurance,
|
||||||
|
Services.InsuranceInPerson,PersonnelCount,Price,InstitutionContractWorkshopGroupId,WorkshopGroup,workshopId);
|
||||||
|
WorkshopCurrent.SetEmployers(Employers.Select(x=>x.EmployerId).ToList());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static InstitutionContractWorkshopInitial CreateManual(string workshopName, bool hasRollCallPlan,
|
||||||
|
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
||||||
|
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
||||||
|
int personnelCount, double price, long workshopId,List<long> employerIds)
|
||||||
|
{
|
||||||
|
|
||||||
|
var entity = new InstitutionContractWorkshopInitial(workshopName, hasRollCallPlan,
|
||||||
|
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan, hasContractPlanInPerson,
|
||||||
|
hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price);
|
||||||
|
entity.WorkshopCreated = true;
|
||||||
|
entity.WorkshopId = workshopId;
|
||||||
|
entity.SetEmployers(employerIds);
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetWorkshopGroup(InstitutionContractWorkshopGroup entityWorkshopGroup)
|
||||||
|
{
|
||||||
|
InstitutionContractWorkshopGroupId = entityWorkshopGroup.id;
|
||||||
|
WorkshopGroup = entityWorkshopGroup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopDetailEmployer : EntityBase
|
||||||
|
{
|
||||||
|
public long EmployerId { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContractWorkshopDetailEmployer(long employerId)
|
||||||
|
{
|
||||||
|
EmployerId = employerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private InstitutionContractWorkshopDetailEmployer() { }
|
||||||
|
}
|
||||||
23
Company.Domain/InstitutionContractAgg/WorkshopServices.cs
Normal file
23
Company.Domain/InstitutionContractAgg/WorkshopServices.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
public record WorkshopServices
|
||||||
|
{
|
||||||
|
public WorkshopServices(bool insurance, bool insuranceInPerson, bool contract, bool contractInPerson, bool rollCall, bool rollCallInPerson, bool customizeCheckout)
|
||||||
|
{
|
||||||
|
Insurance = insurance;
|
||||||
|
InsuranceInPerson = insuranceInPerson;
|
||||||
|
Contract = contract;
|
||||||
|
ContractInPerson = contractInPerson;
|
||||||
|
RollCall = rollCall;
|
||||||
|
CustomizeCheckout = customizeCheckout;
|
||||||
|
RollCallInPerson = rollCallInPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Insurance { get; private set; }
|
||||||
|
public bool InsuranceInPerson { get; private set; }
|
||||||
|
public bool Contract { get; private set; }
|
||||||
|
public bool ContractInPerson { get; private set; }
|
||||||
|
public bool RollCall { get; private set; }
|
||||||
|
|
||||||
|
public bool RollCallInPerson { get; private set; }
|
||||||
|
public bool CustomizeCheckout { get; private set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractAmendmentTempAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentTemp
|
||||||
|
{
|
||||||
|
public InstitutionContractAmendmentTemp(List<InstitutionContractAmendmentTempPrevWorkshop> prevWorkshops,
|
||||||
|
long institutionContractId)
|
||||||
|
{
|
||||||
|
Id = Guid.NewGuid();
|
||||||
|
PrevWorkshops = prevWorkshops;
|
||||||
|
NewWorkshops = prevWorkshops.Select(x=> new InstitutionContractAmendmentTempNewWorkshop(
|
||||||
|
x.WorkshopName, x.CountPerson, x.ContractAndCheckout, x.ContractAndCheckoutInPerson, x.Insurance,
|
||||||
|
x.InsuranceInPerson, x.RollCall, x.RollCallInPerson, x.CustomizeCheckout, x.Price, x.WorkshopId,
|
||||||
|
x.CurrentWorkshopId, 0)).ToList();
|
||||||
|
InstitutionContractId = institutionContractId;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BsonId]
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid Id { get; private set; }
|
||||||
|
public List<InstitutionContractAmendmentTempPrevWorkshop> PrevWorkshops { get; private set; }
|
||||||
|
public List<InstitutionContractAmendmentTempNewWorkshop> NewWorkshops { get; private set; }
|
||||||
|
public long InstitutionContractId { get; private set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentTempNewWorkshop : InstitutionContractAmendmentTempPrevWorkshop
|
||||||
|
{
|
||||||
|
public InstitutionContractAmendmentTempNewWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
|
||||||
|
bool contractAndCheckoutInPerson, bool insurance, bool insuranceInPerson, bool rollCall, bool rollCallInPerson,
|
||||||
|
bool customizeCheckout, double price, long workshopId, long currentWorkshopId,double priceDifference) : base(
|
||||||
|
workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance, insuranceInPerson,
|
||||||
|
rollCall, rollCallInPerson, customizeCheckout, price, workshopId, currentWorkshopId)
|
||||||
|
{
|
||||||
|
PriceDifference = priceDifference;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ اختلاف کارگاه جدید با کارگاه قبلی(مبلغ اصلی ارتقاء)
|
||||||
|
/// </summary>
|
||||||
|
public double PriceDifference { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public void Edit(string workshopName, int countPerson, bool contractAndCheckout,
|
||||||
|
bool contractAndCheckoutInPerson,
|
||||||
|
bool insurance, bool insuranceInPerson, bool rollCall, bool customizeCheckout,
|
||||||
|
double price,double priceDifference)
|
||||||
|
{
|
||||||
|
base.Edit(workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance,
|
||||||
|
insuranceInPerson, rollCall, customizeCheckout, price);
|
||||||
|
PriceDifference = priceDifference;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentTempPrevWorkshop
|
||||||
|
{
|
||||||
|
public InstitutionContractAmendmentTempPrevWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
|
||||||
|
bool contractAndCheckoutInPerson,
|
||||||
|
bool insurance, bool insuranceInPerson,
|
||||||
|
bool rollCall, bool rollCallInPerson, bool customizeCheckout, double price, long workshopId,
|
||||||
|
long currentWorkshopId)
|
||||||
|
{
|
||||||
|
Id = Guid.NewGuid();
|
||||||
|
WorkshopName = workshopName;
|
||||||
|
CountPerson = countPerson;
|
||||||
|
ContractAndCheckout = contractAndCheckout;
|
||||||
|
Insurance = insurance;
|
||||||
|
RollCall = rollCall;
|
||||||
|
CustomizeCheckout = customizeCheckout;
|
||||||
|
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
|
||||||
|
InsuranceInPerson = insuranceInPerson;
|
||||||
|
RollCallInPerson = rollCallInPerson;
|
||||||
|
Price = price;
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
CurrentWorkshopId = currentWorkshopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public long CurrentWorkshopId { get; private set; }
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public int CountPerson { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
#region ServiceSelection
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// قرارداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckout { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool Insurance { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حضورغباب
|
||||||
|
/// </summary>
|
||||||
|
public bool RollCall { get; private set; }
|
||||||
|
|
||||||
|
public bool RollCallInPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
public bool CustomizeCheckout { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری قرداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckoutInPerson { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool InsuranceInPerson { get; private set; }
|
||||||
|
|
||||||
|
public double Price { get; private set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public void Edit(string workshopName, int countPerson, bool contractAndCheckout, bool contractAndCheckoutInPerson,
|
||||||
|
bool insurance, bool insuranceInPerson, bool rollCall, bool customizeCheckout,
|
||||||
|
double price)
|
||||||
|
{
|
||||||
|
WorkshopName = workshopName;
|
||||||
|
CountPerson = countPerson;
|
||||||
|
ContractAndCheckout = contractAndCheckout;
|
||||||
|
Insurance = insurance;
|
||||||
|
RollCall = rollCall;
|
||||||
|
CustomizeCheckout = customizeCheckout;
|
||||||
|
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
|
||||||
|
InsuranceInPerson = insuranceInPerson;
|
||||||
|
Price = price;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractExtensionTempAgg;
|
||||||
|
|
||||||
|
public interface IInstitutionContractExtenstionTempRepository
|
||||||
|
{
|
||||||
|
Task Create(InstitutionContractExtensionTemp institutionContract);
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionTemp> GetPreviousExtenstionData(long contractingPartyId);
|
||||||
|
Task Remove(Guid id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
|
namespace Company.Domain.InstitutionContractExtensionTempAgg;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionTemp
|
||||||
|
{
|
||||||
|
public InstitutionContractExtensionTemp(long previousContractingPartyId)
|
||||||
|
{
|
||||||
|
Id = Guid.NewGuid();
|
||||||
|
PreviousId = previousContractingPartyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BsonId] // Specifies this field as the _id in MongoDB
|
||||||
|
[BsonRepresentation(BsonType.String)] // Ensures the GUID is stored as a string
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public long PreviousId { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string Province { get; set; }
|
||||||
|
public List<EditContactInfo> ContactInfos { get; set; }
|
||||||
|
|
||||||
|
public List<InstitutionContractExtensionTempWorkshop> Workshops { get; set; }
|
||||||
|
|
||||||
|
public InstitutionContractExtensionPlanDetail OneMonth { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail ThreeMonths { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail SixMonths { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail TwelveMonths { get; set; }
|
||||||
|
public InstitutionContractPaymentMonthlyViewModel MonthlyPayment { get; set; }
|
||||||
|
public InstitutionContractPaymentOneTimeViewModel OneTimePayment { get; set; }
|
||||||
|
|
||||||
|
public bool HasContractInPerson { get; set; }
|
||||||
|
|
||||||
|
public InstitutionContractDuration? Duration { get; set; }
|
||||||
|
|
||||||
|
public void SetContractingPartyInfos(string address, string city, string province, List<EditContactInfo> contactInfos)
|
||||||
|
{
|
||||||
|
Address = address;
|
||||||
|
City = city;
|
||||||
|
Province = province;
|
||||||
|
ContactInfos = contactInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetWorkshopsAndPlanAmounts(List<InstitutionContractExtensionTempWorkshop> workshops,
|
||||||
|
InstitutionContractExtensionPlanDetail oneMonth,
|
||||||
|
InstitutionContractExtensionPlanDetail threeMonth, InstitutionContractExtensionPlanDetail sixMonth,
|
||||||
|
InstitutionContractExtensionPlanDetail twelveMonth, bool hasContractInPerson)
|
||||||
|
{
|
||||||
|
Workshops = workshops;
|
||||||
|
OneMonth = oneMonth;
|
||||||
|
ThreeMonths = threeMonth;
|
||||||
|
SixMonths = sixMonth;
|
||||||
|
TwelveMonths = twelveMonth;
|
||||||
|
HasContractInPerson = hasContractInPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAmountAndDuration(InstitutionContractDuration duration,InstitutionContractPaymentMonthlyViewModel monthly,
|
||||||
|
InstitutionContractPaymentOneTimeViewModel oneTime)
|
||||||
|
{
|
||||||
|
Duration = duration;
|
||||||
|
MonthlyPayment = monthly;
|
||||||
|
OneTimePayment = oneTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractExtenstionTempPlan
|
||||||
|
{
|
||||||
|
public InstitutionContractExtenstionTempPlan(string contractStart, string contractEnd,
|
||||||
|
string oneMonthPaymentDiscounted, string oneMonthDiscount, string oneMonthOriginalPayment,
|
||||||
|
string totalPayment, string dailyCompensation, string obligation)
|
||||||
|
{
|
||||||
|
ContractStart = contractStart;
|
||||||
|
ContractEnd = contractEnd;
|
||||||
|
OneMonthPaymentDiscounted = oneMonthPaymentDiscounted;
|
||||||
|
OneMonthDiscount = oneMonthDiscount;
|
||||||
|
OneMonthOriginalPayment = oneMonthOriginalPayment;
|
||||||
|
TotalPayment = totalPayment;
|
||||||
|
DailyCompensation = dailyCompensation;
|
||||||
|
Obligation = obligation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
public string OneMonthPaymentDiscounted { get; set; }
|
||||||
|
public string OneMonthDiscount { get; set; }
|
||||||
|
public string OneMonthOriginalPayment { get; set; }
|
||||||
|
public string TotalPayment { get; set; }
|
||||||
|
public string DailyCompensation { get; set; }
|
||||||
|
public string Obligation { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionTempWorkshop
|
||||||
|
{
|
||||||
|
public InstitutionContractExtensionTempWorkshop(string workshopName, int countPerson, bool contractAndCheckout, bool contractAndCheckoutInPerson,
|
||||||
|
bool insurance, bool insuranceInPerson,
|
||||||
|
bool rollCall,bool rollCallInPerson, bool customizeCheckout,double price,long workshopId)
|
||||||
|
{
|
||||||
|
WorkshopName = workshopName;
|
||||||
|
CountPerson = countPerson;
|
||||||
|
ContractAndCheckout = contractAndCheckout;
|
||||||
|
Insurance = insurance;
|
||||||
|
RollCall = rollCall;
|
||||||
|
CustomizeCheckout = customizeCheckout;
|
||||||
|
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
|
||||||
|
InsuranceInPerson = insuranceInPerson;
|
||||||
|
RollCallInPerson = rollCallInPerson;
|
||||||
|
Price = price;
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public int CountPerson { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
#region ServiceSelection
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// قرارداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckout { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool Insurance { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حضورغباب
|
||||||
|
/// </summary>
|
||||||
|
public bool RollCall { get; private set; }
|
||||||
|
|
||||||
|
public bool RollCallInPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
public bool CustomizeCheckout { get;private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری قرداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckoutInPerson { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool InsuranceInPerson { get; private set; }
|
||||||
|
|
||||||
|
public double Price{ get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -25,5 +25,6 @@ public interface IInsuranceJobRepositpry:IRepository<long, InsuranceJob>
|
|||||||
OperationResult EditInsuranceJob(EditInsuranceJob command);
|
OperationResult EditInsuranceJob(EditInsuranceJob command);
|
||||||
|
|
||||||
|
|
||||||
|
Task<List<InsuranceJobSelectListViewModel>> GetSelectList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
Company.Domain/LawAgg/ILawRepository.cs
Normal file
15
Company.Domain/LawAgg/ILawRepository.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
116
Company.Domain/LawAgg/Law.cs
Normal file
116
Company.Domain/LawAgg/Law.cs
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
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; }
|
||||||
|
public int Version { 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, int version = 1)
|
||||||
|
{
|
||||||
|
Title = title;
|
||||||
|
IsActive = true; // آخرین نسخه فعال است
|
||||||
|
Items = new List<LawItem>();
|
||||||
|
Type = lawType;
|
||||||
|
Notifications = notifications ?? new List<string>();
|
||||||
|
HeadTitle = headTitle;
|
||||||
|
Version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 void SetAsLatestVersion()
|
||||||
|
{
|
||||||
|
IsActive = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAsOldVersion()
|
||||||
|
{
|
||||||
|
IsActive = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Law CreateNewVersion(string title, List<string> notifications, string headTitle, List<LawItem> items)
|
||||||
|
{
|
||||||
|
var newVersion = new Law(
|
||||||
|
title,
|
||||||
|
this.Type,
|
||||||
|
notifications,
|
||||||
|
headTitle,
|
||||||
|
this.Version + 1
|
||||||
|
);
|
||||||
|
|
||||||
|
newVersion.SetItem(items);
|
||||||
|
newVersion.SetAsLatestVersion();
|
||||||
|
|
||||||
|
return newVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ namespace Company.Domain.RollCallAgg
|
|||||||
DateTime endSearch);
|
DateTime endSearch);
|
||||||
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
|
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
|
||||||
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
||||||
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
|
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,WorkshopCurrentDayRollCallSearchModel searchModel);
|
||||||
List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(IEnumerable<long> employeeIds,
|
List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(IEnumerable<long> employeeIds,
|
||||||
long workshopId, DateTime start, DateTime end);
|
long workshopId, DateTime start, DateTime end);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ namespace Company.Domain.SmsResultAgg;
|
|||||||
|
|
||||||
public class SmsResult: EntityBase
|
public class SmsResult: EntityBase
|
||||||
{
|
{
|
||||||
public SmsResult(int messageId, string status,string typeOfSms, string contractingPartyName,string mobile, long contractingPatyId, long institutionContractId)
|
public SmsResult(int messageId, string status,string typeOfSms,
|
||||||
|
string contractingPartyName,string mobile, long contractingPatyId, long institutionContractId)
|
||||||
{
|
{
|
||||||
MessageId = messageId;
|
MessageId = messageId;
|
||||||
Status = status;
|
Status = status;
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ public class ContractingPartyTemp : EntityBase
|
|||||||
IdNumberSerial = idNumberSerial;
|
IdNumberSerial = idNumberSerial;
|
||||||
Gender = gender;
|
Gender = gender;
|
||||||
DateOfBirth = dateOfBirth;
|
DateOfBirth = dateOfBirth;
|
||||||
|
PublicId = Guid.NewGuid();
|
||||||
|
Status = ContractingPartyTempStatus.InComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -91,10 +93,34 @@ public class ContractingPartyTemp : EntityBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Address { get; private set; }
|
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)
|
public void UpdateAddress(string state, string city, string address)
|
||||||
{
|
{
|
||||||
this.State = state;
|
this.State = state;
|
||||||
this.City = city;
|
this.City = city;
|
||||||
this.Address = address;
|
this.Address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetCompleted()
|
||||||
|
{
|
||||||
|
Status = ContractingPartyTempStatus.Completed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetVerifyCode(string verifyCode)
|
||||||
|
{
|
||||||
|
VerifyCode = verifyCode;
|
||||||
|
VerifyCodeSentDateTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ContractingPartyTempStatus
|
||||||
|
{
|
||||||
|
InComplete,
|
||||||
|
Completed
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||||
|
|
||||||
|
public interface IInstitutionContractContactInfoTempRepository : IRepository<long, InstitutionContractContactInfoTemp>
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using _0_Framework_b.Domain;
|
using _0_Framework_b.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||||
@@ -17,10 +18,5 @@ public interface IInstitutionContractTempRepository : IRepository<long, Institut
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<InstitutionContractTempViewModel> GetInstitutionContractTemp(long id,long contractingPartyTempId);
|
Task<InstitutionContractTempViewModel> GetInstitutionContractTemp(long id,long contractingPartyTempId);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
|
||||||
/// جهت نمایش در کارپوشه
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<List<RegistrationWorkflowMainList>> GetAllCompletedRegistration();
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
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,13 +1,15 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using _0_Framework.Application.UID;
|
using _0_Framework.Application.UID;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||||
|
|
||||||
public class InstitutionContractTemp : EntityBase
|
public class InstitutionContractTemp : EntityBase
|
||||||
{
|
{
|
||||||
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)
|
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)
|
||||||
{
|
{
|
||||||
ContractingPartyTempId = contractingPartyTempId;
|
ContractingPartyTempId = contractingPartyTempId;
|
||||||
PaymentModel = paymentModel;
|
PaymentModel = paymentModel;
|
||||||
@@ -22,6 +24,7 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
MessageId = messageId;
|
MessageId = messageId;
|
||||||
SendVerifyCodeTime = sendVerifyCodeTime;
|
SendVerifyCodeTime = sendVerifyCodeTime;
|
||||||
VerifyCodeEndTime = verifyCodeEndTime;
|
VerifyCodeEndTime = verifyCodeEndTime;
|
||||||
|
PublicId = Guid.NewGuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -87,7 +90,7 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
/// -
|
/// -
|
||||||
/// Completed ثبت نام تکمیل شده
|
/// Completed ثبت نام تکمیل شده
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RegistrationStatus { get; private set; }
|
public InstitutionContractTempStatus RegistrationStatus { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آی دی پیامک ارسال شده
|
/// آی دی پیامک ارسال شده
|
||||||
@@ -104,8 +107,16 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? VerifyCodeEndTime{ get; private set; }
|
public DateTime? VerifyCodeEndTime{ get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیدی عمومی
|
||||||
|
/// برای نمایش در آدرس
|
||||||
|
/// </summary>
|
||||||
|
public Guid PublicId { get; set; }
|
||||||
|
|
||||||
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)
|
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)
|
||||||
{
|
{
|
||||||
ContractingPartyTempId = contractingPartyTempId;
|
ContractingPartyTempId = contractingPartyTempId;
|
||||||
PaymentModel = paymentModel;
|
PaymentModel = paymentModel;
|
||||||
@@ -122,7 +133,7 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
VerifyCodeEndTime = verifyCodeEndTime;
|
VerifyCodeEndTime = verifyCodeEndTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update(string verifyCode, string registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
public void Update(string verifyCode, InstitutionContractTempStatus registrationStatus, int messageId, DateTime? sendVerifyCodeTime, DateTime? verifyCodeEndTime)
|
||||||
{
|
{
|
||||||
VerifyCode = verifyCode;
|
VerifyCode = verifyCode;
|
||||||
RegistrationStatus = registrationStatus;
|
RegistrationStatus = registrationStatus;
|
||||||
@@ -131,9 +142,10 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
VerifyCodeEndTime = verifyCodeEndTime;
|
VerifyCodeEndTime = verifyCodeEndTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeRegistrationStatus(string registrationStatus)
|
public void ChangeRegistrationStatus(InstitutionContractTempStatus registrationStatus)
|
||||||
{
|
{
|
||||||
RegistrationStatus = registrationStatus;
|
RegistrationStatus = registrationStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public interface IWorkshopRepository : IRepository<long, Workshop>
|
|||||||
Task<List<WorkshopWithLeftWorkTempEmployeesDto>> GetWorkshopsForLeftWorkTemp(long accountId);
|
Task<List<WorkshopWithLeftWorkTempEmployeesDto>> GetWorkshopsForLeftWorkTemp(long accountId);
|
||||||
Task<int> GetWorkshopsForLeftWorkTempCount(long accountId);
|
Task<int> GetWorkshopsForLeftWorkTempCount(long accountId);
|
||||||
Task<List<WorkshopSelectListViewModel>> GetSelectList(string search, long id);
|
Task<List<WorkshopSelectListViewModel>> GetSelectList(string search, long id);
|
||||||
|
int GetLastArchiveCode();
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -76,14 +76,13 @@ public class Workshop : EntityBase
|
|||||||
|
|
||||||
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Workshop(string workshopName,string workshopSureName, string insuranceCode, string typeOfOwnership, string archiveCode, string agentName, string agentPhone,
|
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 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,
|
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 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)
|
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout,
|
||||||
|
IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout,long contractingPartyId)
|
||||||
{
|
{
|
||||||
WorkshopName = workshopName;
|
WorkshopName = workshopName;
|
||||||
WorkshopSureName = workshopSureName;
|
WorkshopSureName = workshopSureName;
|
||||||
@@ -134,6 +133,7 @@ public class Workshop : EntityBase
|
|||||||
CutContractEndOfYear = cutContractEndOfYear;
|
CutContractEndOfYear = cutContractEndOfYear;
|
||||||
RotatingShiftCompute = rotatingShiftCompute;
|
RotatingShiftCompute = rotatingShiftCompute;
|
||||||
IsStaticCheckout = isStaticCheckout;
|
IsStaticCheckout = isStaticCheckout;
|
||||||
|
ContractingPartyId = contractingPartyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -233,6 +233,8 @@ public class Workshop : EntityBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsStaticCheckout { get; private set; }
|
public bool IsStaticCheckout { get; private set; }
|
||||||
|
|
||||||
|
public long ContractingPartyId { get; private set; }
|
||||||
|
|
||||||
public Workshop()
|
public Workshop()
|
||||||
{
|
{
|
||||||
RollCallServicesList = new List<RollCallService>();
|
RollCallServicesList = new List<RollCallService>();
|
||||||
@@ -344,4 +346,10 @@ public class Workshop : EntityBase
|
|||||||
this.IsActiveString = "false";
|
this.IsActiveString = "false";
|
||||||
ArchiveCode = "b-" + archiveCode;
|
ArchiveCode = "b-" + archiveCode;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum WorkshopRegistrationStatus
|
||||||
|
{
|
||||||
|
NotRegistered = 0,
|
||||||
|
Registered = 1
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Security.AccessControl;
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using Company.Domain.ContarctingPartyAgg;
|
using Company.Domain.ContarctingPartyAgg;
|
||||||
using Company.Domain.ContractAgg;
|
using Company.Domain.ContractAgg;
|
||||||
@@ -66,6 +68,11 @@ public class Employer : EntityBase
|
|||||||
public string SanaPassword { get; private set; }
|
public string SanaPassword { get; private set; }
|
||||||
|
|
||||||
public string EmployerNo { get; set; }
|
public string EmployerNo { get; set; }
|
||||||
|
public bool IsAuth { get; set; }
|
||||||
|
public string IdNumberSerial { get; set; }
|
||||||
|
|
||||||
|
public string IdNumberSeri { get; set; }
|
||||||
|
|
||||||
public PersonalContractingParty ContractingParty { get; set; }
|
public PersonalContractingParty ContractingParty { get; set; }
|
||||||
|
|
||||||
//public List<Workshop> Workshops { get; private set; }
|
//public List<Workshop> Workshops { get; private set; }
|
||||||
@@ -227,4 +234,35 @@ public class Employer : EntityBase
|
|||||||
this.IsActive = false;
|
this.IsActive = false;
|
||||||
this.Address = "false";
|
this.Address = "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Authentication(string fName, string lName, string fatherName,string idNumber,
|
||||||
|
string idNumberSeri, string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
||||||
|
{
|
||||||
|
this.FName = fName;
|
||||||
|
this.LName = lName;
|
||||||
|
this.FatherName = fatherName;
|
||||||
|
this.IdNumberSeri = idNumberSeri;
|
||||||
|
this.IdNumberSerial = idNumberSerial;
|
||||||
|
this.DateOfBirth = !string.IsNullOrWhiteSpace(dateOfBirth) ? dateOfBirth.ToGeorgianDateTime() : new();
|
||||||
|
this.IdNumber = idNumber;
|
||||||
|
this.Gender = gender == _0_Framework.Application.Gender.Male? "مرد" : "زن";
|
||||||
|
this.IsAuth = true;
|
||||||
|
Phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void LegalAuthentication(string fName, string lName, string fatherName,string idNumber, string idNumberSeri,
|
||||||
|
string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
||||||
|
{
|
||||||
|
FName = fName;
|
||||||
|
EmployerLName = lName;
|
||||||
|
this.FatherName = fatherName;
|
||||||
|
this.IdNumberSeri = idNumberSeri;
|
||||||
|
this.IdNumberSerial = idNumberSerial;
|
||||||
|
this.DateOfBirth = !string.IsNullOrWhiteSpace(dateOfBirth) ? dateOfBirth.ToGeorgianDateTime() : new();
|
||||||
|
this.IdNumber = idNumber;
|
||||||
|
this.Gender =gender == _0_Framework.Application.Gender.Male? "مرد" : "زن";
|
||||||
|
this.IsAuth = true;
|
||||||
|
Phone = phone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Application.Enums;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.Checkout;
|
using CompanyManagment.App.Contracts.Checkout;
|
||||||
using CompanyManagment.App.Contracts.Employer;
|
using CompanyManagment.App.Contracts.Employer;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace Company.Domain.empolyerAgg;
|
namespace Company.Domain.empolyerAgg;
|
||||||
|
|
||||||
@@ -34,7 +36,7 @@ public interface IEmployerRepository : IRepository<long, Employer>
|
|||||||
|
|
||||||
List<EmployerViewModel> GetEmployersHasWorkshop();
|
List<EmployerViewModel> GetEmployersHasWorkshop();
|
||||||
|
|
||||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search,long id);
|
Task<List<EmployerSelectListViewModel>> GetSelectList(string search, long id, LegalType? legalType);
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -68,5 +70,5 @@ public interface IEmployerRepository : IRepository<long, Employer>
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
Task<ActionResult<EditEmployerWorkflowRegistration>> GetWorkflowRegistrationForEdit(long employerId, long institutionWorkshopDetailsId);
|
||||||
}
|
}
|
||||||
@@ -12,9 +12,7 @@ public class CaseHistoryRollCallExcelForEmployeeViewModel
|
|||||||
public string EmployeeFullName { get; set; }
|
public string EmployeeFullName { get; set; }
|
||||||
public string TotalWorkingHoursFa { get; set; }
|
public string TotalWorkingHoursFa { get; set; }
|
||||||
public string TotalWorkingTimeSpan { get; set; }
|
public string TotalWorkingTimeSpan { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<RollCallItemForEmployeeExcelViewModel> RollCalls { get; set; }
|
public List<RollCallItemForEmployeeExcelViewModel> RollCalls { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +38,8 @@ public class RollCallItemForEmployeeExcelViewModel
|
|||||||
public bool HasLeave { get; set; }
|
public bool HasLeave { get; set; }
|
||||||
|
|
||||||
public string TotalWorkingHours { get; set; }
|
public string TotalWorkingHours { get; set; }
|
||||||
|
public string EnterTimeDifferences { get; set; }
|
||||||
|
public string ExitTimeDifferences { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RollCallTimeExcelViewModel
|
public class RollCallTimeExcelViewModel
|
||||||
|
|||||||
@@ -113,11 +113,12 @@ public class RollCallExcelGenerator : ExcelGenerator
|
|||||||
worksheet.Cells[i + row + 1, 1].Value = i + 1;
|
worksheet.Cells[i + row + 1, 1].Value = i + 1;
|
||||||
worksheet.Cells[i + row + 1, 2].Value = rollCall.DayOfWeekFa;
|
worksheet.Cells[i + row + 1, 2].Value = rollCall.DayOfWeekFa;
|
||||||
worksheet.Cells[i + row + 1, 3].Value = rollCall.DateFa;
|
worksheet.Cells[i + row + 1, 3].Value = rollCall.DateFa;
|
||||||
worksheet.Cells[i + row + 1, 4].Value = "-";
|
worksheet.Cells[i + row + 1, 4].Value = rollCall.EnterTimeDifferences;
|
||||||
worksheet.Cells[i + row + 1, 5].Value = rollCall.StartsItems;
|
worksheet.Cells[i + row + 1, 5].Value = rollCall.StartsItems;
|
||||||
worksheet.Cells[i + row + 1, 6].Value = rollCall.EndsItems;
|
worksheet.Cells[i + row + 1, 6].Value = rollCall.EndsItems;
|
||||||
worksheet.Cells[i + row + 1, 7].Value = "-";
|
worksheet.Cells[i + row + 1, 7].Value = rollCall.ExitTimeDifferences;
|
||||||
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty ? "ندارد" : rollCall.TotalWorkingHours;
|
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty
|
||||||
|
? "ندارد" : rollCall.TotalWorkingHours;
|
||||||
|
|
||||||
// Style data cells
|
// Style data cells
|
||||||
for (int j = 1; j <= 8; j++)
|
for (int j = 1; j <= 8; j++)
|
||||||
@@ -307,6 +308,49 @@ public class RollCallExcelGenerator : ExcelGenerator
|
|||||||
return package.GetAsByteArray();
|
return package.GetAsByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string CalculateExitMinuteDifference(TimeSpan early, TimeSpan late)
|
||||||
|
{
|
||||||
|
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
else if (late != TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
|
||||||
|
return $"{minutes}+";
|
||||||
|
}
|
||||||
|
else if (early != TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
|
||||||
|
return $"{minutes}-";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string CalculateEntryMinuteDifference(TimeSpan early, TimeSpan late)
|
||||||
|
{
|
||||||
|
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
else if (late != TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
|
||||||
|
return $"{minutes}-";
|
||||||
|
}
|
||||||
|
else if (early != TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
|
||||||
|
return $"{minutes}+";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Company.Domain\Company.Domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MongoDB.Driver" Version="3.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Company.Domain.InstitutionContractExtensionTempAgg;
|
||||||
|
using MongoDB.Driver;
|
||||||
|
|
||||||
|
namespace CompanyManagement.Infrastructure.Mongo.InstitutionContractInsertTempRepo;
|
||||||
|
|
||||||
|
public class InstitutionContractExtenstionTempRepository:IInstitutionContractExtenstionTempRepository
|
||||||
|
{
|
||||||
|
private readonly IMongoCollection<InstitutionContractExtensionTemp> _institutionExtenstionTemp;
|
||||||
|
|
||||||
|
public InstitutionContractExtenstionTempRepository(IMongoDatabase database)
|
||||||
|
{
|
||||||
|
_institutionExtenstionTemp = database.GetCollection<InstitutionContractExtensionTemp>("InstitutionContractExtenstionTemp");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Create(InstitutionContractExtensionTemp institutionContract)
|
||||||
|
{
|
||||||
|
await _institutionExtenstionTemp.InsertOneAsync(institutionContract);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<InstitutionContractExtensionTemp> GetPreviousExtenstionData(long contractingPartyId)
|
||||||
|
{
|
||||||
|
var entity = await _institutionExtenstionTemp
|
||||||
|
.Find(x => x.PreviousId == contractingPartyId)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Remove(Guid id)
|
||||||
|
{
|
||||||
|
await _institutionExtenstionTemp.DeleteOneAsync(x=>x.Id == id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
namespace Company.Application.Contracts.AuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public class AuthorizedBankDetailsSearchModel
|
||||||
|
{
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
public string IBan { get; set; }
|
||||||
|
public string BankName { get; set; }
|
||||||
|
public string NationalIdentifier { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace Company.Application.Contracts.AuthorizedBankDetails;
|
||||||
|
|
||||||
|
public class AuthorizedBankDetailsViewModel
|
||||||
|
{
|
||||||
|
public string NationalIdentifier { get; set; }
|
||||||
|
|
||||||
|
public long Id { get; set; }
|
||||||
|
public string CustomerType { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
public string IBan { get; set; }
|
||||||
|
public string BankName { get; set; }
|
||||||
|
public List<AuthorizedBankDetailsOwnerViewModel> Owners { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Company.Application.Contracts.AuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public class CreateAuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
|
||||||
|
public string IBan { get; set; }
|
||||||
|
|
||||||
|
public string BankName { get; set; }
|
||||||
|
|
||||||
|
public List<CreateAuthorizedBankDetailsOwner> OwnersList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CreateAuthorizedBankDetailsOwner
|
||||||
|
{
|
||||||
|
public string FName { get; set; }
|
||||||
|
|
||||||
|
public string LName { get; set; }
|
||||||
|
|
||||||
|
public string NationalIdentifier { get; set; }
|
||||||
|
|
||||||
|
public string CustomerType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Company.Application.Contracts.AuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public class EditAuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
|
||||||
|
public string IBan { get; set; }
|
||||||
|
|
||||||
|
public string BankName { get; set; }
|
||||||
|
|
||||||
|
public List<AuthorizedBankDetailsOwnerViewModel> OwnersList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AuthorizedBankDetailsOwnerViewModel
|
||||||
|
{
|
||||||
|
public string FName { get; set; }
|
||||||
|
public string LName { get; set; }
|
||||||
|
public string NationalIdentifier { get; set; }
|
||||||
|
public string CustomerType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
using Company.Application.Contracts.AuthorizedBankDetails;
|
||||||
|
|
||||||
|
namespace Company.Application.Contracts.AuthorizedBankDetails
|
||||||
|
{
|
||||||
|
public interface IAuthorizedBankDetailsApplication
|
||||||
|
{
|
||||||
|
OperationResult Create(CreateAuthorizedBankDetails command);
|
||||||
|
EditAuthorizedBankDetails GetDetails(long id);
|
||||||
|
List<AuthorizedBankDetailsViewModel> Search(AuthorizedBankDetailsSearchModel searchModel);
|
||||||
|
AuthorizedBankDetailsViewModel GetByIban(string iban);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
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; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
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; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Transactions;
|
using System.Transactions;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Application.UID;
|
||||||
using CompanyManagment.App.Contracts.OriginalTitle;
|
using CompanyManagment.App.Contracts.OriginalTitle;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||||
@@ -74,5 +76,27 @@ public interface IContractingPartyBankAccountsApplication
|
|||||||
/// <param name="selected">نام سلکت شده</param>
|
/// <param name="selected">نام سلکت شده</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<string>> ContractingPartyNamesSelectList(string search, string selected);
|
Task<List<string>> ContractingPartyNamesSelectList(string search, string selected);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// احراز هویت اطلاعات بانکی طرف حساب
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ContractingPartyBankInquiryResponse> InquiryContractingPartyBankDetails(InquiryContractingPartyBankDetailsRequest command);
|
||||||
|
|
||||||
|
}
|
||||||
|
public class InquiryContractingPartyBankDetailsRequest
|
||||||
|
{
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
public string IBan { get; set; }
|
||||||
|
public UidBanks? UidBank { get; set; }
|
||||||
|
}
|
||||||
|
public class ContractingPartyBankInquiryResponse
|
||||||
|
{
|
||||||
|
public string FullName { get; set; }
|
||||||
|
public string Iban { get; set; }
|
||||||
|
public string AccountNumber { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public interface IEmployeeApplication
|
|||||||
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
|
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
|
||||||
|
|
||||||
Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode, string birthDate);
|
Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode, string birthDate);
|
||||||
|
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Transactions;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Application.Enums;
|
||||||
using CompanyManagment.App.Contracts.Checkout;
|
using CompanyManagment.App.Contracts.Checkout;
|
||||||
using CompanyManagment.App.Contracts.Employee;
|
using CompanyManagment.App.Contracts.Employee;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.Employer;
|
namespace CompanyManagment.App.Contracts.Employer;
|
||||||
@@ -43,8 +47,9 @@ public interface IEmployerApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="search"></param>
|
/// <param name="search"></param>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
|
/// <param name="legalType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search, long id);
|
Task<List<EmployerSelectListViewModel>> GetSelectList(string search, long id, LegalType? legalType = null);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region NewByHeydari
|
#region NewByHeydari
|
||||||
@@ -125,4 +130,293 @@ public interface IEmployerApplication
|
|||||||
|
|
||||||
#endregion
|
#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);
|
||||||
|
Task<ActionResult<EditEmployerWorkflowRegistration>> GetWorkflowRegistrationForEdit(long employerId, long institutionWorkshopDetailsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 long EmployerId { get; set; }
|
||||||
|
/// <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 InstitutionWorkshopInitialId { 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; }
|
||||||
|
|
||||||
|
public string IdNumberSeri { get; set; }
|
||||||
|
public string IdNumberSerial { 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; }
|
||||||
|
|
||||||
|
public string IdNumberSeri { get; set; }
|
||||||
|
public string IdNumberSerial { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کلاس ویرایش کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public class EditEmployerWorkflowRegistration : CreateEmployerWorkflowRegistration
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// شناسه کارفرما
|
||||||
|
/// </summary>
|
||||||
|
public long EmployerId { get; set; }
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace CompanyManagment.App.Contracts.InstitutionContract;
|
|||||||
|
|
||||||
public class CreateInstitutionContract
|
public class CreateInstitutionContract
|
||||||
{
|
{
|
||||||
|
public long LawId { get; set; }
|
||||||
public string ContractNo { get; set; }
|
public string ContractNo { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "انتخاب معرف اجباری است")]
|
[Required(ErrorMessage = "انتخاب معرف اجباری است")]
|
||||||
|
|||||||
@@ -1,29 +1,319 @@
|
|||||||
using System.Collections.Generic;
|
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.InstitutionContractContactinfo;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// درخواست ایجاد قرارداد نهاد
|
||||||
|
/// </summary>
|
||||||
public class CreateInstitutionContractRequest
|
public class CreateInstitutionContractRequest
|
||||||
{
|
{
|
||||||
public List<CreateContactInfo> ContactInfos { get; set; }
|
/// <summary>
|
||||||
public long ContractingPartyId { get; set; }
|
/// نوع حقوقی طرف قرارداد (حقیقی یا حقوقی)
|
||||||
|
/// </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; }
|
public long RepresentativeId { get; set; }
|
||||||
public string TypeOfContract { get; set; }
|
|
||||||
public string ContractDateFa { get; set; }
|
/// <summary>
|
||||||
public string ContractStartFa { get; set; }
|
/// مدت زمان قرارداد
|
||||||
public string ContractEndFa { get; set; }
|
/// </summary>
|
||||||
public string Address { get; set; }
|
public InstitutionContractDuration Duration { get; set; }
|
||||||
public string State { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// استان
|
||||||
|
/// </summary>
|
||||||
|
public string Province { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شهر
|
||||||
|
/// </summary>
|
||||||
public string City { get; set; }
|
public string City { get; set; }
|
||||||
public string OfficialCompany { get; set; }
|
|
||||||
public string HasValueAddedTax { get; set; }
|
/// <summary>
|
||||||
public string ContractAmountString { get; set; }
|
/// آدرس
|
||||||
public string DailyCompenseationString { get; set; }
|
/// </summary>
|
||||||
public string ObligationString { get; set; }
|
public string Address { get; set; }
|
||||||
public string TotalAmountString { get; set; }
|
|
||||||
public string ValueAddedTaxStr { get; set; }
|
/// <summary>
|
||||||
public string WorkshopManualCount { get; set; }
|
/// اطلاعات تماس
|
||||||
public string EmployeeManualCount { get; set; }
|
/// </summary>
|
||||||
|
public List<CreateContactInfo> ContactInfos { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست کارگاههای مورد نظر برای قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public List<CreateInstitutionContractWorkshopDetail> Workshops { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع قرارداد (فارسی)
|
||||||
|
/// </summary>
|
||||||
|
public string ContractStartFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ خسارت روزانه
|
||||||
|
/// </summary>
|
||||||
|
public double DailyCompensation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وجه التزام
|
||||||
|
/// </summary>
|
||||||
|
public double Obligation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// توضیحات
|
||||||
|
/// </summary>
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public int ExtensionNo { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ کل قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public double TotalAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا قرارداد اقساطی است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool IsInstallment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مالیات ارزش افزوده
|
||||||
|
/// </summary>
|
||||||
|
public double TaxAmount { get; set; }
|
||||||
|
|
||||||
|
public double OneMonthAmount { get; set; }
|
||||||
|
|
||||||
|
public long LawId { 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; }
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,5 @@ namespace CompanyManagment.App.Contracts.InstitutionContract;
|
|||||||
public class EditInstitutionContractRequest:CreateInstitutionContractRequest
|
public class EditInstitutionContractRequest:CreateInstitutionContractRequest
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
public long ContractingPartyId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// درخواست تمدید قرارداد مؤسسه
|
||||||
|
/// شامل اطلاعات قرارداد قبلی برای فرآیند تمدید
|
||||||
|
/// </summary>
|
||||||
|
public class ExtenstionInstitutionContractRequest : EditInstitutionContractRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// شناسه قرارداد قبلی که قرار است تمدید شود
|
||||||
|
/// </summary>
|
||||||
|
public long PreviousContractId { get; set; }
|
||||||
|
}
|
||||||
@@ -77,10 +77,49 @@ public class GetInstitutionContractListItemsViewModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// وضعیت قرارداد
|
/// وضعیت قرارداد
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public InstitutionContractStatus Status { get; set; }
|
public InstitutionContractListStatus ListStatus { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آیا منقضی شده است
|
/// آیا منقضی شده است
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsExpired { get; set; }
|
public bool IsExpired { get; set; }
|
||||||
|
|
||||||
|
public long ContractingPartyId { get; set; }
|
||||||
|
|
||||||
|
public List<InstitutionContractListWorkshop> Workshops { get; set; }
|
||||||
|
|
||||||
|
public bool IsInPersonContract { get; set; }
|
||||||
|
|
||||||
|
public bool IsOldContract { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractListWorkshop
|
||||||
|
{
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
public int EmployeeCount { get; set; }
|
||||||
|
public WorkshopServicesViewModel WorkshopServices { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class WorkshopServicesViewModel
|
||||||
|
{
|
||||||
|
public bool Insurance { get; set; }
|
||||||
|
public string InsuranceLabel => "ارسال لیست بیمه";
|
||||||
|
|
||||||
|
public bool InsuranceInPerson { get; set; }
|
||||||
|
public string InsuranceInPersonLabel => "خدمات مستقیم";
|
||||||
|
|
||||||
|
public bool Contract { get; set; }
|
||||||
|
public string ContractLabel => "قرارداد و تصفیه حساب";
|
||||||
|
|
||||||
|
public bool ContractInPerson { get; set; }
|
||||||
|
public string ContractInPersonLabel => "خدمات مستقیم";
|
||||||
|
|
||||||
|
public bool RollCall { get; set; }
|
||||||
|
public string RollCallLabel => "ساعت حضور و غیاب";
|
||||||
|
|
||||||
|
public bool RollCallInPerson { get; set; }
|
||||||
|
public string RollCallInPersonLabel => "خدمات مستقیم";
|
||||||
|
|
||||||
|
public bool CustomizeCheckout { get; set; }
|
||||||
|
public string CustomizeCheckoutLabel => "فیش غیر رسمی";
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class GetInstitutionContractListStatsViewModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// مجموع بدهی قراردادهای مؤسسه
|
||||||
|
/// این ویژگی بدهیهای قراردادهای مربوطه را تجمیع میکند و
|
||||||
|
/// یک معیار واحد برای اندازهگیری تعهدات مالی ارائه میدهد
|
||||||
|
/// </summary>
|
||||||
|
public double TotalDebt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مجموع ارزش پولی مرتبط با قراردادهای مؤسسه
|
||||||
|
/// این ویژگی مبلغ کل قراردادهای مربوطه را برای
|
||||||
|
/// گزارشگیری و تجزیه و تحلیل مالی تجمیع میکند
|
||||||
|
/// </summary>
|
||||||
|
public double TotalAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مجموعهای از تعداد قراردادهای مؤسسه دستهبندی شده بر اساس وضعیت
|
||||||
|
/// این ویژگی تعداد قراردادها را برای هر وضعیت تعریف شده در
|
||||||
|
/// شمارش InstitutionContractStatus ارائه میدهد که امکان تجزیه و تحلیل و نظارت بر توزیع قراردادها را فراهم میکند
|
||||||
|
/// </summary>
|
||||||
|
public List<InstitutionContractStatusCount> Counts { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class GetInstitutionVerificationDetailsViewModel
|
||||||
|
{
|
||||||
|
public InstitutionContratVerificationParty FirstParty { get; set; }
|
||||||
|
public InstitutionContratVerificationParty SecondParty { get; set; }
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
public string CreationDate { get; set; }
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
public List<GetInstitutionVerificationDetailsWorkshopsViewModel> Workshops { get; set; }
|
||||||
|
public string TotalPrice { get; set; }
|
||||||
|
public string TaxPrice { get; set; }
|
||||||
|
public string PaymentPrice { get; set; }
|
||||||
|
public List<InstitutionContractInstallmentViewModel> Installments { get; set; }
|
||||||
|
public bool IsInstallment { get; set; }
|
||||||
|
}
|
||||||
|
public class InstitutionContratVerificationParty
|
||||||
|
{
|
||||||
|
public string CompanyNameOrFullName { get; set; }
|
||||||
|
public string NationalCodeOrNationalId { get; set; }
|
||||||
|
public string CeoName { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string PostalCode { get; set; }
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
public LegalType LegalType { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class GetInstitutionVerificationDetailsWorkshopsViewModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public int PersonnelCount { get; set; }
|
||||||
|
public WorkshopServicesViewModel Services { get; set; }
|
||||||
|
public string Price { get; set; }
|
||||||
|
}
|
||||||
@@ -1,62 +1,165 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Application.Sms;
|
||||||
using CompanyManagment.App.Contracts.Checkout;
|
using CompanyManagment.App.Contracts.Checkout;
|
||||||
|
using CompanyManagment.App.Contracts.Law;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
using CompanyManagment.App.Contracts.Workshop;
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
|
using CompanyManagment.App.Contracts.WorkshopPlan;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// رابط اپلیکیشن قراردادهای مؤسسه
|
||||||
|
/// مدیریت عملیات مربوط به قراردادهای مالی مؤسسات
|
||||||
|
/// </summary>
|
||||||
public interface IInstitutionContractApplication
|
public interface IInstitutionContractApplication
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد قرارداد جدید
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command">اطلاعات قرارداد جدید</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult Create(CreateInstitutionContract command);
|
OperationResult Create(CreateInstitutionContract command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تمدید قرارداد موجود
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command">اطلاعات قرارداد برای تمدید</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult Extension(CreateInstitutionContract command);
|
OperationResult Extension(CreateInstitutionContract command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش قرارداد موجود
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command">اطلاعات جدید قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult Edit(EditInstitutionContract command);
|
OperationResult Edit(EditInstitutionContract command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت جزئیات قرارداد برای ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>اطلاعات قرارداد</returns>
|
||||||
EditInstitutionContract GetDetails(long id);
|
EditInstitutionContract GetDetails(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جستجو در قراردادها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchModel">مدل جستجو</param>
|
||||||
|
/// <returns>لیست قراردادها</returns>
|
||||||
List<InstitutionContractViewModel> Search(InstitutionContractSearchModel searchModel);
|
List<InstitutionContractViewModel> Search(InstitutionContractSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جستجوی جدید در قراردادها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchModel">مدل جستجو</param>
|
||||||
|
/// <returns>لیست قراردادها</returns>
|
||||||
List<InstitutionContractViewModel> NewSearch(InstitutionContractSearchModel searchModel);
|
List<InstitutionContractViewModel> NewSearch(InstitutionContractSearchModel searchModel);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// دریافت اطلاعات قزداد های مالی فعال
|
/// دریافت اطلاعات قرارداد های مالی فعال
|
||||||
///دارای کارگاه
|
///دارای کارگاه
|
||||||
/// جهت ست کردن سرویس ها از طریق اکسل
|
/// جهت ست کردن سرویس ها از طریق اکسل
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<InstitutionContractViewModel> GetInstitutionContractToSetServicesExcelImport();
|
List<InstitutionContractViewModel> GetInstitutionContractToSetServicesExcelImport();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چاپ مجموعه قراردادها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">لیست شناسه قراردادها</param>
|
||||||
|
/// <returns>لیست قراردادها برای چاپ</returns>
|
||||||
List<InstitutionContractViewModel> PrintAll(List<long> id);
|
List<InstitutionContractViewModel> PrintAll(List<long> id);
|
||||||
|
|
||||||
|
|
||||||
|
[Obsolete("استفاده نشود، از متد غیرهمزمان استفاده شود")]
|
||||||
|
/// <summary>
|
||||||
|
/// چاپ یک قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>اطلاعات قرارداد برای چاپ</returns>
|
||||||
InstitutionContractViewModel PrintOne(long id);
|
InstitutionContractViewModel PrintOne(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فعال کردن قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult Active(long id);
|
OperationResult Active(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیرفعال کردن قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult DeActive(long id);
|
OperationResult DeActive(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیرفعال کردن قرارداد (حالت آبی)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult DeActiveBlue(long id);
|
OperationResult DeActiveBlue(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیرفعال کردن تمام اتصالات قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult DeActiveAllConnections(long id);
|
OperationResult DeActiveAllConnections(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فعال کردن مجدد تمام اتصالات قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult ReActiveAllConnections(long id);
|
OperationResult ReActiveAllConnections(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فعال کردن مجدد تمام قراردادها بعد از ایجاد قرارداد جدید
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="contractingPartyId">شناسه طرف قرارداد</param>
|
||||||
void ReActiveAllAfterCreateNew(long contractingPartyId);
|
void ReActiveAllAfterCreateNew(long contractingPartyId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
void RemoveContract(long id);
|
void RemoveContract(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امضای قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult Sign(long id);
|
OperationResult Sign(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لغو امضای قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">شناسه قرارداد</param>
|
||||||
|
/// <returns>نتیجه عملیات</returns>
|
||||||
OperationResult UnSign(long id);
|
OperationResult UnSign(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد حساب کاربری برای طرف قرارداد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="contractingPartyid">شناسه طرف قرارداد</param>
|
||||||
|
/// <param name="accountId">شناسه حساب کاربری</param>
|
||||||
void CreateContractingPartyAccount(long contractingPartyid, long accountId);
|
void CreateContractingPartyAccount(long contractingPartyid, long accountId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// محاسبه مبلغ قرارداد بر اساس تعداد افراد
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="countPerson">تعداد افراد</param>
|
||||||
|
/// <returns>مبلغ قرارداد</returns>
|
||||||
double GetcontractAmount(int countPerson);
|
double GetcontractAmount(int countPerson);
|
||||||
|
|
||||||
#region Api
|
#region Api
|
||||||
@@ -82,52 +185,149 @@ public interface IInstitutionContractApplication
|
|||||||
/// <param name="command"></param>
|
/// <param name="command"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<OperationResult> CreateAsync(CreateInstitutionContractRequest command);
|
Task<OperationResult> CreateAsync(CreateInstitutionContractRequest command);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ویرایش
|
/// ویرایش
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<OperationResult> EditAsync(EditInstitutionContractRequest command);
|
Task<OperationResult> EditAsync(EditInstitutionContractRequest command);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// تمدید قرارداد
|
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
||||||
|
/// جهت نمایش در کارپوشه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<OperationResult> ExtensionَAsync(CreateInstitutionContractRequest command);
|
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت آیتم های کارپوشه ثبت نام
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="institutionContractId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
Task<GetInstitutionVerificationDetailsViewModel> GetVerificationDetails(Guid id);
|
||||||
|
Task<OperationResult<OtpResultViewModel>> SendVerifyOtp(Guid id);
|
||||||
|
Task<OperationResult> VerifyOtp(Guid publicId, string code);
|
||||||
|
Task<InstitutionContractWorkshopDetailViewModel> GetWorkshopInitialDetails(long workshopDetailsId);
|
||||||
|
|
||||||
|
#region Extension
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionInquiryResult> GetExtensionInquiry(long previousContractId);
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionWorkshopsResponse> GetExtensionWorkshops(
|
||||||
|
InstitutionContractExtensionWorkshopsRequest request);
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionPlanResponse> GetExtensionInstitutionPlan(
|
||||||
|
InstitutionContractExtensionPlanRequest request);
|
||||||
|
|
||||||
|
Task<InstitutionContractExtensionPaymentResponse> GetExtensionPaymentMethod(
|
||||||
|
InstitutionContractExtensionPaymentRequest request);
|
||||||
|
|
||||||
|
Task<OperationResult> ExtensionComplete(InstitutionContractExtensionCompleteRequest request);
|
||||||
|
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search,string selected);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Upgrade (Amendment)
|
||||||
|
|
||||||
|
Task<InstitutionContractAmendmentWorkshopsResponse> GetAmendmentWorkshops(long institutionContractId);
|
||||||
|
Task<InsertAmendmentTempWorkshopResponse> InsertAmendmentTempWorkshops(InstitutionContractAmendmentTempWorkshopViewModel request);
|
||||||
|
Task RemoveAmendmentWorkshops(Guid workshopTempId);
|
||||||
|
Task<InsitutionContractAmendmentPaymentResponse> GetAmendmentPaymentDetails(InsitutionContractAmendmentPaymentRequest request);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
|
|
||||||
public class GetInstitutionContractListStatsViewModel
|
Task<OperationResult> ResendVerifyLink(long institutionContractId);
|
||||||
{
|
|
||||||
/// <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>
|
/// <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>
|
/// </summary>
|
||||||
public double TotalAmount { get; set; }
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<InstitutionContractPrintViewModel> PrintOneAsync(long id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractPrintViewModel
|
||||||
|
{
|
||||||
|
public InstitutionContratVerificationParty FirstParty { get; set; }
|
||||||
|
public InstitutionContratVerificationParty SecondParty { get; set; }
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
public string CreationDate { get; set; }
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
public List<GetInstitutionVerificationDetailsWorkshopsViewModel> Workshops { get; set; }
|
||||||
|
public string TotalPrice { get; set; }
|
||||||
|
public string TaxPrice { get; set; }
|
||||||
|
public string PaymentPrice { get; set; }
|
||||||
|
public string VerifyCode { get; set; }
|
||||||
|
public string VerifyDateTime { get; set; }
|
||||||
|
public string VerifierFullName { get; set; }
|
||||||
|
public string VerifierPhoneNumber { get; set; }
|
||||||
|
public LawViewModel LawViewModel { get; set; }
|
||||||
|
public string Obligation { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InsertAmendmentTempWorkshopResponse
|
||||||
|
{
|
||||||
|
public Guid WorkshopTempId { get; set; }
|
||||||
|
public string Amount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentWorkshopsResponse
|
||||||
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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>
|
/// </summary>
|
||||||
public List<InstitutionContractStatusCount> Counts { get; set; }
|
public List<InstitutionContractAmendmentTempWorkshopViewModel> Workshops { get; set; }
|
||||||
|
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InstitutionContractStatusCount
|
public class InstitutionContractSelectListViewModel : SelectListViewModel;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionInquiryResponse
|
||||||
{
|
{
|
||||||
public InstitutionContractStatus Status { get; set; }
|
public long Id { get; set; }
|
||||||
public int Count { get; set; }
|
public string FName { get; set; }
|
||||||
|
public string LName { get; set; }
|
||||||
|
public string DateOfBirthFa { get; set; }
|
||||||
|
public string FatherName { get; set; }
|
||||||
|
public string IdNumberSerial { get; set; }
|
||||||
|
public string IdNumber { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string Phone { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public long RepresentativeId { get; set; }
|
||||||
|
public string NationalCode { get; set; }
|
||||||
}
|
}
|
||||||
public class ExtenstionInstitutionContractRequest:EditInstitutionContractRequest
|
|
||||||
|
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPaymentMonthly:InstitutionContractExtensionPaymentOneTime
|
||||||
{
|
{
|
||||||
public long PreviousContractId { get; set; }
|
public List<MonthlyInstallment> Installments { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPaymentOneTime
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// مجموع مبالغ
|
||||||
|
/// </summary>
|
||||||
|
public string TotalAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// ارزش افزوده
|
||||||
|
/// </summary>
|
||||||
|
public string Tax { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ قابل پرداخت
|
||||||
|
/// </summary>
|
||||||
|
public string PaymentAmount { get; set; }
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InsitutionContractAmendmentPaymentRequest
|
||||||
|
{
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InsitutionContractAmendmentPaymentResponse
|
||||||
|
{
|
||||||
|
public InstitutionContractPaymentOneTimeViewModel OneTime { get; set; }
|
||||||
|
public InstitutionContractPaymentMonthlyViewModel Monthly { get; set; }
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
public string OneMonthAmount { get; set; }
|
||||||
|
public string TotalAmount { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractAmendmentTempWorkshopViewModel
|
||||||
|
{
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
|
||||||
|
public Guid WorkshopTempId { get; set; }
|
||||||
|
|
||||||
|
public long CurrentWorkshopId { get; set; }
|
||||||
|
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public int CountPerson { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#region ServiceSelection
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// قرارداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool Insurance { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حضورغباب
|
||||||
|
/// </summary>
|
||||||
|
public bool RollCall { get; set; }
|
||||||
|
|
||||||
|
public bool RollCallInPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
public bool CustomizeCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری قرداد و تصفیه
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractAndCheckoutInPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خدمات حضوری بیمه
|
||||||
|
/// </summary>
|
||||||
|
public bool InsuranceInPerson { get; set; }
|
||||||
|
|
||||||
|
public double Price{ get; set; }
|
||||||
|
public string PriceStr{ get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionCompleteRequest
|
||||||
|
{
|
||||||
|
public Guid TemporaryId { get; set; }
|
||||||
|
public bool IsInstallment { get; set; }
|
||||||
|
public long LawId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionInquiryRequest
|
||||||
|
{
|
||||||
|
public long ContractingPartyId { get; set; }
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
public string BirthDate { get; set; }
|
||||||
|
public string Mobile { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionInquiryResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// اطلاعات شخص حقیقی
|
||||||
|
/// </summary>
|
||||||
|
public CreateInstitutionContractRealPartyRequest RealParty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اطلاعات شخص حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public CreateInstitutionContractLegalPartyRequest LegalParty { get; set; }
|
||||||
|
|
||||||
|
public LegalType LegalType { get; set; }
|
||||||
|
public Guid TemporaryId { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string Province { get; set; }
|
||||||
|
public List<EditContactInfo> ContactInfoViewModels { get; set; }
|
||||||
|
public long RepresentativeId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPaymentRequest
|
||||||
|
{
|
||||||
|
public InstitutionContractDuration Duration { get; set; }
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPaymentResponse
|
||||||
|
{
|
||||||
|
public InstitutionContractPaymentOneTimeViewModel OneTime { get; set; }
|
||||||
|
public InstitutionContractPaymentMonthlyViewModel Monthly { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPlanRequest
|
||||||
|
{
|
||||||
|
public List<WorkshopTempViewModel> WorkshopTemps { get; set; }
|
||||||
|
public string TotalAmount { get; set; }
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionPlanResponse
|
||||||
|
{
|
||||||
|
public InstitutionContractExtensionPlanDetail OneMonth { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail ThreeMonths { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail SixMonths { get; set; }
|
||||||
|
public InstitutionContractExtensionPlanDetail TwelveMonths { get; set; }
|
||||||
|
}
|
||||||
|
public class InstitutionContractExtensionPlanDetail
|
||||||
|
{
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
public string OneMonthPaymentDiscounted { get; set; }
|
||||||
|
public string OneMonthDiscount { get; set; }
|
||||||
|
public string OneMonthOriginalPayment { get; set; }
|
||||||
|
public string TotalPayment { get; set; }
|
||||||
|
public string DailyCompenseation { get; set; }
|
||||||
|
public string Obligation { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionWorkshopsRequest
|
||||||
|
{
|
||||||
|
public Guid TempId { get; set; }
|
||||||
|
public string City {get; set;}
|
||||||
|
public string Province { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public List<EditContactInfo> ContactInfos { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractExtensionWorkshopsResponse
|
||||||
|
{
|
||||||
|
public List<WorkshopTempViewModel> WorkshopTemps { get; set; }
|
||||||
|
public string TotalAmount { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
/// <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 string Amount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// عدد قسط فارسی
|
||||||
|
/// </summary>
|
||||||
|
public string InstallmentIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شناسه قرارداد مؤسسه مربوط به این قسط
|
||||||
|
/// </summary>
|
||||||
|
public long InstitutionContractId { get; set; }
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ public class InstitutionContractListSearchModel :PaginationRequest
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// تب
|
/// تب
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public InstitutionContractStatus? Status { get; set; }
|
public InstitutionContractListStatus? Status { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// فعال / غیرفعال
|
/// فعال / غیرفعال
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
public enum InstitutionContractStatus
|
public enum InstitutionContractListStatus
|
||||||
{
|
{
|
||||||
Active,
|
Active,
|
||||||
Deactive,
|
Deactive,
|
||||||
@@ -9,4 +9,5 @@ public enum InstitutionContractStatus
|
|||||||
Free,
|
Free,
|
||||||
PendingForRenewal,
|
PendingForRenewal,
|
||||||
WithoutWorkshop,
|
WithoutWorkshop,
|
||||||
|
PendingForVerify
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractPaymentOneTimeViewModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// مجموع مبالغ
|
||||||
|
/// </summary>
|
||||||
|
public string TotalAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// ارزش افزوده
|
||||||
|
/// </summary>
|
||||||
|
public string Tax { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ قابل پرداخت
|
||||||
|
/// </summary>
|
||||||
|
public string PaymentAmount { get; set; }
|
||||||
|
}
|
||||||
|
public class InstitutionContractPaymentMonthlyViewModel:InstitutionContractPaymentOneTimeViewModel
|
||||||
|
{
|
||||||
|
public List<MonthlyInstallment> Installments { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شمارش وضعیت قراردادهای مؤسسه
|
||||||
|
/// نمایش تعداد قراردادها برای هر وضعیت خاص
|
||||||
|
/// </summary>
|
||||||
|
public class InstitutionContractStatusCount
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت لیست قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public InstitutionContractListStatus ListStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد قراردادها در این وضعیت
|
||||||
|
/// </summary>
|
||||||
|
public int Count { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
|
|
||||||
|
public class InstitutionContractWorkshopDetailViewModel
|
||||||
|
{
|
||||||
|
public WorkshopServicesViewModel ServicesViewModel { get; set; }
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
public int ArchiveCode { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
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; }
|
||||||
|
}
|
||||||
@@ -21,4 +21,12 @@ public interface IInsuranceJobApplication
|
|||||||
List<InsuranceJobViewModel> Search(InsuranceJobSearchModel searchModel);
|
List<InsuranceJobViewModel> Search(InsuranceJobSearchModel searchModel);
|
||||||
|
|
||||||
OperationResult Remove(long id);
|
OperationResult Remove(long id);
|
||||||
|
Task<List<InsuranceJobSelectListViewModel>> GetSelectList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InsuranceJobSelectListViewModel
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public string InsuranceJobTitle { get; set; }
|
||||||
|
public string EconomicCode { get; set; }
|
||||||
}
|
}
|
||||||
37
CompanyManagment.App.Contracts/Law/ILawApplication.cs
Normal file
37
CompanyManagment.App.Contracts/Law/ILawApplication.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
48
CompanyManagment.App.Contracts/Law/LawViewModel.cs
Normal file
48
CompanyManagment.App.Contracts/Law/LawViewModel.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
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 int Version { 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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,4 +57,12 @@ public class ContractingPartyGetListViewModel
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ActivationStatus Status { get; set; }
|
public ActivationStatus Status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
public string NationalId { get; set; }
|
||||||
|
public string RepresentativeName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ namespace CompanyManagment.App.Contracts.RollCall
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// گزارش آنلاین حضور غیاب
|
/// گزارش آنلاین حضور غیاب
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
|
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,WorkshopCurrentDayRollCallSearchModel searchModel);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// گزارش آفلاین حضور غیاب کارگاه
|
/// گزارش آفلاین حضور غیاب کارگاه
|
||||||
@@ -126,6 +126,13 @@ namespace CompanyManagment.App.Contracts.RollCall
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
OperationResult RecalculateValues(long workshopId, List<ReCalculateRollCallValues> command);
|
OperationResult RecalculateValues(long workshopId, List<ReCalculateRollCallValues> command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class WorkshopCurrentDayRollCallSearchModel
|
||||||
|
{
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
public int PersonnelCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ReCalculateRollCallValues
|
public class ReCalculateRollCallValues
|
||||||
{
|
{
|
||||||
public long EmployeeId { get; set; }
|
public long EmployeeId { get; set; }
|
||||||
|
|||||||
@@ -8,4 +8,8 @@ public class ContractingPartyTempViewModel : CreateContractingPartyTemp
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string DateOfBirthFa { get; set; }
|
public string DateOfBirthFa { get; set; }
|
||||||
|
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public long RepresentativeId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@ public class CreateInstitutionContractTemp
|
|||||||
/// -
|
/// -
|
||||||
/// Completed ثبت نام تکمیل شده
|
/// Completed ثبت نام تکمیل شده
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string RegistrationStatus { get; set; }
|
public InstitutionContractTempStatus RegistrationStatus { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آی دی پیامک ارسال شده
|
/// آی دی پیامک ارسال شده
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user