Compare commits
391 Commits
Api
...
Feature/ac
| Author | SHA1 | Date | |
|---|---|---|---|
| bd72dada76 | |||
| e79dabbb2d | |||
| f527c59603 | |||
| 112369c2a5 | |||
| 518719a6b8 | |||
| 53eab1be67 | |||
|
|
21aa17d856 | ||
| b8d6911756 | |||
| 2e8f098937 | |||
| c9cae74cd4 | |||
|
|
abe8774d6f | ||
|
|
eab0441f00 | ||
| 13250d9f62 | |||
| e77eb217f7 | |||
| 39200da4b5 | |||
| 49050a8990 | |||
| 9474f3ff1a | |||
| ad4cffffcd | |||
|
|
74c7b1ebbd | ||
|
|
b2c6ad2541 | ||
| 8eded713da | |||
|
|
18e559f1ae | ||
|
|
e1dfd8c8e1 | ||
|
|
b1c9b2669d | ||
|
|
116f40d87d | ||
|
|
6a982a80f7 | ||
|
|
c3cb3df3d3 | ||
|
|
604ac76a1a | ||
|
|
f9947dc138 | ||
|
|
3b12be04b5 | ||
|
|
5a1d2640c3 | ||
|
|
de0e21f98b | ||
|
|
80ed1e9469 | ||
|
|
0609c66e0a | ||
|
|
add5b8ef8e | ||
|
|
c5091c53a4 | ||
|
|
3f1664a844 | ||
|
|
fdc5ea950f | ||
|
|
39d62eb02d | ||
|
|
a42ef19470 | ||
|
|
7ae7d8fc07 | ||
|
|
2bc7766ba1 | ||
|
|
d780f24b36 | ||
|
|
d7b49f8fc3 | ||
|
|
82d035b7e1 | ||
|
|
e80621280c | ||
|
|
1c6b0ac292 | ||
|
|
01bc8ef01b | ||
|
|
ca350aa795 | ||
|
|
58c015b151 | ||
|
|
14480eb683 | ||
|
|
882a295413 | ||
|
|
785e364efc | ||
|
|
bd83ed3880 | ||
|
|
fae3c7cbd3 | ||
|
|
052b94a66e | ||
|
|
369757aebe | ||
|
|
38d8e88fd6 | ||
|
|
bcedb0d690 | ||
|
|
3662502db1 | ||
|
|
0701b334e4 | ||
|
|
631bf3a920 | ||
|
|
874bce1113 | ||
|
|
1daaeff194 | ||
|
|
9cd00a1886 | ||
|
|
1f897fa0c9 | ||
|
|
5f7c27e45c | ||
|
|
824a80d1fe | ||
|
|
9e2ec49247 | ||
|
|
f5137d0bab | ||
|
|
881bdfa7ae | ||
|
|
e063870b36 | ||
|
|
fe8335af55 | ||
|
|
179ff95d54 | ||
|
|
5c3119d3d2 | ||
|
|
0c56240158 | ||
|
|
2e703c49f7 | ||
|
|
e9dbfb411a | ||
|
|
40a02dbede | ||
|
|
030ce880f8 | ||
|
|
2b8cc9d05a | ||
|
|
0136e219a1 | ||
|
|
60ed37b965 | ||
|
|
5355e74830 | ||
|
|
87609773e5 | ||
|
|
6112e969b6 | ||
|
|
3e4c57d813 | ||
|
|
efc510a09b | ||
|
|
a6c1ae7971 | ||
|
|
8bf707056e | ||
|
|
ee72c95d55 | ||
|
|
f4f8ab8272 | ||
|
|
1c6def5d70 | ||
|
|
87e0181a8d | ||
|
|
66d566847e | ||
|
|
dbfffafbee | ||
|
|
b2a70bc5a9 | ||
|
|
5053b69295 | ||
|
|
969a707000 | ||
|
|
57b625f3b2 | ||
|
|
62572a9b64 | ||
|
|
6d0b7de149 | ||
|
|
34d8e068df | ||
|
|
3a1dfa7e11 | ||
|
|
866725e3b4 | ||
|
|
7772bff9f4 | ||
|
|
033461641a | ||
|
|
83a251ad3b | ||
|
|
cdf282a17a | ||
|
|
4bc3fd2fbc | ||
|
|
c826c3614d | ||
|
|
b8ea59b814 | ||
|
|
f82d0d5925 | ||
|
|
701ebaeb96 | ||
|
|
a1d57b291c | ||
|
|
e7d43316ad | ||
|
|
bdc5ccae13 | ||
|
|
d37ad552df | ||
|
|
df39072944 | ||
|
|
9c04fd439d | ||
|
|
2b3067dab2 | ||
|
|
6f8ced3192 | ||
|
|
86682a28e2 | ||
|
|
5720c30f7a | ||
|
|
c90a68a8cc | ||
|
|
a71205aa2b | ||
|
|
641dcc1767 | ||
|
|
b1a15bfa54 | ||
|
|
f7166ca17f | ||
|
|
d4f9c810ea | ||
|
|
09574150b6 | ||
|
|
7ccf600885 | ||
|
|
a7b7bfc745 | ||
|
|
170a0ddba0 | ||
|
|
33a736ab5d | ||
|
|
fa5e079db5 | ||
|
|
ec2defab69 | ||
|
|
e34fef37d7 | ||
|
|
5e7bfe0634 | ||
|
|
23723e4b7a | ||
|
|
859f8ea8ca | ||
|
|
2732ec09b2 | ||
|
|
3744b5f470 | ||
|
|
13d93b3e1d | ||
|
|
db78fb1cd4 | ||
|
|
7ce2142517 | ||
|
|
98146b4aa7 | ||
|
|
5f65c13b45 | ||
|
|
8bde7aa3d1 | ||
|
|
da8579d2a6 | ||
|
|
41503101b6 | ||
|
|
1cd4cd4b49 | ||
|
|
7afa112e63 | ||
|
|
3aa5668696 | ||
|
|
76e5a93ee5 | ||
|
|
469a8808d1 | ||
|
|
d3157780ea | ||
|
|
2d2dc24280 | ||
|
|
362b306c48 | ||
|
|
b0c02d47c4 | ||
|
|
6869ccb436 | ||
|
|
605fe16ced | ||
|
|
dfb78db2fa | ||
|
|
13ebe2fc2a | ||
|
|
54fbbc964f | ||
|
|
f0daa0b283 | ||
|
|
82f68d1bbe | ||
|
|
48c2186110 | ||
|
|
72fe632516 | ||
|
|
b92aaaffa0 | ||
|
|
2a315ff7ae | ||
|
|
204355acd6 | ||
|
|
e1ac481dc3 | ||
|
|
8fd3930393 | ||
|
|
b2694ca281 | ||
|
|
b82456f172 | ||
|
|
c04a8f86a4 | ||
|
|
e0f7ff5ec7 | ||
|
|
7cb3551dc8 | ||
|
|
873a30ecd1 | ||
|
|
c048e89da8 | ||
|
|
c91df337d4 | ||
|
|
b88cda4007 | ||
|
|
5902472b86 | ||
|
|
9aa8855a46 | ||
|
|
9556be42ea | ||
|
|
3ebaeb645c | ||
|
|
366ad25a3a | ||
|
|
463e4bc080 | ||
|
|
785309c731 | ||
|
|
f0126d365d | ||
|
|
b77538218f | ||
|
|
e877aca832 | ||
|
|
f66293a637 | ||
|
|
4aa710b7d6 | ||
|
|
2547fec258 | ||
|
|
acb572d94a | ||
|
|
5ff08ebb2f | ||
|
|
fd122fe582 | ||
|
|
25903856b2 | ||
|
|
d1b7e0c3e1 | ||
|
|
9c0d5b65be | ||
|
|
ac4bd3453a | ||
|
|
77e03f3d7f | ||
|
|
a9008beb24 | ||
|
|
a30d5b68d7 | ||
|
|
93c72e16e7 | ||
|
|
290e1639e8 | ||
|
|
3650b46b8e | ||
|
|
734de19bc2 | ||
|
|
398bb35815 | ||
|
|
697bd9fefe | ||
|
|
2743493a11 | ||
|
|
f9de490c13 | ||
|
|
f374ff3012 | ||
|
|
563fe563c0 | ||
|
|
c75e3464d7 | ||
|
|
e3a5fb578b | ||
|
|
8cb99b2862 | ||
|
|
57b2ad3445 | ||
|
|
3befd6f0d9 | ||
|
|
8f10aa54a8 | ||
|
|
efbd74479b | ||
|
|
8432b2660e | ||
|
|
2f9426bdaf | ||
|
|
5477519464 | ||
|
|
f92257b251 | ||
|
|
5efe58d23d | ||
|
|
648ca44ebb | ||
|
|
3232c979aa | ||
|
|
ce8a0b397d | ||
|
|
c1fcaa1726 | ||
|
|
e1fd94db04 | ||
|
|
882f38d000 | ||
|
|
29560370d8 | ||
|
|
7841e8c336 | ||
|
|
a114cc8242 | ||
|
|
473132d66a | ||
|
|
9124f50577 | ||
|
|
7a13150223 | ||
|
|
f7059bcaeb | ||
|
|
4c4e848f52 | ||
|
|
7984f18516 | ||
|
|
94aa4fda51 | ||
|
|
2d2207565e | ||
|
|
3f8b85906f | ||
|
|
346756c766 | ||
|
|
20f208ac0e | ||
|
|
2b602e4199 | ||
|
|
9557f860bb | ||
|
|
cf0dc95b5c | ||
|
|
c7f7b17866 | ||
|
|
d9259bf7c4 | ||
|
|
55dc4c891f | ||
|
|
daa2a0fdc1 | ||
|
|
6d6ce93f74 | ||
|
|
a71433f751 | ||
|
|
68d1a8d9fe | ||
|
|
a1dfc17ce9 | ||
|
|
99a8cc181d | ||
|
|
05cd8832d5 | ||
|
|
a4bcb1ac55 | ||
|
|
6cec0e39ec | ||
|
|
08bf8395c4 | ||
|
|
bc6378beca | ||
|
|
08adccb2f1 | ||
|
|
5e24071175 | ||
|
|
ebc377603a | ||
|
|
b70dbc8a6b | ||
|
|
a34d81318b | ||
|
|
00357df859 | ||
|
|
ba8e07c63a | ||
|
|
f87b203939 | ||
|
|
79807569dc | ||
|
|
bda666b989 | ||
|
|
9eca54276b | ||
|
|
de64933d06 | ||
|
|
44763da729 | ||
|
|
1f3bf123c4 | ||
|
|
7a33b7da46 | ||
|
|
da6573a147 | ||
|
|
6a6ec2610d | ||
|
|
d9717033cf | ||
|
|
beafd047bf | ||
|
|
7c3abeb463 | ||
|
|
040f40df52 | ||
|
|
ac66df98f5 | ||
|
|
8da9f09663 | ||
|
|
591de9acd8 | ||
|
|
be282fa548 | ||
|
|
1b88cebdf2 | ||
|
|
12356c927b | ||
|
|
b73898f5ea | ||
|
|
51e8686668 | ||
|
|
133b99d5fc | ||
|
|
6c814d5dce | ||
|
|
9879857a97 | ||
|
|
e3f29e5efa | ||
|
|
13278e2c24 | ||
|
|
5ca32bbbaf | ||
|
|
3ea80c1344 | ||
|
|
5ae31b9cea | ||
|
|
0d06457e1f | ||
|
|
bdc433b0a3 | ||
|
|
e87733f5cb | ||
|
|
60bd120196 | ||
|
|
0a41751c15 | ||
|
|
41f39fb6fa | ||
|
|
e8fd8bdace | ||
|
|
9f2487f8ef | ||
|
|
32dbd094e0 | ||
|
|
b97039ee15 | ||
|
|
313579cdee | ||
|
|
3bda7116a2 | ||
|
|
8bb29447e2 | ||
|
|
8dc839f561 | ||
|
|
9f9c0d64a9 | ||
|
|
751c1a4131 | ||
|
|
b96ed1c7c3 | ||
|
|
500d7fc8d4 | ||
|
|
b8cfc8eb56 | ||
|
|
4c0f4bb70c | ||
|
|
6317ebb079 | ||
|
|
91d86dbd2e | ||
|
|
aedaf84d57 | ||
|
|
b0c1f216a1 | ||
|
|
bd42a6d5e9 | ||
|
|
e924ca7049 | ||
|
|
482eb8ab0b | ||
|
|
7541abb92c | ||
|
|
91365f5aeb | ||
|
|
0664a71047 | ||
|
|
4ff2596864 | ||
|
|
744078dd6c | ||
|
|
1ebc93a1f8 | ||
|
|
a61c62a2c3 | ||
|
|
0981dc20ec | ||
|
|
e8a65e51db | ||
|
|
fb10d962a6 | ||
|
|
ad2612b60c | ||
|
|
3254db4a62 | ||
|
|
8325752355 | ||
|
|
bb3a50eb18 | ||
|
|
767022d0b8 | ||
|
|
6e7199cf6d | ||
|
|
9ab4670d68 | ||
|
|
d080b093e8 | ||
|
|
f2717de5bf | ||
|
|
e5fa554971 | ||
|
|
6932ba7b79 | ||
|
|
cc3b18bc99 | ||
|
|
194323004b | ||
|
|
5a3b99d07c | ||
|
|
aab65e07dc | ||
|
|
3c6e83a967 | ||
|
|
bfd6632940 | ||
|
|
39a91c269d | ||
|
|
29875f4870 | ||
|
|
0859cd3ba4 | ||
|
|
200f86b270 | ||
|
|
54b3d6ad2c | ||
|
|
e9ab5c40ef | ||
|
|
c7b9f2ae20 | ||
|
|
bf08af0b3d | ||
|
|
314ec82133 | ||
|
|
76448cdca4 | ||
|
|
9f33b481fa | ||
|
|
f6441f916e | ||
|
|
fe20c63baf | ||
|
|
5427782b06 | ||
|
|
0806b55dfb | ||
|
|
7f68e11f9d | ||
|
|
f550aca7f7 | ||
|
|
f1f3ff199a | ||
|
|
60252ab032 | ||
|
|
15e608a1cf | ||
|
|
f3bf66aeb0 | ||
|
|
8ac15191ad | ||
|
|
a177d6063d | ||
|
|
59f063b824 | ||
|
|
be2333cac8 | ||
|
|
f8a1aa596d | ||
|
|
64422755f2 | ||
| 8255e8679e | |||
|
|
62bcd4d6b6 | ||
|
|
ccbc180c96 | ||
|
|
376d9d1d78 | ||
|
|
7ddd51034a | ||
|
|
042530b6e3 | ||
|
|
0579692a55 | ||
|
|
e26df8026e |
48
.github/workflows/dotnet-developPublish.yml
vendored
Normal file
48
.github/workflows/dotnet-developPublish.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Deploy Development ASP.NET Core App to IIS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Main
|
||||
|
||||
env:
|
||||
DOTNET_ENVIRONMENT: Development
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x' # یا نسخه پروژهت
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release
|
||||
|
||||
- name: Publish
|
||||
run: dotnet publish --configuration Release --output ./publish /p:EnvironmentName=Development --no-build
|
||||
|
||||
- name: Deploy to IIS via Web Deploy
|
||||
shell: powershell
|
||||
run: |
|
||||
$publishFolder = Resolve-Path ./publish
|
||||
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
|
||||
-verb:sync `
|
||||
-source:contentPath="$publishFolder" `
|
||||
-dest:contentPath="dadmehrg",computerName="https://171.22.24.15:8172/msdeploy.axd?site=dadmehrg",userName="Administrator",password="R2rNpdnetP3j>q5b18",authType="Basic" `
|
||||
-allowUntrusted `
|
||||
-enableRule:AppOffline
|
||||
|
||||
|
||||
env:
|
||||
SERVER_HOST: your-server-ip-or-domain
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -361,4 +361,4 @@ MigrationBackup/
|
||||
|
||||
# # Fody - auto-generated XML schema
|
||||
# FodyWeavers.xsd
|
||||
|
||||
.idea
|
||||
|
||||
@@ -21,4 +21,19 @@
|
||||
|
||||
</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>
|
||||
|
||||
@@ -42,6 +42,7 @@ public class AuthHelper : IAuthHelper
|
||||
result.WorkshopName = claims.FirstOrDefault(x => x is { Type: "WorkshopName" })?.Value;
|
||||
result.Permissions = Tools.DeserializeFromBsonList<int>(claims.FirstOrDefault(x => x is { Type: "permissions" })?.Value);
|
||||
result.RoleName = claims.FirstOrDefault(x => x is { Type: "RoleName" })?.Value;
|
||||
result.WorkshopId = long.Parse(claims.FirstOrDefault(x => x.Type == "WorkshopId")?.Value??"0");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -76,7 +77,7 @@ public class AuthHelper : IAuthHelper
|
||||
|
||||
#region Vafa
|
||||
|
||||
public void UpdateWorkshopSlugClaim(string newWorkshopSlug, string newWorkshopName)
|
||||
public void UpdateWorkshopSlugClaim(string newWorkshopSlug, string newWorkshopName,long newWorkshopId)
|
||||
{
|
||||
var user = _contextAccessor.HttpContext.User;
|
||||
|
||||
@@ -85,6 +86,7 @@ public class AuthHelper : IAuthHelper
|
||||
var claimsIdentity = (ClaimsIdentity)user.Identity;
|
||||
var existingClaimSlug = claimsIdentity.FindFirst("WorkshopSlug");
|
||||
var existingClaimName = claimsIdentity.FindFirst("WorkshopName");
|
||||
var existingWorkshopId = claimsIdentity.FindFirst("WorkshopId");
|
||||
|
||||
if (existingClaimSlug != null)
|
||||
{
|
||||
@@ -96,9 +98,14 @@ public class AuthHelper : IAuthHelper
|
||||
claimsIdentity.RemoveClaim(existingClaimName);
|
||||
}
|
||||
|
||||
if (existingWorkshopId != null)
|
||||
{
|
||||
claimsIdentity.RemoveClaim(existingWorkshopId);
|
||||
}
|
||||
|
||||
claimsIdentity.AddClaim(new Claim("WorkshopSlug", newWorkshopSlug));
|
||||
claimsIdentity.AddClaim(new Claim("WorkshopName", newWorkshopName));
|
||||
claimsIdentity.AddClaim(new Claim("WorkshopId",newWorkshopId.ToString()));
|
||||
|
||||
|
||||
var authProperties = new AuthenticationProperties
|
||||
@@ -128,8 +135,16 @@ public class AuthHelper : IAuthHelper
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
public long GetWorkshopId()
|
||||
{
|
||||
return long.Parse(_contextAccessor.HttpContext?.User.Claims.FirstOrDefault(x => x.Type == "WorkshopId")?.Value ?? "0");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public string CurrentAccountRole()
|
||||
{
|
||||
@@ -182,6 +197,7 @@ public class AuthHelper : IAuthHelper
|
||||
//mahanChanges
|
||||
new("workshopList",workshopBson),
|
||||
new("WorkshopSlug",slug),
|
||||
new("WorkshopId", account.WorkshopId.ToString()),
|
||||
new("WorkshopName",account.WorkshopName??"")
|
||||
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@ public class AuthViewModel
|
||||
|
||||
public int? PositionValue { get; set; }
|
||||
public string WorkshopSlug { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
public string WorkshopName { get; set; }
|
||||
public List<WorkshopClaim> WorkshopList { get; set; }
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@ public interface IAuthHelper
|
||||
|
||||
#region Vafa
|
||||
|
||||
void UpdateWorkshopSlugClaim(string workshopSlug, string workshopName);
|
||||
void UpdateWorkshopSlugClaim(string workshopSlug, string workshopName, long workshopId);
|
||||
|
||||
#endregion
|
||||
long CurrentSubAccountId();
|
||||
string GetWorkshopSlug();
|
||||
string GetWorkshopName();
|
||||
long GetWorkshopId();
|
||||
(long Id, UserType userType, long roleId) GetUserTypeWithId();
|
||||
}
|
||||
15
0_Framework/Application/PagedResult.cs
Normal file
15
0_Framework/Application/PagedResult.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
|
||||
public class PagedResult<T> where T : class
|
||||
{
|
||||
public int TotalCount { get; set; }
|
||||
public List<T> List { get; set; }
|
||||
}
|
||||
public class PagedResult<T,TMeta>:PagedResult<T> where T : class
|
||||
{
|
||||
public TMeta? Meta { get; set; }
|
||||
}
|
||||
7
0_Framework/Application/PaginationRequest.cs
Normal file
7
0_Framework/Application/PaginationRequest.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
public class PaginationRequest
|
||||
{
|
||||
public int PageIndex { get; set; } = 1;
|
||||
public int PageSize { get; set; } = 30;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public class AqayePardakhtPaymentGateway:IPaymentGateway
|
||||
{
|
||||
_httpClient = httpClientFactory.CreateClient();
|
||||
|
||||
if (appSetting.Value.Domain == ".dad-mehr.ir")
|
||||
if (appSetting.Value.Domain == ".dadmehrg.ir")
|
||||
{
|
||||
_pin = "7349F84E81AB584862D9";
|
||||
}
|
||||
@@ -40,11 +40,11 @@ public class AqayePardakhtPaymentGateway:IPaymentGateway
|
||||
callback = command.CallBackUrl,
|
||||
card_number = command.CardNumber,
|
||||
invoice_id = command.InvoiceId,
|
||||
mobile = command.Mobile,
|
||||
email = command.Email,
|
||||
mobile = command.Mobile,
|
||||
email = command.Email??"",
|
||||
description = command.Description,
|
||||
}, cancellationToken: cancellationToken);
|
||||
|
||||
var resStr = await response.Content.ReadAsStringAsync(cancellationToken);
|
||||
var result = await response.Content.ReadFromJsonAsync<PaymentGatewayResponse>(cancellationToken: cancellationToken);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -23,13 +23,15 @@ public interface IPaymentGateway
|
||||
public class PaymentGatewayResponse
|
||||
{
|
||||
[JsonPropertyName("status")]
|
||||
public string Status { get; set; }
|
||||
public string Status { get; set; }
|
||||
|
||||
[JsonPropertyName("code")]
|
||||
public int? ErrorCode { get; set; }
|
||||
|
||||
[JsonPropertyName("transid")]
|
||||
public string TransactionId { get; set; }
|
||||
|
||||
public bool IsSuccess => Status == "success";
|
||||
}
|
||||
|
||||
public class WalletAmountResponse
|
||||
|
||||
@@ -30,8 +30,9 @@ public static class StaticWorkshopAccounts
|
||||
/// 380 - افروز نظری
|
||||
/// 381 - مهدی قربانی
|
||||
/// 392 - عمار حسن دوست
|
||||
/// 20 - سمیرا الهی نیا
|
||||
/// </summary>
|
||||
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392];
|
||||
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392, 20];
|
||||
|
||||
/// <summary>
|
||||
/// این تاریخ در جدول اکانت لفت ورک به این معنیست
|
||||
|
||||
@@ -38,7 +38,7 @@ public class UidBasicInformation
|
||||
{
|
||||
"GENDER_MALE" => Application.Gender.Male,
|
||||
"GENDER_FEMALE" => Application.Gender.Female,
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
_ => Application.Gender.None
|
||||
};
|
||||
}
|
||||
public record IdentificationInformation(string NationalId, string BirthDate, string ShenasnameSeri, string ShenasnameSerial, string ShenasnamehNumber);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class BaseCustomizeEntity : EntityBase
|
||||
|
||||
public BreakTime BreakTime { get; protected set; }
|
||||
|
||||
public List<WeeklyOffDay> WeeklyOffDays { get; set; }
|
||||
public List<WeeklyOffDay> WeeklyOffDays { get; set; } = [];
|
||||
|
||||
public void FridayWorkToWeeklyDayOfWeek()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
|
||||
namespace _0_Framework.Domain;
|
||||
|
||||
@@ -17,4 +18,6 @@ public interface IRepository<TKey, T> where T:class
|
||||
bool Exists(Expression<Func<T, bool>> expression);
|
||||
void SaveChanges();
|
||||
Task SaveChangesAsync();
|
||||
Task<IDbContextTransaction> BeginTransactionAsync();
|
||||
|
||||
}
|
||||
22
0_Framework/InfraStructure/QueryableExtensions.cs
Normal file
22
0_Framework/InfraStructure/QueryableExtensions.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace _0_Framework.InfraStructure;
|
||||
|
||||
public static class QueryableExtensions
|
||||
{
|
||||
public static IQueryable<T> ApplyPagination<T>(this IQueryable<T> query, int page, int pageSize)
|
||||
{
|
||||
if (page <= 0) page = 1;
|
||||
if (pageSize <= 0) pageSize = 10;
|
||||
|
||||
return query.Skip((page - 1) * pageSize).Take(pageSize);
|
||||
}
|
||||
public static IEnumerable<T> ApplyPagination<T>(this IEnumerable<T> source, int page, int pageSize)
|
||||
{
|
||||
if (page <= 0) page = 1;
|
||||
if (pageSize <= 0) pageSize = 10;
|
||||
|
||||
return source.Skip((page - 1) * pageSize).Take(pageSize);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Domain;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
|
||||
namespace _0_Framework.InfraStructure
|
||||
{
|
||||
@@ -70,5 +71,10 @@ namespace _0_Framework.InfraStructure
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task<IDbContextTransaction> BeginTransactionAsync()
|
||||
{
|
||||
return await _context.Database.BeginTransactionAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,6 @@ public interface IAccountApplication
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
public bool CheckExistClientAccount(string userName);
|
||||
List<AccountViewModel> GetAdminAccountsNew();
|
||||
|
||||
}
|
||||
@@ -259,7 +259,8 @@ public class AccountApplication : IAccountApplication
|
||||
var workshop = workshopList.First();
|
||||
authViewModel.WorkshopName = workshop.Name;
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshop.Id);
|
||||
}
|
||||
authViewModel.WorkshopId = workshop.Id;
|
||||
}
|
||||
}
|
||||
|
||||
_authHelper.Signin(authViewModel);
|
||||
@@ -317,6 +318,7 @@ public class AccountApplication : IAccountApplication
|
||||
var workshop = workshopList.First();
|
||||
authViewModel.WorkshopName = workshop.WorkshopName;
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshop.WorkshopId);
|
||||
authViewModel.WorkshopId = workshop.WorkshopId;
|
||||
}
|
||||
_authHelper.Signin(authViewModel);
|
||||
idAutoriz = 2;
|
||||
@@ -368,6 +370,7 @@ public class AccountApplication : IAccountApplication
|
||||
var workshop = workshopList.First();
|
||||
authViewModel.WorkshopName = workshop.Name;
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshop.Id);
|
||||
authViewModel.WorkshopId = workshop.Id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,6 +518,7 @@ public class AccountApplication : IAccountApplication
|
||||
var workshop = authViewModel.WorkshopList.First();
|
||||
authViewModel.WorkshopSlug = _passwordHasher.SlugHasher(workshop.Id);
|
||||
authViewModel.WorkshopName = workshop.Name;
|
||||
authViewModel.WorkshopId = workshop.Id;
|
||||
}
|
||||
_authHelper.Signin(authViewModel);
|
||||
return operation.Succcedded(2);
|
||||
@@ -795,4 +799,8 @@ public class AccountApplication : IAccountApplication
|
||||
return _accountRepository.CheckExistClientAccount(userName);
|
||||
}
|
||||
|
||||
public List<AccountViewModel> GetAdminAccountsNew()
|
||||
{
|
||||
return _accountRepository.GetAdminAccountsNew();
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class Checkout : EntityBase
|
||||
string overNightWorkValue, string fridayWorkValue, string rotatingShifValue, string absenceValue,
|
||||
string totalDayOfLeaveCompute, string totalDayOfYearsCompute, string totalDayOfBunosesCompute,
|
||||
ICollection<CheckoutLoanInstallment> loanInstallments,
|
||||
ICollection<CheckoutSalaryAid> salaryAids,CheckoutRollCall checkoutRollCall)
|
||||
ICollection<CheckoutSalaryAid> salaryAids,CheckoutRollCall checkoutRollCall,TimeSpan employeeMandatoryHours)
|
||||
{
|
||||
EmployeeFullName = employeeFullName;
|
||||
FathersName = fathersName;
|
||||
@@ -90,8 +90,10 @@ public class Checkout : EntityBase
|
||||
LoanInstallments = loanInstallments;
|
||||
SalaryAids = salaryAids;
|
||||
CheckoutRollCall = checkoutRollCall;
|
||||
EmployeeMandatoryHours = employeeMandatoryHours;
|
||||
}
|
||||
|
||||
|
||||
public string EmployeeFullName { get; private set; }
|
||||
public string IsActiveString { get; private set; }
|
||||
public string Signature { get; private set; }
|
||||
@@ -193,7 +195,16 @@ public class Checkout : EntityBase
|
||||
/// </summary>
|
||||
public string TotalDayOfBunosesCompute { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// دارای تداخل مبلغ است. این در زمانی اتفاق می افتد که فیش مبلغ آن تغییر کرده ولی به دلیل مسائل قانونی امکان صدور دوباره آن وجود ندارد
|
||||
/// </summary>
|
||||
public bool HasAmountConflict { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// ساعت موظفی پرسنل در ماه
|
||||
/// </summary>
|
||||
public TimeSpan EmployeeMandatoryHours { get; set; }
|
||||
|
||||
#region valueObjects
|
||||
|
||||
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
|
||||
@@ -316,6 +327,16 @@ public class Checkout : EntityBase
|
||||
{
|
||||
CheckoutRollCall = checkoutRollCall;
|
||||
}
|
||||
|
||||
public void SetAmountConflict(bool hasAmountConflict)
|
||||
{
|
||||
HasAmountConflict = hasAmountConflict;
|
||||
}
|
||||
|
||||
public void SetEmployeeMandatoryHours(TimeSpan employeeMandatoryHours)
|
||||
{
|
||||
EmployeeMandatoryHours = employeeMandatoryHours;
|
||||
}
|
||||
}
|
||||
|
||||
public class CheckoutRollCall
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
||||
/// <param name="سال به صورت رشته عددی"></param>
|
||||
/// <param name="ماه بصورت رشته عددی"></param>
|
||||
/// <returns></returns>
|
||||
(bool hasChekout, double FamilyAlloance, double OverTimePay) HasCheckout(long workshopId, long employeId,
|
||||
(bool hasChekout, double FamilyAlloance, double OverTimePay, double RotatingShift, double Nightwork, double Fridaywork, double YraesPay) HasCheckout(long workshopId, long employeId,
|
||||
string year, string month);
|
||||
EditCheckout GetDetails(long id);
|
||||
|
||||
@@ -78,4 +78,6 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
||||
long workshopId, DateTime start, DateTime end);
|
||||
|
||||
#endregion
|
||||
|
||||
Task<Checkout> GetByWorkshopIdEmployeeIdInDate(long workshopId, long employeeId, DateTime inDate);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace Company.Domain.ClassifiedSalaryAgg
|
||||
{
|
||||
public class ClassifiedSalary : EntityBase
|
||||
{
|
||||
//test
|
||||
public ClassifiedSalary(double group1, double group2, double group3, double group4, double group5, double group6, double group7, double group8, double group9, double group10, double group11, double group12, double group13, double group14, double group15, double group16, double group17, double group18, double group19, double group20, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
Group1 = group1;
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
||||
EditPersonalContractingParty GetDetailsToEdit(long id);
|
||||
string GetFullName(long id);
|
||||
List<PersonalContractingPartyViewModel> Search(PersonalContractingPartySearchModel searchModel2);
|
||||
int GetLastArchiveCode();
|
||||
int GetLastNewArchiveCode();
|
||||
#region Mahan
|
||||
|
||||
List<string> SearchByName(string name);
|
||||
@@ -53,8 +53,9 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
||||
/// <summary>
|
||||
/// لیست طرف حساب برای سلکت لیست سرچ
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ContractingPartySelectListViewModel>> GetSelectList();
|
||||
Task<List<ContractingPartySelectListViewModel>> GetSelectList(string search,long id);
|
||||
|
||||
/// <summary>
|
||||
/// لیستی از شماره ملی یا شناسه ملی بر اساس حقیقی یا حقوقی بودن
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.ContractingPartyBankAccountsAgg;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using Company.Domain.RepresentativeAgg;
|
||||
|
||||
@@ -72,17 +73,22 @@ public class PersonalContractingParty : EntityBase
|
||||
/// آیا از طریق ای پی ای احراز هویت شده است
|
||||
/// </summary>
|
||||
public bool IsAuthenticated { get; private set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// سمت و صاحب امضاء اوراق (فقط برای طرف حقوقی)
|
||||
/// </summary>
|
||||
public string LegalPosition { get; private set; }
|
||||
#endregion
|
||||
|
||||
|
||||
public List<Employer> Employers { get; private set; }
|
||||
public Representative Representative { get; set; }
|
||||
public List<ContractingPartyBankAccount> ContractingPartyBankAccounts { get; set; }
|
||||
|
||||
public PersonalContractingParty()
|
||||
{
|
||||
@@ -92,7 +98,7 @@ public class PersonalContractingParty : EntityBase
|
||||
public PersonalContractingParty(string fName, string lName, string nationalcode, string idNumber,
|
||||
/*string legalName,*/ string registerId, string nationalId, string isLegal,
|
||||
string phone, string agentPhone, string address,long representativeId,
|
||||
string representativeFullName, int archiveCode, string state,string city, string zone, string sureName)
|
||||
string representativeFullName, int archiveCode, string state,string city, string zone, string sureName,string legalPosition=null)
|
||||
{
|
||||
|
||||
FName = fName;
|
||||
@@ -118,8 +124,7 @@ public class PersonalContractingParty : EntityBase
|
||||
IsActiveString = "true";
|
||||
IsBlock = "false";
|
||||
BlockTimes = 0;
|
||||
|
||||
|
||||
LegalPosition = legalPosition;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +154,7 @@ public class PersonalContractingParty : EntityBase
|
||||
}
|
||||
|
||||
public void EditLegal(string lName, string registerId, string nationalId, string phone, string agentPhone, string address, long representativeId, string representativeFullName, int archiveCode,
|
||||
string state, string city, string zone, string sureName)
|
||||
string state, string city, string zone, string sureName,string legalPosition = null)
|
||||
{
|
||||
|
||||
LName = lName;
|
||||
@@ -166,6 +171,8 @@ public class PersonalContractingParty : EntityBase
|
||||
State = state;
|
||||
City = city;
|
||||
Zone = zone;
|
||||
if (legalPosition != null)
|
||||
LegalPosition = legalPosition;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.ContarctingPartyAgg;
|
||||
|
||||
namespace Company.Domain.ContractingPartyBankAccountsAgg;
|
||||
|
||||
public class ContractingPartyBankAccount : EntityBase
|
||||
{
|
||||
public long ContractingPartyId { get; private set; }
|
||||
|
||||
public PersonalContractingParty ContractingParty { get; private set; }
|
||||
public string CardNumber { get; private set; }
|
||||
public string AccountHolderName { get; private set; }
|
||||
public string AccountNumber { get; private set; }
|
||||
public string IBan { get; private set; }
|
||||
public bool IsAuth { get; private set; }
|
||||
|
||||
public ContractingPartyBankAccount(long contractingPartyId, string cardNumber, string accountHolderName,
|
||||
string accountNumber, string iBan , bool isAuth)
|
||||
{
|
||||
ContractingPartyId = contractingPartyId;
|
||||
CardNumber = cardNumber;
|
||||
AccountHolderName = accountHolderName;
|
||||
AccountNumber = accountNumber;
|
||||
IBan = iBan;
|
||||
IsAuth = isAuth;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
|
||||
namespace Company.Domain.ContractingPartyBankAccountsAgg;
|
||||
|
||||
public interface IContractingPartyBankAccountsRepository:IRepository<long,ContractingPartyBankAccount>
|
||||
{
|
||||
Task<GetContractingPartyBankAccountViewModel> GetList(ContractingPartyBankAccountSearchModel searchModel);
|
||||
Task<List<string>> ContractingPartyOrAccountHolderNameSelectList(string search, string selected);
|
||||
Task<List<string>> IBanSelectList(string search, string selected);
|
||||
|
||||
Task<List<string>> CardNumberSelectList(string search, string selected);
|
||||
Task<List<string>> AccountNumberSelectList(string search, string selected);
|
||||
Task<List<string>> GetAccountHolderNameSelectList(string search, string selected);
|
||||
Task<List<string>> ContractingPartyNamesSelectList(string search, string selected);
|
||||
}
|
||||
@@ -374,6 +374,13 @@ public class CustomizeCheckout : EntityBase
|
||||
TotalPayment = TotalPayment - previousAmount + newAmount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آیا مغایرت مبلغ دارد
|
||||
/// </summary>
|
||||
public bool HasAmountConflict { get; private set; }
|
||||
|
||||
|
||||
public void SetHasAmountConflict(bool hasConflict)
|
||||
{
|
||||
HasAmountConflict = hasConflict;
|
||||
}
|
||||
}
|
||||
@@ -377,4 +377,16 @@ public class CustomizeCheckoutTemp : EntityBase
|
||||
{
|
||||
TotalPayment = TotalPayment - previousAmount + newAmount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آیا مغایرت مبلغ دارد
|
||||
/// </summary>
|
||||
public bool HasAmountConflict { get; private set; }
|
||||
|
||||
|
||||
|
||||
public void SetHasAmountConflict(bool hasConflict)
|
||||
{
|
||||
HasAmountConflict = hasConflict;
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public interface IEmployeeRepository : IRepository<long, Employee>
|
||||
#endregion
|
||||
|
||||
#region Api
|
||||
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText);
|
||||
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText,long id);
|
||||
Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel);
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -15,7 +16,8 @@ public class FinancialStatment : EntityBase
|
||||
{
|
||||
ContractingPartyId = contractingPartyId;
|
||||
ContractingPartyName = contractingPartyName;
|
||||
|
||||
PublicId = Guid.NewGuid();
|
||||
FinancialTransactionList = [];
|
||||
}
|
||||
|
||||
public FinancialStatment()
|
||||
@@ -24,9 +26,24 @@ public class FinancialStatment : EntityBase
|
||||
}
|
||||
public long ContractingPartyId { get; private set; }
|
||||
public string ContractingPartyName { get; private set; }
|
||||
public Guid PublicId { get; private set; }
|
||||
|
||||
[NotMapped]
|
||||
public string PublicIdStr => PublicId.ToString("N");
|
||||
|
||||
public List<FinancialTransaction> FinancialTransactionList { get; set; }
|
||||
|
||||
|
||||
|
||||
public void SetPublicId()
|
||||
{
|
||||
PublicId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
public void AddFinancialTransaction(FinancialTransaction financialTransaction)
|
||||
{
|
||||
if (financialTransaction == null)
|
||||
throw new ArgumentNullException(nameof(financialTransaction));
|
||||
FinancialTransactionList.Add(financialTransaction);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,18 +3,24 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.FinancialStatment;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Company.Domain.FinancialStatmentAgg;
|
||||
|
||||
public interface IFinancialStatmentRepository : IRepository<long, FinancialStatment>
|
||||
{
|
||||
|
||||
[Obsolete("این متد منسوخ شده است. لطفاً از متد GetDetailsByContractingParty استفاده کنید.")]
|
||||
FinancialStatmentViewModel GetDetailsByContractingPartyId(long contractingPartyId);
|
||||
List<FinancialStatmentViewModel> Search(FinancialStatmentSearchModel searchModel);
|
||||
Task<ClientFinancialStatementViewModel> GetClientFinancialStatement(long accountId,
|
||||
ClientFinancialStatementSearchModel searchModel);
|
||||
FinancialStatementSearchModel searchModel);
|
||||
|
||||
Task<OperationResult<ClientFinancialStatementViewModel>> GetDetailsByPublicId(string publicId);
|
||||
Task<GetFinancialStatementBalanceAmount> GetBalanceAmount(long id);
|
||||
Task<double> GetClientDebtAmount(long accountId);
|
||||
Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,FinancialStatementSearchModel searchModel);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.FinancilTransaction;
|
||||
|
||||
@@ -13,4 +14,15 @@ public interface IFinancialTransactionRepository : IRepository<long, FinancialTr
|
||||
{
|
||||
EditFinancialTransaction GetDetails(long id);
|
||||
void RemoveFinancialTransaction(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد بدهی استند حضور غیاب برای اکسل
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyId"></param>
|
||||
/// <param name="transactionDate"></param>
|
||||
/// <param name="debt"></param>
|
||||
/// <param name="description"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult CreateDebtFromExcel(long contractingPartyId, string transactionDate, double debt,
|
||||
string description);
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
@@ -33,4 +34,22 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
|
||||
|
||||
int ArchiveCodeFinder(List<WorkshopViewModel> workshopViewModels);
|
||||
InstitutionContract InstitutionContractByEmployerId(long employerId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد سند مالی حضور غیاب
|
||||
/// </summary>
|
||||
/// <param name="now"></param>
|
||||
/// <param name="endOfMonthGr"></param>
|
||||
/// <param name="endOfMonth"></param>
|
||||
/// <param name="description"></param>
|
||||
void RollcallServiceCreateTransaction();
|
||||
|
||||
Task<PagedResult<GetInstitutionContractListItemsViewModel>> GetList(InstitutionContractListSearchModel searchModel);
|
||||
Task<GetInstitutionContractListStatsViewModel> GetListStats(InstitutionContractListSearchModel searchModel);
|
||||
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||
Task<InstitutionContractWorkshopDetail> GetInstitutionWorkshopDetails(long institutionWorkshopDetailsId);
|
||||
Task<InstitutionContract> GetIncludeWorkshopDetailsAsync(long institutionContractId);
|
||||
void UpdateStatusIfNeeded(long institutionContractId);
|
||||
}
|
||||
@@ -1,17 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.InstitutionContractContactInfoAgg;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
namespace Company.Domain.InstitutionContractAgg;
|
||||
|
||||
public class InstitutionContract : EntityBase
|
||||
{
|
||||
public InstitutionContract(string contractNo, long representativeId, string representativeName, long contractingPartyId,
|
||||
public InstitutionContract(string contractNo, long representativeId, string representativeName,
|
||||
long contractingPartyId,
|
||||
string contractingPartyName, DateTime contractDateGr, string contractDateFa, string state, string city,
|
||||
string address, DateTime contractStartGr, string contractStartFa, DateTime contractEndGr,
|
||||
string contractEndFa, double contractAmount, double dailyCompenseation, double obligation,
|
||||
double totalAmount, int extensionNo, string workshopManualCount, string employeeManualCount, string description, string officialCompany,string typeOfcontract, string hasValueAddedTax, double valueAddedTax)
|
||||
double totalAmount, int extensionNo, string workshopManualCount, string employeeManualCount, string description,
|
||||
string officialCompany, string typeOfcontract, string hasValueAddedTax, double valueAddedTax)
|
||||
{
|
||||
ContractNo = contractNo;
|
||||
RepresentativeId = representativeId;
|
||||
@@ -43,6 +48,10 @@ public class InstitutionContract : EntityBase
|
||||
TypeOfContract = typeOfcontract;
|
||||
HasValueAddedTax = hasValueAddedTax;
|
||||
ValueAddedTax = valueAddedTax;
|
||||
Status = InstitutionContractStatus.Incomplete;
|
||||
ContactInfoList = [];
|
||||
WorkshopDetails = [];
|
||||
Installments = [];
|
||||
}
|
||||
|
||||
public string ContractNo { get; private set; }
|
||||
@@ -55,21 +64,24 @@ public class InstitutionContract : EntityBase
|
||||
public string ContractDateFa { get; private set; }
|
||||
public string State { get; private set; }
|
||||
public string City { get; private set; }
|
||||
|
||||
public string Address { get; private set; }
|
||||
|
||||
//public long ContactInfoId { get; private set; }
|
||||
public DateTime ContractStartGr { get; private set; }
|
||||
public string ContractStartFa { get; private set; }
|
||||
public DateTime ContractEndGr { get; private set; }
|
||||
public string ContractEndFa { get; private set; }
|
||||
|
||||
|
||||
// مبلغ قرارداد
|
||||
public double ContractAmount { get; private set; }
|
||||
|
||||
|
||||
//خسارت روزانه
|
||||
public double DailyCompenseation { get; private set; }
|
||||
|
||||
//وجه التزام
|
||||
public double Obligation { get; private set; }
|
||||
|
||||
// مبلغ کل قرارداد
|
||||
public double TotalAmount { get; private set; }
|
||||
public string WorkshopManualCount { get; private set; }
|
||||
@@ -82,28 +94,33 @@ public class InstitutionContract : EntityBase
|
||||
public string TypeOfContract { get; private set; }
|
||||
public string HasValueAddedTax { get; set; }
|
||||
public double ValueAddedTax { get; set; }
|
||||
public InstitutionContractStatus Status { get; private set; }
|
||||
|
||||
public List<InstitutionContractWorkshopDetail> WorkshopDetails { get; set; }
|
||||
|
||||
public List<InstitutionContractContactInfo> ContactInfoList { get; set; }
|
||||
|
||||
public List<InstitutionContractInstallment> Installments { get; set; }
|
||||
|
||||
public InstitutionContract()
|
||||
{
|
||||
|
||||
ContactInfoList = new List<InstitutionContractContactInfo>();
|
||||
ContactInfoList = [];
|
||||
WorkshopDetails = [];
|
||||
Installments = [];
|
||||
}
|
||||
|
||||
public void Edit(DateTime contractDateGr, string contractDateFa, string state, string city, string address,
|
||||
DateTime contractStartGr, string contractStartFa, DateTime contractEndGr, string contractEndFa,
|
||||
double contractAmount, double dailyCompenseation, double obligation, double totalAmount,
|
||||
string workshopManualCount, string employeeManualCount, string description, string officialCompany,
|
||||
string workshopManualCount, string employeeManualCount, string description, string officialCompany,
|
||||
string typeOfcontract, double valueAddedTax, string hasValueAddedTax)
|
||||
{
|
||||
|
||||
ContractDateGr = contractDateGr;
|
||||
ContractDateFa = contractDateFa;
|
||||
State = state;
|
||||
City = city;
|
||||
Address = address;
|
||||
|
||||
|
||||
ContractStartGr = contractStartGr;
|
||||
ContractStartFa = contractStartFa;
|
||||
ContractEndGr = contractEndGr;
|
||||
@@ -124,13 +141,11 @@ public class InstitutionContract : EntityBase
|
||||
|
||||
public void Active()
|
||||
{
|
||||
|
||||
this.IsActiveString = "true";
|
||||
}
|
||||
|
||||
public void DeActive()
|
||||
{
|
||||
|
||||
this.IsActiveString = "false";
|
||||
}
|
||||
|
||||
@@ -148,4 +163,177 @@ public class InstitutionContract : EntityBase
|
||||
{
|
||||
this.Signature = "0";
|
||||
}
|
||||
|
||||
public void Complete()
|
||||
{
|
||||
Status = InstitutionContractStatus.Completed;
|
||||
}
|
||||
|
||||
public void SetWorkshopDetails(List<InstitutionContractWorkshopDetail> commandWorkshops)
|
||||
{
|
||||
WorkshopDetails = commandWorkshops;
|
||||
}
|
||||
|
||||
public void SetInstallments(List<InstitutionContractInstallment> installments)
|
||||
{
|
||||
Installments = installments;
|
||||
}
|
||||
}
|
||||
|
||||
public class InstitutionContractWorkshopDetail:EntityBase
|
||||
{
|
||||
public InstitutionContractWorkshopDetail(string workshopName, bool hasRollCallPlan,
|
||||
bool hasCustomizeCheckoutPlan, bool hasContractPlan,bool hasContractPlanInPerson,bool hasInsurancePlan,bool hasInsurancePlanInPerson,
|
||||
int personnelCount, double price)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
HasRollCallPlan = hasRollCallPlan;
|
||||
HasCustomizeCheckoutPlan = hasCustomizeCheckoutPlan;
|
||||
HasContractPlan = hasContractPlan;
|
||||
HasContractPlanInPerson = hasContractPlanInPerson;
|
||||
HasInsurancePlan = hasInsurancePlan;
|
||||
HasInsurancePlanInPerson = hasInsurancePlanInPerson;
|
||||
PersonnelCount = personnelCount;
|
||||
WorkshopCreated = false;
|
||||
Price = price;
|
||||
Employers = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// شناسه کارگاه
|
||||
/// </summary>
|
||||
public long? WorkshopId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن حضور و غیاب
|
||||
/// </summary>
|
||||
public bool HasRollCallPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن فیش غیر رسمی
|
||||
/// </summary>
|
||||
public bool HasCustomizeCheckoutPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه
|
||||
/// </summary>
|
||||
public bool HasContractPlan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه حضوری
|
||||
/// </summary>
|
||||
public bool HasContractPlanInPerson { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن بیمه
|
||||
/// </summary>
|
||||
public bool HasInsurancePlan { get; private set; }
|
||||
/// <summary>
|
||||
/// پلن بیمه حضوری
|
||||
/// </summary>
|
||||
public bool HasInsurancePlanInPerson { get; private set; }
|
||||
|
||||
public int PersonnelCount { get; private set; }
|
||||
|
||||
public bool WorkshopCreated { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد نهاد مرتبط
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Navigation property to InstitutionContract
|
||||
/// </summary>
|
||||
public InstitutionContract InstitutionContract { get; private set; }
|
||||
|
||||
public double Price { get; private set; }
|
||||
|
||||
|
||||
private InstitutionContractWorkshopDetail()
|
||||
{
|
||||
}
|
||||
public List<InstitutionContractWorkshopDetailEmployer> Employers { get; private set; } = new();
|
||||
|
||||
public void SetEmployers(List<long> employerIds)
|
||||
{
|
||||
Employers.Clear();
|
||||
foreach (var employerId in employerIds)
|
||||
{
|
||||
Employers.Add(new InstitutionContractWorkshopDetailEmployer(id, employerId));
|
||||
}
|
||||
}
|
||||
public void AddEmployer(long employerId)
|
||||
{
|
||||
if (Employers.Exists(x => x.EmployerId == employerId))
|
||||
return;
|
||||
|
||||
Employers.Add(new InstitutionContractWorkshopDetailEmployer(id, employerId));
|
||||
}
|
||||
|
||||
public void Edit(bool hasAttendancePlan, bool hasUnofficialPayslipPlan, bool hasContractSettlementPlan)
|
||||
{
|
||||
HasRollCallPlan = hasAttendancePlan;
|
||||
HasCustomizeCheckoutPlan = hasUnofficialPayslipPlan;
|
||||
HasContractPlan = hasContractSettlementPlan;
|
||||
}
|
||||
|
||||
public void SetWorkshopId(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
WorkshopCreated = true;
|
||||
}
|
||||
}
|
||||
|
||||
public enum InstitutionContractStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// ناتمام - قرارداد هنوز تکمیل نشده و نیاز به انجام کارهای بیشتر دارد
|
||||
/// </summary>
|
||||
Incomplete = 0,
|
||||
|
||||
/// <summary>
|
||||
/// تکمیل شده - قرارداد به طور کامل انجام شده و نهایی شده است
|
||||
/// </summary>
|
||||
Completed = 1
|
||||
}
|
||||
|
||||
public class InstitutionContractInstallment
|
||||
{
|
||||
public InstitutionContractInstallment(DateTime installmentDateGr, double amount,
|
||||
string description)
|
||||
{
|
||||
InstallmentDateGr = installmentDateGr;
|
||||
InstallmentDateFa = installmentDateGr.ToFarsi();
|
||||
Amount = amount;
|
||||
Description = description;
|
||||
}
|
||||
|
||||
public long Id { get; private set; }
|
||||
public DateTime InstallmentDateGr { get; private set; }
|
||||
public string InstallmentDateFa { get; private set; }
|
||||
public double Amount { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
|
||||
public long InstitutionContractId { get; private set; }
|
||||
|
||||
public InstitutionContract InstitutionContract { get; private set; }
|
||||
}
|
||||
public class InstitutionContractWorkshopDetailEmployer : EntityBase
|
||||
{
|
||||
public long InstitutionContractWorkshopDetailId { get; private set; }
|
||||
public long EmployerId { get; private set; }
|
||||
|
||||
public InstitutionContractWorkshopDetailEmployer(long institutionContractWorkshopDetailId, long employerId)
|
||||
{
|
||||
InstitutionContractWorkshopDetailId = institutionContractWorkshopDetailId;
|
||||
EmployerId = employerId;
|
||||
}
|
||||
|
||||
private InstitutionContractWorkshopDetailEmployer() { }
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
89
Company.Domain/LawAgg/Law.cs
Normal file
89
Company.Domain/LawAgg/Law.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.Law;
|
||||
using System.Text.Json;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Company.Domain.LawAgg
|
||||
{
|
||||
public class Law : EntityBase
|
||||
{
|
||||
private Law(){}
|
||||
public string Title { get; private set; }
|
||||
public bool IsActive { get; private set; }
|
||||
public List<LawItem> Items { get; private set; }
|
||||
public LawType Type { get; private set; }
|
||||
public string HeadTitle { get; private set; }
|
||||
public string NotificationsJson { get; private set; }
|
||||
|
||||
[NotMapped]
|
||||
public List<string> Notifications
|
||||
{
|
||||
get => string.IsNullOrEmpty(NotificationsJson)
|
||||
? new List<string>()
|
||||
: JsonSerializer.Deserialize<List<string>>(NotificationsJson);
|
||||
set => NotificationsJson = JsonSerializer.Serialize(value);
|
||||
}
|
||||
|
||||
public Law(string title, LawType lawType, List<string> notifications, string headTitle )
|
||||
{
|
||||
Title = title;
|
||||
IsActive = true;
|
||||
Items = new List<LawItem>();
|
||||
Type = lawType;
|
||||
Notifications = notifications ?? new List<string>();
|
||||
HeadTitle = headTitle;
|
||||
}
|
||||
|
||||
public void Edit(string title)
|
||||
{
|
||||
Title = title;
|
||||
}
|
||||
|
||||
public void AddItem(string header, string details, int orderNumber)
|
||||
{
|
||||
Items.Add(new LawItem(header, details, orderNumber));
|
||||
}
|
||||
|
||||
|
||||
public void SetItem(List<LawItem> items)
|
||||
{
|
||||
Items = items ?? new List<LawItem>();
|
||||
}
|
||||
public void RemoveItem(int orderNumber)
|
||||
{
|
||||
var item = Items.Find(x => x.OrderNumber == orderNumber);
|
||||
if (item != null)
|
||||
Items.Remove(item);
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
{
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
public void Deactivate()
|
||||
{
|
||||
IsActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
public class LawItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Header { get; private set; }
|
||||
public string Details { get; private set; }
|
||||
public int OrderNumber { get; private set; }
|
||||
public long LawId { get; set; }
|
||||
|
||||
protected LawItem() { }
|
||||
|
||||
public LawItem(string header, string details, int orderNumber)
|
||||
{
|
||||
Header = header;
|
||||
Details = details;
|
||||
OrderNumber = orderNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
namespace Company.Domain.PaymentInstrumentAgg;
|
||||
|
||||
public interface IPaymentInstrumentGroupRepository:IRepository<long,PaymentInstrumentGroup>
|
||||
{
|
||||
void Remove(PaymentInstrumentGroup paymentInstrumentGroup);
|
||||
Task<List<PaymentInstrumentGroupsViewModel>> GetList();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
namespace Company.Domain.PaymentInstrumentAgg;
|
||||
|
||||
public interface IPaymentInstrumentRepository:IRepository<long,PaymentInstrument>
|
||||
{
|
||||
Task<GetPaymentInstrumentListViewModel> GetList(PaymentInstrumentSearchModel searchModel);
|
||||
Task<List<PosTerminalSelectListViewModel>> GetPosTerminalSelectList(string search);
|
||||
Task<List<string>> PosTerminalIdSelectList(string search, string selected);
|
||||
Task<List<string>> IbanSelectList(string search, string selected);
|
||||
Task<List<string>> AccountNumberSelectList(string search, string selected);
|
||||
Task<List<string>> CardNumberSelectList(string search, string selected);
|
||||
Task<List<string>> AccountHolderNameSelectList(string search, string selected);
|
||||
|
||||
}
|
||||
52
Company.Domain/PaymentInstrumentAgg/PaymentInstrument.cs
Normal file
52
Company.Domain/PaymentInstrumentAgg/PaymentInstrument.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
namespace Company.Domain.PaymentInstrumentAgg;
|
||||
|
||||
public class PaymentInstrument:EntityBase
|
||||
{
|
||||
private PaymentInstrument(string cardNumber, string accountHolderName, string accountNumber,string iBan,bool isAuth,long paymentInstrumentGroupId)
|
||||
{
|
||||
CardNumber = cardNumber;
|
||||
AccountHolderName = accountHolderName;
|
||||
AccountNumber = accountNumber;
|
||||
IBan = iBan;
|
||||
IsAuth = isAuth;
|
||||
PaymentInstrumentGroupId = paymentInstrumentGroupId;
|
||||
Type = PaymentInstrumentType.BankAccount;
|
||||
}
|
||||
|
||||
private PaymentInstrument(string posTerminalId , string description,long paymentInstrumentGroupId)
|
||||
{
|
||||
PosTerminalId = posTerminalId;
|
||||
Description = description;
|
||||
PaymentInstrumentGroupId = paymentInstrumentGroupId;
|
||||
Type = PaymentInstrumentType.Pos;
|
||||
}
|
||||
|
||||
public static PaymentInstrument CreatePosType(string posTerminalId, string description, long paymentInstrumentGroupId)
|
||||
{
|
||||
return new PaymentInstrument(posTerminalId, description, paymentInstrumentGroupId);
|
||||
}
|
||||
|
||||
public static PaymentInstrument CreateBankAccount(string cardNumber, string accountHolderName, string accountNumber,
|
||||
string iBan, bool isAuth, long paymentInstrumentGroupId)
|
||||
{
|
||||
return new PaymentInstrument(cardNumber, accountHolderName, accountNumber, iBan, isAuth, paymentInstrumentGroupId);
|
||||
}
|
||||
|
||||
public string CardNumber { get; private set; }
|
||||
public string AccountHolderName { get; private set; }
|
||||
public string AccountNumber { get; private set; }
|
||||
public string IBan { get; private set; }
|
||||
|
||||
public string PosTerminalId { get; private set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public PaymentInstrumentType Type { get; private set; }
|
||||
|
||||
public bool IsAuth { get; private set; }
|
||||
|
||||
public long PaymentInstrumentGroupId { get; private set; }
|
||||
public PaymentInstrumentGroup PaymentInstrumentGroup { get; private set; }
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.PaymentInstrumentAgg;
|
||||
|
||||
public class PaymentInstrumentGroup:EntityBase
|
||||
{
|
||||
public PaymentInstrumentGroup(string name)
|
||||
{
|
||||
Name = name;
|
||||
IsActive = IsActive.True;
|
||||
}
|
||||
|
||||
public string Name { get; private set; }
|
||||
public IsActive IsActive { get; private set; }
|
||||
public List<PaymentInstrument> PaymentInstruments { get; set; }
|
||||
|
||||
public void Edit(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public void DeActive()
|
||||
{
|
||||
IsActive = IsActive.False;
|
||||
}
|
||||
}
|
||||
@@ -9,4 +9,6 @@ public interface IPaymentTransactionRepository:IRepository<long,PaymentTransacti
|
||||
{
|
||||
Task<List<GetPaymentTransactionListViewModel>> GetPaymentTransactionList(
|
||||
GetPaymentTransactionListSearchModel searchModel);
|
||||
|
||||
Task<PaymentTransactionDetailsViewModel> GetDetails(long id);
|
||||
}
|
||||
@@ -2,103 +2,87 @@
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.PaymentTransaction;
|
||||
|
||||
namespace Company.Domain.PaymentTransactionAgg
|
||||
namespace Company.Domain.PaymentTransactionAgg;
|
||||
|
||||
/// <summary>
|
||||
/// نمایانگر یک تراکنش پرداخت شامل جزئیات طرف قرارداد، اطلاعات بانکی، وضعیت تراکنش و مبلغ.
|
||||
/// </summary>
|
||||
public class PaymentTransaction:EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// نمایانگر یک تراکنش پرداخت شامل جزئیات طرف قرارداد، اطلاعات بانکی، وضعیت تراکنش و مبلغ.
|
||||
/// سازنده کلاس PaymentTransaction با دریافت اطلاعات تراکنش.
|
||||
/// </summary>
|
||||
public class PaymentTransaction:EntityBase
|
||||
/// <param name="contractingPartyId">شناسه طرف قرارداد</param>
|
||||
/// <param name="amount">مبلغ تراکنش</param>
|
||||
/// <param name="contractingPartyName"></param>
|
||||
/// <param name="callBackUrl"></param>
|
||||
public PaymentTransaction(long contractingPartyId,
|
||||
double amount,
|
||||
string contractingPartyName,string callBackUrl)
|
||||
{
|
||||
/// <summary>
|
||||
/// سازنده کلاس PaymentTransaction با دریافت اطلاعات تراکنش.
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyId">شناسه طرف قرارداد</param>
|
||||
/// <param name="bankAccountHolderName">نام صاحب حساب بانکی</param>
|
||||
/// <param name="bankName">نام بانک</param>
|
||||
/// <param name="cardNumber">شماره کارت</param>
|
||||
/// <param name="shebaNumber">شماره شبا</param>
|
||||
/// <param name="accountNumber">شماره حساب بانکی</param>
|
||||
/// <param name="status">وضعیت تراکنش پرداخت</param>
|
||||
/// <param name="amount">مبلغ تراکنش</param>
|
||||
/// <param name="transactionId">شناسه یکتای تراکنش</param>
|
||||
/// <param name="contractingPartyName"></param>
|
||||
public PaymentTransaction(long contractingPartyId,
|
||||
string bankAccountHolderName,
|
||||
string bankName,
|
||||
string cardNumber,
|
||||
string shebaNumber,
|
||||
string accountNumber,
|
||||
PaymentTransactionStatus status,
|
||||
double amount,
|
||||
string transactionId,
|
||||
string contractingPartyName)
|
||||
{
|
||||
TransactionDate = DateTime.Now;
|
||||
ContractingPartyId = contractingPartyId;
|
||||
BankAccountHolderName = bankAccountHolderName;
|
||||
BankName = bankName;
|
||||
CardNumber = cardNumber;
|
||||
ShebaNumber = shebaNumber;
|
||||
AccountNumber = accountNumber;
|
||||
Status = status;
|
||||
Amount = amount;
|
||||
TransactionId = transactionId;
|
||||
ContractingPartyName = contractingPartyName;
|
||||
}
|
||||
ContractingPartyId = contractingPartyId;
|
||||
Status = PaymentTransactionStatus.Pending;
|
||||
Amount = amount;
|
||||
ContractingPartyName = contractingPartyName;
|
||||
CallBackUrl = callBackUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ و زمان انجام پرداخت
|
||||
/// </summary>
|
||||
public DateTime TransactionDate { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ و زمان انجام پرداخت
|
||||
/// </summary>
|
||||
public DateTime TransactionDate { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام صاحب حساب بانکی
|
||||
/// </summary>
|
||||
public string BankAccountHolderName { get; set; }
|
||||
/// <summary>
|
||||
/// نام بانک
|
||||
/// </summary>
|
||||
public string BankName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام بانک
|
||||
/// </summary>
|
||||
public string BankName { get; set; }
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
/// <summary>
|
||||
/// وضعیت تراکنش پرداخت
|
||||
/// </summary>
|
||||
public PaymentTransactionStatus Status { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string ShebaNumber { get; set; }
|
||||
/// <summary>
|
||||
/// مبلغ تراکنش
|
||||
/// </summary>
|
||||
public double Amount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب بانکی
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
/// <summary>
|
||||
/// شناسه یکتای تراکنش
|
||||
/// </summary>
|
||||
public string TransactionId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت تراکنش پرداخت
|
||||
/// </summary>
|
||||
public PaymentTransactionStatus Status { get; set; }
|
||||
public string CallBackUrl { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ تراکنش
|
||||
/// </summary>
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه یکتای تراکنش
|
||||
/// </summary>
|
||||
public string TransactionId { get; set; }
|
||||
public void SetPaid(string cardNumber,string bankName)
|
||||
{
|
||||
Status = PaymentTransactionStatus.Success;
|
||||
TransactionDate = DateTime.Now;
|
||||
CardNumber = cardNumber;
|
||||
BankName = bankName;
|
||||
}
|
||||
public void SetFailed()
|
||||
{
|
||||
Status = PaymentTransactionStatus.Failed;
|
||||
TransactionDate = DateTime.Now;
|
||||
}
|
||||
public void SetTransactionId(string transactionId)
|
||||
{
|
||||
TransactionId = transactionId;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace Company.Domain.RollCallAgg;
|
||||
|
||||
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||
{
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute);
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.Reward;
|
||||
using CompanyManagment.App.Contracts.SalaryAid;
|
||||
@@ -21,4 +22,5 @@ public interface ISalaryAidRepository:IRepository<long,SalaryAid>
|
||||
|
||||
SalaryAidsGroupedViewModel GetSearchListAsGrouped(SalaryAidSearchViewModel searchModel);
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -21,6 +21,8 @@ public class ContractingPartyTemp : EntityBase
|
||||
IdNumberSerial = idNumberSerial;
|
||||
Gender = gender;
|
||||
DateOfBirth = dateOfBirth;
|
||||
PublicId = Guid.NewGuid();
|
||||
Status = ContractingPartyTempStatus.InComplete;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -91,10 +93,34 @@ public class ContractingPartyTemp : EntityBase
|
||||
/// </summary>
|
||||
public string Address { get; private set; }
|
||||
|
||||
public ContractingPartyTempStatus Status { get; set; }
|
||||
|
||||
public string VerifyCode { get; set; }
|
||||
public DateTime VerifyCodeSentDateTime { get; set; }
|
||||
|
||||
public Guid PublicId { get; set; }
|
||||
|
||||
public void UpdateAddress(string state, string city, string address)
|
||||
{
|
||||
this.State = state;
|
||||
this.City = city;
|
||||
this.Address = address;
|
||||
}
|
||||
|
||||
public void SetCompleted()
|
||||
{
|
||||
Status = ContractingPartyTempStatus.Completed;
|
||||
}
|
||||
|
||||
public void SetVerifyCode(string verifyCode)
|
||||
{
|
||||
VerifyCode = verifyCode;
|
||||
VerifyCodeSentDateTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ContractingPartyTempStatus
|
||||
{
|
||||
InComplete,
|
||||
Completed
|
||||
}
|
||||
@@ -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.Threading.Tasks;
|
||||
using _0_Framework_b.Domain;
|
||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
@@ -17,10 +18,5 @@ public interface IInstitutionContractTempRepository : IRepository<long, Institut
|
||||
/// <returns></returns>
|
||||
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.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application.UID;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
namespace Company.Domain.TemporaryClientRegistrationAgg;
|
||||
|
||||
public class InstitutionContractTemp : EntityBase
|
||||
{
|
||||
public InstitutionContractTemp(long contractingPartyTempId, string paymentModel, string periodModel, double totalPayment, DateTime contractStartGr, DateTime contractEndGr, string officialCompany, double valueAddedTax, string verifyCode, 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;
|
||||
PaymentModel = paymentModel;
|
||||
@@ -22,6 +24,7 @@ public class InstitutionContractTemp : EntityBase
|
||||
MessageId = messageId;
|
||||
SendVerifyCodeTime = sendVerifyCodeTime;
|
||||
VerifyCodeEndTime = verifyCodeEndTime;
|
||||
PublicId = Guid.NewGuid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -87,7 +90,7 @@ public class InstitutionContractTemp : EntityBase
|
||||
/// -
|
||||
/// Completed ثبت نام تکمیل شده
|
||||
/// </summary>
|
||||
public string RegistrationStatus { get; private set; }
|
||||
public InstitutionContractTempStatus RegistrationStatus { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی پیامک ارسال شده
|
||||
@@ -104,8 +107,16 @@ public class InstitutionContractTemp : EntityBase
|
||||
/// </summary>
|
||||
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;
|
||||
PaymentModel = paymentModel;
|
||||
@@ -122,7 +133,7 @@ public class InstitutionContractTemp : EntityBase
|
||||
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;
|
||||
RegistrationStatus = registrationStatus;
|
||||
@@ -131,9 +142,10 @@ public class InstitutionContractTemp : EntityBase
|
||||
VerifyCodeEndTime = verifyCodeEndTime;
|
||||
}
|
||||
|
||||
public void ChangeRegistrationStatus(string registrationStatus)
|
||||
public void ChangeRegistrationStatus(InstitutionContractTempStatus registrationStatus)
|
||||
{
|
||||
RegistrationStatus = registrationStatus;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public interface IWorkshopRepository : IRepository<long, Workshop>
|
||||
Task<int> GetWorkshopsForEmployeeStartWorkCount(long accountId);
|
||||
Task<List<WorkshopWithLeftWorkTempEmployeesDto>> GetWorkshopsForLeftWorkTemp(long accountId);
|
||||
Task<int> GetWorkshopsForLeftWorkTempCount(long accountId);
|
||||
Task<List<WorkshopSelectListViewModel>> GetSelectList(string search);
|
||||
Task<List<WorkshopSelectListViewModel>> GetSelectList(string search, long id);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -76,14 +76,13 @@ public class Workshop : EntityBase
|
||||
|
||||
ClientEmployeeWorkshopList = new List<ClientEmployeeWorkshop>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Workshop(string workshopName,string workshopSureName, string insuranceCode, string typeOfOwnership, string archiveCode, string agentName, string agentPhone,
|
||||
string state, string city, string address, string typeOfInsuranceSend, string typeOfContract, string contractTerm,
|
||||
string agreementNumber, bool fixedSalary, string population,long? insuranceJobId, string zoneName, bool addBonusesPay, bool addYearsPay, bool addLeavePay, bool totalPaymentHide,
|
||||
bool isClassified, string computeOptions, string bonusesOptions, string yearsOptions, string hasRollCallFreeVip, bool workshopHolidayWorking,
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout, IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout)
|
||||
bool insuranceCheckoutOvertime, bool insuranceCheckoutFamilyAllowance, bool createContract, bool signContract, bool createCheckout, bool signCheckout,
|
||||
IsActive cutContractEndOfYear, bool rotatingShiftCompute, bool isStaticCheckout,long contractingPartyId)
|
||||
{
|
||||
WorkshopName = workshopName;
|
||||
WorkshopSureName = workshopSureName;
|
||||
@@ -134,6 +133,7 @@ public class Workshop : EntityBase
|
||||
CutContractEndOfYear = cutContractEndOfYear;
|
||||
RotatingShiftCompute = rotatingShiftCompute;
|
||||
IsStaticCheckout = isStaticCheckout;
|
||||
ContractingPartyId = contractingPartyId;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,6 +233,8 @@ public class Workshop : EntityBase
|
||||
/// </summary>
|
||||
public bool IsStaticCheckout { get; private set; }
|
||||
|
||||
public long ContractingPartyId { get; private set; }
|
||||
|
||||
public Workshop()
|
||||
{
|
||||
RollCallServicesList = new List<RollCallService>();
|
||||
@@ -344,4 +346,10 @@ public class Workshop : EntityBase
|
||||
this.IsActiveString = "false";
|
||||
ArchiveCode = "b-" + archiveCode;
|
||||
}
|
||||
}
|
||||
|
||||
public enum WorkshopRegistrationStatus
|
||||
{
|
||||
NotRegistered = 0,
|
||||
Registered = 1
|
||||
}
|
||||
@@ -21,6 +21,18 @@ public interface IYearlySalaryRepository : IRepository<long, YearlySalary>
|
||||
double GetLeavePay(DateTime contractStart, DateTime contractEnd, double daylyWage, double consumableItem, double housingAllowance, double familyAllowance , string weeklyWorkingTime, int officialholiday, int friday, string totalHoursH, string totalHorsM);
|
||||
double GetOverTimeWorking(double dayliWage, string overTimeWorkH, string overTimeWorkM);
|
||||
double GetOverNightWorking(double dayliWage, string overNightWorkH, string overNightWorkM, string weeklyWorkingTime, int officialholiday, int friday, DateTime contractStart, DateTime contractEnd, string totalHoursH, string totalHorsM);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات و لیست پایه سنوات های پرسنل
|
||||
/// </summary>
|
||||
/// <param name="contractStart"></param>
|
||||
/// <param name="contractEnd"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="leftWorkList"></param>
|
||||
/// <returns></returns>
|
||||
Task<BaseYearDataViewModel> BaseYearCompute(DateTime contractStart, DateTime contractEnd, long employeeId,
|
||||
long workshopId, List<LeftWorkViewModel> leftWorkList);
|
||||
DayliFeeViewModel DayliFeeComputing(DateTime startDateW,DateTime contractStart, DateTime endDateW, long employeeId, long workshopId,List<LeftWorkViewModel> leftWorkList);
|
||||
Task<DayliFeeViewModel> DayliFeeComputingAsync(DateTime startDateW, DateTime contractStart, DateTime endDateW, long employeeId, long workshopId, List<LeftWorkViewModel> leftWorkList);
|
||||
string ConsumableItems(DateTime endDateW);
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface IEmployerRepository : IRepository<long, Employer>
|
||||
|
||||
List<EmployerViewModel> GetEmployersHasWorkshop();
|
||||
|
||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search);
|
||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search,long id);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -141,7 +141,9 @@ public class CheckoutViewModel
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
|
||||
public CheckoutRollCallViewModel CheckoutRollCall { get; set; }
|
||||
|
||||
public bool HasAmountConflict { get; set; }
|
||||
public string EmployeeMandatoryHoursStr { get; set; }
|
||||
public TimeSpan EmployeeMandatoryHoursTimeSpan { get; set; }
|
||||
}
|
||||
|
||||
public class CheckoutRollCallViewModel
|
||||
|
||||
@@ -135,6 +135,11 @@ public class CreateCheckout
|
||||
/// </summary>
|
||||
public string TotalDayOfBunosesCompute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ساعت موظفی پرسنل برای این ماه
|
||||
/// </summary>
|
||||
public TimeSpan EmployeeMandatoryHours { get; set; }
|
||||
|
||||
public bool HolidayWorking { get; set; }
|
||||
|
||||
public string ShiftWork { get; set; }
|
||||
|
||||
@@ -56,5 +56,14 @@ public class ComputingViewModel
|
||||
public TimeSpan TotalPaidLeave { get; set; }
|
||||
public TimeSpan TotalSickLeave { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ساعت موظفی پرسنل برای این ماه
|
||||
/// </summary>
|
||||
public TimeSpan EmployeeMandatoryHours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموع مرخصی های پرسنل در این فیش حقوقی
|
||||
/// </summary>
|
||||
//public TimeSpan TotalLeaveOnThisCheckout { get; set; }
|
||||
//public List<string> holidays;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// جستجوی لیست اطلاعات بانکی طرف حساب
|
||||
/// </summary>
|
||||
public class ContractingPartyBankAccountSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام طرف حساب / نام صاحب حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyOrAccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه دستگاه
|
||||
/// </summary>
|
||||
public string PosTerminalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شمارش page
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد اطلاعات بانکی طرف حساب
|
||||
/// </summary>
|
||||
public class CreateContractingPartyBankAccounts
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام صاحب حساب
|
||||
/// </summary>
|
||||
public string AccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا احزار هویت شده است یا خیر
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// لیست اطلاعات بانکی طرف حساب
|
||||
/// </summary>
|
||||
public class GetContractingPartyBankAccountViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// تعداد
|
||||
/// </summary>
|
||||
public int Count { get; set; }
|
||||
public List<ContractingPartyBankAccountsGroupedViewModel> List { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ContractingPartyBankAccountsGroupedViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// لیست حساب های بانکی
|
||||
/// </summary>
|
||||
public List<ContractingPartyBankAccountsItemViewModel> BankAccountsItems { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حساب بانکی طرف حساب
|
||||
/// </summary>
|
||||
public class ContractingPartyBankAccountsItemViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام صاحب حساب
|
||||
/// </summary>
|
||||
public string AccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Security.AccessControl;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.OriginalTitle;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
|
||||
/// <summary>
|
||||
/// اپلیکیشن اطلاعات بانکی طرف حساب
|
||||
/// </summary>
|
||||
public interface IContractingPartyBankAccountsApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد اطلاعات بانکی طرف حساب
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> Create(CreateContractingPartyBankAccounts command);
|
||||
Task<OperationResult> Create(List<CreateContractingPartyBankAccounts> commands);
|
||||
|
||||
/// <summary>
|
||||
/// لیست اطلاعات طرف حساب بانکی
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetContractingPartyBankAccountViewModel> GetList(ContractingPartyBankAccountSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست جستجو برای نام طرف حساب / صاحب حساب
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> ContractingPartyOrAccountHolderNameSelectList(string search, string selected);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست شماره کارت
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> CardNumberSelectList(string search, string selected);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست شماره شبا
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> IBanSelectList(string search, string selected);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست شماره حساب
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> AccountNumberSelectList(string search, string selected);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست نام صاحبان حساب
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> GetAccountHolderNameSelectList(string search, string selected);
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست نام طرف حسابها
|
||||
/// </summary>
|
||||
/// <param name="search">نام جستجو</param>
|
||||
/// <param name="selected">نام سلکت شده</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> ContractingPartyNamesSelectList(string search, string selected);
|
||||
}
|
||||
|
||||
@@ -109,6 +109,8 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||
public List<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; }
|
||||
public List<CustomizeSifts> RegularShift { get; set; }
|
||||
|
||||
public bool HasAmountConflict { get; set; }
|
||||
|
||||
//public bool HasLeft { get; set; }
|
||||
//public string IsBlockCantracingParty { get; set; }
|
||||
//public string IsActiveString { get; set; }
|
||||
|
||||
@@ -81,12 +81,13 @@ public interface IEmployeeApplication
|
||||
|
||||
#region Api
|
||||
|
||||
/// <summary>
|
||||
/// لیست پرسنل برای جستجو
|
||||
/// </summary>
|
||||
/// <param name="searchText"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText);
|
||||
/// <summary>
|
||||
/// لیست پرسنل برای جستجو
|
||||
/// </summary>
|
||||
/// <param name="searchText"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText, long id);
|
||||
|
||||
/// <summary>
|
||||
/// لیست کل پرسنل
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
|
||||
@@ -42,8 +45,9 @@ public interface IEmployerApplication
|
||||
/// لیست نام کارفرما ها برای جستجو
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search);
|
||||
Task<List<EmployerSelectListViewModel>> GetSelectList(string search, long id);
|
||||
|
||||
#endregion
|
||||
#region NewByHeydari
|
||||
@@ -124,4 +128,282 @@ public interface IEmployerApplication
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
Task<OperationResult> CreateWorkflowRegistration(CreateEmployerWorkflowRegistration command);
|
||||
/// <summary>
|
||||
/// ویرایش کارفرما در گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditWorkflowRegistration(EditEmployerWorkflowRegistration command);
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما از گردش کار ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="employerId">شناسه کارفرما</param>
|
||||
/// <param name="institutionWorkshopDetailsId">شناسه جزئیات کارگاه موسسه</param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> DeleteWorkflowRegistration(long employerId, long institutionWorkshopDetailsId);
|
||||
|
||||
Task<OperationResult<AuthenticateUserViewModel>> AuthenticateEmployer(string nationalCode, string dateOfBirth, string mobile);
|
||||
}
|
||||
|
||||
public class AuthenticateUserViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سری شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumberSeri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سریال شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumberSerial { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره همراه
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
|
||||
/// </summary>
|
||||
public class CreateEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقیقی
|
||||
/// </summary>
|
||||
public CreateRealEmployerWorkflowRegistration RealEmployer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقوقی
|
||||
/// </summary>
|
||||
public CreateLegalEmployerWorkflowRegistration LegalEmployer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع حقوقی
|
||||
/// </summary>
|
||||
public LegalType LegalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه جزئیات کارگاه موسسه
|
||||
/// </summary>
|
||||
public long InstitutionWorkshopDetailsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد موسسه
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرمای حقوقی در گردش کار - شامل اطلاعات شرکت و مدیرعامل
|
||||
/// </summary>
|
||||
public class CreateLegalEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی شرکت
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoNationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoIdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoFName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoLName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoFatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoDateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoPlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه مدیرعامل
|
||||
/// </summary>
|
||||
public string CeoDateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره موبایل
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string TelephoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سیستم دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ثبت کارفرمای حقیقی در گردش کار - شامل اطلاعات شخصی کارفرما
|
||||
/// </summary>
|
||||
public class CreateRealEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد
|
||||
/// </summary>
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره موبایل
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه
|
||||
/// </summary>
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه
|
||||
/// </summary>
|
||||
public string DateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سیستم دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string Telephone { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// کلاس ویرایش کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
|
||||
/// </summary>
|
||||
public class EditEmployerWorkflowRegistration : CreateEmployerWorkflowRegistration
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه کارفرما
|
||||
/// </summary>
|
||||
public long EmployerId { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||||
|
||||
public class ClientFinancialStatementViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی FinancialStatement
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع بدهکاری
|
||||
/// </summary>
|
||||
public double TotalDebt { get; set; }
|
||||
/// <summary>
|
||||
/// جمع بستانکاری
|
||||
/// </summary>
|
||||
public double TotalCredit { get; set; }
|
||||
/// <summary>
|
||||
/// مبلغ قابل پرداخت
|
||||
/// </summary>
|
||||
public double TotalAmountPayable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تراکنش ها
|
||||
/// </summary>
|
||||
public List<FinancialTransactionDetailViewModel> Transactions { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||||
|
||||
public class FinancialStatementSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// از تاریخ
|
||||
/// </summary>
|
||||
public string FromDate { get; set; }
|
||||
/// <summary>
|
||||
/// تا تاریخ
|
||||
/// </summary>
|
||||
public string ToDate { get; set; }
|
||||
/// <summary>
|
||||
/// از مبلغ
|
||||
/// </summary>
|
||||
public double FromAmount { get; set; }
|
||||
/// <summary>
|
||||
/// تا مبلغ
|
||||
/// </summary>
|
||||
public double ToAmount { get; set; }
|
||||
/// <summary>
|
||||
/// نوع عملیات تراکنش
|
||||
/// </summary>
|
||||
public FinancialTransactionType? Type { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||||
|
||||
public class FinancialTransactionDetailViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// زمان و تاریخ میلادی
|
||||
/// </summary>
|
||||
public DateTime DateTimeGr { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ
|
||||
/// </summary>
|
||||
public string DateFa { get; set; }
|
||||
/// <summary>
|
||||
/// زمان
|
||||
/// </summary>
|
||||
public string TimeFa { get; set; }
|
||||
/// <summary>
|
||||
/// شرح
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// نوع عملیات پرداخت
|
||||
/// </summary>
|
||||
public FinancialTransactionType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع عملیات پرداخت به صورت استرینگ
|
||||
/// </summary>
|
||||
public string TypeStr { get; set; }
|
||||
/// <summary>
|
||||
/// بدهکار
|
||||
/// </summary>
|
||||
public double Debtor { get; set; }
|
||||
/// <summary>
|
||||
/// بستانکار
|
||||
/// </summary>
|
||||
public double Creditor { get; set; }
|
||||
/// <summary>
|
||||
/// باقی مانده
|
||||
/// </summary>
|
||||
public double Balance { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||||
|
||||
public enum FinancialTransactionType
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد درآمد
|
||||
/// </summary>
|
||||
Debt,
|
||||
/// <summary>
|
||||
/// دریافت درآمد
|
||||
/// </summary>
|
||||
Credit
|
||||
}
|
||||
@@ -1,18 +1,26 @@
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.FinancilTransaction;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.FinancilTransaction;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.FinancialStatment;
|
||||
|
||||
public interface IFinancialStatmentApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد سند مالی از طریق درگاه بانکی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult CreateFromBankGateway(CreateFinancialStatment command);
|
||||
OperationResult Create(CreateFinancialStatment command);
|
||||
|
||||
List<FinancialStatmentViewModel> Search(FinancialStatmentSearchModel searchModel);
|
||||
[Obsolete("این متد منسوخ شده است. لطفاً از متد GetDetailsByContractingParty استفاده کنید.")]
|
||||
FinancialStatmentViewModel GetDetailsByContractingPartyId(long contractingPartyId);
|
||||
|
||||
/// <summary>
|
||||
@@ -21,66 +29,53 @@ public interface IFinancialStatmentApplication
|
||||
/// <param name="searchModel"></param>
|
||||
/// <param name="accountId"></param>
|
||||
/// <returns>مدل صورت حساب مالی کلاینت</returns>
|
||||
Task<ClientFinancialStatementViewModel> GetClientFinancialStatement(ClientFinancialStatementSearchModel searchModel,
|
||||
Task<ClientFinancialStatementViewModel> GetClientFinancialStatement(FinancialStatementSearchModel searchModel,
|
||||
long accountId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نمایش اطلاعات صورت حساب مالی کلاینت بر اساس کد هش
|
||||
/// </summary>
|
||||
/// <param name="hashCode"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult<ClientFinancialStatementViewModel>> GetDetailsByPublicId(string publicId);
|
||||
|
||||
/// <summary>
|
||||
/// مقدار مانده صورت حساب مالی را برمی گرداند
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetFinancialStatementBalanceAmount> GetBalanceAmount(long id);
|
||||
|
||||
/// <summary>
|
||||
/// مقدار بدهی کلاینت را برمی گرداند
|
||||
/// </summary>
|
||||
/// <param name="AccountId"></param>
|
||||
/// <param name="accountId"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetClientDebtAmount(long AccountId);
|
||||
Task<double> GetClientDebtAmount(long accountId);
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات بر اساس
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyId"></param>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,
|
||||
FinancialStatementSearchModel searchModel);
|
||||
}
|
||||
|
||||
public class ClientFinancialStatementSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// از تاریخ
|
||||
/// </summary>
|
||||
public string FromDate { get; set; }
|
||||
/// <summary>
|
||||
/// تا تاریخ
|
||||
/// </summary>
|
||||
public string ToDate { get; set; }
|
||||
/// <summary>
|
||||
/// از مبلغ
|
||||
/// </summary>
|
||||
public double FromAmount { get; set; }
|
||||
/// <summary>
|
||||
/// تا مبلغ
|
||||
/// </summary>
|
||||
public double ToAmount { get; set; }
|
||||
/// <summary>
|
||||
/// نوع عملیات تراکنش
|
||||
/// </summary>
|
||||
public FinancialTransactionType? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// صفحه بندی
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public enum FinancialTransactionType
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد درآمد
|
||||
/// </summary>
|
||||
Debt,
|
||||
/// <summary>
|
||||
/// دریافت درآمد
|
||||
/// </summary>
|
||||
Credit
|
||||
}
|
||||
|
||||
public class ClientFinancialStatementViewModel
|
||||
public class FinancialStatmentDetailsByContractingPartyViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی FinancialStatement
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جمع بدهکاری
|
||||
/// </summary>
|
||||
@@ -97,47 +92,14 @@ public class ClientFinancialStatementViewModel
|
||||
/// <summary>
|
||||
/// تراکنش ها
|
||||
/// </summary>
|
||||
public List<ClientFinancialTransactionViewModel> Transactions { get; set; }
|
||||
public List<FinancialTransactionDetailViewModel> List { get; set; }
|
||||
}
|
||||
|
||||
public class ClientFinancialTransactionViewModel
|
||||
public class GetFinancialStatementBalanceAmount
|
||||
{
|
||||
/// <summary>
|
||||
/// زمان و تاریخ میلادی
|
||||
/// مبلغ
|
||||
/// </summary>
|
||||
public DateTime DateTimeGr { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ
|
||||
/// </summary>
|
||||
public string DateFa { get; set; }
|
||||
/// <summary>
|
||||
/// زمان
|
||||
/// </summary>
|
||||
public string TimeFa { get; set; }
|
||||
/// <summary>
|
||||
/// شرح
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// نوع عملیات پرداخت
|
||||
/// </summary>
|
||||
public FinancialTransactionType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع عملیات پرداخت به صورت استرینگ
|
||||
/// </summary>
|
||||
public string TypeStr { get; set; }
|
||||
/// <summary>
|
||||
/// بدهکار
|
||||
/// </summary>
|
||||
public double Debtor { get; set; }
|
||||
/// <summary>
|
||||
/// بستانکار
|
||||
/// </summary>
|
||||
public double Creditor { get; set; }
|
||||
/// <summary>
|
||||
/// باقی مانده
|
||||
/// </summary>
|
||||
public double Balance { get; set; }
|
||||
public double Amount { get; set; }
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,316 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Security.AccessControl;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// نوع حقوقی طرف قرارداد (حقیقی یا حقوقی)
|
||||
/// </summary>
|
||||
public LegalType ContractingPartyLegalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات شخص حقیقی
|
||||
/// </summary>
|
||||
public CreateInstitutionContractRealPartyRequest RealParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات شخص حقوقی
|
||||
/// </summary>
|
||||
public CreateInstitutionContractLegalPartyRequest LegalParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مدت زمان قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractDuration Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آدرس
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات تماس
|
||||
/// </summary>
|
||||
public List<CreateContactInfo> ContactInfos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارگاههای مورد نظر برای قرارداد
|
||||
/// </summary>
|
||||
public List<CreateInstitutionContractWorkshopDetail> Workshops { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد (فارسی)
|
||||
/// </summary>
|
||||
public 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; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ کل قرارداد
|
||||
/// </summary>
|
||||
public double TotalAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا قرارداد اقساطی است؟
|
||||
/// </summary>
|
||||
public bool IsInstallment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مالیات ارزش افزوده
|
||||
/// </summary>
|
||||
public double TaxAmount { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// مدت زمان قرارداد نهاد
|
||||
/// </summary>
|
||||
public enum InstitutionContractDuration
|
||||
{
|
||||
/// <summary>
|
||||
/// یک ماهه
|
||||
/// </summary>
|
||||
OneMonth = 1,
|
||||
|
||||
/// <summary>
|
||||
/// سه ماهه
|
||||
/// </summary>
|
||||
ThreeMonths = 3,
|
||||
|
||||
/// <summary>
|
||||
/// شش ماهه
|
||||
/// </summary>
|
||||
SixMonths = 6,
|
||||
|
||||
/// <summary>
|
||||
/// دوازده ماهه
|
||||
/// </summary>
|
||||
TwelveMonths = 12
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارگاه در درخواست ایجاد قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractWorkshopDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه کارگاه (اختیاری - در صورت وجود کارگاه از قبل)
|
||||
/// </summary>
|
||||
public long? WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن حضور و غیاب
|
||||
/// </summary>
|
||||
public bool HasRollCallPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن فیش غیر رسمی
|
||||
/// </summary>
|
||||
public bool HasCustomizeCheckoutPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه
|
||||
/// </summary>
|
||||
public bool HasContractPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن قرارداد و تصفیه حضوری
|
||||
/// </summary>
|
||||
public bool HasContractPlanInPerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پلن بیمه
|
||||
/// </summary>
|
||||
public bool HasInsurancePlan { get; set; }
|
||||
/// <summary>
|
||||
/// پلن بیمه حضوری
|
||||
/// </summary>
|
||||
public bool HasInsurancePlanInPerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد پرسنل کارگاه
|
||||
/// </summary>
|
||||
public int PersonnelCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ
|
||||
/// </summary>
|
||||
public double Price { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد طرف حقیقی در قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractRealPartyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد فارسی
|
||||
/// </summary>
|
||||
public string BirthDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه موقت طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست ایجاد طرف حقوقی در قرارداد نهاد
|
||||
/// </summary>
|
||||
public class CreateInstitutionContractLegalPartyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی شرکت
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن شرکت
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه موقت طرف قرارداد
|
||||
/// </summary>
|
||||
public long ContractingPartyTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی نماینده قانونی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد نماینده قانونی فارسی
|
||||
/// </summary>
|
||||
public string BirthDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام نماینده قانونی
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی نماینده قانونی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر نماینده قانونی
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه نماینده قانونی
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت احراز هویت نماینده قانونی
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سمت نماینده قانونی در شرکت
|
||||
/// </summary>
|
||||
public string Position { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت نماینده قانونی
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public class EditInstitutionContractRequest:CreateInstitutionContractRequest
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public class GetInstitutionContractListItemsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دارای امضا
|
||||
/// </summary>
|
||||
public bool HasSigniture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره قرارداد
|
||||
/// </summary>
|
||||
public string ContractNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام معرف
|
||||
/// </summary>
|
||||
public string RepresentativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارفرما
|
||||
/// </summary>
|
||||
public string ArchiveNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارفرماها
|
||||
/// </summary>
|
||||
public List<string> EmployerNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد کارگاه
|
||||
/// </summary>
|
||||
public int WorkshopsCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه ها
|
||||
/// </summary>
|
||||
public List<string> WorkshopNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد پرسنل
|
||||
/// </summary>
|
||||
public int EmployeesCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شروع قرارداد
|
||||
/// </summary>
|
||||
public string ContractStartFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایان قرارداد
|
||||
/// </summary>
|
||||
public string ContractEndFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قرارداد
|
||||
/// </summary>
|
||||
public double ContractAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت مالی
|
||||
/// </summary>
|
||||
public double Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus ListStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا منقضی شده است
|
||||
/// </summary>
|
||||
public bool IsExpired { get; set; }
|
||||
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
/// <summary>
|
||||
/// لیست قرارداد های موسسه
|
||||
/// </summary>
|
||||
public class GetInstitutionContractListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// بدهی کل
|
||||
/// </summary>
|
||||
public double TotalDebt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قرارداد ها
|
||||
/// </summary>
|
||||
public double TotalAmount { get; set; }
|
||||
|
||||
public List<GetInstitutionContractListItemsViewModel> Items { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,33 +1,301 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
/// <summary>
|
||||
/// رابط اپلیکیشن قراردادهای مؤسسه
|
||||
/// مدیریت عملیات مربوط به قراردادهای مالی مؤسسات
|
||||
/// </summary>
|
||||
public interface IInstitutionContractApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد قرارداد جدید
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات قرارداد جدید</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Create(CreateInstitutionContract command);
|
||||
OperationResult Extension(CreateInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// تمدید قرارداد موجود
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات قرارداد برای تمدید</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Extension(CreateInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش قرارداد موجود
|
||||
/// </summary>
|
||||
/// <param name="command">اطلاعات جدید قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Edit(EditInstitutionContract command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت جزئیات قرارداد برای ویرایش
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>اطلاعات قرارداد</returns>
|
||||
EditInstitutionContract GetDetails(long id);
|
||||
|
||||
/// <summary>
|
||||
/// جستجو در قراردادها
|
||||
/// </summary>
|
||||
/// <param name="searchModel">مدل جستجو</param>
|
||||
/// <returns>لیست قراردادها</returns>
|
||||
List<InstitutionContractViewModel> Search(InstitutionContractSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// جستجوی جدید در قراردادها
|
||||
/// </summary>
|
||||
/// <param name="searchModel">مدل جستجو</param>
|
||||
/// <returns>لیست قراردادها</returns>
|
||||
List<InstitutionContractViewModel> NewSearch(InstitutionContractSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت اطلاعات قرارداد های مالی فعال
|
||||
///دارای کارگاه
|
||||
/// جهت ست کردن سرویس ها از طریق اکسل
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<InstitutionContractViewModel> GetInstitutionContractToSetServicesExcelImport();
|
||||
|
||||
/// <summary>
|
||||
/// چاپ مجموعه قراردادها
|
||||
/// </summary>
|
||||
/// <param name="id">لیست شناسه قراردادها</param>
|
||||
/// <returns>لیست قراردادها برای چاپ</returns>
|
||||
List<InstitutionContractViewModel> PrintAll(List<long> id);
|
||||
|
||||
/// <summary>
|
||||
/// چاپ یک قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>اطلاعات قرارداد برای چاپ</returns>
|
||||
InstitutionContractViewModel PrintOne(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Active(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult DeActive(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن قرارداد (حالت آبی)
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult DeActiveBlue(long id);
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن تمام اتصالات قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult DeActiveAllConnections(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن مجدد تمام اتصالات قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult ReActiveAllConnections(long id);
|
||||
|
||||
/// <summary>
|
||||
/// فعال کردن مجدد تمام قراردادها بعد از ایجاد قرارداد جدید
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyId">شناسه طرف قرارداد</param>
|
||||
void ReActiveAllAfterCreateNew(long contractingPartyId);
|
||||
|
||||
/// <summary>
|
||||
/// حذف قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
void RemoveContract(long id);
|
||||
|
||||
/// <summary>
|
||||
/// امضای قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult Sign(long id);
|
||||
|
||||
/// <summary>
|
||||
/// لغو امضای قرارداد
|
||||
/// </summary>
|
||||
/// <param name="id">شناسه قرارداد</param>
|
||||
/// <returns>نتیجه عملیات</returns>
|
||||
OperationResult UnSign(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد حساب کاربری برای طرف قرارداد
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyid">شناسه طرف قرارداد</param>
|
||||
/// <param name="accountId">شناسه حساب کاربری</param>
|
||||
void CreateContractingPartyAccount(long contractingPartyid, long accountId);
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه مبلغ قرارداد بر اساس تعداد افراد
|
||||
/// </summary>
|
||||
/// <param name="countPerson">تعداد افراد</param>
|
||||
/// <returns>مبلغ قرارداد</returns>
|
||||
double GetcontractAmount(int countPerson);
|
||||
}
|
||||
|
||||
#region Api
|
||||
|
||||
/// <summary>
|
||||
/// لیست قرارداد های مالی
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<PagedResult<GetInstitutionContractListItemsViewModel>> GetList
|
||||
(InstitutionContractListSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت لیست کلی
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetInstitutionContractListStatsViewModel> GetListStats(InstitutionContractListSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateAsync(CreateInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditAsync(EditInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// تمدید قرارداد
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> ExtensionَAsync(CreateInstitutionContractRequest command);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست طرف حساب هایی که ثبت نام آنها تکمیل شده
|
||||
/// جهت نمایش در کارپوشه
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<RegistrationWorkflowMainListViewModel>> RegistrationWorkflowMainList();
|
||||
/// <summary>
|
||||
/// دریافت آیتم های کارپوشه ثبت نام
|
||||
/// </summary>
|
||||
/// <param name="institutionContractId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<RegistrationWorkflowItemsViewModel>> RegistrationWorkflowItems(long institutionContractId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class GetInstitutionContractListStatsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// مجموع بدهی قراردادهای مؤسسه
|
||||
/// این ویژگی بدهیهای قراردادهای مربوطه را تجمیع میکند و
|
||||
/// یک معیار واحد برای اندازهگیری تعهدات مالی ارائه میدهد
|
||||
/// </summary>
|
||||
public double TotalDebt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموع ارزش پولی مرتبط با قراردادهای مؤسسه
|
||||
/// این ویژگی مبلغ کل قراردادهای مربوطه را برای
|
||||
/// گزارشگیری و تجزیه و تحلیل مالی تجمیع میکند
|
||||
/// </summary>
|
||||
public double TotalAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مجموعهای از تعداد قراردادهای مؤسسه دستهبندی شده بر اساس وضعیت
|
||||
/// این ویژگی تعداد قراردادها را برای هر وضعیت تعریف شده در
|
||||
/// شمارش InstitutionContractStatus ارائه میدهد که امکان تجزیه و تحلیل و نظارت بر توزیع قراردادها را فراهم میکند
|
||||
/// </summary>
|
||||
public List<InstitutionContractStatusCount> Counts { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// شمارش وضعیت قراردادهای مؤسسه
|
||||
/// نمایش تعداد قراردادها برای هر وضعیت خاص
|
||||
/// </summary>
|
||||
public class InstitutionContractStatusCount
|
||||
{
|
||||
/// <summary>
|
||||
/// وضعیت لیست قرارداد
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus ListStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد قراردادها در این وضعیت
|
||||
/// </summary>
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// درخواست تمدید قرارداد مؤسسه
|
||||
/// شامل اطلاعات قرارداد قبلی برای فرآیند تمدید
|
||||
/// </summary>
|
||||
public class ExtenstionInstitutionContractRequest : EditInstitutionContractRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه قرارداد قبلی که قرار است تمدید شود
|
||||
/// </summary>
|
||||
public long PreviousContractId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// مدل نمایش اقساط قرارداد مؤسسه
|
||||
/// شامل اطلاعات مربوط به هر قسط از قرارداد
|
||||
/// </summary>
|
||||
public class InstitutionContractInstallmentViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه یکتای قسط
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ میلادی قسط
|
||||
/// </summary>
|
||||
public DateTime InstallmentDateGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ فارسی قسط
|
||||
/// </summary>
|
||||
public string InstallmentDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قسط
|
||||
/// </summary>
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات قسط
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه قرارداد مؤسسه مربوط به این قسط
|
||||
/// </summary>
|
||||
public long InstitutionContractId { get; set; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public class InstitutionContractListSearchModel :PaginationRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// کارفرما / کارگاه / طرف حساب / معرف
|
||||
/// </summary>
|
||||
public string EmployerOrWorkshopOrContractingPartyOrRepresentativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قرارداد از
|
||||
/// </summary>
|
||||
public double AmountFrom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ قرارداد تا
|
||||
/// </summary>
|
||||
public double AmountTo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ قرارداد از
|
||||
/// </summary>
|
||||
public string ContractDateFrom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ قرارداد تا
|
||||
/// </summary>
|
||||
public string ContractDateTo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تب
|
||||
/// </summary>
|
||||
public InstitutionContractListStatus? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فعال / غیرفعال
|
||||
/// </summary>
|
||||
public bool? IsActive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// موجود / ناموجود
|
||||
/// </summary>
|
||||
public bool? HasSignature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع = روابط کار / مالیات و حسابداری
|
||||
/// </summary>
|
||||
public InstitutionContractType? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// رسمی / غیررسمی
|
||||
/// </summary>
|
||||
public bool? IsOfficial { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public enum InstitutionContractListStatus
|
||||
{
|
||||
Active,
|
||||
Deactive,
|
||||
DeactiveWithDebt,
|
||||
Block,
|
||||
Free,
|
||||
PendingForRenewal,
|
||||
WithoutWorkshop
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace CompanyManagment.App.Contracts.InstitutionContract;
|
||||
|
||||
public enum InstitutionContractType
|
||||
{
|
||||
/// <summary>
|
||||
/// روابط کار
|
||||
/// </summary>
|
||||
JobRelation,
|
||||
/// <summary>
|
||||
/// حسابداری و مالیات
|
||||
/// </summary>
|
||||
TaxAndFinancial
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
47
CompanyManagment.App.Contracts/Law/LawViewModel.cs
Normal file
47
CompanyManagment.App.Contracts/Law/LawViewModel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Law
|
||||
{
|
||||
public class LawViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
}
|
||||
|
||||
public class LawItemViewModel
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public string Details { get; set; }
|
||||
// public int OrderNumber { get; set; }
|
||||
}
|
||||
|
||||
public class CreateLaw
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class EditLaw
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public List<LawItemViewModel> Items { get; set; }
|
||||
public LawType Type { get; set; }
|
||||
public string HeadTitle { get; set; }
|
||||
public List<string> Notifications { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class AccountNumberSelectListViewModel : SelectListViewModel;
|
||||
@@ -0,0 +1,5 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class CardNumberSelectListViewModel:SelectListViewModel;
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد اطلاعات بانکی
|
||||
/// </summary>
|
||||
public class CreateBankPaymentInstrument
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی عنوان
|
||||
/// </summary>
|
||||
public long PaymentInstrumentGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام صاحب حساب
|
||||
/// </summary>
|
||||
public string AccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا احزار هویت شده است
|
||||
/// </summary>
|
||||
public bool IsAuth { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد عنوان
|
||||
/// </summary>
|
||||
public class CreateBankPaymentInstrumentGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CreatePosPaymentInstrument
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی عنوان
|
||||
/// </summary>
|
||||
public long PaymentInstrumentGroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه دستگاه پوز
|
||||
/// </summary>
|
||||
public string PosTerminalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش عنوان
|
||||
/// </summary>
|
||||
public class EditBankPaymentInstrumentGroup : CreateBankPaymentInstrumentGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class GetPaymentInstrumentListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// تعداد آیتم
|
||||
/// </summary>
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست گروهی
|
||||
/// </summary>
|
||||
public List<PaymentInstrumentGroupedViewModel> GropedViewModels { get; set; }
|
||||
}
|
||||
public class PaymentInstrumentGroupedViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیتم های گروه
|
||||
/// </summary>
|
||||
public List<PaymentInstrumentItemsViewModel> Items { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PaymentInstrumentItemsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه دستگاه
|
||||
/// </summary>
|
||||
public string PosTerminalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام صاحب حساب
|
||||
/// </summary>
|
||||
public string AccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع
|
||||
/// </summary>
|
||||
public PaymentInstrumentType Type { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
/// اپلیکیشن جاری شرکا
|
||||
/// </summary>
|
||||
public interface IPaymentInstrumentApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// ایجاد حساب اطلاعات بانکی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateBankAccount(CreateBankPaymentInstrument command);
|
||||
Task<OperationResult> CreateBankAccount(List<CreateBankPaymentInstrument> commands);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد اطلاعات دستگاه پوز
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreatePos(CreatePosPaymentInstrument command);
|
||||
Task<OperationResult> CreatePos(List<CreatePosPaymentInstrument> commands);
|
||||
|
||||
/// <summary>
|
||||
/// گرفتن لیست
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetPaymentInstrumentListViewModel> GetList(PaymentInstrumentSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد عنوان
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateGroup(CreateBankPaymentInstrumentGroup command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش عنوان
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditGroup(EditBankPaymentInstrumentGroup command);
|
||||
|
||||
/// <summary>
|
||||
/// حذف عنوان
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> DeleteGroup(long id);
|
||||
|
||||
Task<List<PaymentInstrumentGroupsViewModel>> GetGroup();
|
||||
|
||||
Task<List<string>> PosTerminalIdSelectList(string search, string selected);
|
||||
Task<List<string>> IbanSelectList(string search, string selected);
|
||||
Task<List<string>> AccountNumberSelectList(string search, string selected);
|
||||
Task<List<string>> CardNumberSelectList(string search, string selected);
|
||||
Task<List<string>> AccountHolderNameSelectList(string search, string selected);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class IbanSelectListViewModel:SelectListViewModel;
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class PaymentInstrumentGroupsViewModel:EditBankPaymentInstrumentGroup
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
/// <summary>
|
||||
/// سرچ مدل
|
||||
/// </summary>
|
||||
public class PaymentInstrumentSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام صاحب حساب
|
||||
/// </summary>
|
||||
public string AccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه دستگاه
|
||||
/// </summary>
|
||||
public string PosTerminalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string IBan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ایندکس صفحه
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
/// <summary>
|
||||
/// نوع حساب های جاری شرکا
|
||||
/// </summary>
|
||||
public enum PaymentInstrumentType
|
||||
{
|
||||
/// <summary>
|
||||
/// حساب بانکی
|
||||
/// </summary>
|
||||
BankAccount,
|
||||
/// <summary>
|
||||
/// دستگاه پوز
|
||||
/// </summary>
|
||||
Pos
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
|
||||
public class PosTerminalSelectListViewModel:SelectListViewModel
|
||||
{
|
||||
}
|
||||
@@ -7,35 +7,6 @@ public class CreatePaymentTransaction
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام صاحب حساب بانکی
|
||||
/// </summary>
|
||||
public string BankAccountHolderName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام بانک
|
||||
/// </summary>
|
||||
public string BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شبا
|
||||
/// </summary>
|
||||
public string ShebaNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره حساب بانکی
|
||||
/// </summary>
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت تراکنش پرداخت
|
||||
/// </summary>
|
||||
public PaymentTransactionStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ تراکنش
|
||||
@@ -43,12 +14,7 @@ public class CreatePaymentTransaction
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه یکتای تراکنش
|
||||
/// مسیر برگشت پس از پرداخت
|
||||
/// </summary>
|
||||
public string TransactionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
public string CallBackUrl { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
@@ -26,5 +27,79 @@ public interface IPaymentTransactionApplication
|
||||
Task<OperationResult> Create(CreatePaymentTransaction command);
|
||||
|
||||
Task<WalletAmountResponse> GetWalletAmount(CancellationToken cancellationToken);
|
||||
/// <summary>
|
||||
/// گرفتن جزئیات تراکنش
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<PaymentTransactionDetailsViewModel> GetDetails(long id);
|
||||
|
||||
/// <summary>
|
||||
/// تغییر وضعیت تراکنش به ناموفق
|
||||
/// </summary>
|
||||
/// <param name="paymentTransactionId"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult SetFailed(long paymentTransactionId);
|
||||
|
||||
/// <summary>
|
||||
/// تغییر وضعیت تراکنش به موفق
|
||||
/// </summary>
|
||||
/// <param name="paymentTransactionId"></param>
|
||||
/// <param name="cardNumber"></param>
|
||||
/// <param name="bankName"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult SetSuccess(long paymentTransactionId, string cardNumber, string bankName);
|
||||
|
||||
Task<OperationResult> SetTransactionId(long id, string transactionId);
|
||||
}
|
||||
|
||||
public class PaymentTransactionDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ و زمان انجام پرداخت
|
||||
/// </summary>
|
||||
public DateTime TransactionDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام بانک
|
||||
/// </summary>
|
||||
public string BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره کارت
|
||||
/// </summary>
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت تراکنش پرداخت
|
||||
/// </summary>
|
||||
public PaymentTransactionStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ تراکنش
|
||||
/// </summary>
|
||||
public double Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه یکتای تراکنش
|
||||
/// </summary>
|
||||
public string TransactionId { get; set; }
|
||||
|
||||
public string CallBackUrl { get; set; }
|
||||
}
|
||||
@@ -5,6 +5,10 @@
|
||||
/// </summary>
|
||||
public enum PaymentTransactionStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// تراکنش در انتظار انجام است.
|
||||
/// </summary>
|
||||
Pending,
|
||||
/// <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