Compare commits
455 Commits
Author | SHA1 | Date |
---|---|---|
romanov73 | 70c2ab3f8c | 1 month ago |
romanov73 | 9c2fcef028 | 1 month ago |
Anton Romanov | 0a8a5f2df4 | 2 months ago |
Anton Romanov | 7713078596 | 2 months ago |
Anton Romanov | e6b4ed9f2c | 2 months ago |
Anton Romanov | 6dc88fdada | 2 months ago |
Anton Romanov | 234b043d72 | 2 months ago |
Anton Romanov | f522ed9b81 | 2 months ago |
Anton Romanov | 6f6a8b0eac | 2 months ago |
Anton Romanov | eb5ad650c9 | 2 months ago |
Anton Romanov | 9274dfc3d0 | 2 months ago |
Anton Romanov | 41b5d42330 | 2 months ago |
Anton Romanov | c6c0db0232 | 2 months ago |
Anton Romanov | 6a04b5e037 | 2 months ago |
Anton Romanov | a9c617075f | 2 months ago |
romanov73 | db4620694c | 2 months ago |
Anton Romanov | 70c950cdd7 | 2 months ago |
Anton Romanov | a9e8336986 | 2 months ago |
Anton Romanov | 23797bae9e | 2 months ago |
Anton Romanov | 37c1d0db08 | 2 months ago |
Anton Romanov | b49adee62a | 2 months ago |
Anton Romanov | c8382c4aea | 3 months ago |
Anton Romanov | 6e40343d6c | 3 months ago |
Anton Romanov | 55a76daa5a | 3 months ago |
Anton Romanov | 5371df1f50 | 3 months ago |
Anton Romanov | 4ab3637d9c | 4 years ago |
Anton Romanov | 893f7ae1f2 | 4 years ago |
Anton Romanov | 06f657f5c2 | 4 years ago |
Anton Romanov | b13f331f2c | 4 years ago |
Anton Romanov | 12973109d3 | 4 years ago |
Anton Romanov | 278e2135bb | 4 years ago |
Anton Romanov | b662437afe | 4 years ago |
Anton Romanov | 5ae17fbe83 | 4 years ago |
Anton Romanov | 3f16c8a078 | 4 years ago |
Anton Romanov | e3da8c710f | 4 years ago |
Anton Romanov | 54b992a7f3 | 4 years ago |
Anton Romanov | e20fb468f9 | 4 years ago |
Anton Romanov | 1a3ffb7bab | 4 years ago |
Anton Romanov | d29416fb76 | 4 years ago |
Anton Romanov | 37053d853b | 4 years ago |
Anton Romanov | b961c8e3dc | 4 years ago |
Anton Romanov | 3dd6210f42 | 4 years ago |
Anton Romanov | 5520f19357 | 4 years ago |
Anton Romanov | 2cc3008dc5 | 4 years ago |
Anton Romanov | 708a1a6d32 | 4 years ago |
Anton Romanov | 751195bf96 | 4 years ago |
Anton Romanov | 6adb3fec71 | 4 years ago |
Anton Romanov | ae0a1f3532 | 4 years ago |
Anton Romanov | e167a68bc6 | 4 years ago |
Anton Romanov | 6b717f26d3 | 4 years ago |
Anton Romanov | b20ab96b55 | 4 years ago |
Anton Romanov | 2c55293e0e | 4 years ago |
Anton Romanov | a14735699c | 4 years ago |
Anton Romanov | 9f21850767 | 4 years ago |
Anton Romanov | abde7f311c | 4 years ago |
Anton Romanov | 5333258c62 | 4 years ago |
Anton Romanov | 2149dfd32f | 4 years ago |
Anton Romanov | 34c5e79cbb | 4 years ago |
Anton Romanov | 2110c21be7 | 4 years ago |
Anton Romanov | 30e06335e9 | 4 years ago |
Anton Romanov | c528711431 | 4 years ago |
Anton Romanov | 0bb9768bda | 4 years ago |
Anton Romanov | 52d6210875 | 4 years ago |
Anton Romanov | 65569732d6 | 4 years ago |
Anton Romanov | 1d0c90d932 | 4 years ago |
Anton Romanov | 440def2b71 | 4 years ago |
Anton Romanov | 1460e26127 | 4 years ago |
Anton Romanov | 1f5cde4b66 | 4 years ago |
Anton Romanov | 10a99d42cf | 4 years ago |
Anton Romanov | 90c11c6946 | 4 years ago |
Anton Romanov | 134f75666c | 4 years ago |
Anton Romanov | b8d492724c | 4 years ago |
Anton Romanov | bc48a486ee | 4 years ago |
Anton Romanov | c36876f7e7 | 4 years ago |
Anton Romanov | a136acb0b4 | 5 years ago |
Anton Romanov | 7d1f5e9059 | 5 years ago |
Anton Romanov | 4c4c1b2015 | 5 years ago |
Anton Romanov | 6b90d7b0c0 | 5 years ago |
Anton Romanov | fa03edf32d | 5 years ago |
Anton Romanov | 4e1d99392a | 5 years ago |
Anton Romanov | ac55481bc6 | 5 years ago |
Anton Romanov | 71448364d7 | 5 years ago |
Anton Romanov | c57914db7c | 5 years ago |
Anton Romanov | ab20b3843f | 5 years ago |
Anton Romanov | 268a311a87 | 5 years ago |
Anton Romanov | a67eb23714 | 5 years ago |
Anton Romanov | 5ee1f33de1 | 5 years ago |
Anton Romanov | 107ddb90ac | 5 years ago |
Anton Romanov | ac6bd13c6c | 5 years ago |
Anton Romanov | e7061f4545 | 5 years ago |
Anton Romanov | d741bd019a | 5 years ago |
Anton Romanov | 846d94bb46 | 5 years ago |
Anton Romanov | 5755cf2f92 | 5 years ago |
Anton Romanov | 7587ff7a51 | 5 years ago |
Anton Romanov | 6c220355ee | 5 years ago |
Anton Romanov | 779f286988 | 5 years ago |
Anton Romanov | 7753dd104c | 5 years ago |
Anton Romanov | 48955b9cfd | 5 years ago |
Anton Romanov | 9665653234 | 5 years ago |
Anton Romanov | 04f545db1c | 5 years ago |
Anton Romanov | 746f443931 | 5 years ago |
Anton Romanov | 1be74769bf | 5 years ago |
Anton Romanov | 2cdec4bcda | 5 years ago |
Anton Romanov | a17dac55e2 | 5 years ago |
Anton Romanov | 9e6993f136 | 5 years ago |
Anton Romanov | 0647438bfb | 5 years ago |
Anton Romanov | 41c4ee7997 | 5 years ago |
Anton Romanov | 9d3ee273f6 | 5 years ago |
Anton Romanov | 3267138524 | 5 years ago |
Anton Romanov | df1bf873ff | 5 years ago |
Anton Romanov | 24f447aed7 | 5 years ago |
Anton Romanov | 36c4e52e37 | 5 years ago |
Anton Romanov | 529db0442c | 5 years ago |
Anton Romanov | db97892af2 | 5 years ago |
Anton Romanov | ff19001f1f | 5 years ago |
Anton Romanov | 2012a58fc2 | 5 years ago |
Anton Romanov | 9ba4476f80 | 5 years ago |
Anton Romanov | 098f70ede6 | 5 years ago |
Anton Romanov | d84b1fcbdc | 5 years ago |
Anton Romanov | b44bbaec75 | 5 years ago |
Anton Romanov | 436c15e727 | 5 years ago |
T-Midnight | e4f5bede2a | 5 years ago |
T-Midnight | 888fecf687 | 5 years ago |
T-Midnight | 51ed732ae8 | 5 years ago |
Anton Romanov | 18bb0b85ac | 5 years ago |
Anton Romanov | 615c70d12a | 5 years ago |
Artem.Arefev | 96d166d031 | 5 years ago |
Artem.Arefev | fb23f182de | 5 years ago |
Anton Romanov | f8c1e52ca4 | 5 years ago |
Anton Romanov | 59e52aaf4a | 5 years ago |
Anton Romanov | dc467ec72c | 5 years ago |
Artem.Arefev | 019ac6e0ad | 5 years ago |
Anton Romanov | 1ccec83390 | 5 years ago |
Artem.Arefev | 4104844b1e | 5 years ago |
Artem.Arefev | c0afabc37c | 5 years ago |
Anton Romanov | 624573a47a | 5 years ago |
T-Midnight | fddc15af5a | 5 years ago |
Artem.Arefev | bdb8fd8ce4 | 5 years ago |
T-Midnight | acd58005de | 5 years ago |
T-Midnight | 1ff38fc80e | 5 years ago |
T-Midnight | c77702704f | 5 years ago |
Anton Romanov | 44824e53b2 | 5 years ago |
Anton Romanov | bacd3827e3 | 5 years ago |
T-Midnight | 0cd8003dd7 | 5 years ago |
Васин Антон | bdff81d25e | 5 years ago |
Васин Антон | 482964fe53 | 5 years ago |
Васин Антон | dc52968ddf | 5 years ago |
Artem.Arefev | 22abf6a27d | 5 years ago |
Artem.Arefev | abea3c7dad | 5 years ago |
Семенова Мария | 23d4e5602f | 5 years ago |
a.vasin | bde4ac5f1c | 5 years ago |
Artem.Arefev | 3898dcf1c1 | 5 years ago |
Artem.Arefev | 2d230afa35 | 5 years ago |
a.vasin | db3252d822 | 5 years ago |
a.vasin | e6dc2abdd9 | 5 years ago |
a.vasin | ae8dc58a9d | 5 years ago |
a.vasin | 38478835fb | 5 years ago |
a.vasin | 7edb9d2aa3 | 5 years ago |
a.vasin | 961a6a318e | 5 years ago |
a.vasin | 267bd5b0f3 | 5 years ago |
a.vasin | a5ac2bcbc2 | 5 years ago |
a.vasin | 291f4e1e33 | 5 years ago |
Artem.Arefev | 53307c6add | 5 years ago |
Artem.Arefev | a405267092 | 5 years ago |
Васин Антон | 1224cc7a23 | 5 years ago |
Anton Romanov | a878f8c22c | 5 years ago |
Anton Romanov | d2ce6d604e | 5 years ago |
Anton Romanov | b4b7b9087e | 5 years ago |
a.vasin | a7b48e1534 | 5 years ago |
a.vasin | 9388302a47 | 5 years ago |
Artem.Arefev | e680aa30c4 | 5 years ago |
a.vasin | 4498b71259 | 5 years ago |
a.vasin | 632c6299b7 | 5 years ago |
a.vasin | 9013d79228 | 5 years ago |
a.vasin | 192adbfa0b | 5 years ago |
a.vasin | eb30d07d10 | 5 years ago |
a.vasin | eceb8ec528 | 5 years ago |
Anton Romanov | 330ffc4df1 | 5 years ago |
Васин Антон | 77ce908d58 | 5 years ago |
Васин Антон | 8ffafd6693 | 5 years ago |
Васин Антон | e967e2bfee | 5 years ago |
Васин Антон | c25392337a | 5 years ago |
a.vasin | 3b0a2dd964 | 5 years ago |
a.vasin | 8d1e410e83 | 5 years ago |
a.vasin | eb87c6d52f | 5 years ago |
Artem.Arefev | a35bcfce1b | 5 years ago |
Anton Romanov | 6258e7b6bf | 5 years ago |
Artem.Arefev | c4b35ddf6a | 5 years ago |
Васин Антон | 7388e12e3f | 5 years ago |
Васин Антон | 4bb4fd6bca | 5 years ago |
Васин Антон | 4eeb79ab80 | 5 years ago |
Anton Romanov | 336a16ff73 | 5 years ago |
Artem.Arefev | 0e7fdac980 | 5 years ago |
Artem.Arefev | 482e2b3595 | 5 years ago |
Anton Romanov | 2b911017b1 | 5 years ago |
Anton Romanov | 0cd3055176 | 5 years ago |
Anton Romanov | 280c39dae4 | 5 years ago |
Anton Romanov | 828d320e0f | 5 years ago |
Anton Romanov | 678397e970 | 5 years ago |
Anton Romanov | 916bbae414 | 5 years ago |
Anton Romanov | 477a9fd6ff | 5 years ago |
Anton Romanov | 59d6edb818 | 5 years ago |
Artem.Arefev | f4479c2ab7 | 5 years ago |
Artem.Arefev | 193b2b3a32 | 5 years ago |
Anton Romanov | 837a9f465c | 5 years ago |
Anton Romanov | eba3592410 | 5 years ago |
Семенова Мария | 22195813ae | 5 years ago |
Семенова Мария | 43e7b9fe1f | 5 years ago |
Anton Romanov | 308da4113d | 5 years ago |
Anton Romanov | c9ecae9842 | 5 years ago |
Anton Romanov | d4364b9767 | 5 years ago |
Artem.Arefev | 505a054cc8 | 5 years ago |
Artem.Arefev | 8bb9e3a844 | 5 years ago |
Artem.Arefev | 661da17f73 | 5 years ago |
Семенова Мария | 01bcac2680 | 5 years ago |
Семенова Мария | 421ed635e8 | 5 years ago |
Семенова Мария | 24a1276005 | 5 years ago |
Семенова Мария | 512a805e8c | 5 years ago |
ASH | ab17b9f152 | 5 years ago |
Anton Romanov | 181086c9db | 5 years ago |
ASH | 82e454a50b | 5 years ago |
Anton Romanov | c303d65c8d | 5 years ago |
Семенова Мария | 7c1b124c94 | 5 years ago |
Семенова Мария | 29cfadef02 | 5 years ago |
ASH | ef521123dd | 5 years ago |
Anton Romanov | 82ae42f7fc | 5 years ago |
Anton Romanov | af09938e66 | 5 years ago |
Anton Romanov | 1c8359f900 | 5 years ago |
T-Midnight | 47131f1fb7 | 5 years ago |
ASH | 284a3f51e9 | 5 years ago |
ASH | bd24525315 | 5 years ago |
T-Midnight | 3e9bbb3584 | 5 years ago |
T-Midnight | 16885cc94f | 5 years ago |
T-Midnight | b1c090b0ea | 5 years ago |
T-Midnight | ecda92326b | 5 years ago |
T-Midnight | 457f1da985 | 5 years ago |
T-Midnight | 5f214620bf | 5 years ago |
T-Midnight | c21739bfc6 | 5 years ago |
T-Midnight | bab621677e | 5 years ago |
Nightblade73 | 8b52518c4a | 5 years ago |
Artem.Arefev | d7c4e6b222 | 5 years ago |
T-Midnight | bb9f412480 | 5 years ago |
T-Midnight | c0e66e81a2 | 5 years ago |
T-Midnight | 1823c1ba50 | 5 years ago |
Artem.Arefev | e468646cd6 | 5 years ago |
Artem.Arefev | 90799356ab | 5 years ago |
Anton Romanov | 59bc0dbd34 | 5 years ago |
Anton Romanov | d076f35ff7 | 5 years ago |
Anton Romanov | 56f083e757 | 5 years ago |
Artem.Arefev | 532e007b0b | 5 years ago |
Anton Romanov | 3dbf635fb6 | 5 years ago |
Artem.Arefev | 3da374326b | 5 years ago |
Васин Антон | 4213524dbd | 5 years ago |
Васин Антон | f960d4de1b | 5 years ago |
Artem.Arefev | 740adc5318 | 5 years ago |
Artem.Arefev | b8281c527a | 5 years ago |
Artem.Arefev | 7163937a53 | 5 years ago |
Васин Антон | 097f7827b0 | 5 years ago |
Anton Romanov | 83aba158b6 | 5 years ago |
Васин Антон | 50314246f5 | 5 years ago |
Artem.Arefev | 76d3adb464 | 5 years ago |
Artem.Arefev | 64357c2508 | 5 years ago |
Artem.Arefev | 6a62e61caf | 5 years ago |
Artem.Arefev | b9748905d1 | 5 years ago |
Artem.Arefev | fbd618a6d0 | 5 years ago |
Artem.Arefev | 052e4a1aef | 5 years ago |
Artem.Arefev | 4fc8bc3717 | 5 years ago |
Artem.Arefev | 728fa42972 | 5 years ago |
Nightblade73 | dc34c7bfb7 | 5 years ago |
Nightblade73 | 5263393379 | 5 years ago |
Nightblade73 | 80de18d3ee | 5 years ago |
Nightblade73 | bde9cb51fb | 5 years ago |
Nightblade73 | c0937d721a | 5 years ago |
Nightblade73 | ce7b4c9c7a | 5 years ago |
Anton Romanov | 19a6b45cf9 | 5 years ago |
Artem.Arefev | c47d4f8a05 | 5 years ago |
Artem.Arefev | 33f62c04e7 | 5 years ago |
Artem.Arefev | d50673f5fa | 5 years ago |
Artem.Arefev | f8f501b8ff | 5 years ago |
ASH | cd1caa559e | 5 years ago |
ASH | bc9cca62d6 | 5 years ago |
Artem.Arefev | ca3159a66b | 5 years ago |
Artem.Arefev | 3226cc3971 | 5 years ago |
Artem.Arefev | 48a18a3a57 | 5 years ago |
Artem.Arefev | d88f67ce00 | 5 years ago |
Artem.Arefev | 11ef644e5e | 5 years ago |
Nightblade73 | 1e06edfcc0 | 5 years ago |
Nightblade73 | 7952787229 | 5 years ago |
Nightblade73 | 00c5d5f755 | 5 years ago |
Artem.Arefev | 3d02f551cc | 5 years ago |
Artem.Arefev | 95fc9da47d | 5 years ago |
Nightblade73 | 11cab955b4 | 5 years ago |
Nightblade73 | c88c77cd7d | 5 years ago |
Nightblade73 | 1c5c05b5e4 | 5 years ago |
Nightblade73 | e6cb991463 | 5 years ago |
Nightblade73 | a8d987b01f | 5 years ago |
Nightblade73 | 3a9fde3404 | 5 years ago |
Nightblade73 | 9da5fd8a7a | 5 years ago |
Anton Romanov | 51851baa48 | 5 years ago |
Anton Romanov | 10a9bd7a28 | 5 years ago |
Nightblade73 | 58a8495835 | 5 years ago |
Nightblade73 | ab59cb524e | 5 years ago |
Nightblade73 | 1f8722e3ff | 5 years ago |
Nightblade73 | 6044d6f8e3 | 5 years ago |
Anton Romanov | a3afdeb988 | 5 years ago |
Anton Romanov | aaa21d591d | 5 years ago |
T-Midnight | f6830d499b | 5 years ago |
T-Midnight | 99ec7af319 | 5 years ago |
T-Midnight | e1907d3169 | 5 years ago |
Nightblade73 | 451e7e5d04 | 5 years ago |
Nightblade73 | 5cbbb6c319 | 5 years ago |
Nightblade73 | 70062992ae | 5 years ago |
Nightblade73 | fe53c86136 | 5 years ago |
ASH | 5b4180e685 | 5 years ago |
ASH | a11e10dec4 | 5 years ago |
Nightblade73 | d846192046 | 5 years ago |
ASH | 7798508d4f | 5 years ago |
ASH | c59bb45c70 | 5 years ago |
ASH | 0de34c89fe | 5 years ago |
Nightblade73 | b2e8a43cee | 5 years ago |
Nightblade73 | 3f32a61ed2 | 5 years ago |
Nightblade73 | 6edcf8f594 | 5 years ago |
Nightblade73 | 4686406954 | 5 years ago |
Nightblade73 | 4e4e7ae194 | 5 years ago |
Nightblade73 | cad8682088 | 5 years ago |
Nightblade73 | d9a4224317 | 5 years ago |
Nightblade73 | 7b4318a3b5 | 5 years ago |
Nightblade73 | 0cb7b05c25 | 5 years ago |
Nightblade73 | 253f4b4aad | 5 years ago |
Nightblade73 | 1ad66d6fb1 | 5 years ago |
Nightblade73 | 961fdf9397 | 5 years ago |
Anton Romanov | ff7f535980 | 5 years ago |
T-Midnight | 77e2ad0651 | 5 years ago |
T-Midnight | 74a8dcbd8a | 5 years ago |
T-Midnight | 4262446aef | 5 years ago |
T-Midnight | b640dea99a | 5 years ago |
T-Midnight | 2d9fd05060 | 5 years ago |
Nightblade73 | b57142e28f | 5 years ago |
T-Midnight | e3ad5ba510 | 5 years ago |
Anton Romanov | 09aa3d0084 | 5 years ago |
Anton Romanov | 662847698e | 5 years ago |
Семенова Мария | 2fba252df0 | 5 years ago |
T-Midnight | 7ffe04f1db | 5 years ago |
T-Midnight | d244437858 | 5 years ago |
T-Midnight | 934d194df1 | 5 years ago |
Семенова Мария | 1e07c5424d | 5 years ago |
Семенова Мария | dffd839905 | 5 years ago |
Васин Антон | 279cc0e18a | 5 years ago |
Васин Антон | b1e101c940 | 5 years ago |
T-Midnight | 2dae39a100 | 5 years ago |
Васин Антон | 241c489b21 | 5 years ago |
Васин Антон | 52ae197f34 | 5 years ago |
Васин Антон | 4025aa67ca | 5 years ago |
ASH | 65dea9bce2 | 5 years ago |
Васин Антон | 4bab980f62 | 5 years ago |
Васин Антон | ee55e08fee | 5 years ago |
Васин Антон | 82ab40a608 | 5 years ago |
Anton Romanov | 2dff183662 | 5 years ago |
T-Midnight | da382b659a | 5 years ago |
T-Midnight | 114f6769ac | 5 years ago |
T-Midnight | beb334f2fa | 5 years ago |
Anton Romanov | 68737b976f | 5 years ago |
Anton Romanov | 6eed8591b4 | 5 years ago |
T-Midnight | 74d43dcd0d | 5 years ago |
T-Midnight | 0955388f27 | 5 years ago |
T-Midnight | de625923e9 | 5 years ago |
T-Midnight | b334b5d70e | 5 years ago |
T-Midnight | 8b333ab3a6 | 5 years ago |
Nightblade73 | 6350e1c0d6 | 5 years ago |
Nightblade73 | 6820c617f3 | 5 years ago |
Nightblade73 | 60bdd9d233 | 5 years ago |
T-Midnight | c8cfde67a9 | 5 years ago |
Anton Romanov | a6f2177179 | 5 years ago |
T-Midnight | 1f6d15b74b | 5 years ago |
T-Midnight | a69a257f09 | 5 years ago |
T-Midnight | 6442a67ff1 | 5 years ago |
T-Midnight | 2ebd61016d | 5 years ago |
ASH | 7ce8b20841 | 5 years ago |
Nightblade73 | 0e062f1337 | 5 years ago |
Nightblade73 | 9edcf35338 | 5 years ago |
Васин Антон | 5c677a975c | 5 years ago |
Васин Антон | 83f3f7d6b9 | 5 years ago |
ASH | b4c11a7f90 | 5 years ago |
Nightblade73 | 0e8752e460 | 5 years ago |
Nightblade73 | e178cd1639 | 5 years ago |
T-Midnight | 9cf002ad95 | 5 years ago |
T-Midnight | 39f3c69479 | 5 years ago |
Nightblade73 | dbcdb96dbf | 5 years ago |
Anton Romanov | a352f561fa | 5 years ago |
Васин Антон | b2d4d52675 | 5 years ago |
Семенова Мария | a8fbf98d85 | 5 years ago |
Nightblade73 | 51877023d1 | 5 years ago |
Anton Romanov | 1fe2f5469b | 5 years ago |
T-Midnight | 51e121ae24 | 5 years ago |
Семенова Мария | 8f3e3fd9a7 | 5 years ago |
Семенова Мария | 71ec7bb726 | 5 years ago |
Nightblade73 | 34925b81ff | 5 years ago |
Nightblade73 | 16e9bf1fb5 | 5 years ago |
Nightblade73 | c489ebbf91 | 5 years ago |
Anton Romanov | 88ec35faa0 | 5 years ago |
Anton Romanov | fc94ea1f26 | 5 years ago |
T-Midnight | 7853496048 | 5 years ago |
T-Midnight | 2bb5189fff | 5 years ago |
T-Midnight | 4fa0c14ae6 | 5 years ago |
T-Midnight | 7c5a0826c5 | 5 years ago |
T-Midnight | 8ced83ad2b | 5 years ago |
Nightblade73 | bc73265109 | 5 years ago |
Nightblade73 | b77619777e | 5 years ago |
Nightblade73 | 70d260c34b | 5 years ago |
Nightblade73 | d4b514a9b0 | 5 years ago |
Nightblade73 | d921def09d | 5 years ago |
Nightblade73 | f556b969b4 | 5 years ago |
Nightblade73 | b16b3ed2e3 | 5 years ago |
Nightblade73 | 5bff419dbd | 5 years ago |
Anton Romanov | 4dd0a6c210 | 5 years ago |
Anton Romanov | bb2518e5f4 | 5 years ago |
Anton Romanov | 1e6fbdc1fa | 5 years ago |
Anton Romanov | 54c6fe815d | 5 years ago |
Nightblade73 | d37c9bda57 | 5 years ago |
Nightblade73 | fe55890518 | 5 years ago |
Nightblade73 | 7eb5dce94e | 5 years ago |
ASH | 7248a84c30 | 5 years ago |
Васин Антон | 02d643727e | 5 years ago |
Васин Антон | 50a0f8aa78 | 5 years ago |
Васин Антон | 2418e953be | 5 years ago |
Васин Антон | e32da7c7c2 | 5 years ago |
Anton Romanov | 3aea19088d | 5 years ago |
Anton Romanov | 8f2f6adc3b | 5 years ago |
T-Midnight | c18ecea13b | 5 years ago |
T-Midnight | bf515a3fcb | 5 years ago |
Васин Антон | 2d6de6b535 | 5 years ago |
Anton Romanov | 39f44403c1 | 5 years ago |
Васин Антон | 2f3c1addbb | 5 years ago |
Васин Антон | c78ea05255 | 5 years ago |
T-Midnight | 26969dba5b | 5 years ago |
T-Midnight | 6df1a87367 | 5 years ago |
T-Midnight | 546b0dc323 | 5 years ago |
Васин Антон | 41bd00d645 | 5 years ago |
Nightblade73 | 6d6ea3136d | 5 years ago |
Васин Антон | 70920cc612 | 5 years ago |
T-Midnight | d3b8be2cf1 | 5 years ago |
ASH | 3698d31bc8 | 5 years ago |
Nightblade73 | 53cc777734 | 5 years ago |
Nightblade73 | 2767403128 | 5 years ago |
Nightblade73 | 5bfeaff054 | 5 years ago |
ASH | 6876d09557 | 5 years ago |
ASH | 8400c5d40d | 5 years ago |
T-Midnight | eec739a49f | 5 years ago |
T-Midnight | f29d31b840 | 5 years ago |
ASH | 7bec7b4e44 | 5 years ago |
ASH | 59887e5141 | 5 years ago |
ASH | 9da227ab34 | 5 years ago |
Васин Антон | 6469ddcd42 | 5 years ago |
Васин Антон | 92a0674b95 | 5 years ago |
Васин Антон | 8fbce55028 | 5 years ago |
@ -0,0 +1,19 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh "./gradlew clean test --info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (currentBuild.currentResult == 'FAILURE') {
|
||||||
|
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "a.romanov@ulstu.ru", sendToIndividuals: true])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,19 +1,36 @@
|
|||||||
package ru.ulstu.conference.repository;
|
package ru.ulstu.conference.repository;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
import ru.ulstu.conference.model.Conference;
|
import ru.ulstu.conference.model.Conference;
|
||||||
|
import ru.ulstu.name.BaseRepository;
|
||||||
import ru.ulstu.user.model.User;
|
import ru.ulstu.user.model.User;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ConferenceRepository extends JpaRepository<Conference, Integer> {
|
public interface ConferenceRepository extends JpaRepository<Conference, Integer>, BaseRepository {
|
||||||
@Query("SELECT c FROM Conference c LEFT JOIN c.users u WHERE (:user IS NULL OR u.user = :user) " +
|
@Query("SELECT c FROM Conference c LEFT JOIN c.users u WHERE (:user IS NULL OR u.user = :user) " +
|
||||||
"AND (YEAR(c.beginDate) = :year OR :year IS NULL) ORDER BY begin_date DESC")
|
"AND (YEAR(c.beginDate) = :year OR :year IS NULL) ORDER BY c.beginDate DESC")
|
||||||
List<Conference> findByUserAndYear(@Param("user") User user, @Param("year") Integer year);
|
List<Conference> findByUserAndYear(@Param("user") User user, @Param("year") Integer year);
|
||||||
|
|
||||||
@Query("SELECT c FROM Conference c WHERE c.beginDate > :date")
|
@Query("SELECT c FROM Conference c WHERE c.beginDate > :date")
|
||||||
List<Conference> findAllActive(@Param("date") Date date);
|
List<Conference> findAllActive(@Param("date") Date date);
|
||||||
|
|
||||||
|
@Query("SELECT case when count(c) > 0 then true else false end FROM Conference c JOIN c.papers p WHERE p.id = :paperId")
|
||||||
|
boolean isPaperAttached(@Param("paperId") Integer paperId);
|
||||||
|
|
||||||
|
@Modifying
|
||||||
|
@Query("UPDATE Conference c SET c.ping = (c.ping + 1) WHERE c.id = :id")
|
||||||
|
int updatePingConference(@Param("id") Integer id);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Query("SELECT title FROM Conference c WHERE (c.title = :name) AND (:id IS NULL OR c.id != :id) ")
|
||||||
|
List<String> findByNameAndNotId(@Param("name") String name, @Param("id") Integer id);
|
||||||
|
|
||||||
|
@Query("SELECT c FROM Conference c LEFT JOIN c.users u WHERE (:user IS NULL OR u.user = :user) " +
|
||||||
|
"AND (u.participation = 'INTRAMURAL') AND (c.beginDate <= CURRENT_DATE) AND (c.endDate >= CURRENT_DATE)")
|
||||||
|
Conference findActiveByUser(@Param("user") User user);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,112 @@
|
|||||||
package ru.ulstu.conference.service;
|
package ru.ulstu.conference.service;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import ru.ulstu.conference.model.Conference;
|
||||||
|
import ru.ulstu.core.util.DateUtils;
|
||||||
|
import ru.ulstu.ping.service.PingService;
|
||||||
|
import ru.ulstu.user.service.MailService;
|
||||||
|
import ru.ulstu.user.service.UserService;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ConferenceNotificationService {
|
public class ConferenceNotificationService {
|
||||||
|
|
||||||
|
private final static int YESTERDAY = -1;
|
||||||
|
private final static int DAYS_TO_DEADLINE_NOTIFICATION = 7;
|
||||||
|
private final static String TEMPLATE_PING = "conferencePingNotification";
|
||||||
|
private final static String TEMPLATE_DEADLINE = "conferenceDeadlineNotification";
|
||||||
|
private final static String TEMPLATE_CREATE = "conferenceCreateNotification";
|
||||||
|
private final static String TEMPLATE_UPDATE_DEADLINES = "conferenceUpdateDeadlinesNotification";
|
||||||
|
private final static String TEMPLATE_UPDATE_DATES = "conferenceUpdateDatesNotification";
|
||||||
|
|
||||||
|
private final static String TITLE_PING = "Обратите внимание на конференцию: %s";
|
||||||
|
private final static String TITLE_DEADLINE = "Приближается дедлайн конференции: %s";
|
||||||
|
private final static String TITLE_CREATE = "Создана новая конференция: %s";
|
||||||
|
private final static String TITLE_UPDATE_DEADLINES = "Изменения дедлайнов в конференции: %s";
|
||||||
|
private final static String TITLE_UPDATE_DATES = "Изменение дат проведения конференции: %s";
|
||||||
|
|
||||||
|
private final MailService mailService;
|
||||||
|
private final UserService userService;
|
||||||
|
private final PingService pingService;
|
||||||
|
|
||||||
|
public ConferenceNotificationService(MailService mailService,
|
||||||
|
UserService userService,
|
||||||
|
PingService pingService) {
|
||||||
|
this.mailService = mailService;
|
||||||
|
this.userService = userService;
|
||||||
|
this.pingService = pingService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendDeadlineNotifications(List<Conference> conferences) {
|
||||||
|
Date now = DateUtils.addDays(new Date(), DAYS_TO_DEADLINE_NOTIFICATION);
|
||||||
|
conferences
|
||||||
|
.stream()
|
||||||
|
.filter(conference -> needToSendDeadlineNotification(conference, now))
|
||||||
|
.forEach(this::sendMessageDeadline);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean needToSendDeadlineNotification(Conference conference, Date compareDate) {
|
||||||
|
return (conference.getNextDeadline().isPresent())
|
||||||
|
&& conference.getNextDeadline().get().getDate().after(new Date())
|
||||||
|
&& conference.getNextDeadline().get().getDate().before(compareDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendMessageDeadline(Conference conference) {
|
||||||
|
Map<String, Object> variables = Map.of("conference", conference);
|
||||||
|
sendForAllParticipants(variables, conference, TEMPLATE_DEADLINE, String.format(TITLE_DEADLINE, conference.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCreateNotification(Conference conference) {
|
||||||
|
Map<String, Object> variables = Map.of("conference", conference);
|
||||||
|
sendForAllUsers(variables, String.format(TITLE_CREATE, conference.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateDeadlineNotification(Conference conference) {
|
||||||
|
Map<String, Object> variables = Map.of("conference", conference);
|
||||||
|
sendForAllParticipants(variables, conference, TEMPLATE_UPDATE_DEADLINES, String.format(TITLE_UPDATE_DEADLINES, conference.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateConferencesDatesNotification(Conference conference, Date oldBeginDate, Date oldEndDate) {
|
||||||
|
Map<String, Object> variables = Map.of("conference", conference, "oldBeginDate", oldBeginDate, "oldEndDate", oldEndDate);
|
||||||
|
sendForAllParticipants(variables, conference, TEMPLATE_UPDATE_DATES, String.format(TITLE_UPDATE_DATES, conference.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendForAllUsers(Map<String, Object> variables, String title) {
|
||||||
|
userService.findAll().forEach(user -> mailService.sendEmailFromTemplate(variables, user, ConferenceNotificationService.TEMPLATE_CREATE, title));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendForAllParticipants(Map<String, Object> variables, Conference conference, String template, String title) {
|
||||||
|
conference.getUsers().forEach(conferenceUser -> mailService.sendEmailFromTemplate(variables, conferenceUser.getUser(), template, title));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void sendPingNotifications(List<Conference> conferences) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(new Date());
|
||||||
|
calendar.add(Calendar.DAY_OF_MONTH, YESTERDAY);
|
||||||
|
conferences
|
||||||
|
.stream()
|
||||||
|
.filter(conference -> {
|
||||||
|
Integer pingCount = pingService.countPingYesterday(conference, calendar);
|
||||||
|
return needToSendPingNotification(conference, pingCount);
|
||||||
|
})
|
||||||
|
.forEach(this::sendMessagePing);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean needToSendPingNotification(Conference conference, Integer pingCount) {
|
||||||
|
if (pingCount > 0) {
|
||||||
|
conference.setPing((Integer) pingCount);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendMessagePing(Conference conference) {
|
||||||
|
Map<String, Object> variables = Map.of("conference", conference);
|
||||||
|
sendForAllParticipants(variables, conference, TEMPLATE_PING, String.format(TITLE_PING, conference.getTitle()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package ru.ulstu.conference.service;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ConferenceScheduler {
|
||||||
|
private final static boolean IS_DEADLINE_NOTIFICATION_BEFORE_WEEK = true;
|
||||||
|
|
||||||
|
private final Logger log = LoggerFactory.getLogger(ConferenceScheduler.class);
|
||||||
|
|
||||||
|
private final ConferenceNotificationService conferenceNotificationService;
|
||||||
|
private final ConferenceService conferenceService;
|
||||||
|
|
||||||
|
public ConferenceScheduler(ConferenceNotificationService conferenceNotificationService,
|
||||||
|
ConferenceService conferenceService) {
|
||||||
|
this.conferenceNotificationService = conferenceNotificationService;
|
||||||
|
this.conferenceService = conferenceService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 8 * * MON", zone = "Europe/Samara")
|
||||||
|
public void checkDeadlineBeforeWeek() {
|
||||||
|
log.debug("ConferenceScheduler.checkDeadlineBeforeWeek started");
|
||||||
|
conferenceNotificationService.sendDeadlineNotifications(conferenceService.findAll());
|
||||||
|
log.debug("ConferenceScheduler.checkDeadlineBeforeWeek finished");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 8 * * *", zone = "Europe/Samara")
|
||||||
|
public void checkNewPing() {
|
||||||
|
log.debug("ConferenceScheduler.checkPing started");
|
||||||
|
conferenceNotificationService.sendPingNotifications(conferenceService.findAll());
|
||||||
|
log.debug("ConferenceScheduler.checkPing finished");
|
||||||
|
}
|
||||||
|
}
|
@ -1,30 +0,0 @@
|
|||||||
package ru.ulstu.configuration;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.server.ServerConnector;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
|
|
||||||
import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
|
|
||||||
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
|
|
||||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class HttpListenerConfiguration implements WebServerFactoryCustomizer<ConfigurableWebServerFactory> {
|
|
||||||
@Value("${server.http.port}")
|
|
||||||
private int httpPort;
|
|
||||||
|
|
||||||
private void configureJetty(JettyServletWebServerFactory jettyFactory) {
|
|
||||||
jettyFactory.addServerCustomizers((JettyServerCustomizer) server -> {
|
|
||||||
ServerConnector serverConnector = new ServerConnector(server);
|
|
||||||
serverConnector.setPort(httpPort);
|
|
||||||
server.addConnector(serverConnector);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void customize(ConfigurableWebServerFactory factory) {
|
|
||||||
if (factory instanceof JettyServletWebServerFactory) {
|
|
||||||
configureJetty((JettyServletWebServerFactory) factory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package ru.ulstu.configuration;
|
|
||||||
|
|
||||||
import com.google.common.base.Predicates;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import springfox.documentation.builders.PathSelectors;
|
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
|
||||||
import springfox.documentation.spi.DocumentationType;
|
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableSwagger2
|
|
||||||
public class SwaggerConfiguration {
|
|
||||||
@Bean
|
|
||||||
public Docket swaggerApi() {
|
|
||||||
return new Docket(DocumentationType.SWAGGER_2)
|
|
||||||
.select()
|
|
||||||
.apis(RequestHandlerSelectors.any())
|
|
||||||
.paths(Predicates.not(PathSelectors.regex("/error")))
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,21 @@
|
|||||||
|
package ru.ulstu.core.model;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.core.AuthenticationException;
|
||||||
|
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.ulstu.user.error.UserBlockedException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class AuthFailureHandler implements AuthenticationFailureHandler {
|
||||||
|
@Override
|
||||||
|
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
|
||||||
|
AuthenticationException ex) throws IOException {
|
||||||
|
if (ex.getClass() == UserBlockedException.class) {
|
||||||
|
response.sendRedirect("/users/block");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package ru.ulstu.core.model;
|
||||||
|
|
||||||
|
import ru.ulstu.deadline.model.Deadline;
|
||||||
|
import ru.ulstu.timeline.model.Event;
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface EventSource {
|
||||||
|
List<Deadline> getDeadlines();
|
||||||
|
|
||||||
|
String getTitle();
|
||||||
|
|
||||||
|
List<User> getRecipients();
|
||||||
|
|
||||||
|
void addObjectToEvent(Event event);
|
||||||
|
}
|
@ -1,34 +0,0 @@
|
|||||||
package ru.ulstu.core.model;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class TreeDto {
|
|
||||||
private Integer id;
|
|
||||||
private String text;
|
|
||||||
private List<TreeDto> children = new ArrayList<>();
|
|
||||||
|
|
||||||
public TreeDto() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public <T extends TreeEntity> TreeDto(TreeEntity item) {
|
|
||||||
this.text = item.toString();
|
|
||||||
this.id = item.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public TreeDto(String rootName) {
|
|
||||||
this.text = rootName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TreeDto> getChildren() {
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
package ru.ulstu.core.model;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface TreeEntity<T> {
|
|
||||||
|
|
||||||
Integer getId();
|
|
||||||
|
|
||||||
List<T> getChildren();
|
|
||||||
|
|
||||||
void setChildren(List<T> children);
|
|
||||||
|
|
||||||
T getParent();
|
|
||||||
|
|
||||||
void setParent(T parent);
|
|
||||||
}
|
|
@ -0,0 +1,11 @@
|
|||||||
|
package ru.ulstu.core.model;
|
||||||
|
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public interface UserActivity {
|
||||||
|
String getTitle();
|
||||||
|
|
||||||
|
Set<User> getActivityUsers();
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
package ru.ulstu.core.model;
|
|
||||||
|
|
||||||
import ru.ulstu.user.model.User;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public interface UserContainer {
|
|
||||||
Set<User> getUsers();
|
|
||||||
}
|
|
@ -0,0 +1,69 @@
|
|||||||
|
package ru.ulstu.core.navigation;
|
||||||
|
|
||||||
|
public class Page {
|
||||||
|
public static final String INDEX = "/index.html";
|
||||||
|
public static final String PAPER = "/paper/paper.html";
|
||||||
|
public static final String PAPER_LIST = "/paper/papers.html";
|
||||||
|
public static final String PAPER_DASHBOARD = "/paper/dashboard.html";
|
||||||
|
public static final String GRANT = "/grant/grant.html";
|
||||||
|
public static final String GRANT_LIST = "/grant/grants.html";
|
||||||
|
public static final String GRANT_DASHBOARD = "/grant/dashboard.html";
|
||||||
|
public static final String USER_LIST = "/admin/users.html";
|
||||||
|
public static final String LOGOUT = "/logout";
|
||||||
|
public static final String CONFERENCE = "/conference/conference.html";
|
||||||
|
public static final String CONFERENCE_DASHBOARD = "/conference/dashboard.html";
|
||||||
|
public static final String CONFERENCE_LIST = "/conference/conferences.html";
|
||||||
|
public static final String PROJECT_DASHBOARD = "/conference/dashboard.html";
|
||||||
|
|
||||||
|
public String getIndex() {
|
||||||
|
return INDEX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaperList() {
|
||||||
|
return PAPER_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaperDashboard() {
|
||||||
|
return PAPER_DASHBOARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserList() {
|
||||||
|
return USER_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogout() {
|
||||||
|
return LOGOUT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrantList() {
|
||||||
|
return GRANT_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrantDashboard() {
|
||||||
|
return GRANT_DASHBOARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaper() {
|
||||||
|
return PAPER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrant() {
|
||||||
|
return GRANT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConferenceDashboard() {
|
||||||
|
return CONFERENCE_DASHBOARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProjectDashboard() {
|
||||||
|
return PROJECT_DASHBOARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConference() {
|
||||||
|
return CONFERENCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConferenceList() {
|
||||||
|
return CONFERENCE_LIST;
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
package ru.ulstu.core.util;
|
|
||||||
|
|
||||||
public class NumberUtils {
|
|
||||||
public static Double ceil(Double number) {
|
|
||||||
if (number == null) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
return Double.valueOf(Math.ceil(number));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Double round(Double number) {
|
|
||||||
if (number == null) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
return Double.valueOf(Math.ceil(number * 100)) / 100;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,29 @@
|
|||||||
|
package ru.ulstu.grant.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import ru.ulstu.configuration.Constants;
|
||||||
|
import ru.ulstu.grant.service.GrantService;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
|
||||||
|
import static ru.ulstu.paper.controller.PaperRestController.URL;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(URL)
|
||||||
|
public class GrantRestController {
|
||||||
|
public static final String URL = Constants.API_1_0 + "grants";
|
||||||
|
|
||||||
|
private final GrantService grantService;
|
||||||
|
|
||||||
|
public GrantRestController(GrantService grantService) {
|
||||||
|
this.grantService = grantService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/grab")
|
||||||
|
public void grab() throws IOException, ParseException {
|
||||||
|
grantService.createFromKias();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package ru.ulstu.grant.page;
|
||||||
|
|
||||||
|
import com.gargoylesoftware.htmlunit.html.DomNode;
|
||||||
|
import com.gargoylesoftware.htmlunit.html.HtmlElement;
|
||||||
|
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||||
|
import com.gargoylesoftware.htmlunit.html.HtmlTableRow;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class KiasPage {
|
||||||
|
private final static String KIAS_GRANT_DATE_FORMAT = "dd.MM.yyyy HH:mm";
|
||||||
|
private final HtmlPage page;
|
||||||
|
|
||||||
|
public KiasPage(HtmlPage page) {
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean goToNextPage() {
|
||||||
|
try {
|
||||||
|
HtmlElement nextPageLink = page.getHtmlElementById("js-ctrlNext");
|
||||||
|
if (nextPageLink.isDisplayed()) {
|
||||||
|
nextPageLink.click();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DomNode> getPageOfGrants() {
|
||||||
|
return page.getByXPath("/html/body/div[2]/div/div[2]/main/div[1]/table/tbody/tr");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrantTitle(DomNode grant) {
|
||||||
|
return ((DomNode) grant.getFirstByXPath("td[2]")).getTextContent() + " "
|
||||||
|
+ ((DomNode) grant.getFirstByXPath("td[@class='tertiary']/a")).getTextContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date parseDeadLineDate(DomNode grantElement) throws ParseException {
|
||||||
|
String deadlineDate = getFirstDeadline(grantElement); //10.06.2019 23:59
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat(KIAS_GRANT_DATE_FORMAT);
|
||||||
|
return formatter.parse(deadlineDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFirstDeadline(DomNode grantElement) {
|
||||||
|
return ((DomNode) grantElement.getFirstByXPath("td[5]")).getTextContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTableRowGrantLine(DomNode grantElement) {
|
||||||
|
return !((HtmlTableRow) grantElement).getAttribute("class").contains("pagerSavedHeightSpacer");
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,25 @@
|
|||||||
package ru.ulstu.grant.repository;
|
package ru.ulstu.grant.repository;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
import ru.ulstu.grant.model.Grant;
|
import ru.ulstu.grant.model.Grant;
|
||||||
|
import ru.ulstu.name.BaseRepository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface GrantRepository extends JpaRepository<Grant, Integer> {
|
public interface GrantRepository extends JpaRepository<Grant, Integer>, BaseRepository {
|
||||||
|
|
||||||
List<Grant> findByStatus(Grant.GrantStatus status);
|
List<Grant> findByStatus(Grant.GrantStatus status);
|
||||||
|
|
||||||
|
Grant findFirstByTitle(String title);
|
||||||
|
|
||||||
|
Grant findGrantById(Integer grantId);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Query("SELECT title FROM Grant g WHERE (g.title = :name) AND (:id IS NULL OR g.id != :id) ")
|
||||||
|
List<String> findByNameAndNotId(@Param("name") String name, @Param("id") Integer id);
|
||||||
|
|
||||||
|
@Query("SELECT g FROM Grant g WHERE (g.status <> 'SKIPPED') AND (g.status <> 'COMPLETED')")
|
||||||
|
List<Grant> findAllActive();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
package ru.ulstu.grant.service;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import ru.ulstu.core.util.DateUtils;
|
||||||
|
import ru.ulstu.grant.model.Grant;
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
import ru.ulstu.user.service.MailService;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class GrantNotificationService {
|
||||||
|
private final static int DAYS_TO_DEADLINE_NOTIFICATION = 7;
|
||||||
|
private final static String TEMPLATE_DEADLINE = "grantDeadlineNotification";
|
||||||
|
private final static String TEMPLATE_CREATE = "grantCreateNotification";
|
||||||
|
private final static String TEMPLATE_AUTHORS_CHANGED = "grantAuthorsChangeNotification";
|
||||||
|
private final static String TEMPLATE_LEADER_CHANGED = "grantLeaderChangeNotification";
|
||||||
|
|
||||||
|
private final static String TITLE_DEADLINE = "Приближается дедлайн гранта: %s";
|
||||||
|
private final static String TITLE_CREATE = "Создан грант: %s";
|
||||||
|
private final static String TITLE_AUTHORS_CHANGED = "Изменился состав рабочей группы гранта: %s";
|
||||||
|
private final static String TITLE_LEADER_CHANGED = "Изменился руководитель гранта: %s";
|
||||||
|
|
||||||
|
private final MailService mailService;
|
||||||
|
|
||||||
|
public GrantNotificationService(MailService mailService) {
|
||||||
|
this.mailService = mailService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendDeadlineNotifications(List<Grant> grants, boolean isDeadlineBeforeWeek) {
|
||||||
|
Date now = DateUtils.addDays(new Date(), DAYS_TO_DEADLINE_NOTIFICATION);
|
||||||
|
grants.stream()
|
||||||
|
.filter(grant -> needToSendDeadlineNotification(grant, now, isDeadlineBeforeWeek))
|
||||||
|
.forEach(grant -> sendMessageDeadline(grant));
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean needToSendDeadlineNotification(Grant grant, Date compareDate, boolean isDeadlineBeforeWeek) {
|
||||||
|
return (grant.getNextDeadline().isPresent())
|
||||||
|
&& (compareDate.before(grant.getNextDeadline().get().getDate()) && isDeadlineBeforeWeek
|
||||||
|
|| compareDate.after(grant.getNextDeadline().get().getDate()) && !isDeadlineBeforeWeek)
|
||||||
|
&& grant.getNextDeadline().get().getDate().after(new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendMessageDeadline(Grant grant) {
|
||||||
|
Map<String, Object> variables = Map.of("grant", grant);
|
||||||
|
sendForAllAuthors(variables, grant, TEMPLATE_DEADLINE, String.format(TITLE_DEADLINE, grant.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCreateNotification(Grant grant) {
|
||||||
|
Map<String, Object> variables = Map.of("grant", grant);
|
||||||
|
sendForAllAuthors(variables, grant, TEMPLATE_CREATE, String.format(TITLE_CREATE, grant.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendAuthorsChangeNotification(Grant grant, Set<User> oldAuthors) {
|
||||||
|
Map<String, Object> variables = Map.of("grant", grant, "oldAuthors", oldAuthors);
|
||||||
|
sendForAllAuthors(variables, grant, TEMPLATE_AUTHORS_CHANGED, String.format(TITLE_AUTHORS_CHANGED, grant.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendLeaderChangeNotification(Grant grant, User oldLeader) {
|
||||||
|
Map<String, Object> variables = Map.of("grant", grant, "oldLeader", oldLeader);
|
||||||
|
sendForAllAuthors(variables, grant, TEMPLATE_LEADER_CHANGED, String.format(TITLE_LEADER_CHANGED, grant.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendForAllAuthors(Map<String, Object> variables, Grant grant, String template, String title) {
|
||||||
|
Set<User> allAuthors = grant.getAuthors();
|
||||||
|
allAuthors.forEach(author -> mailService.sendEmailFromTemplate(variables, author, template, title));
|
||||||
|
mailService.sendEmailFromTemplate(variables, grant.getLeader(), template, title);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package ru.ulstu.grant.service;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class GrantScheduler {
|
||||||
|
private final static boolean IS_DEADLINE_NOTIFICATION_BEFORE_WEEK = true;
|
||||||
|
|
||||||
|
private final Logger log = LoggerFactory.getLogger(GrantScheduler.class);
|
||||||
|
|
||||||
|
private final GrantNotificationService grantNotificationService;
|
||||||
|
private final GrantService grantService;
|
||||||
|
|
||||||
|
public GrantScheduler(GrantNotificationService grantNotificationService,
|
||||||
|
GrantService grantService) {
|
||||||
|
this.grantNotificationService = grantNotificationService;
|
||||||
|
this.grantService = grantService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 8 * * MON", zone = "Europe/Samara")
|
||||||
|
public void checkDeadlineBeforeWeek() {
|
||||||
|
log.debug("GrantScheduler.checkDeadlineBeforeWeek started");
|
||||||
|
grantNotificationService.sendDeadlineNotifications(grantService.findAllActive(), IS_DEADLINE_NOTIFICATION_BEFORE_WEEK);
|
||||||
|
log.debug("GrantScheduler.checkDeadlineBeforeWeek finished");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 8 * * ?", zone = "Europe/Samara")
|
||||||
|
public void loadGrantsFromKias() {
|
||||||
|
log.debug("GrantScheduler.loadGrantsFromKias started");
|
||||||
|
// try {
|
||||||
|
// grantService.createFromKias();
|
||||||
|
// } catch (ParseException | IOException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
log.debug("GrantScheduler.loadGrantsFromKias finished");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package ru.ulstu.index.model;
|
||||||
|
|
||||||
|
public class Section {
|
||||||
|
private final String title;
|
||||||
|
private final String image;
|
||||||
|
private final String href;
|
||||||
|
|
||||||
|
public Section(String title, String href, String image) {
|
||||||
|
this.title = title;
|
||||||
|
this.image = image;
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package ru.ulstu.name;
|
||||||
|
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface BaseRepository {
|
||||||
|
List<String> findByNameAndNotId(@Param("name") String name, @Param("id") Integer id);
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package ru.ulstu.name;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.Errors;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public abstract class BaseService {
|
||||||
|
|
||||||
|
public BaseRepository baseRepository;
|
||||||
|
|
||||||
|
protected void checkUniqueName(NameContainer nameContainer, Errors errors, Integer id, String errorMessage) {
|
||||||
|
if (nameContainer.getName().equals(getUnique(baseRepository.findByNameAndNotId(nameContainer.getName(), id)))) {
|
||||||
|
errors.rejectValue("title", "errorCode", errorMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String checkUniqueName(NameContainer nameContainer, Integer id) {
|
||||||
|
String foundName = getUnique(baseRepository.findByNameAndNotId(nameContainer.getName(), id));
|
||||||
|
if (nameContainer.getName().equals(foundName)) {
|
||||||
|
return foundName;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getUnique(List<String> names) {
|
||||||
|
return Optional.ofNullable(names)
|
||||||
|
.orElse(new ArrayList<>())
|
||||||
|
.stream()
|
||||||
|
.findAny()
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package ru.ulstu.name;
|
||||||
|
|
||||||
|
public abstract class NameContainer {
|
||||||
|
|
||||||
|
private String name = "";
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
package ru.ulstu.odinexample.controller;
|
|
||||||
|
|
||||||
public class OdinExampleController {
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
package ru.ulstu.odinexample.model;
|
|
||||||
|
|
||||||
public class OdinExampleDto {
|
|
||||||
}
|
|
@ -1,103 +0,0 @@
|
|||||||
package ru.ulstu.odinexample.model;
|
|
||||||
|
|
||||||
import ru.ulstu.core.util.DateUtils;
|
|
||||||
import ru.ulstu.odin.model.annotation.OdinCaption;
|
|
||||||
import ru.ulstu.odin.model.annotation.OdinDate;
|
|
||||||
import ru.ulstu.odin.model.annotation.OdinNumeric;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
public class OdinExampleListDto {
|
|
||||||
@OdinCaption("instant")
|
|
||||||
@OdinDate(type = OdinDate.OdinDateType.DATETIME)
|
|
||||||
private Instant instant;
|
|
||||||
@OdinCaption("date")
|
|
||||||
private Date date;
|
|
||||||
@OdinCaption("localdate")
|
|
||||||
private LocalDate localDate;
|
|
||||||
@OdinCaption("localtime")
|
|
||||||
@OdinDate(type = OdinDate.OdinDateType.TIME)
|
|
||||||
private LocalTime localTime;
|
|
||||||
@OdinCaption("localdatetime")
|
|
||||||
@OdinDate(type = OdinDate.OdinDateType.DATETIME)
|
|
||||||
private LocalDateTime localDateTime;
|
|
||||||
@OdinCaption("int")
|
|
||||||
private int intval;
|
|
||||||
@OdinCaption("int+settings")
|
|
||||||
@OdinNumeric(precision = 5, scale = 2)
|
|
||||||
private int intvalset;
|
|
||||||
@OdinCaption("float")
|
|
||||||
private float floatval;
|
|
||||||
@OdinCaption("double")
|
|
||||||
private double aDouble;
|
|
||||||
@OdinCaption("double+set")
|
|
||||||
@OdinNumeric(precision = 5, scale = 3)
|
|
||||||
private double aDoubles;
|
|
||||||
@OdinCaption("int+positive")
|
|
||||||
@OdinNumeric(positiveOnly = true, scale = 2)
|
|
||||||
private int invalpos;
|
|
||||||
|
|
||||||
public OdinExampleListDto() {
|
|
||||||
this.instant = Instant.now();
|
|
||||||
this.date = new Date();
|
|
||||||
this.localDate = LocalDate.now();
|
|
||||||
this.localTime = LocalTime.now();
|
|
||||||
this.localDateTime = LocalDateTime.now();
|
|
||||||
intval = -134;
|
|
||||||
intvalset = 1343423232;
|
|
||||||
floatval = 2323.44F;
|
|
||||||
aDouble = -232323.43434;
|
|
||||||
aDoubles = 0.456456456;
|
|
||||||
invalpos = -23232323;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Date getInstant() {
|
|
||||||
return DateUtils.instantToDate(instant);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDate() {
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLocalDate() {
|
|
||||||
return DateUtils.localDateToDate(localDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLocalTime() {
|
|
||||||
return DateUtils.localTimeToDate(localTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getLocalDateTime() {
|
|
||||||
return DateUtils.localDateTimeToDate(localDateTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getIntval() {
|
|
||||||
return intval;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getIntvalset() {
|
|
||||||
return intvalset;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getFloatval() {
|
|
||||||
return floatval;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getaDouble() {
|
|
||||||
return aDouble;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getaDoubles() {
|
|
||||||
return aDoubles;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getInvalpos() {
|
|
||||||
return invalpos;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
package ru.ulstu.odinexample.service;
|
|
||||||
|
|
||||||
public class OdinExampleService {
|
|
||||||
}
|
|
@ -0,0 +1,43 @@
|
|||||||
|
package ru.ulstu.paper.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AutoCompleteData {
|
||||||
|
private List<String> authors = new ArrayList<>();
|
||||||
|
private List<String> publicationTitles = new ArrayList<>();
|
||||||
|
private List<String> publishers = new ArrayList<>();
|
||||||
|
private List<String> journalOrCollectionTitles = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<String> getAuthors() {
|
||||||
|
return authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthors(List<String> authors) {
|
||||||
|
this.authors = authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getPublicationTitles() {
|
||||||
|
return publicationTitles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicationTitles(List<String> publicationTitles) {
|
||||||
|
this.publicationTitles = publicationTitles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getPublishers() {
|
||||||
|
return publishers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishers(List<String> publishers) {
|
||||||
|
this.publishers = publishers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getJournalOrCollectionTitles() {
|
||||||
|
return journalOrCollectionTitles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJournalOrCollectionTitles(List<String> journalOrCollectionTitles) {
|
||||||
|
this.journalOrCollectionTitles = journalOrCollectionTitles;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package ru.ulstu.paper.model;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.EnumType;
|
||||||
|
import jakarta.persistence.Enumerated;
|
||||||
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
public class Reference extends BaseEntity {
|
||||||
|
|
||||||
|
private String authors;
|
||||||
|
|
||||||
|
@Column(name = "publication_title")
|
||||||
|
private String publicationTitle;
|
||||||
|
|
||||||
|
@Column(name = "publication_year")
|
||||||
|
private Integer publicationYear;
|
||||||
|
|
||||||
|
private String publisher;
|
||||||
|
|
||||||
|
private String pages;
|
||||||
|
|
||||||
|
@Column(name = "journal_or_collection_title")
|
||||||
|
private String journalOrCollectionTitle;
|
||||||
|
|
||||||
|
@Enumerated(value = EnumType.STRING)
|
||||||
|
@Column(name = "reference_type")
|
||||||
|
private ReferenceDto.ReferenceType referenceType = ReferenceDto.ReferenceType.ARTICLE;
|
||||||
|
|
||||||
|
public String getAuthors() {
|
||||||
|
return authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthors(String authors) {
|
||||||
|
this.authors = authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublicationTitle() {
|
||||||
|
return publicationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicationTitle(String publicationTitle) {
|
||||||
|
this.publicationTitle = publicationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPublicationYear() {
|
||||||
|
return publicationYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicationYear(Integer publicationYear) {
|
||||||
|
this.publicationYear = publicationYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublisher() {
|
||||||
|
return publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublisher(String publisher) {
|
||||||
|
this.publisher = publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPages() {
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPages(String pages) {
|
||||||
|
this.pages = pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJournalOrCollectionTitle() {
|
||||||
|
return journalOrCollectionTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJournalOrCollectionTitle(String journalOrCollectionTitle) {
|
||||||
|
this.journalOrCollectionTitle = journalOrCollectionTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReferenceDto.ReferenceType getReferenceType() {
|
||||||
|
return referenceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReferenceType(ReferenceDto.ReferenceType referenceType) {
|
||||||
|
this.referenceType = referenceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,166 @@
|
|||||||
|
package ru.ulstu.paper.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ReferenceDto {
|
||||||
|
public enum ReferenceType {
|
||||||
|
ARTICLE("Статья"),
|
||||||
|
BOOK("Книга");
|
||||||
|
|
||||||
|
private final String typeName;
|
||||||
|
|
||||||
|
ReferenceType(String name) {
|
||||||
|
this.typeName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeName() {
|
||||||
|
return typeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FormatStandard {
|
||||||
|
GOST("ГОСТ"),
|
||||||
|
SPRINGER("Springer");
|
||||||
|
|
||||||
|
private final String standardName;
|
||||||
|
|
||||||
|
FormatStandard(String name) {
|
||||||
|
this.standardName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStandardName() {
|
||||||
|
return standardName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String authors;
|
||||||
|
private String publicationTitle;
|
||||||
|
private Integer publicationYear;
|
||||||
|
private String publisher;
|
||||||
|
private String pages;
|
||||||
|
private String journalOrCollectionTitle;
|
||||||
|
private ReferenceType referenceType;
|
||||||
|
private FormatStandard formatStandard;
|
||||||
|
private boolean deleted;
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public ReferenceDto(
|
||||||
|
@JsonProperty("id") Integer id,
|
||||||
|
@JsonProperty("authors") String authors,
|
||||||
|
@JsonProperty("publicationTitle") String publicationTitle,
|
||||||
|
@JsonProperty("publicationYear") Integer publicationYear,
|
||||||
|
@JsonProperty("publisher") String publisher,
|
||||||
|
@JsonProperty("pages") String pages,
|
||||||
|
@JsonProperty("journalOrCollectionTitle") String journalOrCollectionTitle,
|
||||||
|
@JsonProperty("referenceType") ReferenceType referenceType,
|
||||||
|
@JsonProperty("formatStandard") FormatStandard formatStandard,
|
||||||
|
@JsonProperty("isDeleted") boolean deleted) {
|
||||||
|
this.id = id;
|
||||||
|
this.authors = authors;
|
||||||
|
this.publicationTitle = publicationTitle;
|
||||||
|
this.publicationYear = publicationYear;
|
||||||
|
this.publisher = publisher;
|
||||||
|
this.pages = pages;
|
||||||
|
this.journalOrCollectionTitle = journalOrCollectionTitle;
|
||||||
|
this.referenceType = referenceType;
|
||||||
|
this.formatStandard = formatStandard;
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReferenceDto(Reference reference) {
|
||||||
|
this.id = reference.getId();
|
||||||
|
this.authors = reference.getAuthors();
|
||||||
|
this.publicationTitle = reference.getPublicationTitle();
|
||||||
|
this.publicationYear = reference.getPublicationYear();
|
||||||
|
this.publisher = reference.getPublisher();
|
||||||
|
this.pages = reference.getPages();
|
||||||
|
this.journalOrCollectionTitle = reference.getJournalOrCollectionTitle();
|
||||||
|
this.referenceType = reference.getReferenceType();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReferenceDto() {
|
||||||
|
referenceType = ReferenceType.ARTICLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuthors() {
|
||||||
|
return authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthors(String authors) {
|
||||||
|
this.authors = authors;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublicationTitle() {
|
||||||
|
return publicationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicationTitle(String publicationTitle) {
|
||||||
|
this.publicationTitle = publicationTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPublicationYear() {
|
||||||
|
return publicationYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicationYear(Integer publicationYear) {
|
||||||
|
this.publicationYear = publicationYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublisher() {
|
||||||
|
return publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublisher(String publisher) {
|
||||||
|
this.publisher = publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPages() {
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPages(String pages) {
|
||||||
|
this.pages = pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJournalOrCollectionTitle() {
|
||||||
|
return journalOrCollectionTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJournalOrCollectionTitle(String journalOrCollectionTitle) {
|
||||||
|
this.journalOrCollectionTitle = journalOrCollectionTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReferenceType getReferenceType() {
|
||||||
|
return referenceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReferenceType(ReferenceType referenceType) {
|
||||||
|
this.referenceType = referenceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormatStandard getFormatStandard() {
|
||||||
|
return formatStandard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormatStandard(FormatStandard formatStandard) {
|
||||||
|
this.formatStandard = formatStandard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted(boolean deleted) {
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package ru.ulstu.paper.repository;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import ru.ulstu.paper.model.Reference;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ReferenceRepository extends JpaRepository<Reference, Integer> {
|
||||||
|
void deleteById(Integer id);
|
||||||
|
|
||||||
|
@Query("SELECT DISTINCT r.authors FROM Reference r")
|
||||||
|
List<String> findDistinctAuthors();
|
||||||
|
|
||||||
|
@Query("SELECT DISTINCT r.publicationTitle FROM Reference r")
|
||||||
|
List<String> findDistinctPublicationTitles();
|
||||||
|
|
||||||
|
@Query("SELECT DISTINCT r.publisher FROM Reference r")
|
||||||
|
List<String> findDistinctPublishers();
|
||||||
|
|
||||||
|
@Query("SELECT DISTINCT r.journalOrCollectionTitle FROM Reference r where r.journalOrCollectionTitle <> ''")
|
||||||
|
List<String> findDistinctJournalOrCollectionTitles();
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package ru.ulstu.ping.model;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.DiscriminatorType;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.persistence.Temporal;
|
||||||
|
import jakarta.persistence.TemporalType;
|
||||||
|
import org.hibernate.annotations.Any;
|
||||||
|
import org.hibernate.annotations.AnyDiscriminator;
|
||||||
|
import org.hibernate.annotations.AnyDiscriminatorValue;
|
||||||
|
import org.hibernate.annotations.AnyKeyJavaClass;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import ru.ulstu.conference.model.Conference;
|
||||||
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
|
import ru.ulstu.core.model.UserActivity;
|
||||||
|
import ru.ulstu.grant.model.Grant;
|
||||||
|
import ru.ulstu.paper.model.Paper;
|
||||||
|
import ru.ulstu.project.model.Project;
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "ping")
|
||||||
|
public class Ping extends BaseEntity {
|
||||||
|
@Temporal(value = TemporalType.TIMESTAMP)
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date date;
|
||||||
|
|
||||||
|
@ManyToOne(optional = false)
|
||||||
|
@JoinColumn(name = "users_id")
|
||||||
|
private User user;
|
||||||
|
|
||||||
|
@Column(name = "activity_type", insertable = false, updatable = false)
|
||||||
|
private String activityType;
|
||||||
|
|
||||||
|
@Any
|
||||||
|
@AnyDiscriminator(DiscriminatorType.STRING)
|
||||||
|
@AnyKeyJavaClass(Integer.class)
|
||||||
|
@JoinColumn(name = "activity_id")
|
||||||
|
@Column(name = "activity_type")
|
||||||
|
@AnyDiscriminatorValue(entity = Conference.class, discriminator = "CONFERENCE")
|
||||||
|
@AnyDiscriminatorValue(entity = Paper.class, discriminator = "PAPER")
|
||||||
|
@AnyDiscriminatorValue(entity = Project.class, discriminator = "PROJECT")
|
||||||
|
@AnyDiscriminatorValue(entity = Grant.class, discriminator = "GRANT")
|
||||||
|
private UserActivity activity;
|
||||||
|
|
||||||
|
public Ping() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Ping(Date date, User user) {
|
||||||
|
this.date = date;
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(Date date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(User user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserActivity getActivity() {
|
||||||
|
return this.activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivity(UserActivity activity) {
|
||||||
|
this.activity = activity;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package ru.ulstu.ping.model;
|
||||||
|
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PingInfo {
|
||||||
|
private User user;
|
||||||
|
private List<Ping> pings = new ArrayList<>();
|
||||||
|
|
||||||
|
public PingInfo(User user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(User user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ping> getPings() {
|
||||||
|
return pings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPings(List<Ping> pings) {
|
||||||
|
this.pings = pings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addPing(Ping ping) {
|
||||||
|
this.pings.add(ping);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package ru.ulstu.ping.repository;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
import ru.ulstu.conference.model.Conference;
|
||||||
|
import ru.ulstu.ping.model.Ping;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PingRepository extends JpaRepository<Ping, Integer> {
|
||||||
|
|
||||||
|
@Query("SELECT count(*) FROM Ping p WHERE (DAY(p.date) = :day) AND (MONTH(p.date) = :month) AND (YEAR(p.date) = :year) AND (p.activityType = 'conference') AND (p.activity = :conference)")
|
||||||
|
long countByConferenceAndDate(@Param("conference") Conference conference, @Param("day") Integer day, @Param("month") Integer month, @Param("year") Integer year);
|
||||||
|
|
||||||
|
@Query("SELECT p FROM Ping p WHERE (:activity = '' OR p.activityType = :activity)")
|
||||||
|
List<Ping> getPings(@Param("activity") String activity);
|
||||||
|
|
||||||
|
@Query("SELECT p FROM Ping p WHERE (:dateFrom < date)")
|
||||||
|
List<Ping> findByDate(@Param("dateFrom") Date dateFrom);
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package ru.ulstu.ping.service;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import ru.ulstu.core.model.UserActivity;
|
||||||
|
import ru.ulstu.ping.model.Ping;
|
||||||
|
import ru.ulstu.ping.model.PingInfo;
|
||||||
|
import ru.ulstu.ping.repository.PingRepository;
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
import ru.ulstu.user.service.MailService;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PingScheduler {
|
||||||
|
private final Logger log = LoggerFactory.getLogger(PingScheduler.class);
|
||||||
|
private final PingRepository pingRepository;
|
||||||
|
private final MailService mailService;
|
||||||
|
private final static String PING_MAIL_SUBJECT = "Ping статистика";
|
||||||
|
|
||||||
|
public PingScheduler(PingRepository pingRepository, MailService mailService) {
|
||||||
|
this.pingRepository = pingRepository;
|
||||||
|
this.mailService = mailService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0 * * 1 ?")
|
||||||
|
public void sendPingsInfo() {
|
||||||
|
log.debug("Scheduler.sendPingsInfo started");
|
||||||
|
|
||||||
|
List<PingInfo> pingInfos = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Ping ping : pingRepository.findByDate(java.sql.Date.valueOf(LocalDate.now().minusWeeks(1)))) {
|
||||||
|
UserActivity pingActivity = ping.getActivity();
|
||||||
|
Set<User> users = pingActivity.getActivityUsers();
|
||||||
|
|
||||||
|
for (User user : users) {
|
||||||
|
PingInfo userPing = pingInfos.stream().filter(u -> u.getUser() == user).findFirst().orElse(null);
|
||||||
|
if (userPing == null) {
|
||||||
|
userPing = new PingInfo(user);
|
||||||
|
pingInfos.add(userPing);
|
||||||
|
}
|
||||||
|
userPing.addPing(ping);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (PingInfo pingInfo : pingInfos) {
|
||||||
|
mailService.sendEmailFromTemplate(Map.of("pings", pingInfo.getPings()),
|
||||||
|
pingInfo.getUser(), "pingsInfoWeekEmail", PING_MAIL_SUBJECT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package ru.ulstu.ping.service;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import ru.ulstu.conference.model.Conference;
|
||||||
|
import ru.ulstu.core.model.UserActivity;
|
||||||
|
import ru.ulstu.ping.model.Ping;
|
||||||
|
import ru.ulstu.ping.repository.PingRepository;
|
||||||
|
import ru.ulstu.user.service.UserService;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PingService {
|
||||||
|
private final PingRepository pingRepository;
|
||||||
|
private final UserService userService;
|
||||||
|
|
||||||
|
public PingService(PingRepository pingRepository,
|
||||||
|
UserService userService,
|
||||||
|
PingScheduler pingScheduler) {
|
||||||
|
this.pingRepository = pingRepository;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public Ping addPing(UserActivity activity) throws IOException {
|
||||||
|
Ping newPing = new Ping(new Date(), userService.getCurrentUser());
|
||||||
|
//newPing.setActivity(activity);
|
||||||
|
return pingRepository.save(newPing);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer countPingYesterday(Conference conference, Calendar calendar) {
|
||||||
|
return Math.toIntExact(pingRepository.countByConferenceAndDate(conference, calendar.get(Calendar.DAY_OF_MONTH),
|
||||||
|
calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.YEAR)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ping> getPings(String activity) {
|
||||||
|
return pingRepository.getPings(activity);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package ru.ulstu.students.model;
|
||||||
|
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.OneToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import jakarta.persistence.Temporal;
|
||||||
|
import jakarta.persistence.TemporalType;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "scheduler")
|
||||||
|
public class Scheduler extends BaseEntity {
|
||||||
|
|
||||||
|
@OneToOne(optional = false)
|
||||||
|
@JoinColumn(name = "task_id")
|
||||||
|
private Task task;
|
||||||
|
|
||||||
|
@Temporal(value = TemporalType.TIMESTAMP)
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date date;
|
||||||
|
|
||||||
|
public Scheduler() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Scheduler(Task task, Date date) {
|
||||||
|
this.task = task;
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(Task task) {
|
||||||
|
this.task = task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(Date date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package ru.ulstu.students.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class TaskFilterDto {
|
||||||
|
|
||||||
|
private List<TaskDto> tasks;
|
||||||
|
private Task.TaskStatus status;
|
||||||
|
private Integer tagId;
|
||||||
|
private String order;
|
||||||
|
|
||||||
|
public TaskFilterDto(List<TaskDto> tasks, Task.TaskStatus status, Integer tagId, String order) {
|
||||||
|
this.tasks = tasks;
|
||||||
|
this.status = status;
|
||||||
|
this.tagId = tagId;
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskFilterDto() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TaskDto> getTasks() {
|
||||||
|
return tasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTasks(List<TaskDto> tasks) {
|
||||||
|
this.tasks = tasks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task.TaskStatus getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Task.TaskStatus status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTag() {
|
||||||
|
return tagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(Integer tagId) {
|
||||||
|
this.tagId = tagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(String order) {
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue