Compare commits
630 Commits
AdminCheck
...
Main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ee72c7408 | |||
| 424f2a5bc5 | |||
| 22104f4d7f | |||
|
|
f44ecb0a8b | ||
|
|
74622d236e | ||
|
|
f0ccce6eb7 | ||
|
|
9aad60fcbe | ||
|
|
c37be3568e | ||
|
|
7a0e952117 | ||
|
|
c867b57cd2 | ||
|
|
e2ad7cab3e | ||
|
|
76058cf356 | ||
|
|
5972d747ec | ||
|
|
05eb620a05 | ||
|
|
841de73772 | ||
|
|
3eb7eca2ba | ||
| d3801744d5 | |||
|
|
66a8979488 | ||
|
|
7879cf33e2 | ||
|
|
6fcb641204 | ||
|
|
0a6e52819f | ||
|
|
edc9019c20 | ||
|
|
f6113cce78 | ||
|
|
4c76306ba5 | ||
|
|
9c3b9b52b1 | ||
| 8a68fd6503 | |||
| 49f6ca8d9e | |||
| 5a244ed35e | |||
| 42008d3c4d | |||
|
|
4ab61c1a2b | ||
|
|
ffea955f13 | ||
|
|
8fb3e054ce | ||
| 22b5fe91b5 | |||
| d361f7839f | |||
| bfba84157b | |||
|
|
c4993a40ae | ||
|
|
9113901ce5 | ||
| 0a49ad51c4 | |||
| 6985e7add2 | |||
| eabedfa92b | |||
| 68c4c57579 | |||
| 4be5fcb359 | |||
|
|
1821f29656 | ||
| d901361a83 | |||
| bd3687270d | |||
|
|
8562386f1c | ||
|
|
7ed7393c21 | ||
|
|
97298b6c96 | ||
|
|
7b2955c386 | ||
|
|
1f16856ad0 | ||
|
|
d30e15d178 | ||
|
|
89ac860c78 | ||
|
|
02bd9ff9b9 | ||
|
|
04a8867385 | ||
|
|
654f2adb5c | ||
| 3a56ffcb6f | |||
| b34e085329 | |||
|
|
1390284be8 | ||
| 5346b7c3a1 | |||
| 49dc5e7bd8 | |||
|
|
1316c997b2 | ||
|
|
86a2986637 | ||
|
|
780cf75102 | ||
|
|
166ad10fbc | ||
|
|
92bdaec45a | ||
| 7fd8596e76 | |||
|
|
0ca8095800 | ||
|
|
aa507e482a | ||
|
|
3e2d00524f | ||
|
|
b5480642f3 | ||
|
|
965af4fbc1 | ||
|
|
5fb461e4e4 | ||
|
|
8f575aa25b | ||
|
|
bc63bcdb01 | ||
|
|
63fd838b58 | ||
|
|
4e3c31d716 | ||
|
|
5d13b8ec27 | ||
|
|
6626ddc10b | ||
|
|
f2cbf7003e | ||
| 491df9e6ea | |||
| b36bb06437 | |||
|
|
705f549a5f | ||
|
|
607b55ac8e | ||
|
|
4bb671f085 | ||
|
|
4e976f35b9 | ||
| 0afe8b5ed8 | |||
| d8a98af372 | |||
|
|
65d56d5a06 | ||
| d5d281f4a5 | |||
|
|
07f298b4eb | ||
|
|
f1ee6d9d4d | ||
|
|
dc6d48cc61 | ||
|
|
6878de879b | ||
|
|
c32ffcec2e | ||
|
|
1694774685 | ||
|
|
21acbda670 | ||
|
|
2d9c57139a | ||
| 53505bbdfb | |||
| da9905c3ac | |||
| 04b8cfd4f3 | |||
| 55f69ca118 | |||
| 387682aedb | |||
|
|
d05a61b3c4 | ||
|
|
51c9afe53d | ||
| ddc66032d7 | |||
|
|
1e0f6704e1 | ||
|
|
e8d47c7307 | ||
|
|
0f1a1b8eb5 | ||
|
|
bb4b7f8c51 | ||
|
|
715acf518d | ||
|
|
f912d34633 | ||
|
|
6c922c7b7a | ||
|
|
9390bd9eb4 | ||
| 85718db39a | |||
| 4f7e859939 | |||
|
|
b72ca0d7ae | ||
| fb239e3159 | |||
| dd89e5a04d | |||
| c844867cab | |||
|
|
59d73d5ca8 | ||
|
|
ce146d9733 | ||
| cb3d4b711a | |||
| 779514f5c0 | |||
|
|
ec8dfe4799 | ||
| b69d450a3a | |||
| bc491eec18 | |||
| c980c627ba | |||
| 67910d2fa5 | |||
| 8cf960ebd7 | |||
| ad167ea1f4 | |||
| 9475c786d3 | |||
| db32b1e6ea | |||
| b30a8b0e4d | |||
| 0ba0043751 | |||
| 79a9d72b86 | |||
| dddc4b143a | |||
|
|
0ea9608912 | ||
| 127d9f7a46 | |||
| a8cb226d20 | |||
| 793b10c6cc | |||
| ffe8fa67e2 | |||
| a0d2023a6c | |||
| c2fdc217b9 | |||
|
|
8ff6d8ecc0 | ||
|
|
c466b68c9a | ||
| 332f58de9b | |||
| db0047d3d3 | |||
|
|
2c305e1d7a | ||
|
|
da966e49c3 | ||
|
|
7d35a65f35 | ||
| ddeb6a7182 | |||
| 77b5c8168e | |||
|
|
1343d9a2a7 | ||
| d7731cd7ad | |||
| cd2c770a9f | |||
|
|
734d0ca692 | ||
|
|
d07a78a637 | ||
|
|
1ac73f9689 | ||
| c28bb46aaf | |||
|
|
d2d95b4fbe | ||
|
|
f067d5a7b4 | ||
|
|
fe8e94f121 | ||
|
|
c493718452 | ||
| dc56df5e0f | |||
| d6e60e2cab | |||
| fa4c39904a | |||
|
|
a14a78309e | ||
|
|
4ccade4c7a | ||
| 085d138bc5 | |||
|
|
6e74447ccb | ||
|
|
b65c33c43a | ||
| 0b1cc34008 | |||
| 3dace574ff | |||
| bf2a102a55 | |||
| 88744bd4cf | |||
| 0705823157 | |||
| 5942075dd6 | |||
| 61015ae5c1 | |||
| 57a5000124 | |||
|
|
734fd9ebca | ||
| 7cbb9eef69 | |||
|
|
add04f854e | ||
|
|
debb54bafc | ||
|
|
7a065e9d16 | ||
| 3bd20d528f | |||
| b850ab1206 | |||
| 33a2c0be95 | |||
| fedfc372d0 | |||
|
|
a2c1fd30bf | ||
| 170f30f162 | |||
| db26c29057 | |||
| 0e7787dd56 | |||
| 577acfd0ae | |||
|
|
1e9f864c1e | ||
|
|
e2bab8c1ce | ||
|
|
3f23d1dac0 | ||
| 04cb584ae3 | |||
| f6cddff59d | |||
| 7b09cc53c3 | |||
| a7d3ff5298 | |||
|
|
6f0a579c33 | ||
| 8ecbbf6975 | |||
|
|
b088d3089d | ||
|
|
45b4690066 | ||
|
|
26517c20d8 | ||
|
|
7ce3224d69 | ||
|
|
5a9bfde922 | ||
|
|
64746fa3c3 | ||
|
|
bc3bc17a61 | ||
| 3720288bed | |||
|
|
a678b92c39 | ||
|
|
4c513191b6 | ||
|
|
33ae28f0e5 | ||
|
|
2f45d519b9 | ||
| 179de86840 | |||
| 3840d89433 | |||
| e0d10510e0 | |||
| 4f400ccef0 | |||
| 23d42bd8f5 | |||
| 25aa76b16c | |||
| d6a9c5e87d | |||
| d777fad96b | |||
|
|
34d336f43e | ||
|
|
6b81f383f6 | ||
|
|
54ff59de48 | ||
| 411363555f | |||
| a55492b16a | |||
| fb7b04596c | |||
|
|
faeb5e11a5 | ||
|
|
50b56d928d | ||
|
|
9f09b6af97 | ||
|
|
63e169b82d | ||
| 9596c8f8b6 | |||
|
|
7339eaaadf | ||
|
|
e5c96c8bcb | ||
| 8622f12f12 | |||
| a20a847065 | |||
| 258a809451 | |||
| 76d2c0e3c4 | |||
| a745dfff86 | |||
|
|
187b7406d2 | ||
|
|
c51bb90a2b | ||
|
|
6285c7320e | ||
|
|
17f117726e | ||
|
|
13fb6fec5d | ||
| 5bead0cc86 | |||
| 9bca1b81d6 | |||
| 9ff6b5cf56 | |||
|
|
bef21edf22 | ||
|
|
04642b7257 | ||
|
|
c151e2d3f7 | ||
|
|
1e36966767 | ||
| c1c9fe51cb | |||
|
|
0d2ac58bbb | ||
| 64693b2ca3 | |||
| 43ccb3a1dd | |||
| 0134111aba | |||
|
|
3cc7adae35 | ||
|
|
c97ea5356f | ||
| 64cb4baba9 | |||
| 03657b6848 | |||
| 69f4819bf6 | |||
|
|
1257e15b62 | ||
|
|
331fb24a99 | ||
| 3be1547137 | |||
|
|
1324baa9c7 | ||
| ce836476a1 | |||
| 15f1c938f7 | |||
| 7e563a0f01 | |||
|
|
48cc07bf2a | ||
| 900b4b3f4d | |||
|
|
be319f6286 | ||
|
|
d3dacceab1 | ||
| bdc6f95af8 | |||
| 7a73e69afa | |||
| a3fd3e6920 | |||
|
|
8db161f960 | ||
|
|
3bb16c02b4 | ||
| 025c59e695 | |||
|
|
7a79343b2f | ||
| 36ccd96352 | |||
| a7c97b22b4 | |||
| 4c143d6bbc | |||
| 0e5a0a16ac | |||
|
|
dfc392f07a | ||
| 88f54b6310 | |||
|
|
7fc5ac7ccd | ||
| d4694e7e1c | |||
| 4bde4ade2d | |||
| 5c3c9739d1 | |||
| bd12ff0506 | |||
|
|
d51e4c462a | ||
|
|
037723ef70 | ||
|
|
7bb507c841 | ||
| cb2c6b9ad1 | |||
| 355ec72140 | |||
| 21b3467517 | |||
| e9d0efc52f | |||
| 301a8f06f4 | |||
| 63a3027a17 | |||
| b22aa86aea | |||
| f0feac9601 | |||
| 8faddedd46 | |||
| 1382305433 | |||
| 90fa0ac8f8 | |||
| eb8352e8fc | |||
| 4c7599b568 | |||
| d179c90c48 | |||
|
|
ae2427473b | ||
|
|
2fc124bf6d | ||
|
|
068d34b4b4 | ||
|
|
1d88ca0fbb | ||
|
|
e2911dfc2a | ||
|
|
377f95561c | ||
|
|
cfb96d1277 | ||
|
|
b5c5be2cb6 | ||
| 8850328fd4 | |||
| b7172630e2 | |||
|
|
b66dc81688 | ||
|
|
f5c8888137 | ||
|
|
20ff66da2f | ||
|
|
4d7923936e | ||
| 0604514190 | |||
| 915f16c7c0 | |||
|
|
2e95846336 | ||
| ad91383e86 | |||
| 6281a024ca | |||
| 0ef4ead292 | |||
| b286923dfe | |||
|
|
532065e3a8 | ||
|
|
f7bfa37a77 | ||
| 18867b4929 | |||
| a9df0669c6 | |||
| 5c75316f40 | |||
| 8839b54dd3 | |||
| 87c3cebb60 | |||
| ff5180eb75 | |||
| a1c9335487 | |||
| 20ece4886c | |||
| 0d72392701 | |||
| 8f6007835c | |||
| 05d860795e | |||
| 607c0780b6 | |||
| 791c8f91b7 | |||
| c980354c6b | |||
| 22a5564ba0 | |||
| ef49302f8a | |||
| d8d2c34de7 | |||
|
|
3a343a19e1 | ||
|
|
e65852c829 | ||
| 7f1939390c | |||
|
|
07a4ce1f64 | ||
|
|
7207172ce0 | ||
| 048da40f3c | |||
| 7ba85fe1aa | |||
|
|
3280202644 | ||
| 1a334c22b8 | |||
|
|
a1bda5bc54 | ||
| c80be16807 | |||
|
|
f6a285b6ea | ||
| 68b1f89ef0 | |||
| 18fe6a5c6a | |||
|
|
56fc69f99f | ||
| d6096b232d | |||
| 6d5c032802 | |||
| 71c0cff03a | |||
|
|
ebcb7530e0 | ||
|
|
9ff9b0be18 | ||
|
|
ceb328cfa7 | ||
| 5a7d65427d | |||
| 8adb0f567c | |||
|
|
7aaf161718 | ||
|
|
2f408a6cc1 | ||
|
|
3ef717583f | ||
|
|
551f5a754c | ||
|
|
ba88a012ff | ||
|
|
e4c41bb704 | ||
|
|
dee55f8854 | ||
|
|
802c79812b | ||
| e2e7aa1989 | |||
| b82e831991 | |||
|
|
44cbdbaa1c | ||
|
|
94466bbb27 | ||
| 931d41c446 | |||
|
|
9614e44003 | ||
|
|
f097be54aa | ||
| 5ba72e2281 | |||
|
|
be4bc2c900 | ||
| 0b42546666 | |||
| a35a51370a | |||
|
|
ef86c6d07d | ||
|
|
1b284b51b9 | ||
|
|
5b15596696 | ||
| f290a71dd3 | |||
| 0d0f643058 | |||
|
|
5ad5fdcca0 | ||
|
|
fb1601db77 | ||
|
|
b39b58b21e | ||
|
|
2a3e733eb6 | ||
| 5d2a917168 | |||
| 4ab9f60932 | |||
| cbcd42db85 | |||
|
|
76aabc3a45 | ||
| a22dbd8811 | |||
| 9cfae54db3 | |||
|
|
3cdd5e7ac7 | ||
| de4e2de2e7 | |||
| d7dd91eaba | |||
|
|
d6e3c48770 | ||
|
|
946024d81e | ||
| e7ce947342 | |||
| 796a13cdcc | |||
| 2b7871c582 | |||
| 8f0c707647 | |||
| a835663e5c | |||
| 0bceed55d1 | |||
| 946e980324 | |||
| 93847e6aa8 | |||
| b329e40930 | |||
|
|
6e34ba79e0 | ||
| 5f21b59cb3 | |||
| e0ea5aec53 | |||
|
|
43000bde7e | ||
|
|
0a7d80c2fe | ||
| 2984d2a3cf | |||
| bc6854f8a7 | |||
| 4f66270cb0 | |||
|
|
6b6ec79faa | ||
|
|
1304a3e8ef | ||
|
|
57881af130 | ||
|
|
6154c2c7f5 | ||
|
|
647909319f | ||
|
|
d5b70d1545 | ||
| 4ed1907075 | |||
| efcf40eea8 | |||
|
|
d2acf59eba | ||
|
|
3139552217 | ||
|
|
8e6defb29e | ||
|
|
fe4e81a60c | ||
|
|
098233fd1b | ||
| 61062dba7b | |||
| 5581e7e013 | |||
|
|
47d8f7156c | ||
| 0b704da21f | |||
| e8059f98d5 | |||
|
|
df5b820782 | ||
|
|
ed8f9558d6 | ||
| 60a1d1cd8e | |||
|
|
dc4c8e9a26 | ||
| 0721467abf | |||
|
|
0e7cb00a9f | ||
|
|
ba4c00c012 | ||
|
|
b3b3b14ebf | ||
|
|
ee486eb706 | ||
| c60af8d248 | |||
|
|
57d13b9bed | ||
|
|
6d0a6085a5 | ||
| 2e274dd280 | |||
| be7fad2cf5 | |||
| a79f9a28fb | |||
| 0d4b5774b6 | |||
|
|
a623044b93 | ||
|
|
76408c48cf | ||
|
|
4ac51f24b5 | ||
| ed121e9ade | |||
| 548aefb8e1 | |||
| 223c2bde21 | |||
| a1736fa3cc | |||
| 62f6817640 | |||
| f17b566957 | |||
|
|
27edcc5f7b | ||
|
|
21b69edf93 | ||
|
|
68b42c98d6 | ||
|
|
f13688ccb2 | ||
|
|
bb9074df34 | ||
| 1a6248f15d | |||
| a9511ffa82 | |||
| 6f3d6e986c | |||
| 18da3221d7 | |||
| 186cb95c70 | |||
| b1f9bc98ba | |||
| 93ee88ba46 | |||
| 5c6af6184c | |||
| e81a3ea7aa | |||
| 7d92ae6658 | |||
| 5de90be51e | |||
| a1ead80a42 | |||
| a121e62102 | |||
| 5d20238904 | |||
| 4b35c3e443 | |||
|
|
c8d6644116 | ||
|
|
fff5bb3706 | ||
|
|
74597c0ad5 | ||
|
|
cccccf084e | ||
| 54b3745276 | |||
| b50ad83144 | |||
| d2e832d52e | |||
| cdeba2009f | |||
| 65adbda73f | |||
|
|
c137c9e78e | ||
|
|
4801d593b7 | ||
|
|
582e140726 | ||
| ff04dff0ca | |||
|
|
c04089b68a | ||
|
|
d9ee96c057 | ||
| fc45e46502 | |||
| 8015e583bf | |||
| 524660d7b4 | |||
| c2d9d809f1 | |||
| b5d52feee4 | |||
| 4c58942e15 | |||
| edf8c8c92d | |||
|
|
8eaeefecc8 | ||
|
|
911c29ea6b | ||
| 8fc798746f | |||
| 3526fdbf2f | |||
|
|
9d0bb7df0e | ||
|
|
a1d0c3ba5b | ||
| 409fc0df96 | |||
| 7533bc821a | |||
|
|
ca520c7291 | ||
| 0a3bdb2720 | |||
| 1eb3b7d066 | |||
| bc3cb5b115 | |||
| c9f519d7ec | |||
| aabb53c6d2 | |||
|
|
0fe0c05e5c | ||
|
|
62349c0a54 | ||
|
|
cb08e11593 | ||
|
|
7eba632f1c | ||
| de37555db9 | |||
| 6102ec3be8 | |||
| aaea658e58 | |||
|
|
e704258c23 | ||
| ea153d17b7 | |||
| dce24e3849 | |||
| f112bab021 | |||
| 00ffb08e2e | |||
| 8b39eed7bb | |||
| 58e30eb297 | |||
| 07851ff7c8 | |||
|
|
17eb5832fe | ||
|
|
8b8b5c3e76 | ||
|
|
db761ceba8 | ||
| 58499d6837 | |||
| d2df27320f | |||
| f4c73a418b | |||
|
|
daf0a366ef | ||
| b36919e0b6 | |||
| 87d47fa0d9 | |||
| c7d4481a6d | |||
| 4b52d144e0 | |||
|
|
91b72fdf8f | ||
| 38184b8d1b | |||
| 90a1683047 | |||
|
|
f93991db96 | ||
|
|
bca3e1dd42 | ||
|
|
c7e22e4ca6 | ||
|
|
7386bd5750 | ||
|
|
5c8a521f8e | ||
|
|
22973fe47b | ||
|
|
48c83e648d | ||
| 36b60555f3 | |||
|
|
494b80c461 | ||
|
|
7cdb431d98 | ||
|
|
f7ae463544 | ||
|
|
1913147f89 | ||
|
|
77798eaccb | ||
|
|
f17c1f0d8e | ||
|
|
bd4f2d18f5 | ||
|
|
0bbed013d2 | ||
|
|
3455c8a786 | ||
|
|
9981116caa | ||
|
|
10e7400611 | ||
| 379126c513 | |||
| d078feccf9 | |||
| fb2d67c069 | |||
| d1ac8e49ba | |||
| c596bf78f4 | |||
| c6a7e0a0bd | |||
| d0fa1b2f58 | |||
| c10ae17f8c | |||
| e612150f1d | |||
| f3c391582c | |||
| c13ad3a8a7 | |||
|
|
2803c34591 | ||
| f76a12d45c | |||
| 2d5efb62be | |||
| ef3338c648 | |||
| fcf2b38457 | |||
|
|
82bb932cfc | ||
|
|
82c2b641fe | ||
| 7b71bd36b1 | |||
| bdc142d577 | |||
| 62900a22a1 | |||
|
|
23c99e60d5 | ||
| f7b9389f55 | |||
| 1c2ff03c90 | |||
| e6977b29fc | |||
| 6e902011ca | |||
| 7cce903f6e | |||
| 4d6077c93d | |||
| 83c1985ad9 | |||
| e0c247d07b | |||
| 1a3558df52 | |||
| c36e81e263 | |||
|
|
490393acbc | ||
| d3cd7e5b3c | |||
| 818d88d859 | |||
| 1a70569a36 | |||
| 8d24339f04 | |||
| bea858d4e7 | |||
|
|
c6874b33cf | ||
|
|
596e21b712 | ||
|
|
e9c3176dfc | ||
|
|
4a956a1397 | ||
|
|
fc3053dd17 | ||
|
|
bb79380ce5 | ||
|
|
849369fea3 | ||
|
|
283f66ab32 | ||
|
|
abf00884a4 | ||
|
|
50718eda93 | ||
|
|
a3dc27f08e | ||
|
|
055ce2b2a7 | ||
|
|
8171e06965 | ||
|
|
bfa8688c38 | ||
|
|
66c903045f | ||
|
|
b245023dd2 | ||
|
|
8044d64d5e | ||
|
|
1ef86d5e9c |
64
.gitea/workflows/deploy-dev.yml
Normal file
64
.gitea/workflows/deploy-dev.yml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
name: Deploy Dev (Branch Trigger)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- Main
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: gozareshgir-api
|
||||||
|
# مسیری که فایل docker-compose.yml مخصوص تست در سرور قرار دارد
|
||||||
|
SERVER_PATH: ~/apps/test-dev/backend-api
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# 1. لاگین به داکر هاب/رجیستری شخصی
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
# 2. بیلد و پوش کردن ایمیج با تگ :dev
|
||||||
|
- name: Build and Push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ secrets.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||||
|
|
||||||
|
# 3. اتصال به سرور و آپدیت سرویس
|
||||||
|
- name: Update Service on Test Server
|
||||||
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
|
env:
|
||||||
|
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
APP_VERSION: dev # ورژن تست همیشه dev است
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.SSH_HOST_TEST }}
|
||||||
|
username: ${{ secrets.SSH_USERNAME_TEST }}
|
||||||
|
key: ${{ secrets.SSH_KEY_TEST }}
|
||||||
|
port: 22
|
||||||
|
envs: DOCKER_REGISTRY,DOCKER_USERNAME,DOCKER_PASSWORD,APP_VERSION
|
||||||
|
script: |
|
||||||
|
cd ${{ env.SERVER_PATH }}
|
||||||
|
|
||||||
|
# لاگین مجدد در سرور برای اطمینان
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin
|
||||||
|
|
||||||
|
# اکسپورت کردن ورژن برای اینکه فایل داکر-کمپوز سرور آن را بشناسد
|
||||||
|
export APP_VERSION=$APP_VERSION
|
||||||
|
|
||||||
|
# دانلود ایمیج جدید و آپدیت کانتینر
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d --remove-orphans
|
||||||
|
|
||||||
|
# پاک کردن ایمیجهای قدیمی برای پر نشدن فضای سرور
|
||||||
|
docker image prune -f
|
||||||
31
.github/workflows/dotnet-developPublish.yml
vendored
31
.github/workflows/dotnet-developPublish.yml
vendored
@@ -5,6 +5,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- Main
|
- Main
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOTNET_ENVIRONMENT: Development
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
@@ -17,29 +19,36 @@ jobs:
|
|||||||
- name: Setup .NET SDK
|
- name: Setup .NET SDK
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x' # یا نسخه پروژهت
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore ServiceHost/ServiceHost.csproj
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build --configuration Release
|
run: dotnet build ServiceHost/ServiceHost.csproj --configuration Release
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish --configuration Release --output ./publish /p:EnvironmentName=Development --no-build
|
run: dotnet publish ServiceHost/ServiceHost.csproj --configuration Release --output ./publish /p:EnvironmentName=Development --no-build
|
||||||
|
|
||||||
- name: Deploy to IIS via Web Deploy
|
- name: Deploy to IIS via Web Deploy
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
$publishFolder = Resolve-Path ./publish
|
$publishFolder = Resolve-Path ./publish
|
||||||
|
$server = $env:SERVER_HOST
|
||||||
|
$user = $env:DEPLOY_USER
|
||||||
|
$pass = $env:DEPLOY_PASSWORD
|
||||||
|
|
||||||
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
|
& "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
|
||||||
-verb:sync `
|
-verb:sync `
|
||||||
-source:contentPath="$publishFolder" `
|
-source:contentPath="$publishFolder" `
|
||||||
-dest:contentPath="dadmehrg",computerName="https://$env:SERVER_HOST:8172/msdeploy.axd?site=gozareshgir",userName="$env:DEPLOY_USER",password="$env:DEPLOY_PASSWORD",authType="Basic" `
|
-dest:contentPath="dadmehrg",computerName="https://${server}:8172/msdeploy.axd?site=dadmehrg",userName="$user",password="$pass",authType="Basic" `
|
||||||
-allowUntrusted `
|
-allowUntrusted `
|
||||||
-enableRule:AppOffline
|
-enableRule:AppOffline
|
||||||
|
-disableRule:DeleteRule `
|
||||||
|
-useChecksum `
|
||||||
|
-retryAttempts:3 `
|
||||||
|
-retryInterval:2000
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SERVER_HOST: 171.22.24.15
|
SERVER_HOST: ${{ secrets.DEV_HOST }}
|
||||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
DEPLOY_USER: ${{ secrets.DEV_USER }}
|
||||||
DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
|
DEPLOY_PASSWORD: ${{ secrets.DEV_PASS }}
|
||||||
|
|||||||
22
.gitignore
vendored
22
.gitignore
vendored
@@ -1,3 +1,21 @@
|
|||||||
|
.env*
|
||||||
|
.env
|
||||||
|
certs/*.pfx
|
||||||
|
certs/*.pem
|
||||||
|
certs/*.key
|
||||||
|
certs/*.crt
|
||||||
|
Storage/
|
||||||
|
Logs/
|
||||||
|
*.user
|
||||||
|
*.suo
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
certs/*.pfx
|
||||||
|
certs/*.pem
|
||||||
|
certs/*.key
|
||||||
|
certs/*.crt
|
||||||
|
Storage/
|
||||||
|
Logs/
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
##
|
##
|
||||||
@@ -364,7 +382,11 @@ MigrationBackup/
|
|||||||
.idea
|
.idea
|
||||||
/ServiceHost/appsettings.Development.json
|
/ServiceHost/appsettings.Development.json
|
||||||
/ServiceHost/appsettings.json
|
/ServiceHost/appsettings.json
|
||||||
|
/ServiceHost/web.config
|
||||||
|
|
||||||
# Storage folder - ignore all uploaded files, thumbnails, and temporary files
|
# Storage folder - ignore all uploaded files, thumbnails, and temporary files
|
||||||
ServiceHost/Storage
|
ServiceHost/Storage
|
||||||
|
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.6.0" />
|
<PackageReference Include="MD.PersianDateTime.Standard" Version="2.6.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.0.1" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.0.1" />
|
||||||
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.1" />
|
<PackageReference Include="System.Security.Cryptography.Xml" Version="10.0.1" />
|
||||||
|
<!--<PackageReference Include="DNTPersianUtils.Core" Version="6.7.1" />-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
237
0_Framework/Application/ClassificationRangeOfGroupRate.cs
Normal file
237
0_Framework/Application/ClassificationRangeOfGroupRate.cs
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace _0_Framework.Application;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دامنه امتیازات گروه های طبقه بندی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public static class ClassificationRangeOfGroupRate
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت فاصله امتیاز گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupNo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static ClassificationGroupRate GetGroupDistanceRate(string groupNo)
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (groupNo)
|
||||||
|
{
|
||||||
|
case "1":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 0,
|
||||||
|
HighRate = 80,
|
||||||
|
DistanceRate = 0,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 81,
|
||||||
|
HighRate = 95,
|
||||||
|
DistanceRate = 15,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 96,
|
||||||
|
HighRate = 110,
|
||||||
|
DistanceRate = 30, //فاصله سقف این گروه تا سقف گروه یک
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 111,
|
||||||
|
HighRate = 125,
|
||||||
|
DistanceRate = 45, //فاصله سقف این گروه تا سقف گروه یک
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "5":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 126,
|
||||||
|
HighRate = 145,
|
||||||
|
DistanceRate = 65, //فاصله سقف این گروه تا سقف گروه یک
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "6":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 146,
|
||||||
|
HighRate = 165,
|
||||||
|
DistanceRate = 85,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "7":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 166,
|
||||||
|
HighRate = 185,
|
||||||
|
DistanceRate = 105,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "8":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 186,
|
||||||
|
HighRate = 210,
|
||||||
|
DistanceRate = 130,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "9":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 211,
|
||||||
|
HighRate = 235,
|
||||||
|
DistanceRate = 155,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "10":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 236,
|
||||||
|
HighRate = 265,
|
||||||
|
DistanceRate = 185,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "11":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 266,
|
||||||
|
HighRate = 295,
|
||||||
|
DistanceRate = 215,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "12":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 296,
|
||||||
|
HighRate = 325,
|
||||||
|
DistanceRate = 245,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "13":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 326,
|
||||||
|
HighRate = 365,
|
||||||
|
DistanceRate = 285,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "14":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 366,
|
||||||
|
HighRate = 405,
|
||||||
|
DistanceRate = 325,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "15":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 406,
|
||||||
|
HighRate = 445,
|
||||||
|
DistanceRate = 365,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "16":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 446,
|
||||||
|
HighRate = 495,
|
||||||
|
DistanceRate = 415,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "17":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 496,
|
||||||
|
HighRate = 545,
|
||||||
|
DistanceRate = 465,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "18":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 546,
|
||||||
|
HighRate = 605,
|
||||||
|
DistanceRate = 525,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "19":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 606,
|
||||||
|
HighRate = 665,
|
||||||
|
DistanceRate = 585,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "20":
|
||||||
|
return new ClassificationGroupRate()
|
||||||
|
{
|
||||||
|
GroupNo = groupNo,
|
||||||
|
LowRate = 666,
|
||||||
|
HighRate = 740,
|
||||||
|
DistanceRate = 660,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return new ClassificationGroupRate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دیتای امتیازات هر گرو
|
||||||
|
/// </summary>
|
||||||
|
public class ClassificationGroupRate
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شمازه گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امتیاز کف
|
||||||
|
/// </summary>
|
||||||
|
public int LowRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امتیاز سقف
|
||||||
|
/// </summary>
|
||||||
|
public int HighRate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فاصله امتیاز
|
||||||
|
/// </summary>
|
||||||
|
public int DistanceRate { get; set; }
|
||||||
|
}
|
||||||
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
14
0_Framework/Application/Enums/TypeOfCoefficient.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
namespace _0_Framework.Application.Enums;
|
||||||
|
|
||||||
|
public enum TypeOfCoefficient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی طرح
|
||||||
|
/// </summary>
|
||||||
|
RialCoefficient,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی اداره کار
|
||||||
|
/// </summary>
|
||||||
|
JobOrganization,
|
||||||
|
}
|
||||||
@@ -45,6 +45,11 @@ public enum TypeOfSmsSetting
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
SendInstitutionContractConfirmationCode,
|
SendInstitutionContractConfirmationCode,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لینک تاییدیه ایجاد قرارداد مالی
|
||||||
|
/// </summary>
|
||||||
|
SendInstitutionContractConfirmationLink,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// یادآور وظایف
|
/// یادآور وظایف
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace _0_Framework.Application;
|
|||||||
public class PagedResult<T> where T : class
|
public class PagedResult<T> where T : class
|
||||||
{
|
{
|
||||||
public int TotalCount { get; set; }
|
public int TotalCount { get; set; }
|
||||||
public List<T> List { get; set; }
|
public List<T> List { get; set; } = [];
|
||||||
}
|
}
|
||||||
public class PagedResult<T,TMeta>:PagedResult<T> where T : class
|
public class PagedResult<T,TMeta>:PagedResult<T> where T : class
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,5 +30,22 @@ public class ApiReportDto
|
|||||||
public string DeliveryState { get; set; }
|
public string DeliveryState { get; set; }
|
||||||
public string DeliveryUnixTime { get; set; }
|
public string DeliveryUnixTime { get; set; }
|
||||||
public string DeliveryColor { get; set; }
|
public string DeliveryColor { get; set; }
|
||||||
|
public string FullName { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SmsDetailsDto
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public string MessageText { get; set; }
|
||||||
|
|
||||||
|
public long Mobile { get; set; }
|
||||||
|
|
||||||
|
public string SendUnixTime { get; set; }
|
||||||
|
public string DeliveryState { get; set; }
|
||||||
|
public string DeliveryUnixTime { get; set; }
|
||||||
|
public string DeliveryColor { get; set; }
|
||||||
|
public string FullName { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -16,15 +16,21 @@ public interface ISmsService
|
|||||||
/// <param name="code"></param>
|
/// <param name="code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<SentSmsViewModel> SendVerifyCodeToClient(string number, string code);
|
Task<SentSmsViewModel> SendVerifyCodeToClient(string number, string code);
|
||||||
bool SendAccountsInfo(string number,string fullName, string userName);
|
bool SendAccountsInfo(string number, string fullName, string userName);
|
||||||
Task<ApiResultViewModel> GetByMessageId(int messId);
|
Task<ApiResultViewModel> GetByMessageId(int messId);
|
||||||
Task<List<ApiResultViewModel>> GetApiResult(string startDate, string endDate);
|
Task<List<ApiResultViewModel>> GetApiResult(string startDate, string endDate);
|
||||||
|
|
||||||
#region ForApi
|
#region ForApi
|
||||||
|
|
||||||
Task<List<ApiReportDto>> GetApiReport(string startDate, string endDate);
|
Task<List<ApiReportDto>> GetApiReport(string startDate, string endDate);
|
||||||
|
/// <summary>
|
||||||
#endregion
|
/// دریافت جزئیات پیامک
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="messId"></param>
|
||||||
|
/// <param name="fullName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SmsDetailsDto> GetSmsDetailsByMessageId(int messId, string fullName);
|
||||||
|
#endregion
|
||||||
|
|
||||||
string DeliveryStatus(byte? dv);
|
string DeliveryStatus(byte? dv);
|
||||||
string DeliveryColorStatus(byte? dv);
|
string DeliveryColorStatus(byte? dv);
|
||||||
@@ -33,9 +39,9 @@ public interface ISmsService
|
|||||||
#region Mahan
|
#region Mahan
|
||||||
|
|
||||||
Task<double> GetCreditAmount();
|
Task<double> GetCreditAmount();
|
||||||
|
|
||||||
public Task<bool> SendInstitutionCreationVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId, string typeOfSms = null);
|
public Task<bool> SendInstitutionCreationVerificationLink(string number, string fullName, Guid institutionId, long contractingPartyId, long institutionContractId, string typeOfSms = null);
|
||||||
|
|
||||||
public Task<bool> SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName,
|
public Task<bool> SendInstitutionVerificationCode(string number, string code, string contractingPartyFullName,
|
||||||
long contractingPartyId, long institutionContractId);
|
long contractingPartyId, long institutionContractId);
|
||||||
|
|
||||||
@@ -68,7 +74,7 @@ public interface ISmsService
|
|||||||
/// <param name="aprove"></param>
|
/// <param name="aprove"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<(byte status, string message, int messaeId, bool isSucceded)> MonthlyBill(string number, int tamplateId, string fullname, string amount, string id, string aprove);
|
Task<(byte status, string message, int messaeId, bool isSucceded)> MonthlyBill(string number, int tamplateId, string fullname, string amount, string id, string aprove);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// پیامک مسدودی طرف حساب
|
/// پیامک مسدودی طرف حساب
|
||||||
/// قراردادهای قدیم
|
/// قراردادهای قدیم
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ public static class StaticWorkshopAccounts
|
|||||||
/// 381 - مهدی قربانی
|
/// 381 - مهدی قربانی
|
||||||
/// 392 - عمار حسن دوست
|
/// 392 - عمار حسن دوست
|
||||||
/// 20 - سمیرا الهی نیا
|
/// 20 - سمیرا الهی نیا
|
||||||
|
/// 322 - ماهان چمنی
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392, 20, 476];
|
public static List<long> StaticAccountIds = [2, 3, 380, 381, 392, 20, 476,322];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// این تاریخ در جدول اکانت لفت ورک به این معنیست
|
/// این تاریخ در جدول اکانت لفت ورک به این معنیست
|
||||||
|
|||||||
@@ -33,6 +33,35 @@ public static class Tools
|
|||||||
public static string[] DayNames = { "شنبه", "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه" };
|
public static string[] DayNames = { "شنبه", "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه" };
|
||||||
public static string[] DayNamesG = { "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه", "شنبه" };
|
public static string[] DayNamesG = { "یکشنبه", "دو شنبه", "سه شنبه", "چهار شنبه", "پنج شنبه", "جمعه", "شنبه" };
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام ستون از جدول مزد سنوات طبثه بندی را میگیرد و دیتای داخل آن ستون را برمیگرداند
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <param name="propertyName"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static double? GetDynamicDouble(object obj, string propertyName)
|
||||||
|
{
|
||||||
|
if (obj == null || string.IsNullOrWhiteSpace(propertyName))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var propertyInfo = obj.GetType().GetProperty(propertyName);
|
||||||
|
if (propertyInfo == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
var value = propertyInfo.GetValue(obj);
|
||||||
|
if (value == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Convert.ToDouble(value);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static bool IsMobileValid(this string mobileNo)
|
public static bool IsMobileValid(this string mobileNo)
|
||||||
{
|
{
|
||||||
@@ -41,6 +70,33 @@ public static class Tools
|
|||||||
return Regex.IsMatch(mobileNo, "^((09))(\\d{9})$");
|
return Regex.IsMatch(mobileNo, "^((09))(\\d{9})$");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// متد رند کننده مبلغ
|
||||||
|
/// استفاده شده در بیمه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static double GetRoundDoubleValue(double value)
|
||||||
|
{
|
||||||
|
string strValue = value.ToString();
|
||||||
|
if (strValue.IndexOf('.') > -1)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
string a = strValue.Substring(strValue.IndexOf('.') + 1, 1);
|
||||||
|
if (int.Parse(a) > 5)
|
||||||
|
{
|
||||||
|
return (Math.Round(value, MidpointRounding.ToPositiveInfinity));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (Math.Round(value, MidpointRounding.ToNegativeInfinity));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// تاریخ شروع و تعداد ماه را میگیرد و تاریخ پایان قراردا را بر میگرداند
|
/// تاریخ شروع و تعداد ماه را میگیرد و تاریخ پایان قراردا را بر میگرداند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -650,7 +706,115 @@ public static class Tools
|
|||||||
return y2;
|
return y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمسی میگیرد و پایان ماه را به میلادی برمیگرداند
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="date"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DateTime FindeEndOfMonthReturnGr(this string date)
|
||||||
|
{
|
||||||
|
string y2 = string.Empty;
|
||||||
|
var year = Convert.ToInt32(date.Substring(0, 4));
|
||||||
|
var month = Convert.ToInt32(date.Substring(5, 2));
|
||||||
|
var YearD = date.Substring(0, 4);
|
||||||
|
var MonthD = date.Substring(5, 2);
|
||||||
|
if (month <= 6)
|
||||||
|
{
|
||||||
|
y2 = $"{YearD}/{MonthD}/31";
|
||||||
|
}
|
||||||
|
else if (month > 6 && month < 12)
|
||||||
|
{
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
}
|
||||||
|
else if (month == 12)
|
||||||
|
{
|
||||||
|
switch (year)
|
||||||
|
{
|
||||||
|
case 1346:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1350:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1354:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1358:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1362:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1366:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1370:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1375:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1379:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1383:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1387:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1391:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1395:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1399:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1403:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1408:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1412:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1416:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1420:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1424:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1428:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1432:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1436:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1441:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
case 1445:
|
||||||
|
y2 = $"{YearD}/{MonthD}/30";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
y2 = $"{YearD}/{MonthD}/29";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return y2.ToGeorgianDateTime();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// تعداد روزهای سال را برمیگرداند
|
/// تعداد روزهای سال را برمیگرداند
|
||||||
/// اگر کبیسهد بود سال 366 روزه برمیگرداند
|
/// اگر کبیسهد بود سال 366 روزه برمیگرداند
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ namespace _0_Framework.Domain;
|
|||||||
public interface IRepository<TKey, T> where T:class
|
public interface IRepository<TKey, T> where T:class
|
||||||
{
|
{
|
||||||
T Get(TKey id);
|
T Get(TKey id);
|
||||||
List<T> Get();
|
List<T> Get();
|
||||||
|
Task<List<T>> GetListByIdList(List<TKey> ids);
|
||||||
void Create(T entity);
|
void Create(T entity);
|
||||||
Task CreateAsync(T entity);
|
Task CreateAsync(T entity);
|
||||||
bool ExistsIgnoreQueryFilter(Expression<Func<T, bool>> expression);
|
bool ExistsIgnoreQueryFilter(Expression<Func<T, bool>> expression);
|
||||||
|
|||||||
8
0_Framework/Excel/ExcelApiDto.cs
Normal file
8
0_Framework/Excel/ExcelApiDto.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace _0_Framework.Excel;
|
||||||
|
|
||||||
|
public class ExcelApiDto
|
||||||
|
{
|
||||||
|
public byte[] Bytes { get; set; }
|
||||||
|
public string FileName { get; set; }
|
||||||
|
public string MimeType { get; set; } = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ using _0_Framework.Application;
|
|||||||
using _0_Framework.Application.FaceEmbedding;
|
using _0_Framework.Application.FaceEmbedding;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Http;
|
using Microsoft.Extensions.Http;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace _0_Framework.Infrastructure;
|
namespace _0_Framework.Infrastructure;
|
||||||
@@ -24,12 +25,12 @@ public class FaceEmbeddingService : IFaceEmbeddingService
|
|||||||
private readonly string _apiBaseUrl;
|
private readonly string _apiBaseUrl;
|
||||||
|
|
||||||
public FaceEmbeddingService(IHttpClientFactory httpClientFactory, ILogger<FaceEmbeddingService> logger,
|
public FaceEmbeddingService(IHttpClientFactory httpClientFactory, ILogger<FaceEmbeddingService> logger,
|
||||||
IFaceEmbeddingNotificationService notificationService = null)
|
IConfiguration configuration, IFaceEmbeddingNotificationService notificationService = null)
|
||||||
{
|
{
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_notificationService = notificationService;
|
_notificationService = notificationService;
|
||||||
_apiBaseUrl = "http://localhost:8000";
|
_apiBaseUrl = configuration["FaceEmbeddingApi:BaseUrl"] ?? "http://localhost:8000";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<OperationResult> GenerateEmbeddingsAsync(long employeeId, long workshopId,
|
public async Task<OperationResult> GenerateEmbeddingsAsync(long employeeId, long workshopId,
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ namespace _0_Framework.InfraStructure
|
|||||||
{
|
{
|
||||||
return _context.Set<T>().ToList();
|
return _context.Set<T>().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<T>> GetListByIdList(List<TKey> ids)
|
||||||
|
{
|
||||||
|
return await _context.Set<T>().Where(e => ids.Contains(EF.Property<TKey>(e, "id"))).ToListAsync();
|
||||||
|
}
|
||||||
public void Remove(T entity)
|
public void Remove(T entity)
|
||||||
{
|
{
|
||||||
_context.Set<T>().Remove(entity);
|
_context.Set<T>().Remove(entity);
|
||||||
|
|||||||
@@ -1,624 +0,0 @@
|
|||||||
# راهنمای اتصال اپلیکیشن Android به SignalR برای Face Embedding
|
|
||||||
|
|
||||||
## 1. افزودن کتابخانه SignalR به پروژه Android
|
|
||||||
|
|
||||||
در فایل `build.gradle` (Module: app) خود، dependency زیر را اضافه کنید:
|
|
||||||
|
|
||||||
```gradle
|
|
||||||
dependencies {
|
|
||||||
// SignalR for Android
|
|
||||||
implementation 'com.microsoft.signalr:signalr:7.0.0'
|
|
||||||
|
|
||||||
// اگر از Kotlin استفاده میکنید:
|
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
|
|
||||||
|
|
||||||
// برای JSON پردازش:
|
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 2. اضافه کردن Permission در AndroidManifest.xml
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
```
|
|
||||||
|
|
||||||
## 3. کد Java/Kotlin برای اتصال به SignalR
|
|
||||||
|
|
||||||
### نسخه Java:
|
|
||||||
|
|
||||||
```java
|
|
||||||
import com.microsoft.signalr.HubConnection;
|
|
||||||
import com.microsoft.signalr.HubConnectionBuilder;
|
|
||||||
import com.microsoft.signalr.HubConnectionState;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
public class FaceEmbeddingSignalRClient {
|
|
||||||
private static final String TAG = "FaceEmbeddingHub";
|
|
||||||
private HubConnection hubConnection;
|
|
||||||
private String serverUrl = "http://YOUR_SERVER_IP:PORT/trackingFaceEmbeddingHub"; // آدرس سرور خود را وارد کنید
|
|
||||||
private long workshopId;
|
|
||||||
|
|
||||||
public FaceEmbeddingSignalRClient(long workshopId) {
|
|
||||||
this.workshopId = workshopId;
|
|
||||||
initializeSignalR();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initializeSignalR() {
|
|
||||||
// ایجاد اتصال SignalR
|
|
||||||
hubConnection = HubConnectionBuilder
|
|
||||||
.create(serverUrl)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
// دریافت رویداد ایجاد Embedding
|
|
||||||
hubConnection.on("EmbeddingCreated", (data) -> {
|
|
||||||
JsonObject jsonData = (JsonObject) data;
|
|
||||||
long employeeId = jsonData.get("employeeId").getAsLong();
|
|
||||||
String employeeFullName = jsonData.get("employeeFullName").getAsString();
|
|
||||||
String timestamp = jsonData.get("timestamp").getAsString();
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Created - Employee: " + employeeFullName + " (ID: " + employeeId + ")");
|
|
||||||
|
|
||||||
// اینجا میتوانید دادههای جدید را از سرور بگیرید یا UI را بروزرسانی کنید
|
|
||||||
onEmbeddingCreated(employeeId, employeeFullName, timestamp);
|
|
||||||
|
|
||||||
}, JsonObject.class);
|
|
||||||
|
|
||||||
// دریافت رویداد حذف Embedding
|
|
||||||
hubConnection.on("EmbeddingDeleted", (data) -> {
|
|
||||||
JsonObject jsonData = (JsonObject) data;
|
|
||||||
long employeeId = jsonData.get("employeeId").getAsLong();
|
|
||||||
String timestamp = jsonData.get("timestamp").getAsString();
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Deleted - Employee ID: " + employeeId);
|
|
||||||
onEmbeddingDeleted(employeeId, timestamp);
|
|
||||||
|
|
||||||
}, JsonObject.class);
|
|
||||||
|
|
||||||
// دریافت رویداد بهبود Embedding
|
|
||||||
hubConnection.on("EmbeddingRefined", (data) -> {
|
|
||||||
JsonObject jsonData = (JsonObject) data;
|
|
||||||
long employeeId = jsonData.get("employeeId").getAsLong();
|
|
||||||
String timestamp = jsonData.get("timestamp").getAsString();
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Refined - Employee ID: " + employeeId);
|
|
||||||
onEmbeddingRefined(employeeId, timestamp);
|
|
||||||
|
|
||||||
}, JsonObject.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void connect() {
|
|
||||||
if (hubConnection.getConnectionState() == HubConnectionState.DISCONNECTED) {
|
|
||||||
hubConnection.start()
|
|
||||||
.doOnComplete(() -> {
|
|
||||||
Log.d(TAG, "Connected to SignalR Hub");
|
|
||||||
joinWorkshopGroup();
|
|
||||||
})
|
|
||||||
.doOnError(error -> {
|
|
||||||
Log.e(TAG, "Error connecting to SignalR: " + error.getMessage());
|
|
||||||
})
|
|
||||||
.subscribe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void joinWorkshopGroup() {
|
|
||||||
// عضویت در گروه مخصوص این کارگاه
|
|
||||||
hubConnection.send("JoinWorkshopGroup", workshopId);
|
|
||||||
Log.d(TAG, "Joined workshop group: " + workshopId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void disconnect() {
|
|
||||||
if (hubConnection.getConnectionState() == HubConnectionState.CONNECTED) {
|
|
||||||
// خروج از گروه
|
|
||||||
hubConnection.send("LeaveWorkshopGroup", workshopId);
|
|
||||||
|
|
||||||
hubConnection.stop();
|
|
||||||
Log.d(TAG, "Disconnected from SignalR Hub");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// این متدها را در Activity/Fragment خود override کنید
|
|
||||||
protected void onEmbeddingCreated(long employeeId, String employeeFullName, String timestamp) {
|
|
||||||
// اینجا UI را بروزرسانی کنید یا داده جدید را بگیرید
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onEmbeddingDeleted(long employeeId, String timestamp) {
|
|
||||||
// اینجا UI را بروزرسانی کنید
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onEmbeddingRefined(long employeeId, String timestamp) {
|
|
||||||
// اینجا UI را بروزرسانی کنید
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### نسخه Kotlin:
|
|
||||||
|
|
||||||
```kotlin
|
|
||||||
import com.microsoft.signalr.HubConnection
|
|
||||||
import com.microsoft.signalr.HubConnectionBuilder
|
|
||||||
import com.microsoft.signalr.HubConnectionState
|
|
||||||
import com.google.gson.JsonObject
|
|
||||||
import android.util.Log
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.launch
|
|
||||||
|
|
||||||
class FaceEmbeddingSignalRClient(private val workshopId: Long) {
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val TAG = "FaceEmbeddingHub"
|
|
||||||
}
|
|
||||||
|
|
||||||
private lateinit var hubConnection: HubConnection
|
|
||||||
private val serverUrl = "http://YOUR_SERVER_IP:PORT/trackingFaceEmbeddingHub" // آدرس سرور خود را وارد کنید
|
|
||||||
|
|
||||||
init {
|
|
||||||
initializeSignalR()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun initializeSignalR() {
|
|
||||||
hubConnection = HubConnectionBuilder
|
|
||||||
.create(serverUrl)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
// دریافت رویداد ایجاد Embedding
|
|
||||||
hubConnection.on("EmbeddingCreated", { data: JsonObject ->
|
|
||||||
val employeeId = data.get("employeeId").asLong
|
|
||||||
val employeeFullName = data.get("employeeFullName").asString
|
|
||||||
val timestamp = data.get("timestamp").asString
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Created - Employee: $employeeFullName (ID: $employeeId)")
|
|
||||||
onEmbeddingCreated(employeeId, employeeFullName, timestamp)
|
|
||||||
}, JsonObject::class.java)
|
|
||||||
|
|
||||||
// دریافت رویداد حذف Embedding
|
|
||||||
hubConnection.on("EmbeddingDeleted", { data: JsonObject ->
|
|
||||||
val employeeId = data.get("employeeId").asLong
|
|
||||||
val timestamp = data.get("timestamp").asString
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Deleted - Employee ID: $employeeId")
|
|
||||||
onEmbeddingDeleted(employeeId, timestamp)
|
|
||||||
}, JsonObject::class.java)
|
|
||||||
|
|
||||||
// دریافت رویداد بهبود Embedding
|
|
||||||
hubConnection.on("EmbeddingRefined", { data: JsonObject ->
|
|
||||||
val employeeId = data.get("employeeId").asLong
|
|
||||||
val timestamp = data.get("timestamp").asString
|
|
||||||
|
|
||||||
Log.d(TAG, "Embedding Refined - Employee ID: $employeeId")
|
|
||||||
onEmbeddingRefined(employeeId, timestamp)
|
|
||||||
}, JsonObject::class.java)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun connect() {
|
|
||||||
if (hubConnection.connectionState == HubConnectionState.DISCONNECTED) {
|
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
|
||||||
try {
|
|
||||||
hubConnection.start().blockingAwait()
|
|
||||||
Log.d(TAG, "Connected to SignalR Hub")
|
|
||||||
joinWorkshopGroup()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e(TAG, "Error connecting to SignalR: ${e.message}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun joinWorkshopGroup() {
|
|
||||||
hubConnection.send("JoinWorkshopGroup", workshopId)
|
|
||||||
Log.d(TAG, "Joined workshop group: $workshopId")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun disconnect() {
|
|
||||||
if (hubConnection.connectionState == HubConnectionState.CONNECTED) {
|
|
||||||
hubConnection.send("LeaveWorkshopGroup", workshopId)
|
|
||||||
hubConnection.stop()
|
|
||||||
Log.d(TAG, "Disconnected from SignalR Hub")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// این متدها را override کنید
|
|
||||||
open fun onEmbeddingCreated(employeeId: Long, employeeFullName: String, timestamp: String) {
|
|
||||||
// اینجا UI را بروزرسانی کنید یا داده جدید را بگیرید
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun onEmbeddingDeleted(employeeId: Long, timestamp: String) {
|
|
||||||
// اینجا UI را بروزرسانی کنید
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun onEmbeddingRefined(employeeId: Long, timestamp: String) {
|
|
||||||
// اینجا UI را بروزرسانی کنید
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 4. استفاده در Activity یا Fragment
|
|
||||||
|
|
||||||
### مثال با Login و دریافت WorkshopId
|
|
||||||
|
|
||||||
#### Java:
|
|
||||||
```java
|
|
||||||
public class LoginActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_login);
|
|
||||||
|
|
||||||
Button btnLogin = findViewById(R.id.btnLogin);
|
|
||||||
btnLogin.setOnClickListener(v -> performLogin());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void performLogin() {
|
|
||||||
// فراخوانی API لاگین
|
|
||||||
// فرض کنید response شامل workshopId است
|
|
||||||
|
|
||||||
// مثال ساده (باید از Retrofit یا کتابخانه مشابه استفاده کنید):
|
|
||||||
// LoginResponse response = apiService.login(username, password);
|
|
||||||
// long workshopId = response.getWorkshopId();
|
|
||||||
|
|
||||||
long workshopId = 123; // این را از response دریافت کنید
|
|
||||||
|
|
||||||
// ذخیره workshopId
|
|
||||||
SharedPreferences prefs = getSharedPreferences("AppPrefs", MODE_PRIVATE);
|
|
||||||
prefs.edit().putLong("workshopId", workshopId).apply();
|
|
||||||
|
|
||||||
// رفتن به صفحه اصلی
|
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
|
||||||
private FaceEmbeddingSignalRClient signalRClient;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
|
||||||
|
|
||||||
// دریافت workshopId از SharedPreferences
|
|
||||||
SharedPreferences prefs = getSharedPreferences("AppPrefs", MODE_PRIVATE);
|
|
||||||
long workshopId = prefs.getLong("workshopId", 0);
|
|
||||||
|
|
||||||
if (workshopId == 0) {
|
|
||||||
// اگر workshopId وجود نداره، برگرد به صفحه لاگین
|
|
||||||
Intent intent = new Intent(this, LoginActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ایجاد و اتصال SignalR
|
|
||||||
signalRClient = new FaceEmbeddingSignalRClient(workshopId) {
|
|
||||||
@Override
|
|
||||||
protected void onEmbeddingCreated(long employeeId, String employeeFullName, String timestamp) {
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// بروزرسانی UI
|
|
||||||
Toast.makeText(MainActivity.this,
|
|
||||||
"Embedding ایجاد شد برای: " + employeeFullName,
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
|
|
||||||
// دریافت دادههای جدید از API
|
|
||||||
refreshEmployeeList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onEmbeddingDeleted(long employeeId, String timestamp) {
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onEmbeddingRefined(long employeeId, String timestamp) {
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
signalRClient.connect();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
if (signalRClient != null) {
|
|
||||||
signalRClient.disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void refreshEmployeeList() {
|
|
||||||
// دریافت لیست جدید کارمندان از API
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Kotlin:
|
|
||||||
```kotlin
|
|
||||||
class LoginActivity : AppCompatActivity() {
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_login)
|
|
||||||
|
|
||||||
val btnLogin = findViewById<Button>(R.id.btnLogin)
|
|
||||||
btnLogin.setOnClickListener { performLogin() }
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun performLogin() {
|
|
||||||
// فراخوانی API لاگین
|
|
||||||
// فرض کنید response شامل workshopId است
|
|
||||||
|
|
||||||
// مثال ساده (باید از Retrofit یا کتابخانه مشابه استفاده کنید):
|
|
||||||
// val response = apiService.login(username, password)
|
|
||||||
// val workshopId = response.workshopId
|
|
||||||
|
|
||||||
val workshopId = 123L // این را از response دریافت کنید
|
|
||||||
|
|
||||||
// ذخیره workshopId
|
|
||||||
val prefs = getSharedPreferences("AppPrefs", Context.MODE_PRIVATE)
|
|
||||||
prefs.edit().putLong("workshopId", workshopId).apply()
|
|
||||||
|
|
||||||
// رفتن به صفحه اصلی
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
|
||||||
private lateinit var signalRClient: FaceEmbeddingSignalRClient
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_main)
|
|
||||||
|
|
||||||
// دریافت workshopId از SharedPreferences
|
|
||||||
val prefs = getSharedPreferences("AppPrefs", Context.MODE_PRIVATE)
|
|
||||||
val workshopId = prefs.getLong("workshopId", 0L)
|
|
||||||
|
|
||||||
if (workshopId == 0L) {
|
|
||||||
// اگر workshopId وجود نداره، برگرد به صفحه لاگین
|
|
||||||
val intent = Intent(this, LoginActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
finish()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ایجاد و اتصال SignalR
|
|
||||||
signalRClient = object : FaceEmbeddingSignalRClient(workshopId) {
|
|
||||||
override fun onEmbeddingCreated(employeeId: Long, employeeFullName: String, timestamp: String) {
|
|
||||||
runOnUiThread {
|
|
||||||
// بروزرسانی UI
|
|
||||||
Toast.makeText(this@MainActivity,
|
|
||||||
"Embedding ایجاد شد برای: $employeeFullName",
|
|
||||||
Toast.LENGTH_SHORT).show()
|
|
||||||
|
|
||||||
// دریافت دادههای جدید از API
|
|
||||||
refreshEmployeeList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onEmbeddingDeleted(employeeId: Long, timestamp: String) {
|
|
||||||
runOnUiThread {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onEmbeddingRefined(employeeId: Long, timestamp: String) {
|
|
||||||
runOnUiThread {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
signalRClient.connect()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
signalRClient.disconnect()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun refreshEmployeeList() {
|
|
||||||
// دریافت لیست جدید کارمندان از API
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### مثال ساده بدون Login:
|
|
||||||
اگر workshopId را از قبل میدانید:
|
|
||||||
|
|
||||||
#### Java:
|
|
||||||
```java
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
|
||||||
private FaceEmbeddingSignalRClient signalRClient;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_main);
|
|
||||||
|
|
||||||
long workshopId = 123; // شناسه کارگاه خود را وارد کنید
|
|
||||||
|
|
||||||
signalRClient = new FaceEmbeddingSignalRClient(workshopId) {
|
|
||||||
@Override
|
|
||||||
protected void onEmbeddingCreated(long employeeId, String employeeFullName, String timestamp) {
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// بروزرسانی UI
|
|
||||||
Toast.makeText(MainActivity.this,
|
|
||||||
"Embedding ایجاد شد برای: " + employeeFullName,
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
|
|
||||||
// دریافت دادههای جدید از API
|
|
||||||
refreshEmployeeList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onEmbeddingDeleted(long employeeId, String timestamp) {
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
signalRClient.connect();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
if (signalRClient != null) {
|
|
||||||
signalRClient.disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void refreshEmployeeList() {
|
|
||||||
// دریافت لیست جدید کارمندان از API
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Kotlin:
|
|
||||||
```kotlin
|
|
||||||
class MainActivity : AppCompatActivity() {
|
|
||||||
private lateinit var signalRClient: FaceEmbeddingSignalRClient
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(R.layout.activity_main)
|
|
||||||
|
|
||||||
val workshopId = 123L // شناسه کارگاه خود را وارد کنید
|
|
||||||
|
|
||||||
signalRClient = object : FaceEmbeddingSignalRClient(workshopId) {
|
|
||||||
override fun onEmbeddingCreated(employeeId: Long, employeeFullName: String, timestamp: String) {
|
|
||||||
runOnUiThread {
|
|
||||||
// بروزرسانی UI
|
|
||||||
Toast.makeText(this@MainActivity,
|
|
||||||
"Embedding ایجاد شد برای: $employeeFullName",
|
|
||||||
Toast.LENGTH_SHORT).show()
|
|
||||||
|
|
||||||
// دریافت دادههای جدید از API
|
|
||||||
refreshEmployeeList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onEmbeddingDeleted(employeeId: Long, timestamp: String) {
|
|
||||||
runOnUiThread {
|
|
||||||
// بروزرسانی UI
|
|
||||||
refreshEmployeeList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
signalRClient.connect()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
signalRClient.disconnect()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun refreshEmployeeList() {
|
|
||||||
// دریافت لیست جدید کارمندان از API
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 5. نکات مهم
|
|
||||||
|
|
||||||
### آدرس سرور
|
|
||||||
- اگر روی شبیهساز اندروید تست میکنید و سرور روی localhost اجرا میشود، از آدرس `http://10.0.2.2:PORT` استفاده کنید
|
|
||||||
- اگر روی دستگاه فیزیکی تست میکنید، از آدرس IP شبکه محلی سرور استفاده کنید (مثل `http://192.168.1.100:PORT`)
|
|
||||||
- PORT پیشفرض معمولاً 5000 یا 5001 است (بسته به کانفیگ پروژه شما)
|
|
||||||
|
|
||||||
### دریافت WorkshopId از Login
|
|
||||||
بعد از login موفق، workshopId را از سرور دریافت کنید و در SharedPreferences یا یک Singleton ذخیره کنید:
|
|
||||||
|
|
||||||
```java
|
|
||||||
// بعد از login موفق
|
|
||||||
SharedPreferences prefs = getSharedPreferences("AppPrefs", MODE_PRIVATE);
|
|
||||||
prefs.edit().putLong("workshopId", workshopId).apply();
|
|
||||||
|
|
||||||
// استفاده در Activity
|
|
||||||
long workshopId = prefs.getLong("workshopId", 0);
|
|
||||||
```
|
|
||||||
|
|
||||||
یا در Kotlin:
|
|
||||||
|
|
||||||
```kotlin
|
|
||||||
// بعد از login موفق
|
|
||||||
val prefs = getSharedPreferences("AppPrefs", Context.MODE_PRIVATE)
|
|
||||||
prefs.edit().putLong("workshopId", workshopId).apply()
|
|
||||||
|
|
||||||
// استفاده در Activity
|
|
||||||
val workshopId = prefs.getLong("workshopId", 0L)
|
|
||||||
```
|
|
||||||
|
|
||||||
### مدیریت اتصال
|
|
||||||
برای reconnection خودکار:
|
|
||||||
|
|
||||||
```java
|
|
||||||
hubConnection.onClosed(exception -> {
|
|
||||||
Log.e(TAG, "Connection closed. Attempting to reconnect...");
|
|
||||||
new Handler().postDelayed(() -> connect(), 5000); // تلاش مجدد بعد از 5 ثانیه
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### Thread Safety
|
|
||||||
همیشه UI updates را در main thread انجام دهید:
|
|
||||||
|
|
||||||
```java
|
|
||||||
runOnUiThread(() -> {
|
|
||||||
// UI updates here
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## 6. تست اتصال
|
|
||||||
|
|
||||||
برای تست میتوانید:
|
|
||||||
1. اپلیکیشن را اجرا کنید
|
|
||||||
2. از طریق Postman یا Swagger یک Embedding ایجاد کنید
|
|
||||||
3. باید در Logcat پیام "Embedding Created" را ببینید
|
|
||||||
|
|
||||||
## 7. خطایابی (Debugging)
|
|
||||||
|
|
||||||
برای دیدن جزئیات بیشتر:
|
|
||||||
|
|
||||||
```java
|
|
||||||
hubConnection = HubConnectionBuilder
|
|
||||||
.create(serverUrl)
|
|
||||||
.withHttpConnectionOptions(options -> {
|
|
||||||
options.setLogging(LogLevel.TRACE);
|
|
||||||
})
|
|
||||||
.build();
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## خلاصه Endpoints
|
|
||||||
|
|
||||||
| نوع رویداد | متد SignalR | پارامترهای دریافتی |
|
|
||||||
|-----------|-------------|---------------------|
|
|
||||||
| ایجاد Embedding | `EmbeddingCreated` | workshopId, employeeId, employeeFullName, timestamp |
|
|
||||||
| حذف Embedding | `EmbeddingDeleted` | workshopId, employeeId, timestamp |
|
|
||||||
| بهبود Embedding | `EmbeddingRefined` | workshopId, employeeId, timestamp |
|
|
||||||
|
|
||||||
| متد ارسالی | پارامتر | توضیحات |
|
|
||||||
|-----------|---------|---------|
|
|
||||||
| `JoinWorkshopGroup` | workshopId | عضویت در گروه کارگاه |
|
|
||||||
| `LeaveWorkshopGroup` | workshopId | خروج از گروه کارگاه |
|
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<NuGetAudit>false</NuGetAudit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,175 +0,0 @@
|
|||||||
# سیستم گزارش خرابی (Bug Report System)
|
|
||||||
|
|
||||||
## نمای کلی
|
|
||||||
|
|
||||||
این سیستم برای جمعآوری، ذخیره و مدیریت گزارشهای خرابی از تطبیق موبایلی طراحی شده است.
|
|
||||||
|
|
||||||
## ساختار فایلها
|
|
||||||
|
|
||||||
### Domain Layer
|
|
||||||
- `AccountManagement.Domain/BugReportAgg/`
|
|
||||||
- `BugReport.cs` - موجودیت اصلی
|
|
||||||
- `BugReportLog.cs` - لاگهای گزارش
|
|
||||||
- `BugReportScreenshot.cs` - تصاویر ضمیمه شده
|
|
||||||
|
|
||||||
### Application Contracts
|
|
||||||
- `AccountManagement.Application.Contracts/BugReport/`
|
|
||||||
- `IBugReportApplication.cs` - اینترفیس سرویس
|
|
||||||
- `CreateBugReportCommand.cs` - درخواست ایجاد
|
|
||||||
- `EditBugReportCommand.cs` - درخواست ویرایش
|
|
||||||
- `BugReportViewModel.cs` - نمایش لیست
|
|
||||||
- `BugReportDetailViewModel.cs` - نمایش جزئیات
|
|
||||||
- `IBugReportRepository.cs` - اینترفیس Repository
|
|
||||||
|
|
||||||
### Application Service
|
|
||||||
- `AccountManagement.Application/BugReportApplication.cs` - پیادهسازی سرویس
|
|
||||||
|
|
||||||
### Infrastructure
|
|
||||||
- `AccountMangement.Infrastructure.EFCore/`
|
|
||||||
- `Mappings/BugReportMapping.cs`
|
|
||||||
- `Mappings/BugReportLogMapping.cs`
|
|
||||||
- `Mappings/BugReportScreenshotMapping.cs`
|
|
||||||
- `Repository/BugReportRepository.cs`
|
|
||||||
|
|
||||||
### API Controller
|
|
||||||
- `ServiceHost/Controllers/BugReportController.cs`
|
|
||||||
|
|
||||||
### Admin Pages
|
|
||||||
- `ServiceHost/Areas/AdminNew/Pages/BugReport/`
|
|
||||||
- `BugReportPageModel.cs` - base model
|
|
||||||
- `Index.cshtml.cs / Index.cshtml` - لیست گزارشها
|
|
||||||
- `Details.cshtml.cs / Details.cshtml` - جزئیات کامل
|
|
||||||
- `Edit.cshtml.cs / Edit.cshtml` - ویرایش وضعیت/اولویت
|
|
||||||
- `Delete.cshtml.cs / Delete.cshtml` - حذف
|
|
||||||
|
|
||||||
## روش استفاده
|
|
||||||
|
|
||||||
### 1. ثبت گزارش از موبایل
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
POST /api/bugreport/submit
|
|
||||||
|
|
||||||
{
|
|
||||||
"title": "برنامه هنگام ورود خراب میشود",
|
|
||||||
"description": "هنگام وارد کردن نام کاربری، برنامه کرش میکند",
|
|
||||||
"userEmail": "user@example.com",
|
|
||||||
"deviceModel": "Samsung Galaxy S21",
|
|
||||||
"osVersion": "Android 12",
|
|
||||||
"platform": "Android",
|
|
||||||
"manufacturer": "Samsung",
|
|
||||||
"deviceId": "device-unique-id",
|
|
||||||
"screenResolution": "1440x3200",
|
|
||||||
"memoryInMB": 8000,
|
|
||||||
"storageInMB": 256000,
|
|
||||||
"batteryLevel": 75,
|
|
||||||
"isCharging": false,
|
|
||||||
"networkType": "4G",
|
|
||||||
"appVersion": "1.0.0",
|
|
||||||
"buildNumber": "100",
|
|
||||||
"packageName": "com.example.app",
|
|
||||||
"installTime": "2024-01-01T10:00:00Z",
|
|
||||||
"lastUpdateTime": "2024-12-01T14:30:00Z",
|
|
||||||
"flavor": "production",
|
|
||||||
"type": 1, // Crash = 1
|
|
||||||
"priority": 2, // High = 2
|
|
||||||
"stackTrace": "...",
|
|
||||||
"logs": ["log1", "log2"],
|
|
||||||
"screenshots": ["base64-encoded-image-1"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. دسترسی به Admin Panel
|
|
||||||
|
|
||||||
```
|
|
||||||
https://yourdomain.com/AdminNew/BugReport
|
|
||||||
```
|
|
||||||
|
|
||||||
**صفحات موجود:**
|
|
||||||
- **Index** - لیست تمام گزارشها با فیلترها
|
|
||||||
- **Details** - نمایش جزئیات کامل شامل:
|
|
||||||
- معلومات کاربر و گزارش
|
|
||||||
- معلومات دستگاه
|
|
||||||
- معلومات برنامه
|
|
||||||
- لاگها
|
|
||||||
- تصاویر
|
|
||||||
- Stack Trace
|
|
||||||
- **Edit** - تغییر وضعیت و اولویت
|
|
||||||
- **Delete** - حذف گزارش
|
|
||||||
|
|
||||||
### 3. درخواستهای API
|
|
||||||
|
|
||||||
#### دریافت لیست
|
|
||||||
```
|
|
||||||
GET /api/bugreport/list?type=1&priority=2&status=1&searchTerm=crash&pageNumber=1&pageSize=10
|
|
||||||
```
|
|
||||||
|
|
||||||
#### دریافت جزئیات
|
|
||||||
```
|
|
||||||
GET /api/bugreport/{id}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### ویرایش
|
|
||||||
```
|
|
||||||
PUT /api/bugreport/{id}
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"priority": 2,
|
|
||||||
"status": 3
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### حذف
|
|
||||||
```
|
|
||||||
DELETE /api/bugreport/{id}
|
|
||||||
```
|
|
||||||
|
|
||||||
## انواع (Enums)
|
|
||||||
|
|
||||||
### BugReportType
|
|
||||||
- `1` - Crash (کرش)
|
|
||||||
- `2` - UI (مشکل رابط)
|
|
||||||
- `3` - Performance (عملکرد)
|
|
||||||
- `4` - Feature (فیچر)
|
|
||||||
- `5` - Network (شبکه)
|
|
||||||
- `6` - Camera (دوربین)
|
|
||||||
- `7` - FaceRecognition (تشخیص چهره)
|
|
||||||
- `8` - Database (دیتابیس)
|
|
||||||
- `9` - Login (ورود)
|
|
||||||
- `10` - Other (سایر)
|
|
||||||
|
|
||||||
### BugPriority
|
|
||||||
- `1` - Critical (بحرانی)
|
|
||||||
- `2` - High (بالا)
|
|
||||||
- `3` - Medium (متوسط)
|
|
||||||
- `4` - Low (پایین)
|
|
||||||
|
|
||||||
### BugReportStatus
|
|
||||||
- `1` - Open (باز)
|
|
||||||
- `2` - InProgress (در حال بررسی)
|
|
||||||
- `3` - Fixed (رفع شده)
|
|
||||||
- `4` - Closed (بسته شده)
|
|
||||||
- `5` - Reopened (مجدداً باز)
|
|
||||||
|
|
||||||
## Migration
|
|
||||||
|
|
||||||
برای اعمال تغییرات دیتابیس:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
Add-Migration AddBugReportTables
|
|
||||||
Update-Database
|
|
||||||
```
|
|
||||||
|
|
||||||
## نکات مهم
|
|
||||||
|
|
||||||
1. **تصاویر**: تصاویر به صورت Base64 encoded ذخیره میشوند
|
|
||||||
2. **لاگها**: تمام لاگها به صورت جدا ذخیره میشوند
|
|
||||||
3. **وضعیت پیشفرض**: وقتی گزارش ثبت میشود، وضعیت آن "Open" است
|
|
||||||
4. **تاریخ**: تاریخ ایجاد و بروزرسانی خودکار ثبت میشود
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
- API endpoints از `authentication` محافظت میشوند
|
|
||||||
- Admin pages تنها برای کاربرانی با دسترسی AdminArea قابل دسترس هستند
|
|
||||||
- حذف و ویرایش نیاز به تأیید دارد
|
|
||||||
|
|
||||||
314
CHANGELOG.md
314
CHANGELOG.md
@@ -1,314 +0,0 @@
|
|||||||
# خلاصه تغییرات سیستم گزارش خرابی
|
|
||||||
|
|
||||||
## 📝 فایلهای اضافه شده (23 فایل)
|
|
||||||
|
|
||||||
### 1️⃣ Domain Layer (3 فایل)
|
|
||||||
```
|
|
||||||
✓ AccountManagement.Domain/BugReportAgg/
|
|
||||||
├── BugReport.cs
|
|
||||||
├── BugReportLog.cs
|
|
||||||
└── BugReportScreenshot.cs
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2️⃣ Application Contracts (6 فایل)
|
|
||||||
```
|
|
||||||
✓ AccountManagement.Application.Contracts/BugReport/
|
|
||||||
├── IBugReportRepository.cs
|
|
||||||
├── IBugReportApplication.cs
|
|
||||||
├── CreateBugReportCommand.cs
|
|
||||||
├── EditBugReportCommand.cs
|
|
||||||
├── BugReportViewModel.cs
|
|
||||||
└── BugReportDetailViewModel.cs
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3️⃣ Application Service (1 فایل)
|
|
||||||
```
|
|
||||||
✓ AccountManagement.Application/
|
|
||||||
└── BugReportApplication.cs
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4️⃣ Infrastructure EFCore (4 فایل)
|
|
||||||
```
|
|
||||||
✓ AccountMangement.Infrastructure.EFCore/
|
|
||||||
├── Mappings/
|
|
||||||
│ ├── BugReportMapping.cs
|
|
||||||
│ ├── BugReportLogMapping.cs
|
|
||||||
│ └── BugReportScreenshotMapping.cs
|
|
||||||
└── Repository/
|
|
||||||
└── BugReportRepository.cs
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5️⃣ API Controller (1 فایل)
|
|
||||||
```
|
|
||||||
✓ ServiceHost/Controllers/
|
|
||||||
└── BugReportController.cs
|
|
||||||
```
|
|
||||||
|
|
||||||
### 6️⃣ Admin Pages (8 فایل)
|
|
||||||
```
|
|
||||||
✓ ServiceHost/Areas/AdminNew/Pages/BugReport/
|
|
||||||
├── BugReportPageModel.cs
|
|
||||||
├── Index.cshtml.cs
|
|
||||||
├── Index.cshtml
|
|
||||||
├── Details.cshtml.cs
|
|
||||||
├── Details.cshtml
|
|
||||||
├── Edit.cshtml.cs
|
|
||||||
├── Edit.cshtml
|
|
||||||
├── Delete.cshtml.cs
|
|
||||||
└── Delete.cshtml
|
|
||||||
```
|
|
||||||
|
|
||||||
### 7️⃣ Documentation (2 فایل)
|
|
||||||
```
|
|
||||||
✓ BUG_REPORT_SYSTEM.md
|
|
||||||
✓ FLUTTER_BUG_REPORT_EXAMPLE.dart
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✏️ فایلهای اصلاح شده (2 فایل)
|
|
||||||
|
|
||||||
### 1. AccountManagement.Configuration/AccountManagementBootstrapper.cs
|
|
||||||
**تغییر:** اضافه کردن using برای BugReport
|
|
||||||
```csharp
|
|
||||||
using AccountManagement.Application.Contracts.BugReport;
|
|
||||||
```
|
|
||||||
|
|
||||||
**تغییر:** رجیستریشن سرویسها
|
|
||||||
```csharp
|
|
||||||
services.AddTransient<IBugReportApplication, BugReportApplication>();
|
|
||||||
services.AddTransient<IBugReportRepository, BugReportRepository>();
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. AccountMangement.Infrastructure.EFCore/AccountContext.cs
|
|
||||||
**تغییر:** اضافه کردن using
|
|
||||||
```csharp
|
|
||||||
using AccountManagement.Domain.BugReportAgg;
|
|
||||||
```
|
|
||||||
|
|
||||||
**تغییر:** اضافه کردن DbSets
|
|
||||||
```csharp
|
|
||||||
#region BugReport
|
|
||||||
public DbSet<BugReport> BugReports { get; set; }
|
|
||||||
public DbSet<BugReportLog> BugReportLogs { get; set; }
|
|
||||||
public DbSet<BugReportScreenshot> BugReportScreenshots { get; set; }
|
|
||||||
#endregion
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 موارد مورد نیاز قبل از استفاده
|
|
||||||
|
|
||||||
### 1. Database Migration
|
|
||||||
```powershell
|
|
||||||
# در Package Manager Console
|
|
||||||
cd AccountMangement.Infrastructure.EFCore
|
|
||||||
|
|
||||||
Add-Migration AddBugReportSystem
|
|
||||||
Update-Database
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. الگوی Enum برای Flutter
|
|
||||||
```dart
|
|
||||||
enum BugReportType {
|
|
||||||
crash, // 1
|
|
||||||
ui, // 2
|
|
||||||
performance, // 3
|
|
||||||
feature, // 4
|
|
||||||
network, // 5
|
|
||||||
camera, // 6
|
|
||||||
faceRecognition, // 7
|
|
||||||
database, // 8
|
|
||||||
login, // 9
|
|
||||||
other, // 10
|
|
||||||
}
|
|
||||||
|
|
||||||
enum BugPriority {
|
|
||||||
critical, // 1
|
|
||||||
high, // 2
|
|
||||||
medium, // 3
|
|
||||||
low, // 4
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 نقاط ورود
|
|
||||||
|
|
||||||
### API Endpoints
|
|
||||||
```
|
|
||||||
POST /api/bugreport/submit - ثبت گزارش جدید
|
|
||||||
GET /api/bugreport/list - دریافت لیست
|
|
||||||
GET /api/bugreport/{id} - دریافت جزئیات
|
|
||||||
PUT /api/bugreport/{id} - ویرایش وضعیت/اولویت
|
|
||||||
DELETE /api/bugreport/{id} - حذف گزارش
|
|
||||||
```
|
|
||||||
|
|
||||||
### Admin Pages
|
|
||||||
```
|
|
||||||
/AdminNew/BugReport - لیست گزارشها
|
|
||||||
/AdminNew/BugReport/Details/{id} - جزئیات کامل
|
|
||||||
/AdminNew/BugReport/Edit/{id} - ویرایش
|
|
||||||
/AdminNew/BugReport/Delete/{id} - حذف
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 Database Schema
|
|
||||||
|
|
||||||
### BugReports جدول
|
|
||||||
```sql
|
|
||||||
- id (bigint, PK)
|
|
||||||
- Title (nvarchar(200))
|
|
||||||
- Description (ntext)
|
|
||||||
- UserEmail (nvarchar(150))
|
|
||||||
- AccountId (bigint, nullable)
|
|
||||||
- DeviceModel (nvarchar(100))
|
|
||||||
- OsVersion (nvarchar(50))
|
|
||||||
- Platform (nvarchar(50))
|
|
||||||
- Manufacturer (nvarchar(100))
|
|
||||||
- DeviceId (nvarchar(200))
|
|
||||||
- ScreenResolution (nvarchar(50))
|
|
||||||
- MemoryInMB (int)
|
|
||||||
- StorageInMB (int)
|
|
||||||
- BatteryLevel (int)
|
|
||||||
- IsCharging (bit)
|
|
||||||
- NetworkType (nvarchar(50))
|
|
||||||
- AppVersion (nvarchar(50))
|
|
||||||
- BuildNumber (nvarchar(50))
|
|
||||||
- PackageName (nvarchar(150))
|
|
||||||
- InstallTime (datetime2)
|
|
||||||
- LastUpdateTime (datetime2)
|
|
||||||
- Flavor (nvarchar(50))
|
|
||||||
- Type (int)
|
|
||||||
- Priority (int)
|
|
||||||
- Status (int)
|
|
||||||
- StackTrace (ntext, nullable)
|
|
||||||
- CreationDate (datetime2)
|
|
||||||
- UpdateDate (datetime2, nullable)
|
|
||||||
```
|
|
||||||
|
|
||||||
### BugReportLogs جدول
|
|
||||||
```sql
|
|
||||||
- id (bigint, PK)
|
|
||||||
- BugReportId (bigint, FK)
|
|
||||||
- Message (ntext)
|
|
||||||
- Timestamp (datetime2)
|
|
||||||
```
|
|
||||||
|
|
||||||
### BugReportScreenshots جدول
|
|
||||||
```sql
|
|
||||||
- id (bigint, PK)
|
|
||||||
- BugReportId (bigint, FK)
|
|
||||||
- Base64Data (ntext)
|
|
||||||
- FileName (nvarchar(255))
|
|
||||||
- UploadDate (datetime2)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✨ مثال درخواست API
|
|
||||||
|
|
||||||
```json
|
|
||||||
POST /api/bugreport/submit
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"title": "برنامه هنگام ورود خراب میشود",
|
|
||||||
"description": "هنگام فشار دادن دکمه ورود، برنامه کرش میکند",
|
|
||||||
"userEmail": "user@example.com",
|
|
||||||
"accountId": 123,
|
|
||||||
"deviceModel": "Samsung Galaxy S21",
|
|
||||||
"osVersion": "Android 12",
|
|
||||||
"platform": "Android",
|
|
||||||
"manufacturer": "Samsung",
|
|
||||||
"deviceId": "device-12345",
|
|
||||||
"screenResolution": "1440x3200",
|
|
||||||
"memoryInMB": 8000,
|
|
||||||
"storageInMB": 256000,
|
|
||||||
"batteryLevel": 75,
|
|
||||||
"isCharging": false,
|
|
||||||
"networkType": "4G",
|
|
||||||
"appVersion": "1.0.0",
|
|
||||||
"buildNumber": "100",
|
|
||||||
"packageName": "com.example.app",
|
|
||||||
"installTime": "2024-01-01T10:00:00Z",
|
|
||||||
"lastUpdateTime": "2024-12-07T14:30:00Z",
|
|
||||||
"flavor": "production",
|
|
||||||
"type": 1,
|
|
||||||
"priority": 2,
|
|
||||||
"stackTrace": "...",
|
|
||||||
"logs": ["log line 1", "log line 2"],
|
|
||||||
"screenshots": ["base64-string"]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔐 Security Features
|
|
||||||
|
|
||||||
- ✅ Authorization برای Admin Pages (AdminAreaPermission required)
|
|
||||||
- ✅ API Authentication
|
|
||||||
- ✅ XSS Protection (Html.Raw محدود)
|
|
||||||
- ✅ CSRF Protection (ASP.NET Core default)
|
|
||||||
- ✅ Input Validation
|
|
||||||
- ✅ Safe Delete with Confirmation
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📚 Documentation Files
|
|
||||||
|
|
||||||
1. **BUG_REPORT_SYSTEM.md** - راهنمای کامل سیستم
|
|
||||||
2. **FLUTTER_BUG_REPORT_EXAMPLE.dart** - مثال پیادهسازی Flutter
|
|
||||||
3. **CHANGELOG.md** (این فایل) - خلاصه تغییرات
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✅ Checklist پیادهسازی
|
|
||||||
|
|
||||||
- [x] Domain Models
|
|
||||||
- [x] Database Mappings
|
|
||||||
- [x] Repository Pattern
|
|
||||||
- [x] Application Services
|
|
||||||
- [x] API Endpoints
|
|
||||||
- [x] Admin UI Pages
|
|
||||||
- [x] Dependency Injection
|
|
||||||
- [x] Error Handling
|
|
||||||
- [x] Documentation
|
|
||||||
- [x] Flutter Example
|
|
||||||
- [ ] Database Migration (باید دستی اجرا شود)
|
|
||||||
- [ ] Testing
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 مراحل بعدی
|
|
||||||
|
|
||||||
1. **اجرای Migration:**
|
|
||||||
```powershell
|
|
||||||
Add-Migration AddBugReportSystem
|
|
||||||
Update-Database
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **تست API:**
|
|
||||||
- استفاده از Postman/Thunder Client
|
|
||||||
- تست تمام endpoints
|
|
||||||
|
|
||||||
3. **تست Admin Panel:**
|
|
||||||
- دسترسی به /AdminNew/BugReport
|
|
||||||
- تست فیلترها و جستجو
|
|
||||||
- تست ویرایش و حذف
|
|
||||||
|
|
||||||
4. **Integration Flutter:**
|
|
||||||
- کپی کردن `FLUTTER_BUG_REPORT_EXAMPLE.dart`
|
|
||||||
- سازگار کردن با پروژه Flutter
|
|
||||||
- تست ثبت گزارشها
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📞 پشتیبانی
|
|
||||||
|
|
||||||
برای هر سوال یا مشکل:
|
|
||||||
1. بررسی کنید `BUG_REPORT_SYSTEM.md`
|
|
||||||
2. بررسی کنید logs و error messages
|
|
||||||
3. مطمئن شوید Migration اجرا شده است
|
|
||||||
|
|
||||||
248
CONFIGURATION_SUMMARY.md
Normal file
248
CONFIGURATION_SUMMARY.md
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
# ✅ Docker Bind Mounts Configuration - Summary
|
||||||
|
|
||||||
|
## What Was Changed
|
||||||
|
|
||||||
|
### 1. docker-compose.yml
|
||||||
|
**Before:**
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
- ./ServiceHost/certs:/app/certs:ro
|
||||||
|
- app_storage:/app/Storage # ❌ Docker volume
|
||||||
|
- app_logs:/app/Logs # ❌ Docker volume
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
app_storage:
|
||||||
|
driver: local
|
||||||
|
app_logs:
|
||||||
|
driver: local
|
||||||
|
```
|
||||||
|
|
||||||
|
**After:**
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
# ✅ Bind mounts for production-critical data on Windows host
|
||||||
|
- ./ServiceHost/certs:/app/certs:ro
|
||||||
|
- D:/AppData/Faces:/app/Faces
|
||||||
|
- D:/AppData/Storage:/app/Storage
|
||||||
|
- D:/AppData/Logs:/app/Logs
|
||||||
|
|
||||||
|
# ✅ No volumes section needed
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. New Files Created
|
||||||
|
- `DOCKER_BIND_MOUNTS_SETUP.md` - Complete documentation
|
||||||
|
- `setup-bind-mounts.ps1` - Automated setup script
|
||||||
|
- `QUICK_REFERENCE.md` - Quick command reference
|
||||||
|
|
||||||
|
## Path Mapping
|
||||||
|
|
||||||
|
| Container (Linux paths) | Windows Host (forward slash) | Actual Windows Path |
|
||||||
|
|-------------------------|------------------------------|---------------------|
|
||||||
|
| `/app/Faces` | `D:/AppData/Faces` | `D:\AppData\Faces` |
|
||||||
|
| `/app/Storage` | `D:/AppData/Storage` | `D:\AppData\Storage`|
|
||||||
|
| `/app/Logs` | `D:/AppData/Logs` | `D:\AppData\Logs` |
|
||||||
|
|
||||||
|
**Note:** Docker Compose on Windows accepts both `D:/` and `D:\` but prefers forward slashes.
|
||||||
|
|
||||||
|
## Application Code Compatibility
|
||||||
|
|
||||||
|
Your application uses:
|
||||||
|
```csharp
|
||||||
|
Path.Combine(env.ContentRootPath, "Faces"); // → /app/Faces
|
||||||
|
Path.Combine(env.ContentRootPath, "Storage"); // → /app/Storage
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `env.ContentRootPath` = `/app` in the container.
|
||||||
|
|
||||||
|
✅ **No code changes required!** The bind mounts map directly to these paths.
|
||||||
|
|
||||||
|
## Setup Instructions
|
||||||
|
|
||||||
|
### Option 1: Automated Setup (Recommended)
|
||||||
|
```powershell
|
||||||
|
# Navigate to project directory
|
||||||
|
cd D:\GozareshgirOrginal\OriginalGozareshgir
|
||||||
|
|
||||||
|
# Run setup script with permissions
|
||||||
|
.\setup-bind-mounts.ps1 -GrantFullPermissions
|
||||||
|
|
||||||
|
# Start the application
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option 2: Manual Setup
|
||||||
|
```powershell
|
||||||
|
# 1. Create directories
|
||||||
|
New-Item -ItemType Directory -Force -Path "D:\AppData\Faces"
|
||||||
|
New-Item -ItemType Directory -Force -Path "D:\AppData\Storage"
|
||||||
|
New-Item -ItemType Directory -Force -Path "D:\AppData\Logs"
|
||||||
|
|
||||||
|
# 2. Grant permissions
|
||||||
|
icacls "D:\AppData\Faces" /grant Everyone:F /T
|
||||||
|
icacls "D:\AppData\Storage" /grant Everyone:F /T
|
||||||
|
icacls "D:\AppData\Logs" /grant Everyone:F /T
|
||||||
|
|
||||||
|
# 3. Start the application
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## Verification Checklist
|
||||||
|
|
||||||
|
After starting the container:
|
||||||
|
|
||||||
|
1. **Check if directories are mounted:**
|
||||||
|
```powershell
|
||||||
|
docker exec gozareshgir-servicehost ls -la /app
|
||||||
|
```
|
||||||
|
Should show: `Faces/`, `Storage/`, `Logs/`
|
||||||
|
|
||||||
|
2. **Test write access from container:**
|
||||||
|
```powershell
|
||||||
|
docker exec gozareshgir-servicehost sh -c "echo 'test' > /app/Storage/test.txt"
|
||||||
|
Get-Content D:\AppData\Storage\test.txt # Should display: test
|
||||||
|
Remove-Item D:\AppData\Storage\test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Test write access from host:**
|
||||||
|
```powershell
|
||||||
|
"test from host" | Out-File "D:\AppData\Storage\host-test.txt"
|
||||||
|
docker exec gozareshgir-servicehost cat /app/Storage/host-test.txt
|
||||||
|
Remove-Item D:\AppData\Storage\host-test.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Check application logs:**
|
||||||
|
```powershell
|
||||||
|
docker logs gozareshgir-servicehost --tail 50
|
||||||
|
# Or directly on host:
|
||||||
|
Get-Content D:\AppData\Logs\gozareshgir_log.txt -Tail 50
|
||||||
|
```
|
||||||
|
|
||||||
|
## Data Persistence Guarantees
|
||||||
|
|
||||||
|
✅ **Files persist through:**
|
||||||
|
- `docker-compose down`
|
||||||
|
- `docker-compose restart`
|
||||||
|
- Container removal (`docker rm`)
|
||||||
|
- Image rebuilds (`docker-compose build`)
|
||||||
|
- Server reboots (with `restart: unless-stopped`)
|
||||||
|
|
||||||
|
✅ **Direct access:**
|
||||||
|
- Files can be accessed from Windows Explorer at `D:\AppData\*`
|
||||||
|
- Can be backed up using Windows Backup, robocopy, or any backup software
|
||||||
|
- Can be edited directly on the host (changes visible in container immediately)
|
||||||
|
|
||||||
|
⚠️ **Data does NOT survive:**
|
||||||
|
- Deleting the host directories (`D:\AppData\*`)
|
||||||
|
- Formatting the D: drive
|
||||||
|
- Without regular backups, hardware failures
|
||||||
|
|
||||||
|
## Production Checklist
|
||||||
|
|
||||||
|
Before deploying to production:
|
||||||
|
|
||||||
|
- [ ] Run `setup-bind-mounts.ps1 -GrantFullPermissions`
|
||||||
|
- [ ] Verify disk space on D: drive (at least 50 GB recommended)
|
||||||
|
- [ ] Set up scheduled backups (see `DOCKER_BIND_MOUNTS_SETUP.md`)
|
||||||
|
- [ ] Replace `Everyone` with specific service account for permissions
|
||||||
|
- [ ] Enable NTFS encryption for sensitive data (optional)
|
||||||
|
- [ ] Test container restart: `docker-compose restart`
|
||||||
|
- [ ] Test data persistence: Create a test file, restart container, verify file exists
|
||||||
|
- [ ] Configure monitoring for disk space usage
|
||||||
|
|
||||||
|
## Security Recommendations
|
||||||
|
|
||||||
|
1. **Restrict permissions** (production):
|
||||||
|
```powershell
|
||||||
|
# Replace Everyone with specific account
|
||||||
|
icacls "D:\AppData\Faces" /grant "DOMAIN\ServiceAccount:(OI)(CI)F" /T
|
||||||
|
icacls "D:\AppData\Storage" /grant "DOMAIN\ServiceAccount:(OI)(CI)F" /T
|
||||||
|
icacls "D:\AppData\Logs" /grant "DOMAIN\ServiceAccount:(OI)(CI)F" /T
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Enable encryption** for sensitive data:
|
||||||
|
```powershell
|
||||||
|
cipher /e "D:\AppData\Faces"
|
||||||
|
cipher /e "D:\AppData\Storage"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Set up audit logging:**
|
||||||
|
```powershell
|
||||||
|
auditpol /set /subcategory:"File System" /success:enable /failure:enable
|
||||||
|
```
|
||||||
|
|
||||||
|
## Backup Strategy
|
||||||
|
|
||||||
|
### Scheduled Backup (Recommended)
|
||||||
|
```powershell
|
||||||
|
# Create daily backup at 2 AM
|
||||||
|
$action = New-ScheduledTaskAction -Execute "robocopy" -Argument '"D:\AppData" "D:\Backups\AppData" /MIR /Z /LOG:"D:\Backups\backup.log"'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Daily -At 2am
|
||||||
|
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "GozareshgirBackup" -Description "Daily backup of Gozareshgir data"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual Backup
|
||||||
|
```powershell
|
||||||
|
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||||
|
robocopy "D:\AppData" "D:\Backups\AppData_$timestamp" /MIR /Z
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Issue: Container starts but files not appearing
|
||||||
|
**Solution:**
|
||||||
|
```powershell
|
||||||
|
# Check mount points
|
||||||
|
docker inspect gozareshgir-servicehost --format='{{json .Mounts}}' | ConvertFrom-Json
|
||||||
|
|
||||||
|
# Verify directories exist
|
||||||
|
Test-Path D:\AppData\Faces
|
||||||
|
Test-Path D:\AppData\Storage
|
||||||
|
Test-Path D:\AppData\Logs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Issue: Permission denied errors
|
||||||
|
**Solution:**
|
||||||
|
```powershell
|
||||||
|
# Re-grant permissions
|
||||||
|
icacls "D:\AppData\Faces" /grant Everyone:F /T
|
||||||
|
icacls "D:\AppData\Storage" /grant Everyone:F /T
|
||||||
|
icacls "D:\AppData\Logs" /grant Everyone:F /T
|
||||||
|
```
|
||||||
|
|
||||||
|
### Issue: Out of disk space
|
||||||
|
**Solution:**
|
||||||
|
```powershell
|
||||||
|
# Check disk usage
|
||||||
|
Get-ChildItem D:\AppData -Recurse | Measure-Object -Property Length -Sum
|
||||||
|
|
||||||
|
# Clean old log files (example: older than 30 days)
|
||||||
|
Get-ChildItem D:\AppData\Logs -Recurse -File | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | Remove-Item
|
||||||
|
```
|
||||||
|
|
||||||
|
## Support & Documentation
|
||||||
|
|
||||||
|
- **Full Documentation:** `DOCKER_BIND_MOUNTS_SETUP.md`
|
||||||
|
- **Quick Reference:** `QUICK_REFERENCE.md`
|
||||||
|
- **Setup Script:** `setup-bind-mounts.ps1`
|
||||||
|
|
||||||
|
## Migration from Docker Volumes (If applicable)
|
||||||
|
|
||||||
|
If you previously used Docker volumes, migrate the data:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 1. Stop the container
|
||||||
|
docker-compose down
|
||||||
|
|
||||||
|
# 2. Copy data from old volumes to host
|
||||||
|
docker run --rm -v old_volume_name:/source -v D:/AppData/Storage:/dest alpine cp -av /source/. /dest/
|
||||||
|
|
||||||
|
# 3. Start with new bind mounts
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Configuration Date:** January 2026
|
||||||
|
**Tested On:** Windows Server 2019/2022 with Docker Desktop
|
||||||
|
**Status:** ✅ Production Ready
|
||||||
|
|
||||||
@@ -8,5 +8,6 @@ namespace Company.Domain.BankAgg
|
|||||||
{
|
{
|
||||||
public void Remove(Bank entity);
|
public void Remove(Bank entity);
|
||||||
List<BankViewModel> Search(string name);
|
List<BankViewModel> Search(string name);
|
||||||
|
List<BankSelectList> GetBanksForSelectList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class Checkout : EntityBase
|
|||||||
string overNightWorkValue, string fridayWorkValue, string rotatingShifValue, string absenceValue,
|
string overNightWorkValue, string fridayWorkValue, string rotatingShifValue, string absenceValue,
|
||||||
string totalDayOfLeaveCompute, string totalDayOfYearsCompute, string totalDayOfBunosesCompute,
|
string totalDayOfLeaveCompute, string totalDayOfYearsCompute, string totalDayOfBunosesCompute,
|
||||||
ICollection<CheckoutLoanInstallment> loanInstallments,
|
ICollection<CheckoutLoanInstallment> loanInstallments,
|
||||||
ICollection<CheckoutSalaryAid> salaryAids, CheckoutRollCall checkoutRollCall, TimeSpan employeeMandatoryHours, bool hasInsuranceShareTheSameAsList)
|
ICollection<CheckoutSalaryAid> salaryAids, CheckoutRollCall checkoutRollCall, TimeSpan employeeMandatoryHours, bool hasInsuranceShareTheSameAsList, ICollection<CheckoutReward> rewards,double rewardPay)
|
||||||
{
|
{
|
||||||
EmployeeFullName = employeeFullName;
|
EmployeeFullName = employeeFullName;
|
||||||
FathersName = fathersName;
|
FathersName = fathersName;
|
||||||
@@ -71,7 +71,7 @@ public class Checkout : EntityBase
|
|||||||
TotalClaims = totalClaims;
|
TotalClaims = totalClaims;
|
||||||
TotalDeductions = totalDeductions;
|
TotalDeductions = totalDeductions;
|
||||||
TotalPayment = totalPayment;
|
TotalPayment = totalPayment;
|
||||||
RewardPay = 0;
|
RewardPay = rewardPay;
|
||||||
IsActiveString = "true";
|
IsActiveString = "true";
|
||||||
Signature = signature;
|
Signature = signature;
|
||||||
MarriedAllowance = marriedAllowance;
|
MarriedAllowance = marriedAllowance;
|
||||||
@@ -93,6 +93,7 @@ public class Checkout : EntityBase
|
|||||||
CheckoutRollCall = checkoutRollCall;
|
CheckoutRollCall = checkoutRollCall;
|
||||||
EmployeeMandatoryHours = employeeMandatoryHours;
|
EmployeeMandatoryHours = employeeMandatoryHours;
|
||||||
HasInsuranceShareTheSameAsList = hasInsuranceShareTheSameAsList;
|
HasInsuranceShareTheSameAsList = hasInsuranceShareTheSameAsList;
|
||||||
|
Rewards = rewards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -130,7 +131,7 @@ public class Checkout : EntityBase
|
|||||||
public double BonusesPay { get; private set; }
|
public double BonusesPay { get; private set; }
|
||||||
public double YearsPay { get; private set; }
|
public double YearsPay { get; private set; }
|
||||||
public double LeavePay { get; private set; }
|
public double LeavePay { get; private set; }
|
||||||
public double? RewardPay { get; private set; }
|
public double RewardPay { get; private set; }
|
||||||
public double InsuranceDeduction { get; private set; }
|
public double InsuranceDeduction { get; private set; }
|
||||||
public double TaxDeducation { get; private set; }
|
public double TaxDeducation { get; private set; }
|
||||||
public double InstallmentDeduction { get; private set; }
|
public double InstallmentDeduction { get; private set; }
|
||||||
@@ -223,6 +224,8 @@ public class Checkout : EntityBase
|
|||||||
|
|
||||||
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
|
public ICollection<CheckoutLoanInstallment> LoanInstallments { get; set; } = [];
|
||||||
public ICollection<CheckoutSalaryAid> SalaryAids { get; set; } = [];
|
public ICollection<CheckoutSalaryAid> SalaryAids { get; set; } = [];
|
||||||
|
|
||||||
|
public ICollection<CheckoutReward> Rewards { get; set; } = [];
|
||||||
public CheckoutRollCall CheckoutRollCall { get; private set; }
|
public CheckoutRollCall CheckoutRollCall { get; private set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -239,7 +242,7 @@ public class Checkout : EntityBase
|
|||||||
double insuranceDeduction, double taxDeducation, double installmentDeduction,
|
double insuranceDeduction, double taxDeducation, double installmentDeduction,
|
||||||
double salaryAidDeduction, double absenceDeduction, string sumOfWorkingDays
|
double salaryAidDeduction, double absenceDeduction, string sumOfWorkingDays
|
||||||
, string archiveCode, string personnelCode,
|
, string archiveCode, string personnelCode,
|
||||||
string totalClaims, string totalDeductions, double totalPayment, double? rewardPay)
|
string totalClaims, string totalDeductions, double totalPayment, double rewardPay)
|
||||||
{
|
{
|
||||||
EmployeeFullName = employeeFullName;
|
EmployeeFullName = employeeFullName;
|
||||||
FathersName = fathersName;
|
FathersName = fathersName;
|
||||||
@@ -337,6 +340,11 @@ public class Checkout : EntityBase
|
|||||||
InstallmentDeduction = installmentsAmount;
|
InstallmentDeduction = installmentsAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetReward(ICollection<CheckoutReward> rewards, double rewardAmount)
|
||||||
|
{
|
||||||
|
RewardPay = rewardAmount;
|
||||||
|
Rewards = rewards;
|
||||||
|
}
|
||||||
public void SetCheckoutRollCall(CheckoutRollCall checkoutRollCall)
|
public void SetCheckoutRollCall(CheckoutRollCall checkoutRollCall)
|
||||||
{
|
{
|
||||||
CheckoutRollCall = checkoutRollCall;
|
CheckoutRollCall = checkoutRollCall;
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.Checkout;
|
using CompanyManagment.App.Contracts.Checkout;
|
||||||
using CompanyManagment.App.Contracts.Checkout.Dto;
|
using CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
using CompanyManagment.App.Contracts.Leave;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using CompanyManagment.App.Contracts.Checkout.ClientDto;
|
||||||
|
|
||||||
|
|
||||||
namespace Company.Domain.CheckoutAgg;
|
namespace Company.Domain.CheckoutAgg;
|
||||||
@@ -23,7 +25,7 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
|||||||
string year, string month);
|
string year, string month);
|
||||||
EditCheckout GetDetails(long id);
|
EditCheckout GetDetails(long id);
|
||||||
|
|
||||||
Task CreateCkeckout(Checkout command);
|
Task<bool> CreateCheckout(Checkout command);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// لود لیست اولیه جهت ایجاد فیش حقوقی
|
/// لود لیست اولیه جهت ایجاد فیش حقوقی
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -83,6 +85,7 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
|||||||
Task<Checkout> GetByWorkshopIdEmployeeIdInDate(long workshopId, long employeeId, DateTime inDate);
|
Task<Checkout> GetByWorkshopIdEmployeeIdInDate(long workshopId, long employeeId, DateTime inDate);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region ForApi
|
#region ForApi
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// دریافت سلکت لیست پرسنل کارگاه
|
/// دریافت سلکت لیست پرسنل کارگاه
|
||||||
@@ -107,5 +110,55 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<CheckoutPrintDto>> CheckoutPrint(List<long> ids);
|
Task<List<CheckoutPrintDto>> CheckoutPrint(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت قردادها و جداول وابسته برای ایجاد فیش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="month"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<GetContractAndIncludesDataToCreateDto>> GetContractsAndIncludeDataDataToCreateCheckout(
|
||||||
|
List<long> ids, string year, string month, long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف گروهی یا تکی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> GroupDeleteCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امضاء تکی یا گروهی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> SignCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف امضاء تکی یا گروهی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> UnSignCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت مرخصی برای فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<LeavePrintForCheckoutDto>>> LeavePrintForCheckout(long id);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region ClientApi
|
||||||
|
|
||||||
|
Task<PagedResult<CheckoutListClientDto>> GetListForClient(long workshopId, CheckoutListClientSearchModel searchModel);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
57
Company.Domain/CheckoutAgg/ValueObjects/CheckoutReward.cs
Normal file
57
Company.Domain/CheckoutAgg/ValueObjects/CheckoutReward.cs
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Company.Domain.CheckoutAgg.ValueObjects;
|
||||||
|
|
||||||
|
public class CheckoutReward
|
||||||
|
{
|
||||||
|
public CheckoutReward(string amount, double amountDouble, string grantDateFa, DateTime grantDateGr, string description, string title, long entityId)
|
||||||
|
{
|
||||||
|
Amount = amount;
|
||||||
|
AmountDouble = amountDouble;
|
||||||
|
GrantDateFa = grantDateFa;
|
||||||
|
GrantDateGr = grantDateGr;
|
||||||
|
Description = description;
|
||||||
|
Title = title;
|
||||||
|
EntityId = entityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ پاداش
|
||||||
|
/// string
|
||||||
|
/// </summary>
|
||||||
|
public string Amount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ پاداش
|
||||||
|
/// double
|
||||||
|
/// </summary>
|
||||||
|
public double AmountDouble { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اعطاء
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string GrantDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اعطاء
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime GrantDateGr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// توضیحات
|
||||||
|
/// </summary>
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// عنوان
|
||||||
|
/// </summary>
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پاداش
|
||||||
|
/// </summary>
|
||||||
|
public long EntityId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public class ClassificationEmployee : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد پرسنل طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="employeeId"></param>
|
||||||
|
/// <param name="classificationSchemeId"></param>
|
||||||
|
/// <param name="classificationGroupId"></param>
|
||||||
|
/// <param name="classificationGroupJobId"></param>
|
||||||
|
/// <param name="startGroupDate"></param>
|
||||||
|
/// <param name="endGroupDate"></param>
|
||||||
|
public ClassificationEmployee(long workshopId, long employeeId, long classificationSchemeId, long classificationGroupId, long classificationGroupJobId, DateTime? startGroupDate)
|
||||||
|
{
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
EmployeeId = employeeId;
|
||||||
|
ClassificationSchemeId = classificationSchemeId;
|
||||||
|
ClassificationGroupId = classificationGroupId;
|
||||||
|
ClassificationGroupJobId = classificationGroupJobId;
|
||||||
|
StartGroupDate = startGroupDate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationSchemeId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupJobId { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? StartGroupDate{ get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndGroupDate { get; private set; }
|
||||||
|
|
||||||
|
public ClassificationGroup ClassificationGroup { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش پرسنل طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="classificationGroupId"></param>
|
||||||
|
/// <param name="classificationGroupJobId"></param>
|
||||||
|
public void Edit(long classificationGroupId, long classificationGroupJobId)
|
||||||
|
{
|
||||||
|
ClassificationGroupId = classificationGroupId;
|
||||||
|
ClassificationGroupJobId = classificationGroupJobId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش گروه های چندگانه پرسنل طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="classificationGroupId"></param>
|
||||||
|
/// <param name="classificationGroupJobId"></param>
|
||||||
|
/// <param name="startGroupDate"></param>
|
||||||
|
/// <param name="endGroupDate"></param>
|
||||||
|
public void EditMultipleGroupMember(long classificationGroupId, long classificationGroupJobId, DateTime startGroupDate)
|
||||||
|
{
|
||||||
|
ClassificationGroupId = classificationGroupId;
|
||||||
|
ClassificationGroupJobId = classificationGroupJobId;
|
||||||
|
StartGroupDate = startGroupDate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
|
||||||
|
public class ClassificationGroup : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد گروه های بیست گانه طرح طبقه بندی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupNo"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="classificationSchemeId"></param>
|
||||||
|
public ClassificationGroup(string groupNo, long workshopId, long classificationSchemeId)
|
||||||
|
{
|
||||||
|
GroupNo = groupNo;
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
ClassificationSchemeId = classificationSchemeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; private set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationSchemeId { get; private set; }
|
||||||
|
|
||||||
|
public ClassificationScheme ClassificationScheme { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public List<ClassificationGroupJob> ClassificationGroupJobs { get; set; }
|
||||||
|
public List<ClassificationGroupSalary> ClassificationGroupSalaries { get; set; }
|
||||||
|
|
||||||
|
public List<ClassificationEmployee> ClassificationEmployees { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
using _0_Framework_b.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public class ClassificationGroupJob : EntityBaseWithoutCreationDate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد لیست مشغال برای گروه های طرح طبقه بندی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="jobId"></param>
|
||||||
|
/// <param name="jobName"></param>
|
||||||
|
/// <param name="jobCode"></param>
|
||||||
|
/// <param name="classificationGroupId"></param>
|
||||||
|
/// <param name="groupNo"></param>
|
||||||
|
public ClassificationGroupJob(long jobId, string jobName, string jobCode, long classificationGroupId, string groupNo)
|
||||||
|
{
|
||||||
|
JobId = jobId;
|
||||||
|
JobName = jobName;
|
||||||
|
JobCode = jobCode;
|
||||||
|
ClassificationGroupId = classificationGroupId;
|
||||||
|
GroupNo = groupNo;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long JobId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobName { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobCode { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public ClassificationGroup ClassificationGroup { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public class ClassificationGroupSalary : EntityBase
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد دستمزد برای گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="classificationGroupId"></param>
|
||||||
|
/// <param name="groupNo"></param>
|
||||||
|
/// <param name="groupSalary"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
public ClassificationGroupSalary(long classificationGroupId, string groupNo, double groupSalary, DateTime startDate, DateTime endDate, int year, long schemeId)
|
||||||
|
{
|
||||||
|
ClassificationGroupId = classificationGroupId;
|
||||||
|
GroupNo = groupNo;
|
||||||
|
GroupSalary = groupSalary;
|
||||||
|
StartDate = startDate;
|
||||||
|
EndDate = endDate;
|
||||||
|
Year = year;
|
||||||
|
SchemeId = schemeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دستمزد گروه
|
||||||
|
/// </summary>
|
||||||
|
public double GroupSalary { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartDate { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// </summary>
|
||||||
|
public DateTime EndDate { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; private set; }
|
||||||
|
|
||||||
|
public long SchemeId { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public ClassificationGroup ClassificationGroup { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش دستمزد گروه
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
/// <param name="groupSalary"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
public void Edit(double groupSalary, DateTime startDate, DateTime endDate, int year)
|
||||||
|
{
|
||||||
|
|
||||||
|
GroupSalary = groupSalary;
|
||||||
|
StartDate = startDate;
|
||||||
|
EndDate = endDate;
|
||||||
|
Year = year;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
using System;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public class ClassificationRialCoefficient : EntityBaseWithoutCreationDate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایچاد ضریب ریالی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="classificationSchemeId"></param>
|
||||||
|
/// <param name="rialCoefficient"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
public ClassificationRialCoefficient(long classificationSchemeId, double rialCoefficient, DateTime startDate, DateTime endDate, int year)
|
||||||
|
{
|
||||||
|
ClassificationSchemeId = classificationSchemeId;
|
||||||
|
RialCoefficient = rialCoefficient;
|
||||||
|
StartDate = startDate;
|
||||||
|
EndDate = endDate;
|
||||||
|
Year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
//آی دی طرح
|
||||||
|
public long ClassificationSchemeId { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی
|
||||||
|
/// </summary>
|
||||||
|
public double RialCoefficient { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartDate { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// </summary>
|
||||||
|
public DateTime EndDate { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public ClassificationScheme ClassificationScheme { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش ضریب ریالی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="classificationSchemeId"></param>
|
||||||
|
/// <param name="rialCoefficient"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
public void Edit(double rialCoefficient, DateTime startDate, DateTime endDate, int year)
|
||||||
|
{
|
||||||
|
|
||||||
|
RialCoefficient = rialCoefficient;
|
||||||
|
StartDate = startDate;
|
||||||
|
EndDate = endDate;
|
||||||
|
Year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public class ClassificationScheme : EntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد طرح طبقه بندی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="includingDateGr"></param>
|
||||||
|
/// <param name="executionDateGr"></param>
|
||||||
|
/// <param name="designerFullName"></param>
|
||||||
|
/// <param name="designerPhone"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="typeOfCoefficient"></param>
|
||||||
|
public ClassificationScheme(DateTime includingDateGr, DateTime executionDateGr, string designerFullName, string designerPhone, long workshopId, TypeOfCoefficient typeOfCoefficient)
|
||||||
|
{
|
||||||
|
IncludingDateGr = includingDateGr;
|
||||||
|
ExecutionDateGr = executionDateGr;
|
||||||
|
DesignerFullName = designerFullName;
|
||||||
|
DesignerPhone = designerPhone;
|
||||||
|
WorkshopId = workshopId;
|
||||||
|
TypeOfCoefficient = typeOfCoefficient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمول طرح
|
||||||
|
/// </summary>
|
||||||
|
public DateTime IncludingDateGr { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// </summary>
|
||||||
|
public DateTime ExecutionDateGr { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان طرح
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndSchemeDateGr { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerFullName { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره همراه طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerPhone { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ضریب
|
||||||
|
/// </summary>
|
||||||
|
public TypeOfCoefficient TypeOfCoefficient { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public List<ClassificationGroup> ClassificationGroups { get; set; }
|
||||||
|
|
||||||
|
public List<ClassificationRialCoefficient> ClassificationRialCoefficients { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="includingDateGr"></param>
|
||||||
|
/// <param name="executionDateGr"></param>
|
||||||
|
/// <param name="designerFullName"></param>
|
||||||
|
/// <param name="designerPhone"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
public void Edit(DateTime includingDateGr, DateTime executionDateGr,string designerFullName, string designerPhone, TypeOfCoefficient typeOfCoefficient)
|
||||||
|
{
|
||||||
|
IncludingDateGr = includingDateGr;
|
||||||
|
ExecutionDateGr = executionDateGr;
|
||||||
|
DesignerFullName = designerFullName;
|
||||||
|
DesignerPhone = designerPhone;
|
||||||
|
TypeOfCoefficient = typeOfCoefficient;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public interface IClassificationEmployeeRepository : IRepository<long, ClassificationEmployee>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پرسنل کارگاه
|
||||||
|
/// تب افزودن پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EmployeeInfoList>> GetEmployeeListData(long schemeId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="employeeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EditEmployeeGroupList>> GetEmployeeMemberizeData(long employeeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیره انتقال پرسنل به گره های دیگر
|
||||||
|
///بصورت گروهی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task CreateTransferRange(List<ClassificationEmployee> command);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف پرسنل از گروه از سمت ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task RemoveRangeByEdit(List<ClassificationEmployee> command);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public interface IClassificationGroupRepository : IRepository<long, ClassificationGroup>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت گروه های طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ClassificationGroupList>> GetGroups(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست گروه ها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<GetGroupAndJobSchemeListDto>> GetGroupList(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست مشاغل برای مودال ایجاد و ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<AddOrEditJobInGroupDto> GetCreateOrEditJobsData(long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="jobId"></param>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> CheckIfEmployeeHasThisJob(long jobId, long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیر ایجاد یا ویرایش مشاغل در گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> SaveJobsToGroup(AddOrEditJobInGroupDto command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت مشاغل گروه توسط آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> CheckEmployeeHasThisJob(long id, long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد مشاغل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="createClassificationGroupJob"></param>
|
||||||
|
/// <param name="deleteJobList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> CreateJobs(List<ClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد گروه های بیست گانه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task CreateGroups(List<ClassificationGroup> groupList);
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public interface IClassificationGroupSalariesRepository : IRepository<long, ClassificationGroupSalary>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد دستمزدهای گروه ها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="createClassificationGroupSalary"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task CreateSalaries(List<ClassificationGroupSalary> createClassificationGroupSalary);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId);
|
||||||
|
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<SalaryAndRialCoefficientTabDataList>> GetSalaryList(long schemeId);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public interface IClassificationRialCoefficientRepository : IRepository<long, ClassificationRialCoefficient>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Domain;
|
||||||
|
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
using CompanyManagment.App.Contracts.YearlySalary;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Company.Domain.ClassificationSchemeAgg;
|
||||||
|
|
||||||
|
public interface IClassificationSchemeRepository : IRepository<long, ClassificationScheme>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// پارشیال صفحه ایجاد طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="worskhopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات طرح برای ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EditClassificationSchemeDto> GetClassificationScheme(long id);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات طر برای محاسبات
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// متد محاسبه پایه سنوات برا افراد تک گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeStart">تاریخ شروع طرح</param>
|
||||||
|
/// <param name="schemeEnd">تاریخ پاین طرح، اجباری نیست</param>
|
||||||
|
/// <param name="contractStart">تاریخ شروع قراداد</param>
|
||||||
|
/// <param name="contractEnd">تاریخ پایان قراداد</param>
|
||||||
|
/// <param name="groupNo">شماره گروه</param>
|
||||||
|
/// <param name="employeeId">آی دی پرسنل</param>
|
||||||
|
/// <param name="workshopId">آی دی کارگاه</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<BaseYearDataViewModel> BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
|
||||||
|
DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task DeleteClassificationScheme(long id);
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||||
|
using CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -22,5 +24,34 @@ namespace Company.Domain.CustomizeCheckoutAgg
|
|||||||
|
|
||||||
(bool Checkout, bool CustomizeCheckout, bool CustomizeCheckoutTemp) ValidateExistsCheckouts(
|
(bool Checkout, bool CustomizeCheckout, bool CustomizeCheckoutTemp) ValidateExistsCheckouts(
|
||||||
DateTime startDate, DateTime endDate, long workshopId, List<long> employeeId);
|
DateTime startDate, DateTime endDate, long workshopId, List<long> employeeId);
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست فیش غیر رسمی نهایی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedResult<CustomizeCheckoutListDto>> GetCustomizeCheckoutList(long workshopId,
|
||||||
|
CustomizeCheckoutSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت فیش غیررسمی نهایی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutPrintDto>> PrintCustomizeCheckout(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات برای اکسل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutExcelDto>> CustomizeCheckoutExcelDownloadApi(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using Company.Domain.CustomizeCheckoutAgg;
|
using Company.Domain.CustomizeCheckoutAgg;
|
||||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||||
|
using CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -22,5 +24,36 @@ namespace Company.Domain.CustomizeCheckoutTempAgg
|
|||||||
void RemoveRange(IEnumerable<CustomizeCheckoutTemp> entities);
|
void RemoveRange(IEnumerable<CustomizeCheckoutTemp> entities);
|
||||||
List<CustomizeCheckoutTemp> GetByWorkshopIdEmployeeIdInDates(long workshopId, long employeeId, DateTime startDate, DateTime endDate);
|
List<CustomizeCheckoutTemp> GetByWorkshopIdEmployeeIdInDates(long workshopId, long employeeId, DateTime startDate, DateTime endDate);
|
||||||
Task<CustomizeCheckoutTemp> GetByWorkshopIdEmployeeIdInDate(long workshopId, long employeeId, DateTime inDate);
|
Task<CustomizeCheckoutTemp> GetByWorkshopIdEmployeeIdInDate(long workshopId, long employeeId, DateTime inDate);
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست فیش حوقوقی غیر رسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedResult<CustomizeCheckoutListDto>> GetCustomizeCheckoutTempList(long workshopId,
|
||||||
|
CustomizeCheckoutSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت فیش غیررسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutPrintDto>> PrintCustomizeCheckoutTemp(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات برای اکسل
|
||||||
|
/// فیش غیر رسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutExcelDto>> CustomizeCheckoutTempExcelDownloadApi(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public interface IEmployeeRepository : IRepository<long, Employee>
|
|||||||
|
|
||||||
Employee GetIgnoreQueryFilter(long id);
|
Employee GetIgnoreQueryFilter(long id);
|
||||||
|
|
||||||
|
[Obsolete("این متد منسوخ شده است و از متد WorkedEmployeesInWorkshopSelectList استفاده کنید")]
|
||||||
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
|
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
|
||||||
|
|
||||||
|
|
||||||
@@ -77,7 +78,39 @@ public interface IEmployeeRepository : IRepository<long, Employee>
|
|||||||
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText,long id);
|
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText,long id);
|
||||||
Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel);
|
Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel);
|
||||||
Task<List<GetClientEmployeeListViewModel>> GetClientEmployeeList(GetClientEmployeeListSearchModel searchModel, long workshopId);
|
Task<List<GetClientEmployeeListViewModel>> GetClientEmployeeList(GetClientEmployeeListSearchModel searchModel, long workshopId);
|
||||||
#endregion
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پرسنل کلاینت
|
||||||
|
/// api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EmployeeListDto>> ListOfAllEmployeesClient(EmployeeSearchModelDto searchModel, long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت تجمیعی پرسنل کلاینت
|
||||||
|
/// api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<PrintAllEmployeesInfoDtoClient>> PrintAllEmployeesInfoClient(long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت گروهی تفکیکی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<PrintAllDetailsPersonnelInfoDtoClient>> PrintAllDetailsPersonnelInfoClient(long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سلکت لیست پرسنل های کارگاه کلاینت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(long workshopId);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
|
|
||||||
|
using System;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.EmployeeBankInformation;
|
using CompanyManagment.App.Contracts.EmployeeBankInformation;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Security.AccessControl;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
|
|
||||||
namespace Company.Domain.EmployeeBankInformationAgg
|
namespace Company.Domain.EmployeeBankInformationAgg
|
||||||
{
|
{
|
||||||
@@ -11,14 +15,31 @@ namespace Company.Domain.EmployeeBankInformationAgg
|
|||||||
void Remove(EmployeeBankInformation bankInformation);
|
void Remove(EmployeeBankInformation bankInformation);
|
||||||
void RemoveRange(List<EmployeeBankInformation> entities);
|
void RemoveRange(List<EmployeeBankInformation> entities);
|
||||||
|
|
||||||
|
[Obsolete("از متد async استفاده کنید")]
|
||||||
List<GroupedEmployeeBankInformationViewModel> Search(long workshopId, EmployeeBankInformationSearchModel searchParams);
|
List<GroupedEmployeeBankInformationViewModel> Search(long workshopId, EmployeeBankInformationSearchModel searchParams);
|
||||||
|
|
||||||
|
Task<List<GroupedEmployeeBankInformationViewModel>> SearchAsync(long workshopId,
|
||||||
|
EmployeeBankInformationSearchModel searchParams);
|
||||||
|
|
||||||
|
|
||||||
GroupedEmployeeBankInformationViewModel GetByEmployeeId(long workshopId, long employeeId);
|
GroupedEmployeeBankInformationViewModel GetByEmployeeId(long workshopId, long employeeId);
|
||||||
List<EmployeeBankInformation> GetRangeByEmployeeId(long workshopId, long employeeId);
|
List<EmployeeBankInformation> GetRangeByEmployeeId(long workshopId, long employeeId);
|
||||||
EmployeeBankInformationViewModel GetDetails(long id);
|
EmployeeBankInformationViewModel GetDetails(long id);
|
||||||
List<GroupedEmployeeBankInformationViewModel> GetAllByWorkshopId(long workshopId);
|
List<GroupedEmployeeBankInformationViewModel> GetAllByWorkshopId(long workshopId);
|
||||||
|
|
||||||
|
List<EmployeeBankInformationViewModelForExcel> SearchForExcel(long workshopId,
|
||||||
|
EmployeeBankInfoExcelSearchModel searchParams);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
List<EmployeeBankInformationViewModelForExcel> SearchForExcel(long workshopId, EmployeeBankInformationSearchModel searchParams);
|
/// جزئیات اطلاعات بانکی بر اساس پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="employeeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<GetEmployeeBankInfoDetailsDto> GetDetailsByEmployeeIdAsync(long workshopId, long employeeId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using _0_Framework.Application.Enums;
|
|||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.InstitutionContract;
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
using CompanyManagment.App.Contracts.Workshop;
|
using CompanyManagment.App.Contracts.Workshop;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
|
|
||||||
namespace Company.Domain.InstitutionContractAgg;
|
namespace Company.Domain.InstitutionContractAgg;
|
||||||
|
|
||||||
@@ -89,6 +88,9 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
|
|||||||
|
|
||||||
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected);
|
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected);
|
||||||
Task<List<InstitutionContractPrintViewModel>> PrintAllAsync(List<long> ids);
|
Task<List<InstitutionContractPrintViewModel>> PrintAllAsync(List<long> ids);
|
||||||
|
Task<GetInstitutionContractWorkshopsDetails> GetContractWorkshopsDetails(long id);
|
||||||
|
Task AmendmentComplete(InstitutionContractAmendmentCompleteRequest request);
|
||||||
|
Task<GetInstitutionAmendmentVerificationDetailsViewModel> GetAmendmentVerificationDetails(Guid id, long amendmentId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -275,6 +275,11 @@ public class InstitutionContract : EntityBase
|
|||||||
{
|
{
|
||||||
SigningType = signingType;
|
SigningType = signingType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddAmendment(InstitutionContractAmendment amendment)
|
||||||
|
{
|
||||||
|
Amendments.Add(amendment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InstitutionContractAmendment : EntityBase
|
public class InstitutionContractAmendment : EntityBase
|
||||||
@@ -282,14 +287,15 @@ public class InstitutionContractAmendment : EntityBase
|
|||||||
private InstitutionContractAmendment(){}
|
private InstitutionContractAmendment(){}
|
||||||
public InstitutionContractAmendment(long institutionContractId,
|
public InstitutionContractAmendment(long institutionContractId,
|
||||||
List<InstitutionContractInstallment> installments, double amount, bool hasInstallment,
|
List<InstitutionContractInstallment> installments, double amount, bool hasInstallment,
|
||||||
InstitutionContractAmendmentChange amendmentChange, long lawId)
|
List<InstitutionContractAmendmentChange> amendmentChanges, long lawId)
|
||||||
{
|
{
|
||||||
InstitutionContractId = institutionContractId;
|
InstitutionContractId = institutionContractId;
|
||||||
Installments = installments is { Count: > 0} ? installments : [];
|
Installments = installments is { Count: > 0} ? installments : [];
|
||||||
Amount = amount;
|
Amount = amount;
|
||||||
HasInstallment = hasInstallment;
|
HasInstallment = hasInstallment;
|
||||||
AmendmentChanges = [amendmentChange];
|
AmendmentChanges = amendmentChanges;
|
||||||
LawId = lawId;
|
LawId = lawId;
|
||||||
|
VerificationStatus = InstitutionContractVerificationStatus.PendingForVerify;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long InstitutionContractId { get; set; }
|
public long InstitutionContractId { get; set; }
|
||||||
@@ -303,6 +309,15 @@ public class InstitutionContractAmendment : EntityBase
|
|||||||
|
|
||||||
public long LawId { get; set; }
|
public long LawId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string VerifierPhoneNumber { get; private set; }
|
||||||
|
|
||||||
|
public string VerifierFullName { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContractVerificationStatus VerificationStatus { get; set; }
|
||||||
|
|
||||||
|
public DateTime VerifyCodeCreation { get; set; }
|
||||||
|
|
||||||
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
|
public void SetVerifyCode(string code,string verifierFullName, string verifierPhoneNumber)
|
||||||
{
|
{
|
||||||
VerifyCode = code;
|
VerifyCode = code;
|
||||||
@@ -310,25 +325,22 @@ public class InstitutionContractAmendment : EntityBase
|
|||||||
VerifierFullName = verifierFullName;
|
VerifierFullName = verifierFullName;
|
||||||
VerifierPhoneNumber = verifierPhoneNumber;
|
VerifierPhoneNumber = verifierPhoneNumber;
|
||||||
}
|
}
|
||||||
|
public void Verified()
|
||||||
public string VerifierPhoneNumber { get; private set; }
|
{
|
||||||
|
VerificationStatus = InstitutionContractVerificationStatus.Verified;
|
||||||
public string VerifierFullName { get; private set; }
|
}
|
||||||
|
|
||||||
public DateTime VerifyCodeCreation { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InstitutionContractAmendmentChange : EntityBase
|
public class InstitutionContractAmendmentChange : EntityBase
|
||||||
{
|
{
|
||||||
private InstitutionContractAmendmentChange() { }
|
private InstitutionContractAmendmentChange() { }
|
||||||
private InstitutionContractAmendmentChange(long institutionContractAmendmentId,
|
|
||||||
InstitutionContractAmendment institutionContractAmendment, InstitutionContractAmendmentChangeType changeType,
|
private InstitutionContractAmendmentChange(InstitutionContractAmendmentChangeType changeType,
|
||||||
DateTime changeDateGr, bool? hasRollCallPlan, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan,
|
DateTime changeDateGr, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan,
|
||||||
bool? hasContractPlanInPerson, bool? hasInsurancePlan, bool? hasInsurancePlanInPerson, int? personnelCount,
|
bool? hasContractPlanInPerson, bool? hasInsurancePlan, bool? hasInsurancePlanInPerson, int? personnelCount,
|
||||||
long? workshopDetailsId)
|
bool? hasRollCallPlan, bool? hasRollCallInPerson,
|
||||||
|
long? currentWorkshopId, int personnelCountDifference)
|
||||||
{
|
{
|
||||||
InstitutionContractAmendmentId = institutionContractAmendmentId;
|
|
||||||
InstitutionContractAmendment = institutionContractAmendment;
|
|
||||||
ChangeType = changeType;
|
ChangeType = changeType;
|
||||||
ChangeDateGr = changeDateGr;
|
ChangeDateGr = changeDateGr;
|
||||||
HasRollCallPlan = hasRollCallPlan;
|
HasRollCallPlan = hasRollCallPlan;
|
||||||
@@ -338,9 +350,80 @@ public class InstitutionContractAmendmentChange : EntityBase
|
|||||||
HasInsurancePlan = hasInsurancePlan;
|
HasInsurancePlan = hasInsurancePlan;
|
||||||
HasInsurancePlanInPerson = hasInsurancePlanInPerson;
|
HasInsurancePlanInPerson = hasInsurancePlanInPerson;
|
||||||
PersonnelCount = personnelCount;
|
PersonnelCount = personnelCount;
|
||||||
WorkshopDetailsId = workshopDetailsId;
|
PersonnelCountDifference = personnelCountDifference;
|
||||||
|
CurrentWorkshopId = currentWorkshopId;
|
||||||
|
HasRollCallInPerson = hasRollCallInPerson;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تغییر تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public static InstitutionContractAmendmentChange CreatePersonCountChange(
|
||||||
|
DateTime changeDateGr, int personnelCount, int personnelCountDifference,
|
||||||
|
long currentWorkshopId)
|
||||||
|
{
|
||||||
|
return new InstitutionContractAmendmentChange(
|
||||||
|
changeType: InstitutionContractAmendmentChangeType.PersonCount,
|
||||||
|
changeDateGr: changeDateGr,
|
||||||
|
hasCustomizeCheckoutPlan: null,
|
||||||
|
hasContractPlan: null,
|
||||||
|
hasContractPlanInPerson: null,
|
||||||
|
hasInsurancePlan: null,
|
||||||
|
hasInsurancePlanInPerson: null,
|
||||||
|
personnelCount: personnelCount,
|
||||||
|
hasRollCallPlan: null,
|
||||||
|
hasRollCallInPerson: null,
|
||||||
|
currentWorkshopId: currentWorkshopId,
|
||||||
|
personnelCountDifference: personnelCountDifference);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تغییر خدمات
|
||||||
|
/// </summary>
|
||||||
|
public static InstitutionContractAmendmentChange CreateServicesChange(
|
||||||
|
DateTime changeDateGr, long currentWorkshopId, bool hasRollCallPlan, bool hasRollCallInPerson,
|
||||||
|
bool hasCustomizeCheckoutPlan, bool hasContractPlan, bool hasContractPlanInPerson,
|
||||||
|
bool hasInsurancePlan, bool hasInsurancePlanInPerson)
|
||||||
|
{
|
||||||
|
return new InstitutionContractAmendmentChange(
|
||||||
|
changeType: InstitutionContractAmendmentChangeType.Services,
|
||||||
|
changeDateGr: changeDateGr,
|
||||||
|
hasCustomizeCheckoutPlan: hasCustomizeCheckoutPlan,
|
||||||
|
hasContractPlan: hasContractPlan,
|
||||||
|
hasContractPlanInPerson: hasContractPlanInPerson,
|
||||||
|
hasInsurancePlan: hasInsurancePlan,
|
||||||
|
hasInsurancePlanInPerson: hasInsurancePlanInPerson,
|
||||||
|
personnelCount: null,
|
||||||
|
hasRollCallPlan: hasRollCallPlan,
|
||||||
|
hasRollCallInPerson: hasRollCallInPerson,
|
||||||
|
currentWorkshopId: currentWorkshopId,
|
||||||
|
personnelCountDifference: 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد کارگاه جدید
|
||||||
|
/// </summary>
|
||||||
|
public static InstitutionContractAmendmentChange CreateWorkshopCreatedChange(
|
||||||
|
DateTime changeDateGr, bool hasRollCallPlan, bool hasRollCallInPerson,
|
||||||
|
bool hasCustomizeCheckoutPlan, bool hasContractPlan, bool hasContractPlanInPerson,
|
||||||
|
bool hasInsurancePlan, bool hasInsurancePlanInPerson,int personnelCount)
|
||||||
|
{
|
||||||
|
return new InstitutionContractAmendmentChange(
|
||||||
|
changeType: InstitutionContractAmendmentChangeType.WorkshopCreated,
|
||||||
|
changeDateGr: changeDateGr,
|
||||||
|
hasCustomizeCheckoutPlan: hasCustomizeCheckoutPlan,
|
||||||
|
hasContractPlan: hasContractPlan,
|
||||||
|
hasContractPlanInPerson: hasContractPlanInPerson,
|
||||||
|
hasInsurancePlan: hasInsurancePlan,
|
||||||
|
hasInsurancePlanInPerson: hasInsurancePlanInPerson,
|
||||||
|
personnelCount: personnelCount,
|
||||||
|
hasRollCallPlan: hasRollCallPlan,
|
||||||
|
hasRollCallInPerson: hasRollCallInPerson,
|
||||||
|
currentWorkshopId: null,
|
||||||
|
personnelCountDifference: 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public long InstitutionContractAmendmentId { get; private set; }
|
public long InstitutionContractAmendmentId { get; private set; }
|
||||||
public InstitutionContractAmendment InstitutionContractAmendment { get; private set; }
|
public InstitutionContractAmendment InstitutionContractAmendment { get; private set; }
|
||||||
public InstitutionContractAmendmentChangeType ChangeType { get; private set; }
|
public InstitutionContractAmendmentChangeType ChangeType { get; private set; }
|
||||||
@@ -351,6 +434,8 @@ public class InstitutionContractAmendmentChange : EntityBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? HasRollCallPlan { get; private set; }
|
public bool? HasRollCallPlan { get; private set; }
|
||||||
|
|
||||||
|
public bool? HasRollCallInPerson { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// پلن فیش غیر رسمی
|
/// پلن فیش غیر رسمی
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -380,11 +465,17 @@ public class InstitutionContractAmendmentChange : EntityBase
|
|||||||
/// تعداد پرسنل
|
/// تعداد پرسنل
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? PersonnelCount { get; private set; }
|
public int? PersonnelCount { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مقدار تغییرات تعداد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public int PersonnelCountDifference { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// تعداد کارگاه
|
/// تعداد کارگاه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public long? WorkshopDetailsId { get; private set; }
|
public long? CurrentWorkshopId { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum InstitutionContractAmendmentChangeType
|
public enum InstitutionContractAmendmentChangeType
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class InstitutionContractWorkshopBase:EntityBase
|
|||||||
protected InstitutionContractWorkshopBase(){}
|
protected InstitutionContractWorkshopBase(){}
|
||||||
public InstitutionContractWorkshopBase(string workshopName, bool hasRollCallPlan,bool hasRollCallPlanInPerson,
|
public InstitutionContractWorkshopBase(string workshopName, bool hasRollCallPlan,bool hasRollCallPlanInPerson,
|
||||||
bool hasCustomizeCheckoutPlan, bool hasContractPlan,bool hasContractPlanInPerson,bool hasInsurancePlan,bool hasInsurancePlanInPerson,
|
bool hasCustomizeCheckoutPlan, bool hasContractPlan,bool hasContractPlanInPerson,bool hasInsurancePlan,bool hasInsurancePlanInPerson,
|
||||||
int personnelCount, double price )
|
int personnelCount, double price,bool isAmendment )
|
||||||
{
|
{
|
||||||
WorkshopName = workshopName;
|
WorkshopName = workshopName;
|
||||||
Services = new WorkshopServices(hasInsurancePlan, hasInsurancePlanInPerson,
|
Services = new WorkshopServices(hasInsurancePlan, hasInsurancePlanInPerson,
|
||||||
@@ -17,7 +17,10 @@ public class InstitutionContractWorkshopBase:EntityBase
|
|||||||
PersonnelCount = personnelCount;
|
PersonnelCount = personnelCount;
|
||||||
Price = price;
|
Price = price;
|
||||||
Employers = [];
|
Employers = [];
|
||||||
|
IsAmendment = isAmendment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// شناسه کارگاه
|
/// شناسه کارگاه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -42,7 +45,11 @@ public class InstitutionContractWorkshopBase:EntityBase
|
|||||||
|
|
||||||
|
|
||||||
public double Price { get; private set; }
|
public double Price { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جهت نمایش دادن اینکه آیا این کارگاه مربوط به ارتقا قرارداد است یا خیر
|
||||||
|
/// </summary>
|
||||||
|
public bool IsAmendment { get; set; }
|
||||||
|
|
||||||
public List<InstitutionContractWorkshopDetailEmployer> Employers { get; private set; } = new();
|
public List<InstitutionContractWorkshopDetailEmployer> Employers { get; private set; } = new();
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ public class InstitutionContractWorkshopCurrent:InstitutionContractWorkshopBase
|
|||||||
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
||||||
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
||||||
int personnelCount, double price,long institutionContractWorkshopGroupId,
|
int personnelCount, double price,long institutionContractWorkshopGroupId,
|
||||||
InstitutionContractWorkshopGroup workshopGroup,long workshopId,long initialWorkshopId) : base(workshopName, hasRollCallPlan,
|
InstitutionContractWorkshopGroup workshopGroup,long workshopId,bool isAmendment, long initialWorkshopId) : base(workshopName, hasRollCallPlan,
|
||||||
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan,
|
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan,
|
||||||
hasContractPlanInPerson, hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price)
|
hasContractPlanInPerson, hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price,isAmendment)
|
||||||
{
|
{
|
||||||
InstitutionContractWorkshopGroupId = institutionContractWorkshopGroupId;
|
InstitutionContractWorkshopGroupId = institutionContractWorkshopGroupId;
|
||||||
WorkshopGroup = workshopGroup;
|
WorkshopGroup = workshopGroup;
|
||||||
|
|||||||
@@ -33,6 +33,13 @@ public class InstitutionContractWorkshopGroup : EntityBase
|
|||||||
InitialWorkshops = initialWorkshops.ToList();
|
InitialWorkshops = initialWorkshops.ToList();
|
||||||
LastModifiedDate = DateTime.Now;
|
LastModifiedDate = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddAmendmentWorkshops(List<InstitutionContractWorkshopInitial> amendmentDetails)
|
||||||
|
{
|
||||||
|
InitialWorkshops.AddRange(amendmentDetails);
|
||||||
|
LastModifiedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void UpdateCurrentWorkshops(List<InstitutionContractWorkshopCurrent> updatedDetails)
|
public void UpdateCurrentWorkshops(List<InstitutionContractWorkshopCurrent> updatedDetails)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ public class InstitutionContractWorkshopInitial:InstitutionContractWorkshopBase
|
|||||||
public InstitutionContractWorkshopInitial(string workshopName, bool hasRollCallPlan,
|
public InstitutionContractWorkshopInitial(string workshopName, bool hasRollCallPlan,
|
||||||
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
bool hasRollCallPlanInPerson, bool hasCustomizeCheckoutPlan, bool hasContractPlan,
|
||||||
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
bool hasContractPlanInPerson, bool hasInsurancePlan, bool hasInsurancePlanInPerson,
|
||||||
int personnelCount, double price) : base(workshopName, hasRollCallPlan,
|
int personnelCount, double price,bool isAmendment =false) : base(workshopName, hasRollCallPlan,
|
||||||
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan, hasContractPlanInPerson,
|
hasRollCallPlanInPerson, hasCustomizeCheckoutPlan, hasContractPlan, hasContractPlanInPerson,
|
||||||
hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price)
|
hasInsurancePlan, hasInsurancePlanInPerson, personnelCount, price,isAmendment)
|
||||||
{
|
{
|
||||||
WorkshopCreated = false;
|
WorkshopCreated = false;
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,8 @@ public class InstitutionContractWorkshopInitial:InstitutionContractWorkshopBase
|
|||||||
WorkshopCreated = true;
|
WorkshopCreated = true;
|
||||||
WorkshopCurrent = new InstitutionContractWorkshopCurrent(WorkshopName,Services.RollCall,Services.RollCallInPerson,
|
WorkshopCurrent = new InstitutionContractWorkshopCurrent(WorkshopName,Services.RollCall,Services.RollCallInPerson,
|
||||||
Services.CustomizeCheckout,Services.Contract,Services.ContractInPerson,Services.Insurance,
|
Services.CustomizeCheckout,Services.Contract,Services.ContractInPerson,Services.Insurance,
|
||||||
Services.InsuranceInPerson,PersonnelCount,Price,InstitutionContractWorkshopGroupId,WorkshopGroup,workshopId,id);
|
Services.InsuranceInPerson,PersonnelCount,Price,InstitutionContractWorkshopGroupId,WorkshopGroup,workshopId,
|
||||||
|
IsAmendment, id);
|
||||||
WorkshopCurrent.SetEmployers(Employers.Select(x=>x.EmployerId).ToList());
|
WorkshopCurrent.SetEmployers(Employers.Select(x=>x.EmployerId).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
||||||
using MongoDB.Bson;
|
using MongoDB.Bson;
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ public class InstitutionContractAmendmentTemp
|
|||||||
NewWorkshops = prevWorkshops.Select(x=> new InstitutionContractAmendmentTempNewWorkshop(
|
NewWorkshops = prevWorkshops.Select(x=> new InstitutionContractAmendmentTempNewWorkshop(
|
||||||
x.WorkshopName, x.CountPerson, x.ContractAndCheckout, x.ContractAndCheckoutInPerson, x.Insurance,
|
x.WorkshopName, x.CountPerson, x.ContractAndCheckout, x.ContractAndCheckoutInPerson, x.Insurance,
|
||||||
x.InsuranceInPerson, x.RollCall, x.RollCallInPerson, x.CustomizeCheckout, x.Price, x.WorkshopId,
|
x.InsuranceInPerson, x.RollCall, x.RollCallInPerson, x.CustomizeCheckout, x.Price, x.WorkshopId,
|
||||||
x.CurrentWorkshopId, 0)).ToList();
|
x.CurrentWorkshopId, 0,x.Id)).ToList();
|
||||||
InstitutionContractId = institutionContractId;
|
InstitutionContractId = institutionContractId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,17 +26,32 @@ public class InstitutionContractAmendmentTemp
|
|||||||
public Guid Id { get; private set; }
|
public Guid Id { get; private set; }
|
||||||
public List<InstitutionContractAmendmentTempPrevWorkshop> PrevWorkshops { get; private set; }
|
public List<InstitutionContractAmendmentTempPrevWorkshop> PrevWorkshops { get; private set; }
|
||||||
public List<InstitutionContractAmendmentTempNewWorkshop> NewWorkshops { get; private set; }
|
public List<InstitutionContractAmendmentTempNewWorkshop> NewWorkshops { get; private set; }
|
||||||
|
|
||||||
|
public InstitutionContractPaymentMonthlyViewModel MonthlyPayment { get; set; }
|
||||||
|
|
||||||
|
public InstitutionContractPaymentOneTimeViewModel OneTimePayment { get; set; }
|
||||||
|
|
||||||
public long InstitutionContractId { get; private set; }
|
public long InstitutionContractId { get; private set; }
|
||||||
|
|
||||||
|
public int MonthDifference { get; set; }
|
||||||
|
public void AddPaymentDetails(InstitutionContractPaymentMonthlyViewModel resMonthly, InstitutionContractPaymentOneTimeViewModel resOneTime, int monthDiff)
|
||||||
|
{
|
||||||
|
MonthlyPayment = resMonthly;
|
||||||
|
OneTimePayment = resOneTime;
|
||||||
|
MonthDifference = monthDiff;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InstitutionContractAmendmentTempNewWorkshop : InstitutionContractAmendmentTempPrevWorkshop
|
public class InstitutionContractAmendmentTempNewWorkshop : InstitutionContractAmendmentTempPrevWorkshop
|
||||||
{
|
{
|
||||||
public InstitutionContractAmendmentTempNewWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
|
public InstitutionContractAmendmentTempNewWorkshop(string workshopName, int countPerson, bool contractAndCheckout,
|
||||||
bool contractAndCheckoutInPerson, bool insurance, bool insuranceInPerson, bool rollCall, bool rollCallInPerson,
|
bool contractAndCheckoutInPerson, bool insurance, bool insuranceInPerson, bool rollCall, bool rollCallInPerson,
|
||||||
bool customizeCheckout, double price, long workshopId, long currentWorkshopId,double priceDifference) : base(
|
bool customizeCheckout, double price, long workshopId, long currentWorkshopId,double priceDifference,Guid prevId) : base(
|
||||||
workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance, insuranceInPerson,
|
workshopName, countPerson, contractAndCheckout, contractAndCheckoutInPerson, insurance, insuranceInPerson,
|
||||||
rollCall, rollCallInPerson, customizeCheckout, price, workshopId, currentWorkshopId)
|
rollCall, rollCallInPerson, customizeCheckout, price, workshopId, currentWorkshopId)
|
||||||
{
|
{
|
||||||
|
Id = prevId;
|
||||||
PriceDifference = priceDifference;
|
PriceDifference = priceDifference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ public interface IJobRepository : IRepository<long, Job>
|
|||||||
EditJob GetDetails(long id);
|
EditJob GetDetails(long id);
|
||||||
List<JobViewModel> Search(JobSearchModel searchModel);
|
List<JobViewModel> Search(JobSearchModel searchModel);
|
||||||
List<JobViewModel> SearchJobForMain(JobSearchModel searchModel);
|
List<JobViewModel> SearchJobForMain(JobSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جستجوس مشاغل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searchtText"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<JobListDto>> JobSearchSelect(string searchtText);
|
||||||
// Task<List<JobViewModel>> GetJobListByText(string searchtText);
|
// Task<List<JobViewModel>> GetJobListByText(string searchtText);
|
||||||
List<JobViewModel> GetJobListByText(string searchtText);
|
List<JobViewModel> GetJobListByText(string searchtText);
|
||||||
List<JobViewModel> GetJobListByWorkshopId(long workshopId);
|
List<JobViewModel> GetJobListByWorkshopId(long workshopId);
|
||||||
|
|||||||
@@ -61,4 +61,14 @@ public interface ILeaveRepository : IRepository<long, Leave>
|
|||||||
/// <param name="ids"></param>
|
/// <param name="ids"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<LeaveListPrintDto> ListPrint(List<long> ids);
|
Task<LeaveListPrintDto> ListPrint(List<long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت مرخصی کلاینت
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<LeavePrintForClientDto>>> LeavePrintForClientApi(List<long> ids, long workshopId);
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,22 @@
|
|||||||
using System;
|
using _0_Framework.Domain;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using _0_Framework.Domain;
|
|
||||||
using Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities;
|
using Company.Domain.CustomizeWorkshopEmployeeSettingsAgg.Entities;
|
||||||
using CompanyManagment.App.Contracts.Contract;
|
using CompanyManagment.App.Contracts.Contract;
|
||||||
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
using CompanyManagment.App.Contracts.CustomizeCheckout;
|
||||||
using CompanyManagment.App.Contracts.Leave;
|
using CompanyManagment.App.Contracts.Leave;
|
||||||
using CompanyManagment.App.Contracts.Loan;
|
using CompanyManagment.App.Contracts.Loan;
|
||||||
|
using CompanyManagment.App.Contracts.Reward;
|
||||||
using CompanyManagment.App.Contracts.RollCall;
|
using CompanyManagment.App.Contracts.RollCall;
|
||||||
using CompanyManagment.App.Contracts.SalaryAid;
|
using CompanyManagment.App.Contracts.SalaryAid;
|
||||||
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Company.Domain.RollCallAgg;
|
namespace Company.Domain.RollCallAgg;
|
||||||
|
|
||||||
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||||
{
|
{
|
||||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
Task<ComputingViewModel> MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||||
@@ -53,6 +54,9 @@ public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
|||||||
List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart,
|
List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart,
|
||||||
DateTime checkoutEnd);
|
DateTime checkoutEnd);
|
||||||
|
|
||||||
|
List<RewardViewModel> RewardForCheckout(long employeeId, long workshopId, DateTime checkoutEnd,
|
||||||
|
DateTime checkoutStart);
|
||||||
|
|
||||||
Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart,
|
Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart,
|
||||||
DateTime contractEnd, string shiftwork, bool hasRollCall, CreateWorkingHoursTemp command,bool holidayWorking);
|
DateTime contractEnd, string shiftwork, bool hasRollCall, CreateWorkingHoursTemp command,bool holidayWorking);
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.RollCall;
|
using CompanyManagment.App.Contracts.RollCall;
|
||||||
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||||
@@ -25,7 +26,7 @@ namespace Company.Domain.RollCallAgg
|
|||||||
DateTime endSearch);
|
DateTime endSearch);
|
||||||
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
|
void RemoveEmployeeRollCallsInDate(long workshopId, long employeeId, DateTime date);
|
||||||
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
||||||
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
|
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId,WorkshopCurrentDayRollCallSearchModel searchModel);
|
||||||
List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(IEnumerable<long> employeeIds,
|
List<PersonnelCheckoutDailyRollCallViewModel> GetEmployeeRollCallsForMonth(IEnumerable<long> employeeIds,
|
||||||
long workshopId, DateTime start, DateTime end);
|
long workshopId, DateTime start, DateTime end);
|
||||||
|
|
||||||
@@ -91,5 +92,9 @@ namespace Company.Domain.RollCallAgg
|
|||||||
Task<List<RollCall>> GetRollCallsUntilNowWithWorkshopIdEmployeeIds(long workshopId, List<long> employeeIds,
|
Task<List<RollCall>> GetRollCallsUntilNowWithWorkshopIdEmployeeIds(long workshopId, List<long> employeeIds,
|
||||||
DateTime fromDate);
|
DateTime fromDate);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Task<PagedResult<RollCallCaseHistoryTitleDto>> GetCaseHistoryTitles(long workshopId,RollCallCaseHistorySearchModel searchModel);
|
||||||
|
Task<List<RollCallCaseHistoryDetail>> GetCaseHistoryDetails(long workshopId,
|
||||||
|
string titleId, RollCallCaseHistorySearchModel searchModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ namespace Company.Domain.RollCallEmployeeAgg;
|
|||||||
|
|
||||||
public interface IRollCallEmployeeRepository : IRepository<long, RollCallEmployee>
|
public interface IRollCallEmployeeRepository : IRepository<long, RollCallEmployee>
|
||||||
{
|
{
|
||||||
bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd);
|
Task<bool> HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd);
|
||||||
List<RollCallEmployeeViewModel> GetByWorkshopId(long workshopId);
|
List<RollCallEmployeeViewModel> GetByWorkshopId(long workshopId);
|
||||||
EditRollCallEmployee GetDetails(long id);
|
EditRollCallEmployee GetDetails(long id);
|
||||||
RollCallEmployeeViewModel GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId);
|
RollCallEmployeeViewModel GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId);
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ public interface ISalaryAidRepository:IRepository<long,SalaryAid>
|
|||||||
void RemoveRange(IEnumerable<SalaryAid> salaryAids);
|
void RemoveRange(IEnumerable<SalaryAid> salaryAids);
|
||||||
|
|
||||||
#region Pooya
|
#region Pooya
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// گروهبندی بر اساس ماه هنگام جستجو با انتخاب کارمند
|
/// گروهبندی بر اساس ماه هنگام جستجو با انتخاب کارمند
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
SalaryAidsGroupedViewModel GetSearchListAsGrouped(SalaryAidSearchViewModel searchModel);
|
SalaryAidsGroupedViewModel GetSearchListAsGrouped(SalaryAidSearchViewModel searchModel);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Domain;
|
using _0_Framework.Application.Enums;
|
||||||
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.SmsResult;
|
using CompanyManagment.App.Contracts.SmsResult;
|
||||||
using CompanyManagment.App.Contracts.SmsResult.Dto;
|
using CompanyManagment.App.Contracts.SmsResult.Dto;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -22,8 +23,9 @@ public interface ISmsResultRepository : IRepository<long, SmsResult>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="searchModel"></param>
|
/// <param name="searchModel"></param>
|
||||||
/// <param name="date"></param>
|
/// <param name="date"></param>
|
||||||
|
/// <param name="typeOfSmsSetting"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<SmsReportListDto>> GetSmsReportExpandList(SmsReportSearchModel searchModel, string date);
|
Task<List<SmsReportListDto>> GetSmsReportExpandList(SmsReportSearchModel searchModel, string date, string typeOfSmsSetting);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
List<SmsResultViewModel> Search(SmsResultSearchModel searchModel);
|
List<SmsResultViewModel> Search(SmsResultSearchModel searchModel);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using _0_Framework.Application.Enums;
|
using _0_Framework.Application.Enums;
|
||||||
using _0_Framework.Domain;
|
using _0_Framework.Domain;
|
||||||
using CompanyManagment.App.Contracts.SmsResult;
|
using CompanyManagment.App.Contracts.SmsResult;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Company.Domain.SmsResultAgg;
|
namespace Company.Domain.SmsResultAgg;
|
||||||
@@ -27,4 +28,25 @@ public interface ISmsSettingsRepository : IRepository<long, SmsSetting>
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task RemoveItem(long id);
|
Task RemoveItem(long id);
|
||||||
|
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پیامک های خودکار بر اساس نوع آن
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="typeOfSmsSetting"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<SmsSettingDto>> GetSmsSettingList(TypeOfSmsSetting typeOfSmsSetting);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات تنظیمات پیامک جهت ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SmsSettingDto> GetSmsSettingDataToEdit(long id);
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -185,8 +185,17 @@ public class Workshop : EntityBase
|
|||||||
public bool AddLeavePay { get; private set; }
|
public bool AddLeavePay { get; private set; }
|
||||||
public string ZoneName { get; private set; }
|
public string ZoneName { get; private set; }
|
||||||
public bool TotalPaymentHide { get; private set; }
|
public bool TotalPaymentHide { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا طبقه بندی شده است
|
||||||
|
/// [کارگاه دارای طرح طبقه بندی می باشد ؟]
|
||||||
|
/// </summary>
|
||||||
public bool IsClassified { get; private set; }
|
public bool IsClassified { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا طرح طبقه بندی تکمیل شده است
|
||||||
|
/// </summary>
|
||||||
|
public bool IsClassificationSchemeCompleted { get; private set; }
|
||||||
|
|
||||||
//نحوه محاسبه مزد مرخصی
|
//نحوه محاسبه مزد مرخصی
|
||||||
public string ComputeOptions { get; private set; }
|
public string ComputeOptions { get; private set; }
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using System.Drawing;
|
using _0_Framework.Application;
|
||||||
using _0_Framework.Application;
|
using CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
using OfficeOpenXml;
|
using OfficeOpenXml;
|
||||||
using OfficeOpenXml.Style;
|
using OfficeOpenXml.Style;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
namespace CompanyManagement.Infrastructure.Excel.Checkout;
|
namespace CompanyManagement.Infrastructure.Excel.Checkout;
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ public class CustomizeCheckoutExcelGenerator
|
|||||||
{ "BankName", "نام بانک" },
|
{ "BankName", "نام بانک" },
|
||||||
|
|
||||||
};
|
};
|
||||||
public static byte[] GenerateCheckoutTempExcelInfo(List<CustomizeCheckoutTempExcelViewModel> data, List<string> selectedParameters)
|
public static byte[] GenerateCheckoutTempExcelInfo(List<CustomizeCheckoutExcelDto> data, List<string> selectedParameters)
|
||||||
{
|
{
|
||||||
ExcelPackage.License.SetNonCommercialOrganization("Gozareshgir Noncommercial organization");
|
ExcelPackage.License.SetNonCommercialOrganization("Gozareshgir Noncommercial organization");
|
||||||
using var package = new ExcelPackage();
|
using var package = new ExcelPackage();
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
using _0_Framework.Excel;
|
using _0_Framework.Excel;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
using CompanyManagment.App.Contracts.RollCall;
|
||||||
using OfficeOpenXml;
|
using OfficeOpenXml;
|
||||||
using OfficeOpenXml.Drawing;
|
using OfficeOpenXml.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace CompanyManagement.Infrastructure.Excel.RollCall;
|
namespace CompanyManagement.Infrastructure.Excel.RollCall;
|
||||||
|
|
||||||
@@ -308,6 +314,111 @@ public class RollCallExcelGenerator : ExcelGenerator
|
|||||||
return package.GetAsByteArray();
|
return package.GetAsByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static byte[] CaseHistoryExcelForEmployee(List<RollCallCaseHistoryDetail> data, string titleId)
|
||||||
|
{
|
||||||
|
if (!Regex.IsMatch(titleId, @"^\d{4}_\d{2}$"))
|
||||||
|
throw new ArgumentException("Invalid titleId format.", nameof(titleId));
|
||||||
|
|
||||||
|
var splitDate = titleId.Split("_");
|
||||||
|
var year = Convert.ToInt32(splitDate.First());
|
||||||
|
var month = Convert.ToInt32(splitDate.Last());
|
||||||
|
|
||||||
|
var startDateFa = $"{year:D4}/{month:D2}/01";
|
||||||
|
var startDate = startDateFa.ToGeorgianDateTime();
|
||||||
|
var endDateFa = startDateFa.FindeEndOfMonth();
|
||||||
|
var endDate = endDateFa.ToGeorgianDateTime();
|
||||||
|
|
||||||
|
var dateRange = (int)(endDate.Date - startDate.Date).TotalDays + 1;
|
||||||
|
var dates = Enumerable.Range(0, dateRange).Select(x => startDate.AddDays(x)).ToList();
|
||||||
|
|
||||||
|
var safeData = data ?? new List<RollCallCaseHistoryDetail>();
|
||||||
|
var first = safeData.FirstOrDefault();
|
||||||
|
var totalWorkingTime = new TimeSpan(safeData.Sum(x => x.TotalWorkingTime.Ticks));
|
||||||
|
|
||||||
|
var viewModel = new CaseHistoryRollCallExcelForEmployeeViewModel
|
||||||
|
{
|
||||||
|
EmployeeId = first?.EmployeeId ?? 0,
|
||||||
|
DateGr = startDate,
|
||||||
|
PersonnelCode = first?.PersonnelCode,
|
||||||
|
EmployeeFullName = first?.EmployeeFullName,
|
||||||
|
PersianMonthName = month.ToFarsiMonthByIntNumber(),
|
||||||
|
PersianYear = year.ToString(),
|
||||||
|
TotalWorkingHoursFa = totalWorkingTime.ToFarsiHoursAndMinutes("-"),
|
||||||
|
TotalWorkingTimeSpan = $"{(int)totalWorkingTime.TotalHours}:{totalWorkingTime.Minutes:00}",
|
||||||
|
RollCalls = dates.Select((date, index) =>
|
||||||
|
{
|
||||||
|
var item = index < safeData.Count ? safeData[index] : null;
|
||||||
|
var records = item?.Records ?? new List<RollCallCaseHistoryDetailRecord>();
|
||||||
|
|
||||||
|
return new RollCallItemForEmployeeExcelViewModel
|
||||||
|
{
|
||||||
|
DateGr = date,
|
||||||
|
DateFa = date.ToFarsi(),
|
||||||
|
DayOfWeekFa = date.DayOfWeek.DayOfWeeKToPersian(),
|
||||||
|
PersonnelCode = item?.PersonnelCode,
|
||||||
|
EmployeeFullName = item?.EmployeeFullName,
|
||||||
|
IsAbsent = item?.Status == RollCallRecordStatus.Absent,
|
||||||
|
HasLeave = item?.Status == RollCallRecordStatus.Leaved,
|
||||||
|
IsHoliday = false,
|
||||||
|
TotalWorkingHours = (item?.TotalWorkingTime ?? TimeSpan.Zero).ToFarsiHoursAndMinutes("-"),
|
||||||
|
StartsItems = JoinRecords(records, r => r.StartTime),
|
||||||
|
EndsItems = JoinRecords(records, r => r.EndTime),
|
||||||
|
EnterTimeDifferences = JoinRecords(records, r => FormatSignedTimeSpan(r.EntryTimeDifference)),
|
||||||
|
ExitTimeDifferences = JoinRecords(records, r => FormatSignedTimeSpan(r.ExitTimeDifference))
|
||||||
|
};
|
||||||
|
}).ToList()
|
||||||
|
};
|
||||||
|
|
||||||
|
return CaseHistoryExcelForEmployee(viewModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] CaseHistoryExcelForOneDay(List<RollCallCaseHistoryDetail> data, string titleId)
|
||||||
|
{
|
||||||
|
if (!Regex.IsMatch(titleId, @"^\d{4}/\d{2}/\d{2}$"))
|
||||||
|
throw new ArgumentException("Invalid titleId format.", nameof(titleId));
|
||||||
|
|
||||||
|
var dateGr = titleId.ToGeorgianDateTime();
|
||||||
|
var safeData = data ?? new List<RollCallCaseHistoryDetail>();
|
||||||
|
|
||||||
|
var viewModel = new CaseHistoryRollCallForOneDayViewModel
|
||||||
|
{
|
||||||
|
DateFa = titleId,
|
||||||
|
DateGr = dateGr,
|
||||||
|
DayOfWeekFa = dateGr.DayOfWeek.DayOfWeeKToPersian(),
|
||||||
|
RollCalls = safeData.Select(item =>
|
||||||
|
{
|
||||||
|
var records = item.Records ?? new List<RollCallCaseHistoryDetailRecord>();
|
||||||
|
return new RollCallItemForOneDayExcelViewModel
|
||||||
|
{
|
||||||
|
EmployeeFullName = item.EmployeeFullName,
|
||||||
|
PersonnelCode = item.PersonnelCode,
|
||||||
|
StartsItems = JoinRecords(records, r => r.StartTime),
|
||||||
|
EndsItems = JoinRecords(records, r => r.EndTime),
|
||||||
|
TotalWorkingHours = item.TotalWorkingTime.ToFarsiHoursAndMinutes("-")
|
||||||
|
};
|
||||||
|
}).ToList()
|
||||||
|
};
|
||||||
|
|
||||||
|
return CaseHistoryExcelForOneDay(viewModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string JoinRecords(IEnumerable<RollCallCaseHistoryDetailRecord> records, Func<RollCallCaseHistoryDetailRecord, string> selector)
|
||||||
|
{
|
||||||
|
var safeRecords = records ?? Enumerable.Empty<RollCallCaseHistoryDetailRecord>();
|
||||||
|
var values = safeRecords.Select(selector).Where(x => !string.IsNullOrWhiteSpace(x)).ToList();
|
||||||
|
return values.Count == 0 ? string.Empty : string.Join(Environment.NewLine, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string FormatSignedTimeSpan(TimeSpan value)
|
||||||
|
{
|
||||||
|
if (value == TimeSpan.Zero)
|
||||||
|
return "-";
|
||||||
|
|
||||||
|
var abs = value.Duration();
|
||||||
|
var sign = value.Ticks < 0 ? "-" : "+";
|
||||||
|
return $"{(int)abs.TotalHours}:{abs.Minutes:00}{sign}";
|
||||||
|
}
|
||||||
|
|
||||||
private string CalculateExitMinuteDifference(TimeSpan early, TimeSpan late)
|
private string CalculateExitMinuteDifference(TimeSpan early, TimeSpan late)
|
||||||
{
|
{
|
||||||
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
|
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
|
||||||
|
|||||||
@@ -10,5 +10,12 @@ namespace CompanyManagment.App.Contracts.Bank
|
|||||||
OperationResult Create(CreateBank command);
|
OperationResult Create(CreateBank command);
|
||||||
OperationResult Edit(EditBank command);
|
OperationResult Edit(EditBank command);
|
||||||
List<BankViewModel> Search(string name);
|
List<BankViewModel> Search(string name);
|
||||||
|
List<BankSelectList> GetBanksForSelectList();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BankSelectList:SelectListViewModel
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,142 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Checkout.ClientDto;
|
||||||
|
|
||||||
|
public class CheckoutListClientDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ای دی فیش
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public string Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public string Month { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قراداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع فیش
|
||||||
|
/// </summary>
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان فیش
|
||||||
|
/// </summary>
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امضاء
|
||||||
|
/// </summary>
|
||||||
|
public bool Signature { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public string PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا فیش نیاز به بروزرسانی دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool IsUpdateNeeded { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// لیست پیام های هشدار فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public List<CheckoutWarningMessageModel> CheckoutWarningMessageList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا مبالغ مانند مساعده مغایرت دارند
|
||||||
|
/// </summary>
|
||||||
|
public bool HasAmountConflict { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CheckoutListClientSearchModel : PaginationRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long? EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public int Month { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع فیش
|
||||||
|
/// </summary>
|
||||||
|
public string StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان فیش
|
||||||
|
/// </summary>
|
||||||
|
public string EndDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مرتب سازی
|
||||||
|
/// </summary>
|
||||||
|
public CheckoutClientListOrderType? OrderType { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public enum CheckoutClientListOrderType
|
||||||
|
{
|
||||||
|
//بر اساس تاریخ ایجاد
|
||||||
|
ByCheckoutCreationDate,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بر اساس امضاء شده
|
||||||
|
/// </summary>
|
||||||
|
BySignedCheckout,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بر اساس امضاء نشده
|
||||||
|
/// </summary>
|
||||||
|
ByUnSignedCheckout,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بر اساس کد پرسنلی
|
||||||
|
/// کوچک به بزرگ
|
||||||
|
/// </summary>
|
||||||
|
ByPersonnelCode,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بر اساس کد پرسنلی
|
||||||
|
/// بزرگ به کوچک
|
||||||
|
/// </summary>
|
||||||
|
ByPersonnelCodeDescending,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بر اساس تاریخ شروع
|
||||||
|
/// کوچک به بزرگ
|
||||||
|
/// </summary>
|
||||||
|
ByCheckoutStartDate,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// براساس تاریخ شروع
|
||||||
|
/// بزرگ به کوچک
|
||||||
|
/// </summary>
|
||||||
|
ByCheckoutStartDateDescending
|
||||||
|
|
||||||
|
}
|
||||||
@@ -193,4 +193,9 @@ public class CreateCheckout
|
|||||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double BaseYearUnAffected { get; set; }
|
public double BaseYearUnAffected { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا برای محاسبه پاداش مجاز است
|
||||||
|
/// </summary>
|
||||||
|
public bool RewardPayCompute { get; set; }
|
||||||
}
|
}
|
||||||
@@ -85,8 +85,13 @@ public class CheckoutDto
|
|||||||
public List<CheckoutWarningMessageModel> CheckoutWarningMessageList { get; set; }
|
public List<CheckoutWarningMessageModel> CheckoutWarningMessageList { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// نیاز به امزا دارد یا خیر
|
/// نیاز به امضاء دارد یا خیر
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasSignCheckoutOption { get; set; }
|
public bool HasSignCheckoutOption { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا در این فیش مرخصی استحقاقی دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool HasLeave { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,15 @@ public class CheckoutPrintDto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string LeftWorkDate { get; set; }
|
public string LeftWorkDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// متن مربوط به دریافت مطالبات
|
||||||
|
/// </summary>
|
||||||
|
public string ClaimsReceivedText { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا حضورغیاب دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool HasRollCall { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//جدول مطالبات و کسورات
|
//جدول مطالبات و کسورات
|
||||||
@@ -116,12 +125,7 @@ public class CheckoutPrintDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// لیست حضورغیاب
|
/// لیست حضورغیاب
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<CheckoutPrintRollCallDto> MonthlyRollCall { get; set; }
|
public CheckoutPrintRollCallDto RollCall { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// دیتای جدول حضورغیاب
|
|
||||||
/// </summary>
|
|
||||||
public CheckoutRollCallViewModel CheckoutRollCall { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ public class CheckoutSearchModelDto : PaginationRequest
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// ماه
|
/// ماه
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Month { get; set; }
|
public int Month { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// سال
|
/// سال
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Year { get; set; }
|
public int Year { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// آی دی گارفرما
|
/// آی دی گارفرما
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
|
||||||
|
public class ContractsListToCreateCheckoutDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی قراداد
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public long PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
|
||||||
|
//نام کارگاه
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شوع فیش
|
||||||
|
/// </summary>
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان فیش
|
||||||
|
/// </summary>
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ ترک کار
|
||||||
|
/// </summary>
|
||||||
|
public string LeftWorkDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت ایجاد فیش
|
||||||
|
/// </summary>
|
||||||
|
public CreateCheckoutStatus CreateCheckoutStatus { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// توضیحات
|
||||||
|
/// </summary>
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
|
||||||
|
public class CreateCheckoutDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// لیست آی دی های قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public List<long> Ids { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public int Month { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت ایجاد فیش
|
||||||
|
/// </summary>
|
||||||
|
public enum CreateCheckoutStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آماده ایجاد
|
||||||
|
/// </summary>
|
||||||
|
ReadyToCreate,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیر مجاز
|
||||||
|
/// </summary>
|
||||||
|
NotValid,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دارای فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
HasCheckout,
|
||||||
|
}
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
using System;
|
||||||
|
using CompanyManagment.App.Contracts.Contract;
|
||||||
|
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
|
||||||
|
using CompanyManagment.App.Contracts.WorkingHoursTemp;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
|
||||||
|
public class GetContractAndIncludesDataToCreateDto
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد بایگانی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string ArchiveCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا تنظیمات کارگاه بر رو ایجاد فیش استاتیک است
|
||||||
|
/// </summary>
|
||||||
|
public bool IsStaticCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا کارگاه در تعطیلات رسمی باز است
|
||||||
|
/// </summary>
|
||||||
|
public bool WorkshopHolidayWorking { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// محاسبه نوبت کاری در فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
public bool RotatingShiftCompute { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پاداش در فیش حقوقی محاسبه شود
|
||||||
|
/// </summary>
|
||||||
|
public bool RewardComputeOnCheckout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا اضافه کار فیش حقوقی در بیمه محاسبه شود
|
||||||
|
/// </summary>
|
||||||
|
public bool HasInsuranceCheckoutOverTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی صنف بیمه کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long? InsuranceJobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا کارگاه مشاغل مقطوع است
|
||||||
|
/// </summary>
|
||||||
|
public bool FixedSalary { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جمعیت شهر کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string Population { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ارسال لیست بیمه
|
||||||
|
/// </summary>
|
||||||
|
public string TypeOfInsuranceSend { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// قرارداد قدیمی است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool IsOldContract { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<ContractIncludedData> ContractIncludedData { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ContractIncludedData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام پدر
|
||||||
|
/// </summary>
|
||||||
|
public string FathersName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد ملی
|
||||||
|
/// </summary>
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ تولد
|
||||||
|
/// </summary>
|
||||||
|
public string DateOfBirth { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلس
|
||||||
|
/// </summary>
|
||||||
|
public string PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت تاهل
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string MaritalStatus { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ساعت کاری پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public CreateWorkingHoursTemp WorkingHours { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اطلاعات جداسازی تاریخ فیش
|
||||||
|
/// </summary>
|
||||||
|
public ContractSeparationViewModel Separation { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تنظیمات فنی پرسنل
|
||||||
|
/// سنوات
|
||||||
|
/// </summary>
|
||||||
|
public string YearsOption { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تنظیمات فنی پرسنل
|
||||||
|
/// عیدی و پاداش
|
||||||
|
/// </summary>
|
||||||
|
public string BonusesOption { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تنظیمات فنی پرسنل
|
||||||
|
/// مزد مرخصی
|
||||||
|
/// </summary>
|
||||||
|
public string ComputeOption { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ترایخ شروع قراداد
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ContractStart { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان قرارداد
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ContractEnd { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ترایخ شروع قراداد
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime ContractStartGr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان قرارداد
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime ContractEndGr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی قراداد
|
||||||
|
/// </summary>
|
||||||
|
public long ContractId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مزد روزانه قرداد بدون تاثیر ساعات کار
|
||||||
|
/// </summary>
|
||||||
|
public double DailySalaryUnAffected { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع مزد روزانه
|
||||||
|
/// </summary>
|
||||||
|
public string DailyWageType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اولین شروع بکار پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string FirstGetWorkingDay { get; set; }
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
using CompanyManagment.App.Contracts.Checkout.Dto;
|
using CompanyManagment.App.Contracts.Checkout.Dto;
|
||||||
|
using CompanyManagment.App.Contracts.Leave;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using CompanyManagment.App.Contracts.Checkout.ClientDto;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.Checkout;
|
namespace CompanyManagment.App.Contracts.Checkout;
|
||||||
|
|
||||||
@@ -65,6 +67,7 @@ public interface ICheckoutApplication
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region ForApi
|
#region ForApi
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -95,6 +98,66 @@ public interface ICheckoutApplication
|
|||||||
/// <param name="ids"></param>
|
/// <param name="ids"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<CheckoutPrintDto>> CheckoutPrint(List<long> ids);
|
Task<List<CheckoutPrintDto>> CheckoutPrint(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست قراردادها برای ایجاد فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="month"></param>
|
||||||
|
/// <param name="employeeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<ContractsListToCreateCheckoutDto>>> GetContractToCreateCheckout(long workshopId,
|
||||||
|
string year, string month, long employeeId);
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="month"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CreateCheckoutApi(List<long> ids, string year, string month, long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف گروهی یا تکی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> GroupDeleteCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// امضاء تکی یا گروهی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> SignCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف امضاء تکی یا گروهی فیش حقوقی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> UnSignCheckoutApi(List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت مرخصی برای فیش حقوقی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<LeavePrintForCheckoutDto>>> LeavePrintForCheckout(long id);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ClientApi
|
||||||
|
|
||||||
|
Task<PagedResult<CheckoutListClientDto>> GetListForClient(long workshopId,
|
||||||
|
CheckoutListClientSearchModel searchModel);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,4 +171,5 @@ public class CheckoutPrintSalaryAidDto
|
|||||||
{
|
{
|
||||||
public string Amount { get; set; }
|
public string Amount { get; set; }
|
||||||
public string SalaryAidDateTimeFa { get; set; }
|
public string SalaryAidDateTimeFa { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مدل برای مدال افزودن پرسنل ب گروه
|
||||||
|
/// </summary>
|
||||||
|
public class AddEmployeeToGroup
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GoroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobCode { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست گروه ها
|
||||||
|
/// </summary>
|
||||||
|
public List<ClassificationGroupList> ClassificationGroupList{ get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست گروه ها
|
||||||
|
/// </summary>
|
||||||
|
public class ClassificationGroupList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// استرینگ
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// اینتیجر
|
||||||
|
/// </summary>
|
||||||
|
public int GroupNoInt { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class AddOrEditJobInGroupDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه نوع عددی
|
||||||
|
/// </summary>
|
||||||
|
public int GroupNoInt { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public List<AddJobListDto> AddJobListDto { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست مشغال افزوده شده به گروه
|
||||||
|
/// </summary>
|
||||||
|
public class AddJobListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل در مشاغل اداره کار
|
||||||
|
/// </summary>
|
||||||
|
public long JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobName { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class CheckStatusToDeleteScheme
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت طرح برای حذف
|
||||||
|
/// </summary>
|
||||||
|
public DeleteSchemeStatus DeleteSchemeStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پیام سیستم
|
||||||
|
/// </summary>
|
||||||
|
public string Message { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DeleteSchemeStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// مجاز
|
||||||
|
/// </summary>
|
||||||
|
Valid,
|
||||||
|
/// <summary>
|
||||||
|
/// مجاز باشرط تایید
|
||||||
|
/// </summary>
|
||||||
|
ConfirmationNeeded,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیر مجاز
|
||||||
|
/// </summary>
|
||||||
|
NotValid,
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد گروه
|
||||||
|
/// </summary>
|
||||||
|
public class ClassificationGroupAndJobModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// استرینگ
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه نوع عددی
|
||||||
|
/// </summary>
|
||||||
|
public int GroupNoInt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationSchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public List<EditClassificationGroupJob> EditClassificationGroupJob { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد مشاغل گروه
|
||||||
|
/// </summary>
|
||||||
|
public class CreateClassificationGroupJob
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد شغل
|
||||||
|
/// </summary>
|
||||||
|
public string JobCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش مشاغل گروه
|
||||||
|
/// </summary>
|
||||||
|
public class EditClassificationGroupJob : CreateClassificationGroupJob
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ای دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد یا ویرایش مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public class CreateOrEditGroupJobs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// استرینگ
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public List<long> JobIdList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پارشیال صفحه ایجاد طرح
|
||||||
|
/// </summary>
|
||||||
|
public class ClassificationSchemeListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آیا طرح دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool HasScheme { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست طرح
|
||||||
|
/// </summary>
|
||||||
|
public List<SchemeListDto> ClassificationSchemesList { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد دستمزد گروه و ضریب ریالی
|
||||||
|
/// </summary>
|
||||||
|
public class CreateClassificationGroupSalaryAndRialCoefficient
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دستمزد گروه
|
||||||
|
/// </summary>
|
||||||
|
public double GroupSalary { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// </summary>
|
||||||
|
public DateTime EndDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش دستمزد
|
||||||
|
/// </summary>
|
||||||
|
public class EditClassificationGroupSalaryAndRialCoefficient : CreateClassificationGroupSalaryAndRialCoefficient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string StartDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string EndDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دستمزد گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupSalaryStr { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها و ضرایب ریالی
|
||||||
|
/// </summary>
|
||||||
|
public class SalaryAndRialCoefficientModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string StartDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime EndDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string EndDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی
|
||||||
|
/// string
|
||||||
|
/// </summary>
|
||||||
|
public string RialCoefficientStr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی
|
||||||
|
/// double
|
||||||
|
/// </summary>
|
||||||
|
public double RialCoefficient { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ضریب
|
||||||
|
/// </summary>
|
||||||
|
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی ضریب ریالی
|
||||||
|
/// </summary>
|
||||||
|
public long CoefficientId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها و ضرایب بر اساس سال
|
||||||
|
/// </summary>
|
||||||
|
public List<EditClassificationGroupSalaryAndRialCoefficient> SalariesAndCoefficientList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تب دستمزد ها و ضرایب ریالی
|
||||||
|
/// </summary>
|
||||||
|
public class SalaryAndRialCoefficientTab
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا دستمزدی قبلا ایجاد شده است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool HasAnySalaries { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها و ضرایب
|
||||||
|
/// </summary>
|
||||||
|
public List<SalaryAndRialCoefficientTabDataList> SalaryAndRialCoefficientTabDataList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها
|
||||||
|
/// </summary>
|
||||||
|
public class SalaryAndRialCoefficientTabDataList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string StartDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
[DataType(DataType.Text)]
|
||||||
|
public string EndDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ضریب ریالی
|
||||||
|
/// string
|
||||||
|
/// </summary>
|
||||||
|
public string RialCoefficientStr { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد طرح
|
||||||
|
/// </summary>
|
||||||
|
public class CreateClassificationScheme
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمول طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string IncludingDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// میلادی
|
||||||
|
/// </summary>
|
||||||
|
public DateTime ExecutionDateGr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ExecutionDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان طرح
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndSchemeDateGr { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره همراه طراح
|
||||||
|
/// </summary>
|
||||||
|
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||||
|
public string DesignerPhone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ضریب
|
||||||
|
/// </summary>
|
||||||
|
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class CreateClassificationSchemeDto
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمول طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string IncludingDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ExecutionDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره همراه طراح
|
||||||
|
/// </summary>
|
||||||
|
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||||
|
public string DesignerPhone { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ضریب
|
||||||
|
/// </summary>
|
||||||
|
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش طرح
|
||||||
|
/// </summary>
|
||||||
|
public class EditClassificationScheme : CreateClassificationScheme
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using _0_Framework.Application.Enums;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class EditClassificationSchemeDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمول طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string IncludingDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ExecutionDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره همراه طراح
|
||||||
|
/// </summary>
|
||||||
|
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||||
|
public string DesignerPhone { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع ضریب
|
||||||
|
/// </summary>
|
||||||
|
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش گروه پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public class EditEmployeeGroup
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آیا گروه بندی پرسنل چند گانه است
|
||||||
|
/// </summary>
|
||||||
|
public bool HasMultipleGroup { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست گروه های پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public List<EditEmployeeGroupList> EditEmployeeGroupLists { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست گروه های طرح
|
||||||
|
/// </summary>
|
||||||
|
public List<ClassificationGroupList> ClassificationGroupList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست گروه های پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public class EditEmployeeGroupList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی شغل
|
||||||
|
/// </summary>
|
||||||
|
public long ClassificationGroupJobId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? StartGroupDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndGroupDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public string StartGroupDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان استفاده از گروه
|
||||||
|
/// </summary>
|
||||||
|
public string EndGroupDateFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا حذف شده است
|
||||||
|
/// </summary>
|
||||||
|
public bool IsRemoved { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جستجوی پرسنل
|
||||||
|
/// تب افزودن پرسنل طبقه بندی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public class EmployeeInfoTab
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public long WorkshopId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string FullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long SchemeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public List<EmployeeInfoList> EmployeeInfoList { get; set; }
|
||||||
|
|
||||||
|
public List<string> YearlyList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست پرسنل
|
||||||
|
/// تب افزودن پرسنل طبقه بندی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public class EmployeeInfoList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string FullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه یا گره هایی که پرسنل در آن اضافه شده
|
||||||
|
/// </summary>
|
||||||
|
public string GroupNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرسنل هیچ گروهی دارد؟
|
||||||
|
/// </summary>
|
||||||
|
public bool HasGroup { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ شروع بکار قراداد
|
||||||
|
/// </summary>
|
||||||
|
public string LastStartContractWork { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ ترک کار قراداد
|
||||||
|
/// </summary>
|
||||||
|
public string LastLeftContractWork { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ شروع بکار بیمه
|
||||||
|
/// </summary>
|
||||||
|
public string LastStartInsuranceWork { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ ترک کار بیمه
|
||||||
|
/// </summary>
|
||||||
|
public string LastLeftInsuranceWork { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرسنل قرداد است
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractPerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرسنل بیمه است
|
||||||
|
/// </summary>
|
||||||
|
public bool InsurancePerson { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا ترک کار قرارداد دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool ContractLeft { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا ترک کار بیمه دارد
|
||||||
|
/// </summary>
|
||||||
|
public bool InsuranceLeft { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا کلا ترک کار کرده است
|
||||||
|
/// </summary>
|
||||||
|
public bool Black { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class GetGroupAndJobSchemeListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
public long GroupId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره گروه نوع عددی
|
||||||
|
/// </summary>
|
||||||
|
public int GroupNoInt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا شغلی به گروه اضافه شده
|
||||||
|
/// </summary>
|
||||||
|
public bool HasAnyJob { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
using _0_Framework.Application;
|
||||||
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
using CompanyManagment.App.Contracts.YearlySalary;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اپلیکیش طرح طبقه بندی مشاغل
|
||||||
|
/// </summary>
|
||||||
|
public interface IClassificationSchemeApplication
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// پارشیال صفحه ایجاد طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="worskhopId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ClassificationSchemeListDto> GetClassificationSchemeList(long workshopId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CreateClassificationScheme(CreateClassificationSchemeDto command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات طرح برای مودال ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EditClassificationSchemeDto> GetClassificationScheme(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات طر برای محاسبات
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EditClassificationScheme> GetClassificationSchemeToCompute(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ویرایش طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> EditClassificationScheme(EditClassificationSchemeDto command);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت گروه ها و مشاغلشان برای تب تعیین مشاغل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ClassificationGroupAndJobModel>> GetGroupAndJobs(long schemeId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت مشاغل گروه توسط آی دی گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<EditClassificationGroupJob>> GetGroupJobs(long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> CheckEmployeeHasThisJob(long id, long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد مشاغل گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="createClassificationGroupJob"></param>
|
||||||
|
/// <param name="deleteJobList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<bool> CreateGroupJobs(List<CreateClassificationGroupJob> createClassificationGroupJob, List<long> deleteJobList);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک میکند که آیا برای این طرح تابحال دستمزدی ایجاد شده یا نه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// در یافت اطلاعات گروه برای لود مودال ایجاد دستمزد های
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientModel> GetGroupToCreateSalariesModal(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد دستمزدها و ضرایب ریالی هر گروه در هر سال
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CreateGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <param name="startDate"></param>
|
||||||
|
/// <param name="endDate"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ثبت ویرایش دستمزدها و ضریب
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پرسنل برای تب افزودن پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EmployeeInfoTab> GetEmployeeDataTab(EmployeeInfoTab command);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت گروه های طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<ClassificationGroupList>> GetGroups(long schemeId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیره پرسنل افزوده شده در گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> AddEmployeeToGroup(AddEmployeeToGroup command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// انتقال پرسنل به گروه جدید
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> TransferEmployeeToNewGroup(List<EditEmployeeGroupList> command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیره ویرایش گروه پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> EditGroupMember(AddEmployeeToGroup command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیره ویرایش گروه چندگانه پرسنل
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> EditMultipleGroupMember(List<EditEmployeeGroupList> command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت اطلاعات عضویتی پرسنل در گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="employeeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EditEmployeeGroup> GetEmployeeMemberizeData(long employeeId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// متد محاسبه پایه سنوات برا افراد تک گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeStart">تاریخ شروع طرح</param>
|
||||||
|
/// <param name="schemeEnd">تاریخ پاین طرح، اجباری نیست</param>
|
||||||
|
/// <param name="contractStart">تاریخ شروع قراداد</param>
|
||||||
|
/// <param name="contractEnd">تاریخ پایان قراداد</param>
|
||||||
|
/// <param name="groupNo">شماره گروه</param>
|
||||||
|
/// <param name="employeeId">آی دی پرسنل</param>
|
||||||
|
/// <param name="workshopId">آی دی کارگاه</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<BaseYearDataViewModel> BaseYearComputeOneGroup(DateTime schemeStart, DateTime? schemeEnd,
|
||||||
|
DateTime contractStart, DateTime contractEnd, string groupNo, long employeeId, long workshopId);
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک کردن امکان حذف طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<CheckStatusToDeleteScheme>> CheckToDeleteScheme(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف طرح
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> DeleteScheme(long id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تب گروه ها و مشاغل
|
||||||
|
/// لیست گروه ها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<GetGroupAndJobSchemeListDto>> GetGroupList(long schemeId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست مشاغل برای مودال ایجاد و ویرایش
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<AddOrEditJobInGroupDto> GetCreateOrEditJobsData(long groupId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// چک میکند که آی پرسنلی وجود دارد که این شغل به او نسبت داده شده
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="jobId"></param>
|
||||||
|
/// <param name="groupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CheckIfEmployeeHasThisJob(long jobId, long groupId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ذخیر ایجاد یا ویرایش مشاغل در گروه
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> SaveJobsToGroup(AddOrEditJobInGroupDto command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="schemeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<SalaryAndRialCoefficientTabDataList>> GetSalaryList(long schemeId);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||||
|
|
||||||
|
public class SchemeListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی طرح
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شمول طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string IncludingDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ اجرای طرح
|
||||||
|
/// شمسی
|
||||||
|
/// </summary>
|
||||||
|
public string ExecutionDateFa { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل طراح
|
||||||
|
/// </summary>
|
||||||
|
public string DesignerFullName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||||
|
<NuGetAudit>false</NuGetAudit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -20,8 +21,9 @@
|
|||||||
<ProjectReference Include="..\_0_Framework\_0_Framework_b.csproj" />
|
<ProjectReference Include="..\_0_Framework\_0_Framework_b.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="CopyDocs" AfterTargets="Build">
|
<Target Name="CopyDocs" AfterTargets="Build">
|
||||||
<Copy SourceFiles="$(OutputPath)CompanyManagment.App.Contracts.xml" DestinationFolder="../ServiceHost\bin\Debug\net8.0\" />
|
<Copy SourceFiles="$(TargetDir)CompanyManagment.App.Contracts.xml"
|
||||||
</Target>
|
DestinationFolder="../ServiceHost\bin\$(Configuration)\net10.0\"
|
||||||
|
Condition="Exists('$(TargetDir)CompanyManagment.App.Contracts.xml')" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public class ContractSeparationViewModel
|
|||||||
public string ConsumableItems { get; set; }
|
public string ConsumableItems { get; set; }
|
||||||
public bool checker { get; set; }
|
public bool checker { get; set; }
|
||||||
public bool HasLeft { get; set; }
|
public bool HasLeft { get; set; }
|
||||||
|
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CreateCustomizeCheckoutDto
|
||||||
|
{
|
||||||
|
public int Year { get; set; }
|
||||||
|
public int Month { get; set; }
|
||||||
|
public List<long> EmployeeIds { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CreateCustomizeCheckoutTempDto
|
||||||
|
{
|
||||||
|
public int Year { get; set; }
|
||||||
|
public int Month { get; set; }
|
||||||
|
public int Day { get; set; }
|
||||||
|
public List<long> EmployeeIds { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CustomizeCheckoutExcelDto
|
||||||
|
{
|
||||||
|
public string Month { get; set; }
|
||||||
|
public string Year { get; set; }
|
||||||
|
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
public string EmployeeFName { get; set; }
|
||||||
|
public string EmployeeLName { get; set; }
|
||||||
|
public string EmployeeFullName => $"{EmployeeFName} {EmployeeLName}";
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
public long PersonnelCode { get; set; }
|
||||||
|
public string PersonnelCodeString => PersonnelCode.ToString();
|
||||||
|
|
||||||
|
|
||||||
|
public string SumOfWorkingDays { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string MonthlySalary { get; set; }
|
||||||
|
public string BaseYearsPay { get; set; }
|
||||||
|
|
||||||
|
public string MarriedAllowance { get; set; }
|
||||||
|
public string OvertimePay { get; set; }
|
||||||
|
public string NightworkPay { get; set; }
|
||||||
|
public string FridayPay { get; set; }
|
||||||
|
public string MissionPay { get; set; }
|
||||||
|
public string ShiftPay { get; set; }
|
||||||
|
public string FamilyAllowance { get; set; }
|
||||||
|
public string BonusesPay { get; set; }
|
||||||
|
public string LeavePay { get; set; }
|
||||||
|
public string RewardPay { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string FineDeduction { get; set; }
|
||||||
|
public string InsuranceDeduction { get; set; }
|
||||||
|
public string TaxDeducation { get; set; }
|
||||||
|
public string InstallmentDeduction { get; set; }
|
||||||
|
public string SalaryAidDeduction { get; set; }
|
||||||
|
public string AbsenceDeduction { get; set; }
|
||||||
|
public string EarlyExitDeduction { get; set; }
|
||||||
|
public string LateToWorkDeduction { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string TotalClaims { get; set; }
|
||||||
|
public string TotalDeductions { get; set; }
|
||||||
|
public string TotalPayment { get; set; }
|
||||||
|
|
||||||
|
public string BankAccountNumber { get; set; }
|
||||||
|
public string CardNumber { get; set; }
|
||||||
|
public string ShebaNumber { get; set; }
|
||||||
|
|
||||||
|
public string BankName { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CustomizeCheckoutPrintDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public string PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// عکس پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeePicture { get; set; }
|
||||||
|
|
||||||
|
// هدر فیش
|
||||||
|
// اطلاعات هویتی
|
||||||
|
// اطلاعات کارگاه
|
||||||
|
#region Hearder
|
||||||
|
/// <summary>
|
||||||
|
/// نام مجموعه/کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public string WorkshopName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// لیست کارفرما
|
||||||
|
/// </summary>
|
||||||
|
public List<string> EmployerList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حقوق ماهانه
|
||||||
|
/// </summary>
|
||||||
|
public string MonthlySalary { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حقوق روزانه
|
||||||
|
/// </summary>
|
||||||
|
public string DailyWage { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد ملی
|
||||||
|
/// </summary>
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع شیفت
|
||||||
|
/// string
|
||||||
|
/// </summary>
|
||||||
|
public string ShiftStatusStr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع شیفت
|
||||||
|
/// Enum
|
||||||
|
/// </summary>
|
||||||
|
public WorkshopShiftStatus ShiftStatusEnum { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public string Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public string Month { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نوع شیفت محتلط
|
||||||
|
/// </summary>
|
||||||
|
public string IrregularShiftType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// بازه های شیفت
|
||||||
|
/// </summary>
|
||||||
|
public List<string> ShiftTimes { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//جدول مطالبات و کسورات
|
||||||
|
#region PaymentAndDeductionTable
|
||||||
|
/// <summary>
|
||||||
|
/// مطالبات
|
||||||
|
/// </summary>
|
||||||
|
public List<PaymentAndDeductionListDto> PaymentList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کسورات
|
||||||
|
/// </summary>
|
||||||
|
public List<PaymentAndDeductionListDto> DeductionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جمع مطالبات
|
||||||
|
/// </summary>
|
||||||
|
public string TotalPayment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جمع کسورات
|
||||||
|
/// </summary>
|
||||||
|
public string TotalDeductions { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ قابل پرداخت
|
||||||
|
/// </summary>
|
||||||
|
public string TotalClaims { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region RollcallItems
|
||||||
|
|
||||||
|
public List<CustomizeCheckoutPrintRollCallItemDto> RollCallItems { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//جرایم
|
||||||
|
//مساعده
|
||||||
|
//وام
|
||||||
|
//پاداش
|
||||||
|
#region Fine-SalaryAid-Installment-Reward
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جرایم
|
||||||
|
/// </summary>
|
||||||
|
public List<FineDto> FineList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مساعده
|
||||||
|
/// </summary>
|
||||||
|
public List<SalaryAidDto> SalaryAidList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وام
|
||||||
|
/// </summary>
|
||||||
|
public List<InstallmentDto> InstallmentList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پاداش
|
||||||
|
/// </summary>
|
||||||
|
public List<RewardDto> RewardList { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مطالبات و کسورات
|
||||||
|
/// </summary>
|
||||||
|
public class PaymentAndDeductionListDto
|
||||||
|
{
|
||||||
|
public int RowNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// عنوان
|
||||||
|
/// </summary>
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مقدار/روز/ساعت
|
||||||
|
/// </summary>
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ
|
||||||
|
/// </summary>
|
||||||
|
public string Amount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// جرایم
|
||||||
|
/// </summary>
|
||||||
|
public class FineDto
|
||||||
|
{
|
||||||
|
public string Amount { get; set; }
|
||||||
|
public string FineDate { get; set; }
|
||||||
|
public string Title { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مساعده
|
||||||
|
/// </summary>
|
||||||
|
public class SalaryAidDto
|
||||||
|
{
|
||||||
|
public string Amount { get; set; }
|
||||||
|
public string SalaryAidDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وام
|
||||||
|
/// </summary>
|
||||||
|
public class InstallmentDto
|
||||||
|
{
|
||||||
|
public string LoanAmount { get; set; }
|
||||||
|
public string RemainingAmount { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پاداش
|
||||||
|
/// </summary>
|
||||||
|
public class RewardDto
|
||||||
|
{
|
||||||
|
public string Amount { get; set; }
|
||||||
|
public string RewardDate { get; set; }
|
||||||
|
public string Title { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using CompanyManagment.App.Contracts.RollCall;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CustomizeCheckoutPrintRollCallItemDto
|
||||||
|
{
|
||||||
|
public string RollCallDateFa { get; set; }
|
||||||
|
public string StartDate1 { get; set; }
|
||||||
|
public string EndDate1 { get; set; }
|
||||||
|
|
||||||
|
public string StartDate2 { get; set; }
|
||||||
|
public string EndDate2 { get; set; }
|
||||||
|
|
||||||
|
//منقطع بودن شیفت کاری
|
||||||
|
public bool IsSliced { get; set; }
|
||||||
|
|
||||||
|
public TimeSpan TotalWorkingHours { get; set; }
|
||||||
|
|
||||||
|
public string DayOfWeek { get; set; }
|
||||||
|
|
||||||
|
public TimeSpan BreakTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// اگر مرخصی نداشته باشد خالی خواهد بود، اگر داشته باشد نوع مرخصی جانشانی می شود
|
||||||
|
/// </summary>
|
||||||
|
public string LeaveType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت کارکرد پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public CustomizeCheckoutPrintRollCallStatus RollCallStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا تعطیل هست؟ این آیتم هم شامل تعطیلات رسمی هست هم شامل جمعه ها
|
||||||
|
/// </summary>
|
||||||
|
public bool IsHoliday { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاخیر 1
|
||||||
|
/// </summary>
|
||||||
|
public string EnterDifferencesMinutes1 { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// تعجیل 1
|
||||||
|
/// </summary>
|
||||||
|
public string ExitDifferencesMinutes1 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاخیر 2
|
||||||
|
/// </summary>
|
||||||
|
public string EnterDifferencesMinutes2 { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعجیل 2
|
||||||
|
/// </summary>
|
||||||
|
public string ExitDifferencesMinutes2 { get; set; }
|
||||||
|
|
||||||
|
public bool IsBirthDay { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CustomizeCheckoutPrintRollCallStatus
|
||||||
|
{
|
||||||
|
Worked,
|
||||||
|
Leaved,
|
||||||
|
Absent
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
using System;
|
||||||
|
using _0_Framework.Application;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class CustomizeCheckoutSearchModel : PaginationRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public int Month { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع جستجو
|
||||||
|
/// </summary>
|
||||||
|
public string SearchStartFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان جستجو
|
||||||
|
/// </summary>
|
||||||
|
public string SearchEndFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی بانک
|
||||||
|
/// </summary>
|
||||||
|
public long BankId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مرتب سازی
|
||||||
|
/// </summary>
|
||||||
|
public CustomizeCheckoutOrderByEnum OrderBy { get; set; } = CustomizeCheckoutOrderByEnum.ContractStartDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class CustomizeCheckoutListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public string PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سال
|
||||||
|
/// </summary>
|
||||||
|
public string Month { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ماه
|
||||||
|
/// </summary>
|
||||||
|
public string Year { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع قراداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractStartFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان قراداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractEndFa { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مجموع روزهای کارکرد
|
||||||
|
/// </summary>
|
||||||
|
public string SumOfWorkingDays { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاخیر در ورود
|
||||||
|
/// </summary>
|
||||||
|
public string LateToWorkDeduction { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غبت
|
||||||
|
/// </summary>
|
||||||
|
public string AbsenceDeduction { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مساعده
|
||||||
|
/// </summary>
|
||||||
|
public string SalaryAidDeduction { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ قابل پرداخت
|
||||||
|
/// </summary>
|
||||||
|
public string TotalPayment { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا مبلغ قابل پرداخت منفی است
|
||||||
|
/// </summary>
|
||||||
|
public bool IsTotalPaymentNegative { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آیا مبالغ مغایرت دارند؟
|
||||||
|
/// </summary>
|
||||||
|
public bool HasAmountConflict { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public enum CustomizeCheckoutStatusToCreate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// فاقد تعیین حقوق
|
||||||
|
/// </summary>
|
||||||
|
SalaryUnDefined,
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// مجاز به ایجاد فیش
|
||||||
|
/// </summary>
|
||||||
|
ReadyToCreate,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// فاقد گروهبندی
|
||||||
|
/// </summary>
|
||||||
|
GroupUnDefined,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دارای فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
AlreadyCreated,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// غیر مجاز
|
||||||
|
/// </summary>
|
||||||
|
NotValid,
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
|
||||||
|
public class EmployeeListToCreateCustomizeCheckoutDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public string PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت ایجاد فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
public CustomizeCheckoutStatusToCreate CustomizeCheckoutStatusToCreate { get; set; }
|
||||||
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Excel;
|
||||||
|
using CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||||
{
|
{
|
||||||
@@ -21,6 +24,62 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
|||||||
(bool Checkout, bool CustomizeCheckout, bool CustomizeCheckoutTemp) ValidateExistsCheckouts(
|
(bool Checkout, bool CustomizeCheckout, bool CustomizeCheckoutTemp) ValidateExistsCheckouts(
|
||||||
DateTime startDate, DateTime endDate, long workshopId, List<long> employeeId);
|
DateTime startDate, DateTime endDate, long workshopId, List<long> employeeId);
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست فیش غیر رسمی نهایی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedResult<CustomizeCheckoutListDto>> GetCustomizeCheckoutList(long workshopId,
|
||||||
|
CustomizeCheckoutSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پرسنل جهت ایجاد فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="month"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<EmployeeListToCreateCustomizeCheckoutDto>>> GetEmployeesToCreateCustomizeCheckout(
|
||||||
|
long workshopId, int year, int month);
|
||||||
|
|
||||||
}
|
/// <summary>
|
||||||
|
/// ایجاد فیش غیررسمی نهایی
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CreateCustomizeCheckout(long workshopId, CreateCustomizeCheckoutDto command);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت فیش غیررسمی نهایی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutPrintDto>> PrintCustomizeCheckout(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف فیش غیر رسمی نهایی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> DeleteCustomizeCheckout(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دانلود اکسل فیش غیر رسمی
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ExcelApiDto> CustomizeCheckoutExcelDownloadApi(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using _0_Framework.Excel;
|
||||||
|
using CompanyManagment.App.Contracts.CustomizeCheckout.CustomizeCheckoutDto;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
||||||
{
|
{
|
||||||
@@ -11,5 +14,64 @@ namespace CompanyManagment.App.Contracts.CustomizeCheckout
|
|||||||
OperationResult GroupCreate(CreateCustomizeCheckoutTempGroup command);
|
OperationResult GroupCreate(CreateCustomizeCheckoutTempGroup command);
|
||||||
OperationResult<List<EligibleEmployeesForCustomizeCheckoutViewModel>> GetWorkshopEmployeesEligibleForCheckoutInDates(long workshopId);
|
OperationResult<List<EligibleEmployeesForCustomizeCheckoutViewModel>> GetWorkshopEmployeesEligibleForCheckoutInDates(long workshopId);
|
||||||
OperationResult GroupRemove(long workshopId, List<long> idList);
|
OperationResult GroupRemove(long workshopId, List<long> idList);
|
||||||
|
|
||||||
|
#region ForApi
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست فیش حوقوقی غیر رسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="searchModel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PagedResult<CustomizeCheckoutListDto>> GetCustomizeCheckoutTempList(long workshopId,
|
||||||
|
CustomizeCheckoutSearchModel searchModel);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دریافت لیست پرسنل جهت ایجاد فیش غیر رسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="year"></param>
|
||||||
|
/// <param name="month"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult<List<EmployeeListToCreateCustomizeCheckoutDto>>> GetEmployeesToCreateCustomizeCheckout(
|
||||||
|
long workshopId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد فیش غیررسمی موقت
|
||||||
|
/// Api
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="command"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> CreateCustomizeCheckoutTemp(long workshopId, CreateCustomizeCheckoutTempDto command);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// پرینت فیش غیررسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<CustomizeCheckoutPrintDto>> PrintCustomizeCheckoutTemp(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// حذف فیش غیررسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OperationResult> DeleteCustomizeCheckoutTemp(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دانلود فایل اکسل
|
||||||
|
/// فیش غیر رسمی موقت
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="workshopId"></param>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<ExcelApiDto> CustomizeCheckoutTempExcelDownloadApi(long workshopId, List<long> ids);
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,27 @@ public class SearchCustomizeCheckout
|
|||||||
|
|
||||||
public enum CustomizeCheckoutOrderByEnum
|
public enum CustomizeCheckoutOrderByEnum
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ شروع
|
||||||
|
/// کوچک به بزرگ
|
||||||
|
/// </summary>
|
||||||
ContractStart,
|
ContractStart,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ پایان
|
||||||
|
/// بزرگ به کوچک
|
||||||
|
/// </summary>
|
||||||
ContractStartDesc,
|
ContractStartDesc,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قراداد
|
||||||
|
/// کوچکئ به بزرگ
|
||||||
|
/// </summary>
|
||||||
ContractNoDesc,
|
ContractNoDesc,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره قراداد
|
||||||
|
/// بزرگ به کوچک
|
||||||
|
/// </summary>
|
||||||
ContractNo,
|
ContractNo,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Employee.DTO;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ایجاد ترک کار از کلاینت
|
||||||
|
/// api
|
||||||
|
/// </summary>
|
||||||
|
public class CreateLeftWorkTempDtoClient
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long EmployeeId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ ترک کار
|
||||||
|
/// </summary>
|
||||||
|
public string LeftWorkTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ آخرین روز کاری
|
||||||
|
/// </summary>
|
||||||
|
public string LastDayStanding { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
using System.Diagnostics.Contracts;
|
||||||
|
|
||||||
|
namespace CompanyManagment.App.Contracts.Employee.DTO;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// لیست پرسنل کلاینت
|
||||||
|
/// api
|
||||||
|
/// </summary>
|
||||||
|
public class EmployeeListDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// آی دی پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام کامل پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد پرسنلی
|
||||||
|
/// </summary>
|
||||||
|
public int PersonnelCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت تاهل
|
||||||
|
/// </summary>
|
||||||
|
public string MaritalStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///کد ملی
|
||||||
|
/// </summary>
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// شماره شناسنامه
|
||||||
|
/// </summary>
|
||||||
|
public string IdNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ تولد
|
||||||
|
/// </summary>
|
||||||
|
public string DateOfBirth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام پدر
|
||||||
|
/// </summary>
|
||||||
|
public string FatherName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تعداد فرزندان
|
||||||
|
/// </summary>
|
||||||
|
public string NumberOfChildren { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ شروع بکار قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string LatestContractStartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ ترک کار قرارداد
|
||||||
|
/// </summary>
|
||||||
|
public string ContractLeftDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// آخرین تاریخ شروع بکار بیمه
|
||||||
|
/// </summary>
|
||||||
|
public string LatestInsuranceStartDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// تاریخ ترک کار بیمه
|
||||||
|
/// </summary>
|
||||||
|
public string InsuranceLeftDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دارای قرارداد است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool HasContract { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// دارای بیمه است؟
|
||||||
|
/// </summary>
|
||||||
|
public bool HasInsurance { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// وضعیت پرسنل در کارگاه
|
||||||
|
/// </summary>
|
||||||
|
public EmployeeStatusInWorkshop EmployeeStatusInWorkshop { get; set; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace CompanyManagment.App.Contracts.Employee.DTO;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// سرچ مدل پرسنل
|
||||||
|
/// api
|
||||||
|
/// </summary>
|
||||||
|
public class EmployeeSearchModelDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// نام پرسنل
|
||||||
|
/// </summary>
|
||||||
|
public string EmployeeFullName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// کد ملی
|
||||||
|
/// </summary>
|
||||||
|
public string NationalCode { get; set; }
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user