Compare commits
1742 Commits
feature/SD
...
20241010_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9bc0392d5 | ||
| d495f5fc5c | |||
| 4e066fe104 | |||
| eadc35561d | |||
| 2481dd3dc8 | |||
| b619a14b13 | |||
| 6f09c4903f | |||
| f689531e18 | |||
| b873013798 | |||
| 825c9c9827 | |||
| 5ae0b44e99 | |||
| 2284e54833 | |||
| 8361ae1b83 | |||
| 3181ae391d | |||
| e445b72f7d | |||
| 3358989914 | |||
| 5dddc7ae80 | |||
| c3d81765d3 | |||
| f48960ddb9 | |||
| adc02cc9fe | |||
| 5287d0d779 | |||
| dbb0f2e03b | |||
| 9f4543358d | |||
| 9607b0f91a | |||
| ce3c6faae4 | |||
| 6953e339db | |||
| 325545be5c | |||
| 85d787105f | |||
| 0b3b21c73c | |||
| d9bbcd821e | |||
| 36690c988c | |||
| 044306ca0d | |||
| 36cd762fc9 | |||
| 7f0210e150 | |||
| aab5f154b4 | |||
| ff678bd97f | |||
| a0731205ff | |||
| 12ebad7ae2 | |||
| 10840631b7 | |||
| 07e86a3c91 | |||
| 0531b865c4 | |||
| a24fab203e | |||
| 8c9db78a2d | |||
| 6f81a86a7d | |||
| 41afab06d6 | |||
| 07f20765cb | |||
| 509148632f | |||
| 6c7ddef35c | |||
| 7507fd4a9f | |||
| bcbb2a9504 | |||
| 7ba2b75864 | |||
| 9f88e36b61 | |||
| 03d8960e5a | |||
| ef463d31f5 | |||
| f904ee7040 | |||
| aabee3022c | |||
| ff5972298c | |||
| e064d63bce | |||
| 5d4a9c0702 | |||
| ca82ea83e6 | |||
| 27fa0aa24c | |||
| 01d955200f | |||
| ea779be68f | |||
| a10155a5fd | |||
| 4491b932de | |||
| 8736af3e55 | |||
| c3dcaeb944 | |||
| 8ed1527e95 | |||
| ad02a0e54c | |||
| 0e64ff7c05 | |||
| 74e356f3bb | |||
| dcdfb7e03d | |||
| 4335c1b0f7 | |||
| b96479962c | |||
| 311b0a1705 | |||
| 99a4df9256 | |||
| c010e6f3bc | |||
| 0a824da8c6 | |||
| 090e5f6d94 | |||
| a4a172b069 | |||
| 21c8ffdf18 | |||
| c49c2aabe4 | |||
| 38a603ada6 | |||
| cbb8e97d03 | |||
| 0037360a36 | |||
| 8ded3f4a91 | |||
| 1553c3b457 | |||
| 4763bc5965 | |||
| e467ebb5e2 | |||
| a961d0bb63 | |||
| 4cf0c42375 | |||
| 495876bc65 | |||
| 90e6e64c91 | |||
| 42d0c68c7f | |||
| 0a27df0352 | |||
| 6e2a9e9743 | |||
| bfb33d0d1f | |||
| c8a31a10fe | |||
| 5df5f3b662 | |||
| b45154e486 | |||
| 352f0e31d1 | |||
| f674b9a359 | |||
| 9a2bada3cd | |||
| 10b0fad6a6 | |||
| c0d7fe5f8e | |||
| ff39e731de | |||
| bbf62915b5 | |||
| bf1e04997c | |||
| d6bf039007 | |||
| 56f9d2041e | |||
| f8004fab38 | |||
| c6ff9bf898 | |||
| ad2b7b3905 | |||
| 6c445cc0e4 | |||
| f8e857ab26 | |||
| b2df910a51 | |||
| af80a0711a | |||
| 57e6bc8bf1 | |||
| 2d07f7e23c | |||
| d42e6d9bc1 | |||
| 0c06a2f04d | |||
| f3a2027fb1 | |||
| bdc4359ad0 | |||
| 2211fb890b | |||
| 3a0667df22 | |||
| 87597ab83b | |||
| 08144fd5ea | |||
| e417eb762c | |||
| 50ce405dd7 | |||
| d52ecd7457 | |||
| ef7e3624fd | |||
| 17178edd4f | |||
| a168edc3c2 | |||
| fb019fcd1a | |||
| d7541b5fa8 | |||
| 9759e7b4d5 | |||
| 0c582d6a91 | |||
| af100ad02e | |||
| 0deb7a519f | |||
| de6186895a | |||
| ed493ca159 | |||
| 8547bbdd08 | |||
| c6ee4364a2 | |||
| 9561f42283 | |||
| a5faa8c671 | |||
| 27a48d221c | |||
| b9b0caa9fd | |||
| daa9dc3116 | |||
| 0859e13a22 | |||
| 173c27d98a | |||
| cdc00bf9d3 | |||
| 060487d40f | |||
| 676d411191 | |||
| 1f2bd32da9 | |||
| 3c43ce55c4 | |||
| dbe0563dad | |||
| d604707800 | |||
| ebf84daf89 | |||
| a401490d4b | |||
| 2bbddc0df5 | |||
| 4022505656 | |||
| ac785fc135 | |||
| 74c69af243 | |||
| d155771914 | |||
| 25a7acb865 | |||
| dd3d71a9e0 | |||
| 835633ca4c | |||
| cd76a5655b | |||
| 617f28594d | |||
| 35494375dc | |||
| 4822c68e32 | |||
| 787cbeacec | |||
| 962e3c8208 | |||
| a711305b13 | |||
| 490defe829 | |||
| a557d59700 | |||
| d6125204dd | |||
| b8e03337ee | |||
| b5b854851b | |||
| bda9427eb8 | |||
| 789a73fa78 | |||
| c6008c4171 | |||
| 93832a5e60 | |||
| c1b9e900f4 | |||
| 5e2d3fb38c | |||
| 1f351ae36f | |||
| fc8831799d | |||
| 38a270a5de | |||
| 4296ab94f0 | |||
| 2ed3438b0c | |||
| 17b70036a6 | |||
| e3321d83d0 | |||
| efeacadb33 | |||
| 6e908c02a2 | |||
| 663acfee7e | |||
| d3b2ca57de | |||
| 8b5645118f | |||
| 761f89d8a1 | |||
| 2fcb5eab65 | |||
| d464948fc9 | |||
| d17208d158 | |||
| 113be95c26 | |||
| 04a226859e | |||
| fc9009072a | |||
| c0abde4fd0 | |||
| 898a79a6a4 | |||
| 4579c64744 | |||
| a115c8e607 | |||
| 18acbfa324 | |||
| 955e6d37c2 | |||
| f617edbf27 | |||
| f97de2de08 | |||
| d2bf587d57 | |||
| 941e5948c8 | |||
| 94a52168f7 | |||
| 1d408a1460 | |||
| 63858fa63e | |||
| 8fd558360d | |||
| 2f191e012d | |||
| fcae5341bd | |||
| 5fa18833e7 | |||
| 724c875f72 | |||
| 30e599140d | |||
| 7ae54057a4 | |||
| b7f41fdd33 | |||
| a456690c89 | |||
| ec5b635a13 | |||
| 110ee85863 | |||
| 175befb82f | |||
| 17e8cad14b | |||
| d27b4ac4b7 | |||
| db37651a65 | |||
| 4da0144be7 | |||
| c1660b4821 | |||
| 9db3002acc | |||
| 10c69c022c | |||
| 44f127ab9b | |||
| e7fcd977f7 | |||
| 9892418137 | |||
| 0b884b97ce | |||
| 7bf36fcdf5 | |||
| d930c23677 | |||
| 409cee499d | |||
| 8f1cba7756 | |||
| 32323a0323 | |||
| fac88c991b | |||
| c6f6ca31f0 | |||
| 9df7e2ad73 | |||
| 3ea63962a2 | |||
| 2a657043d7 | |||
| 450b458f29 | |||
| 8e862e3e41 | |||
| 441804f254 | |||
| 67c0ceefdd | |||
| 3647fb995d | |||
| 9534dabdf1 | |||
| 31a123789a | |||
| 94625a04f1 | |||
| fd52f5bf3a | |||
| aad189abb0 | |||
| dac51332c4 | |||
| 296e828f84 | |||
| 2cf7e8896d | |||
| 7140170b01 | |||
| ac953a7668 | |||
| 1abf04e112 | |||
| c97ac8ef24 | |||
| 32c6fe13d1 | |||
| 12210508cf | |||
| 517e614a67 | |||
| c109ba1d8f | |||
| 1089324b48 | |||
| d35f1fd3e7 | |||
| 98346a4263 | |||
| 9f03ce827f | |||
| efebad843a | |||
| 89430c96e3 | |||
| d5a8032514 | |||
| 26c18df76e | |||
| eab51f4f81 | |||
| ecd3e14cc5 | |||
| adccc2bb1a | |||
| 3af2aefa47 | |||
| 2fd4d75df0 | |||
| 67904d5e78 | |||
| 0246331940 | |||
| 450ab46281 | |||
| bee4ec324a | |||
| af1e06d765 | |||
| d4b35cccd4 | |||
| 46b8842db1 | |||
| 9fa40e5e3c | |||
| 1dc43f7760 | |||
| f37afb6e51 | |||
| f70130e7bd | |||
| 11b6853979 | |||
| 4236989e20 | |||
| 772c69f7dc | |||
| 83ee7eb720 | |||
| 18d99158f5 | |||
| 611560f365 | |||
| 6c54599f1a | |||
| 132a4d176c | |||
| dbf79d9cc6 | |||
| 40557913ba | |||
| b1f28f9462 | |||
| 3e14bafe61 | |||
| 9e38f3da92 | |||
| fb690a3f2d | |||
| 3064ca55da | |||
| 665f193692 | |||
| 043f424a80 | |||
| 46df55e70e | |||
| c396715e83 | |||
| 6177cfb56b | |||
| b3e7f76efc | |||
| 08d75b06cb | |||
| 7dbeb2ce91 | |||
| a4db651ec6 | |||
| 8f921ecd13 | |||
| de9bcceb21 | |||
| a4a360ca90 | |||
| d221eb16b5 | |||
| 17236668e7 | |||
| 1030781c2d | |||
| 27e60d558f | |||
| 872419006b | |||
| 2637081af7 | |||
| 6a96c920f1 | |||
| c6d107465c | |||
| bfa24280bf | |||
| b2a572ea84 | |||
| cab6025e41 | |||
| 91ee2082ab | |||
| f79c311573 | |||
| 183e794657 | |||
| e50e9b37c6 | |||
| 537dbe7695 | |||
| 8c3ae2d854 | |||
| 620b3daf5a | |||
| 2e70316bc6 | |||
| afc06b38b3 | |||
| 1c7db830ea | |||
| 5cf060920e | |||
| f7d6e527b9 | |||
| 80a0d68fc3 | |||
| 6498e2a123 | |||
| ace9cbe4a8 | |||
| a42c0e1ad9 | |||
| ba35c03032 | |||
| 550b2889f7 | |||
| 28a1c49d3a | |||
| 1e97a37dd7 | |||
| dcb14913a6 | |||
| cb380d090d | |||
| cbea692c05 | |||
| 8e686ce633 | |||
| b05c52a668 | |||
| 9f901d1341 | |||
| 9c3064ba82 | |||
| 079854109f | |||
| 331eb1efb0 | |||
| 8578e2fa7c | |||
| 40b49300dc | |||
| f149d54350 | |||
| 2e989c2752 | |||
| 1bdb592755 | |||
| 0d77488056 | |||
| ae259cfc10 | |||
| ecb45f2ccb | |||
| ebe93e2ca0 | |||
| 859c50334a | |||
| 982c3e4676 | |||
| b4ddf1f587 | |||
| d6bfb1efbc | |||
| 009a523aa9 | |||
| 05213c1053 | |||
| 7c1cfa010f | |||
| d2e9ee8f44 | |||
| e282fe5d0a | |||
| 71652f0e55 | |||
| 0e08fc2aa1 | |||
| 9409204e96 | |||
| 6adce3e2f6 | |||
| 395e8b8c34 | |||
| fef3901f63 | |||
| 6d8e5baffe | |||
| b714d66f2e | |||
| 1bd2a0ffb5 | |||
| 45989f6b0d | |||
| 4669c21085 | |||
| 93b6cbdf6e | |||
| 1e3cd71f0c | |||
| 1500fb56a2 | |||
| 0c20232661 | |||
| 4a5dfa3c58 | |||
| 351f0733a3 | |||
| dbf96ac0eb | |||
| fd0a686078 | |||
| 2262b6db2e | |||
| 2b817b10a1 | |||
| 52ccc41694 | |||
| d4648148ba | |||
| 6fd583521b | |||
| 201a556ad5 | |||
| f2b783d970 | |||
| 6e66ce8dac | |||
| 61c1c89dde | |||
| aa080067df | |||
| 39760e5e94 | |||
| a5e1af3f54 | |||
| b28b27d8ae | |||
| e2d50a4233 | |||
| 3bcfd78adb | |||
| 368154b80a | |||
| 8bfd37d9aa | |||
| 3b99091bfa | |||
| 2410b95969 | |||
| 077f002fbe | |||
| ebe5f91e45 | |||
| a162b6c3f8 | |||
| 66d3fd4bc9 | |||
| 2a5276cddb | |||
| aba96c11b7 | |||
| 48c8981015 | |||
| 05fc8d9d61 | |||
| 1a685140b9 | |||
| d344257b0c | |||
| 46a4ef3f05 | |||
| 23beff9772 | |||
| 8d53d0b825 | |||
| e5014e602b | |||
| 61a6c58a8a | |||
| effd05cf46 | |||
| f01ea9470d | |||
| 3b33018019 | |||
| 23d061be0c | |||
| 5f6669343b | |||
| e33ac3f0cc | |||
| e64a3821b8 | |||
| 95f4a99991 | |||
| 4f10590254 | |||
| 7628f7325c | |||
| 81b2edde0c | |||
| 09a922098c | |||
| 5cf3d2c732 | |||
| d80f1d1fb8 | |||
| 54033ca781 | |||
| b24182eb9e | |||
| 50228dcb90 | |||
| a698651c24 | |||
| ba7c89e626 | |||
| 09270bf4b8 | |||
| b9df8c14e3 | |||
| 8194b4099d | |||
| bf1a1b6251 | |||
| da231585f3 | |||
| 2481bee5fa | |||
| 48e54129d3 | |||
| fc4edde981 | |||
| f494126e97 | |||
| b9fb539d02 | |||
| 2e0086880f | |||
| bfe72399fd | |||
| d8dec26f5d | |||
| 7b5366839c | |||
| 6ee276be2c | |||
| 03d5335909 | |||
| 8a85015f5f | |||
| c1f432e8aa | |||
| f7b7b0c91f | |||
| 622de7b531 | |||
| 59da080298 | |||
| b9d342901b | |||
| aef2e68828 | |||
| f21085de30 | |||
| 5ca91469a5 | |||
| ae7cc990a0 | |||
| 555f6d5dc4 | |||
| cad940bdff | |||
| 3e73c4e663 | |||
| e66fc3d672 | |||
| cd526f04c8 | |||
| 1723a8fd86 | |||
| b5d5d15072 | |||
| 2a52cbf3da | |||
| 9b2749dff2 | |||
| a87814bf02 | |||
| 99bc8fb39c | |||
| 884dfd3400 | |||
| 3b4935bd1d | |||
| a3869198aa | |||
| d7e97fd2fc | |||
| fac71baad3 | |||
| 144ea8eaaa | |||
| 12d6a6dc56 | |||
| 7394ef79bd | |||
| 606a0ebdb7 | |||
| 69902b7f6a | |||
| 91d1d202bf | |||
| 51668a9f25 | |||
| 54c226c98a | |||
| 6027cef5b0 | |||
| aad2aba9e2 | |||
| 9f7db88a4a | |||
| 7691c5018f | |||
| 5dd158c824 | |||
| d930e2928f | |||
| 1ab0cf2d13 | |||
| db73af8d91 | |||
| 676b58835a | |||
| 5ae50ecf08 | |||
| 52611d61d4 | |||
| 5b8b68dec1 | |||
| 2a0c6abff5 | |||
| 01552d5335 | |||
| 7b93c6e0a3 | |||
| e5df127ee0 | |||
| 1fb9c25fae | |||
| 261f8c0877 | |||
| 015820ccc4 | |||
| f2d1f810f7 | |||
| 5cf7b89472 | |||
| 7d002f2e56 | |||
| 1f925e5852 | |||
| 30d1c061e4 | |||
| 3a3c0ae1c3 | |||
| eb404a0872 | |||
| abd823e6ef | |||
| 2b879d0356 | |||
| 0d3028657b | |||
| 3684213b97 | |||
| 511ee19120 | |||
| 37f38ed2f7 | |||
| 52816af36f | |||
| c09c4ce194 | |||
| dd83ab2ad5 | |||
| aa8a0228b7 | |||
| 169dcf3867 | |||
| 2acac4fdcb | |||
| 11b2c94064 | |||
| 401eb4c28a | |||
| 8dcc672ff6 | |||
| 86694bf5c5 | |||
| d1cb72b7b8 | |||
| 2cfd5ff050 | |||
| e99d2daa45 | |||
| 60fa52e62b | |||
| f0ffeb4e05 | |||
| 4eafcf7742 | |||
| 525e521dbb | |||
| 4bc7c5c678 | |||
| cd04fcc42e | |||
| 8626ced5ba | |||
| 51ceb69192 | |||
| a08578a361 | |||
| d80d843400 | |||
| c0321cc006 | |||
| d528bcbd72 | |||
| fb6d2f32a7 | |||
| c408580898 | |||
| 1c7d9c1775 | |||
| 86ea8ccc36 | |||
| a0be59c532 | |||
| 7052434ff1 | |||
| 42a69dd21b | |||
| 96a10237ff | |||
| 54ca8f193e | |||
| c6560933d5 | |||
| 848efdc3e4 | |||
| 4252d5faf9 | |||
| d257a00f67 | |||
| ffa6d4be7a | |||
| 0cb0ac8aa5 | |||
| 2a9bf4f18e | |||
| 2949f5cf3a | |||
| ce735aa5df | |||
| 0377e1c73d | |||
| 791dad2aed | |||
| f941b63f54 | |||
| aa267a6b2c | |||
| d7d5c413a7 | |||
| 7d39957614 | |||
| cb9ac26602 | |||
| f7e82b4089 | |||
| 4098b1296e | |||
| 754a43a05f | |||
| 407fb28206 | |||
| f84e64ad5a | |||
| f2be08e500 | |||
| a5d596ae1c | |||
| 15ac3df1ce | |||
| 7a86247e12 | |||
| 074506fa0c | |||
| c274ce3fcc | |||
| e81fa79d85 | |||
| e0b31bef6d | |||
| 50a9e940f1 | |||
| 2d2cd07478 | |||
| 9c8804d905 | |||
| 0f80faaf0d | |||
| 2c9e0ce455 | |||
| dcb2af5c43 | |||
| c477d64413 | |||
| 7a41e22ba4 | |||
| 3ef60fa238 | |||
| 6f5442486d | |||
| 01d39fd652 | |||
| a67f8104c5 | |||
| cb6717fb93 | |||
| f229824dfa | |||
| fa5b0393eb | |||
| e52b9896d0 | |||
| 05204ed269 | |||
| 4f08220893 | |||
| be536a9c38 | |||
| 4c57f2ac34 | |||
| 6f54902862 | |||
| 36afcc836c | |||
| ddd70ecf64 | |||
| 6a7ec32d66 | |||
| fce0b0e81a | |||
| 6f4d0f1072 | |||
| 26dc422f3d | |||
| b8a9e2bcc1 | |||
| 158269f6f3 | |||
| e3765a9638 | |||
| 0330046f69 | |||
| bc03755afa | |||
| cd16233da5 | |||
| 67a320dac3 | |||
| 580b2257cc | |||
| 52954b5a52 | |||
| 284f23bd83 | |||
| 3a6eb612e0 | |||
| fd3b5bcdfd | |||
| 2524d5442a | |||
| 68ad7af07a | |||
| 4ef27af2c0 | |||
| fdda76eb5c | |||
| 1857428cd0 | |||
| 1e8b1ca28b | |||
| 6fd6431f7e | |||
| 66c41d10eb | |||
| 8586308fde | |||
| bfe78c4a81 | |||
| 8bd8c94eff | |||
| 30acf97b57 | |||
| 9016f5956f | |||
| e9c7e94db3 | |||
| 471cf93d96 | |||
| 644ea03201 | |||
| a9ab0a253a | |||
| ef47cc5616 | |||
| 7795c6c248 | |||
| a11ef715a1 | |||
| 7985811e71 | |||
| d4292fdb72 | |||
| 980f541a18 | |||
| 1fae705d64 | |||
| 465e725782 | |||
| 79d13dc1c7 | |||
| 25abcbb869 | |||
| b553122d3e | |||
| 10158cf46b | |||
| 1dc0ddc5df | |||
| c91165dc96 | |||
| ac1cbff3ba | |||
| 644010dbda | |||
| a5b6220a7e | |||
| a6d63a1f51 | |||
| 45f53d5d80 | |||
| fe84a31f66 | |||
| 1f09e82245 | |||
| 205dce88b8 | |||
| 1b6f7d6e35 | |||
| 61f59ac4a3 | |||
| 481471d9b6 | |||
| f0e587e1f3 | |||
| 118e43b849 | |||
| 19f5450243 | |||
| 236d0dcdec | |||
| df8a1de401 | |||
| 5fd3b5668a | |||
| 489089b9a4 | |||
| 54390e7198 | |||
| b3acb22495 | |||
| 8e2196d23f | |||
| 99ad3d7b48 | |||
| d83e658a9c | |||
| 0176176e84 | |||
| 1cb33d1c99 | |||
| a05005edf9 | |||
| 25f3b7710a | |||
| dd06da4e2c | |||
| 74117a4ea2 | |||
| 65dce87abf | |||
| 0d175b693a | |||
| b47c8ecb7b | |||
| 8397e7c6aa | |||
| 68a76ca0c2 | |||
| 9ba1078d5a | |||
| 043a8b62d8 | |||
| 3cb2b9d8e9 | |||
| dfb34df5e9 | |||
| 44c3721116 | |||
| ba68f631a1 | |||
| 7a6c81feb6 | |||
| d27415fb7b | |||
| bd06beff71 | |||
| 99234b2f94 | |||
| 74be9d3b20 | |||
| 9d15ebd65e | |||
| 7716a01e81 | |||
| 3feb507013 | |||
| 9e682093ae | |||
| 058334fb0b | |||
| aa0a69409c | |||
| 225af5f087 | |||
| f66a3ccdfb | |||
| b981ece98a | |||
| 3e8e44871d | |||
| 75d4bdfc4d | |||
| b79c88c23c | |||
| 3c945a4be5 | |||
| c300dff9f0 | |||
| 32ed6f1188 | |||
| a4fbf3138d | |||
| 6056e4dccc | |||
| 493ca43226 | |||
| 81394cc6fa | |||
| cd1f71952b | |||
| 432de33a60 | |||
| 6078e9770e | |||
| d6add3cf65 | |||
| 6a03fd5010 | |||
| e04e5166ce | |||
| 012f27d460 | |||
| d8a9337d30 | |||
| 71f7a665c8 | |||
| cc7db6a529 | |||
| b2522ecc38 | |||
| 356e1bdd12 | |||
| 4eae593bce | |||
| 40055a6c03 | |||
| 48edcf2e9d | |||
| 49214b500e | |||
| d6d4c3583b | |||
| 049e1b4921 | |||
| 672195fb4a | |||
| ffa3ea8cff | |||
| de3f04a6ca | |||
| d76fd941a8 | |||
| 05a6b2b5d4 | |||
| 8e846a6598 | |||
| 1f8252db21 | |||
| 08cae9e3bb | |||
| 513fa6f5f0 | |||
| 9c1bb13d7a | |||
| ab6a08ab60 | |||
| 5793fd1908 | |||
| 641f39784c | |||
| 64850e628a | |||
| 88d0d82544 | |||
| cabc38b216 | |||
| 04841eec4e | |||
| 3a12327b16 | |||
| 1d3b96395e | |||
| 7341cc625b | |||
| 2ee729449d | |||
| 87fb1868f0 | |||
| 446db73fe7 | |||
| 05a6e363c9 | |||
| 0b91e53f96 | |||
| a5518de1c1 | |||
| 0dd3403946 | |||
| 0e316cba9c | |||
| 27e14f99ee | |||
| 79dcb073df | |||
| 0d2b4c01f3 | |||
| 463dd423a0 | |||
| d849ff54e7 | |||
| 5148a4d571 | |||
| 73d94f077e | |||
| cde50e6c57 | |||
| f7e9fca83f | |||
| d88c7647db | |||
| d5f4d73dc4 | |||
| cf63edb453 | |||
| f7b71cc4ee | |||
| 971ea7bd7a | |||
| 2e02fd38ad | |||
| 7cfc702ea0 | |||
| 09bc88241d | |||
| c702d7410b | |||
| fd67662dc2 | |||
| 08e4162620 | |||
| 6c3fc25ef8 | |||
| 73c882684c | |||
| 3336b4ce20 | |||
| 41dd98e1f9 | |||
| 9f66f92984 | |||
| 5ef4cf2ff5 | |||
| d97a7305cc | |||
| 0b60ab7a06 | |||
| ed30d129d5 | |||
| 674c1ce5de | |||
| 308f883b15 | |||
| 8c9421325f | |||
| 63e9f325f3 | |||
| 706b4e3c21 | |||
| fb8aeea028 | |||
| 41ee89c94e | |||
| 21e2267340 | |||
| 0b0a2ea918 | |||
| aef6b1e937 | |||
| ce5673cd24 | |||
| 3045529df8 | |||
| 96cbf6f844 | |||
| fd09483123 | |||
| 832d411426 | |||
| fc8262a203 | |||
| 6d8cba5d07 | |||
| 4abf1c2b01 | |||
| 12901abd2d | |||
| f93fa6678c | |||
| 819f0c8ce0 | |||
| e13611a328 | |||
| bb8bc2b7fd | |||
| f13c81f119 | |||
| abdfb4c1ef | |||
| b435488b7d | |||
| 167183ac64 | |||
| 43d101719c | |||
| 62a1e49e7c | |||
| 65fceec62e | |||
| 3e2dc62fba | |||
| a5b979f53d | |||
| 5f59100142 | |||
| 4bbc909563 | |||
| 2770cac483 | |||
| 702d529a8b | |||
| 6b5a2cafaf | |||
| 255d82cec5 | |||
| 66ac02a7a9 | |||
| 32daa9fbe7 | |||
| 349c47ce52 | |||
| 3828e5cbec | |||
| 73f1b01fed | |||
| 007e66aff7 | |||
| a1ab5da08a | |||
| 5cb6e30ed6 | |||
| ea82bff88a | |||
| cfad878bc2 | |||
| ac68ea4ea5 | |||
| e2ad0a7c65 | |||
| 3e6c38b51f | |||
| a0cd0cbec5 | |||
| 087189a0b0 | |||
| b2df536011 | |||
| 2f863e1489 | |||
| 7705b8a5fd | |||
| 5b2c5c2676 | |||
| 3757f511e0 | |||
| 3842cc0f6e | |||
| 747e2615b3 | |||
| fcea8f5267 | |||
| ea2b8c7593 | |||
| b144d84549 | |||
| 48c7de51f7 | |||
| d7f1992154 | |||
| 11f5056fd0 | |||
| 9147b6be27 | |||
| 9492a646ba | |||
| ec8b8547c5 | |||
| 49dd2269af | |||
| ac5c3ff2dd | |||
| 069d497566 | |||
| 207b557655 | |||
| 76fc878585 | |||
| 80c41b1fcc | |||
| 94994d696f | |||
| d0065a1219 | |||
| eeba09920f | |||
| 6d69f6c059 | |||
| 2f7bd7596a | |||
| a3a99f687f | |||
| 0f96873847 | |||
| 8f3406fa4d | |||
| b347cf1aff | |||
| b720b08088 | |||
| 42169a5646 | |||
| c17cd3d83e | |||
| 1d92895df6 | |||
| 46c3419751 | |||
| 69b0f37254 | |||
| efc38970ff | |||
| 83156e8623 | |||
| 3a2e6a405b | |||
| 105309ef4f | |||
| 7da201e24f | |||
| cb88dfbead | |||
| 36efa1c628 | |||
| fb80695cba | |||
| ce1b0df102 | |||
| a713368d62 | |||
| bf32d9be5c | |||
| e93d54c986 | |||
| a4caa25c05 | |||
| 5db1aa0948 | |||
| 95e18001ef | |||
| 026a4890d1 | |||
| afa1342e8f | |||
| 46692dd75e | |||
| dd23b7b7fb | |||
| 9c1332f385 | |||
| 63061e576a | |||
| 7b18f23794 | |||
| 2e496d6b60 | |||
| 4c148ccbd9 | |||
| c7b8cae326 | |||
| 599df1fc16 | |||
| 7175380045 | |||
| 33c9d32262 | |||
| 8d09a02f1c | |||
| 83d48df47d | |||
| bd3d295f6f | |||
| 9672fce01f | |||
| 6b5274f2c3 | |||
| fc3dfc13cf | |||
| f4b7eba1d8 | |||
| 25fade5f48 | |||
| 9fd75d10b6 | |||
| 25eabec6e6 | |||
| 88c2f06386 | |||
| f90ac6f64a | |||
| fe414ec431 | |||
| 5671ba07d5 | |||
| 35e3e1447d | |||
| d4840aa672 | |||
| 1d0711ebd4 | |||
| 5bbbea25fa | |||
| 5298ec4949 | |||
| 61fc69ae89 | |||
| 4401c05464 | |||
| a12d5198b1 | |||
| 1aa0f7518f | |||
| 7423754900 | |||
| 26b5c5b6a3 | |||
| b69d79381b | |||
| 606a486f82 | |||
| ba0e4650ce | |||
| 8c43abd739 | |||
| 1cbc9489f1 | |||
| 0c14e7b987 | |||
| 4f33830879 | |||
| 500a39bbc9 | |||
| c04e08a575 | |||
| 7b842ca014 | |||
| cd72eed0cc | |||
| 9fbcf5b074 | |||
| c041d3fc48 | |||
| 3578afa37b | |||
| a030dd13b3 | |||
| bfe7e3c972 | |||
| 0b6a1b871f | |||
| f301eacef3 | |||
| 1b51013d0f | |||
| 3dab6a9cf1 | |||
| 8b56c4f136 | |||
| a14e9f85e1 | |||
| 56326bcb94 | |||
| d2247e559c | |||
| d5059a49a9 | |||
| 5ff6412128 | |||
| 25a08389df | |||
| 2171dfc16c | |||
| 8346d16d7d | |||
| bed96c9ed4 | |||
| e67ca853b8 | |||
| 7ebf5af9f9 | |||
| e626f1e1c2 | |||
| 8818d7c839 | |||
| c506709c33 | |||
| 97c458b674 | |||
| 638ab3b5ed | |||
| 414d62aa6c | |||
| 917cf529d8 | |||
| 6a39ca8972 | |||
| aaa03da726 | |||
| 7115254c53 | |||
| 8926fe4cf4 | |||
| 777ab4c223 | |||
| fb66797fe0 | |||
| b1bed3bfab | |||
| ed7a2a0374 | |||
| c9fb344849 | |||
| fcd45a187a | |||
| e6319eb7c8 | |||
| 35702757b9 | |||
| 2a59351e09 | |||
| 5067eff40b | |||
| b8c4caaa9b | |||
| fad75298f9 | |||
| f125e339f5 | |||
| f69848f748 | |||
| 27a1c0efe9 | |||
| 2bed8730c5 | |||
| cf56f61962 | |||
| 81d05fa0ae | |||
| 067a059532 | |||
| 94ac3fb90c | |||
| cdc3bb92cc | |||
| 8153291184 | |||
| 6f20b34196 | |||
| 6d01cfd280 | |||
| 1a1cbaed28 | |||
| d18f51ca6d | |||
| abd843ad7a | |||
| 43297555f0 | |||
| a4717ba245 | |||
| a51325ede0 | |||
| 4a81d6e988 | |||
| c9f9c63ef2 | |||
| a6958eee39 | |||
| b6eec691f5 | |||
| 90cbc94e6a | |||
| 02ca6eea4a | |||
| 9629be196a | |||
| 3e461bc692 | |||
| 1878ce5673 | |||
| 4b55c57da1 | |||
| 7814e3c0db | |||
| 129e52a116 | |||
| d97e582802 | |||
| e98bf98a3b | |||
| 12b9e432aa | |||
| b411e331a9 | |||
| d1d5c7ca21 | |||
| c348be1365 | |||
| ddff8bb078 | |||
| 0b7ece1c48 | |||
| 8722de1d68 | |||
| b1b2e00b87 | |||
| d895eccda3 | |||
| bf57c1442e | |||
| dbd9bad7e7 | |||
| c466abb836 | |||
| 203808d323 | |||
| 7189cae9e3 | |||
| ebce20e389 | |||
| d1c5d4d29f | |||
| 90f5a08c50 | |||
| 966bc1e9b3 | |||
| 6179d07564 | |||
| 946168517e | |||
| ec6b888840 | |||
| 3fdf558b6c | |||
| c57344e334 | |||
| 4c5b847c14 | |||
| 30faa66519 | |||
| 476ff92f30 | |||
| 18dd9dc8a3 | |||
| d292ab6ac0 | |||
| 9a90387df6 | |||
| c1909b58ab | |||
| 9b77c4a693 | |||
| cf672c349b | |||
| 800f1d84d9 | |||
| f72c0962c8 | |||
| d4303b053f | |||
| 6737226d91 | |||
| b0492de6d4 | |||
| 4c4d608ac1 | |||
| 6648d4f655 | |||
| 2a4e57de0d | |||
| 9ab0e5fc0f | |||
| 6a605f9db0 | |||
| a7fbe6e491 | |||
| b4252581b5 | |||
| fcde03ce4b | |||
| 363258f6ac | |||
| 06580f507b | |||
| 82db179601 | |||
| 565336e454 | |||
| 692a68d65e | |||
| db819a69f1 | |||
| 6fe25e1405 | |||
| 165770699e | |||
| 3ae6180584 | |||
| bb11ae9d36 | |||
| 8e56d53796 | |||
| 6d2f268ff3 | |||
| 5362c4f39a | |||
| 875821df08 | |||
| 51ae525983 | |||
| 141f7b6751 | |||
| 4c5c628d23 | |||
| 1d8449773d | |||
| 5479e9dbcd | |||
| 52a0b1df5c | |||
| e0f5c9814a | |||
| 39b928b118 | |||
| 378fc24198 | |||
| b6737aca0f | |||
| 12115880a1 | |||
| b3a248d754 | |||
| c41502a829 | |||
| 47f3ebcf4d | |||
| b7646d8ce3 | |||
| e2e2e09bbb | |||
| 98e024ed5a | |||
| a2fe597ed6 | |||
| 946089e307 | |||
| 990e0e7fdc | |||
| d16225e111 | |||
| d4530567d7 | |||
| a82106edf0 | |||
| 5c3e25b41c | |||
| ce74ff45d7 | |||
| b66938e367 | |||
| 067c7c24fc | |||
| ebb9db1b92 | |||
| c5ef5c6f83 | |||
| ff96e73483 | |||
| 6fe75d1b57 | |||
| f306d53d3a | |||
| d7c73745ff | |||
| d479180337 | |||
| a664c1b7e5 | |||
| f89eb0fc2f | |||
| 9d403f87f4 | |||
| 6b47fb3ad3 | |||
| b78180374e | |||
| d148de7617 | |||
| a6fd50b523 | |||
| 95a49495c3 | |||
| 457e9e2a45 | |||
| b30d0deeda | |||
| 34c441eaff | |||
| 4f3b0c81c7 | |||
| 6729807363 | |||
| cdedd25c23 | |||
| c0ae8f98f8 | |||
| 83e770fb00 | |||
| a2de1582cc | |||
| 0296fc1666 | |||
| 4fd700d771 | |||
| cc5401f193 | |||
| c0654f4ab3 | |||
| 475fbe7c2c | |||
| 842cece89f | |||
| 035fe7c8bc | |||
| 7e54ca7b92 | |||
| 4892d75946 | |||
| 3c821317f5 | |||
| 8073f9cd28 | |||
| 55933b974e | |||
| 29e4748521 | |||
| b192f0db5d | |||
| 5e975a62b9 | |||
| 9eec9b81ae | |||
| 65cbe8644b | |||
| 997cd9ee31 | |||
| 78b68dc135 | |||
| 0b62b93484 | |||
| 3831cfd4c7 | |||
| efa2b3a8af | |||
| 862ca8fbbd | |||
| 6cca2bf89e | |||
| 2620d061b4 | |||
| bf4a4359f7 | |||
| 075d441ecc | |||
| ed0a654e9a | |||
| a37a878c92 | |||
| 32d888472f | |||
| 68f7123eec | |||
| 099093c66a | |||
| 921ca80eef | |||
| 8796b14d39 | |||
| 01737e7fa8 | |||
| 2cb14e2452 | |||
| f18aacd809 | |||
| a805edc181 | |||
| 1bb2416059 | |||
| 2342bbf4d4 | |||
| 13bc0e665e | |||
| 396b6b7d80 | |||
| 9c09c36a0b | |||
| c4dae52dff | |||
| 5f96e7b0dd | |||
| 5a2e7b75b4 | |||
| 1d39fb8ad1 | |||
| 9c0e1258a3 | |||
| 513a3ad610 | |||
| c7f17f771b | |||
| a9fd75ff52 | |||
| ef3e7d0fa6 | |||
| 9c802252c6 | |||
| 4928fd1f0c | |||
| 9d80c66605 | |||
| 8607c70bbe | |||
| a7d235e53a | |||
| 0ca0182687 | |||
| 2190cf2221 | |||
| e86fdce970 | |||
| 63b067cb7e | |||
| abf274f0c5 | |||
| fd01e0446d | |||
| 4a371cda80 | |||
| d1da0d0f9e | |||
| 6fe356bad7 | |||
| 40d9aa1790 | |||
| b7cac443c1 | |||
| 93fbd9d154 | |||
| 13a5ce024e | |||
| a60a6c028c | |||
| 37bb46db79 | |||
| db56a05559 | |||
| a35003d750 | |||
| cd3caf9b76 | |||
| 864f4303a0 | |||
| c4eadb03b9 | |||
| a9e7ccb870 | |||
| ff518e3525 | |||
| 03b03e8831 | |||
| ee96e8e91b | |||
| 31e1df6786 | |||
| f75c2c7fc9 | |||
| 3b115b5e08 | |||
| 542a0d7a8a | |||
| 0c869066b4 | |||
| 6ec4bf91e0 | |||
| e8d316cb83 | |||
| 0c8d4e2dc4 | |||
| 63c7ed7faf | |||
| 82bcf9ee15 | |||
| e8d116cbb8 | |||
| eeac0a0348 | |||
| 2a01d0ed7d | |||
| 0567665ca1 | |||
| 1b38a00056 | |||
| 47cfdb6e7f | |||
| a86664ee2e | |||
| e420cd2d54 | |||
| b1d1c548b4 | |||
| 3a99747e2a | |||
| 66a3d9c140 | |||
| f92e35ccc6 | |||
| 1d859f3c73 | |||
| 55c97f3441 | |||
| c6d88346d1 | |||
| 03b3a25b86 | |||
| 5c46e4aed5 | |||
| 7743569034 | |||
| b1d10af821 | |||
| cf526b8003 | |||
| 4311b93611 | |||
| 432e52536b | |||
| 3f062c9370 | |||
| 9cc3abe964 | |||
| b1a7ea4482 | |||
| 37219b4fb6 | |||
| 4d38fd8fb3 | |||
| 0376b4c790 | |||
| 88b73f950d | |||
| 21ab0fdc0d | |||
| 21021cec1f | |||
| 4187aabd11 | |||
| 7d23d4c288 | |||
| d7da677fdb | |||
| 53d546f99a | |||
| 8fce6a446f | |||
| 08d48a4601 | |||
| d31d55b00e | |||
| ec4d0076b6 | |||
| 1365aadaf0 | |||
| 957bcfb52f | |||
| 007f0c5808 | |||
| fa9c1f83eb | |||
| 98d479e82c | |||
| 9fa386ea8c | |||
| df20c13204 | |||
| 2d24a1beb3 | |||
| ecb6175c64 | |||
| 5b1a866996 | |||
| 1004c66965 | |||
| 1fbf875c16 | |||
| ad8109ed65 | |||
| 05ae4be472 | |||
| 406513488b | |||
| 71fdc5c9ea | |||
| d2e68c7c9b | |||
| 2bdbbcfa75 | |||
| 6ba4d0d310 | |||
| e14cbb49c3 | |||
| b5a7ba0054 | |||
| 74ec8ff9eb | |||
| d1726b65ff | |||
| 91994256d7 | |||
| cdc3f0076a | |||
| 0fa7eb5568 | |||
| ca0559bf7f | |||
| 1a02d73154 | |||
| e899ea74b9 | |||
| f8623173cb | |||
| 67c9211123 | |||
| e76bc1e38e | |||
| 49576b0558 | |||
| 9a6b6f88d9 | |||
| 8388e939d3 | |||
| 932bc290d4 | |||
| fdc7f9bf10 | |||
| e88489166b | |||
| 83ae87b5d4 | |||
| 1e278e4d7b | |||
| 9cb671fc43 | |||
| aedf5cde77 | |||
| 2a5831c971 | |||
| 84cc42cc40 | |||
| 4cf9437688 | |||
| eb15585c03 | |||
| 144b26bd5d | |||
| 0fbfffbdea | |||
| 892733b66d | |||
| 54735e3476 | |||
| a599c46cfc | |||
| 1c2ec14677 | |||
| b0d18a151d | |||
| 2d2d5d6bae | |||
| 374fe08fe2 | |||
| 3f8bb86e15 | |||
| 1e2190b1ad | |||
| 09bb658367 | |||
| c91e4f83e0 | |||
| 8c0fbede36 | |||
| 61788b2c7f | |||
| 8ff0ed5756 | |||
| e242956c61 | |||
| 58e8c56d37 | |||
| 9b615738f3 | |||
| 26b19bb545 | |||
| 8577366285 | |||
| 65b82c29d4 | |||
| e86d728acd | |||
| 87b3030b9e | |||
| dfc61ec50c | |||
| 70b72d950a | |||
| 6302fbd5a9 | |||
| e1a3dc034e | |||
| 4e934ed31c | |||
| 3f5d3a9d64 | |||
| e72b00fe17 | |||
| 5e73631377 | |||
| df04dba03f | |||
| ed35819ae5 | |||
| 2aac7353e2 | |||
| 1cb380de45 | |||
| 27bc8a2b32 | |||
| 2e367f398f | |||
| f022e89a73 | |||
| 5b46046b87 | |||
| b62104ae91 | |||
| 76a2e5b8ba | |||
| 4f9eb6ea13 | |||
| 0c0e0d2ba6 | |||
| fc51f4fc74 | |||
| 8583f29082 | |||
| fc6a944f61 | |||
| 1d0234f9ed | |||
| 75bd2abe12 | |||
| 06bce9f7e2 | |||
| 2a9bebc416 | |||
| 0a021baf09 | |||
| 34331c2312 | |||
| 8eef4083c8 | |||
| 869da4fa6c | |||
| 7048d0a4d9 | |||
| e029bb2e89 | |||
| 6cd612fbb8 | |||
| 41c9f25c6b | |||
| 3b4ade02a5 | |||
| bf4a70b0e5 | |||
| 30ec953aa1 | |||
| 5edade9076 | |||
| 225501b1a5 | |||
| 9df682b4ef | |||
| 9d6a23658f | |||
| 408b106c2f | |||
| 713989bcb9 | |||
| 7ce4703235 | |||
| a1013c878a | |||
| 27ff4b1d69 | |||
| 61d03a9ece | |||
| baf5d9151f | |||
| eb02131482 | |||
| 504910cbc7 | |||
| 47c0fadb40 | |||
| 203b14064f | |||
| fe7e9aee68 | |||
| bf1307c3a8 | |||
| e65a9eab8f | |||
| fb27d1a17c | |||
| 6ffc809fac | |||
| 8a11d7b4b6 | |||
| 1336cbda98 | |||
| f30cf71f27 | |||
| 8ff6dc4cd4 | |||
| 4a9681ae26 | |||
| bf80b77374 | |||
| c9c8450cbb | |||
| df0d3d4972 | |||
| 026f76cb4a | |||
| 338c13947d | |||
| 81eb1ec9a5 | |||
| 4b625ab9ea | |||
| 9f76cf6762 | |||
| 427839fe52 | |||
| 6146eb074b | |||
| 69309bf40b | |||
| 8a48701cbf | |||
| a369bf0297 | |||
| d863468175 | |||
| abf19e0c0d | |||
| 4d6998371f | |||
| ce600f5bd0 | |||
| 912a208dfe | |||
| cf5f52e696 | |||
| af40f38ca3 | |||
| bc9de1344d | |||
| 5c33542b35 | |||
| 64d077df8b | |||
| 5c7254a827 | |||
| 10508da2f4 | |||
| 248ecaf778 | |||
| d42c139490 | |||
| 051f3b5ce5 | |||
| 4d1b79b1b5 | |||
| 446a57b1e2 | |||
| 22d812a305 | |||
| 21cc84f7a1 | |||
| 7604bd0b4a | |||
| f88d409265 | |||
| 3d394e7591 | |||
| d8e4f45827 | |||
| 9a75993848 | |||
| daf4bc347e | |||
| 840805f39f | |||
| 4c4a3a99c2 | |||
| 6f0ec7ad47 | |||
| 92c10d50c8 | |||
| 44e78b336f | |||
| 688af6c815 | |||
| 5629a09ab8 | |||
| 19bdd5e160 | |||
| 338da4bbdb | |||
| 5ae6961b2f | |||
| b2f7dd77bb | |||
| 1ebb61c1b4 | |||
| ea4d196ca2 | |||
| caad874c62 | |||
| bd8942617f | |||
| 033dee9393 | |||
| bdafc2ad36 | |||
| e0e233b50e | |||
| e448d220a0 | |||
| 79022c1612 | |||
| 23f34e4846 | |||
| 961a7bd278 | |||
| efd595f45b | |||
| d683d75924 | |||
| 119bcd82bf | |||
| 4fa27e5ec0 | |||
| ec507dc606 | |||
| 14871e6175 | |||
| 5f4ace9e96 | |||
| 410e2f272c | |||
| 23df2f7bb2 | |||
| 107e5cefca | |||
| c49b5ac309 | |||
| f69f9cd94a | |||
| f1e5a1cb25 | |||
| cb0b718e84 | |||
| 7f35e6782e | |||
| 9445b1f468 | |||
| 7b65dce59e | |||
| cf4fc241ab | |||
| b200eeb8ed | |||
| b10cb1d551 | |||
| 1d97a93b87 | |||
| a1f23f4fc5 | |||
| 5860943104 | |||
| 9063db3fd0 | |||
| 884a279a4a | |||
| 8ab0cd5465 | |||
| fe5f517c25 | |||
| 2b14a047a3 | |||
| af17a976a8 | |||
| 925bc99566 | |||
| bd82ff80c1 | |||
| 104b537177 | |||
| 6dcb21a301 | |||
| 9cfb59d501 | |||
| 141e7ace37 | |||
| 0df3fc3349 | |||
| 414a8bb1c3 | |||
| 71fd011c65 | |||
| b1cf1de005 | |||
| 54a7597709 | |||
| a424adb64b | |||
| 0ae6cc1dd2 | |||
| 351184cda2 | |||
| 582e67ea3d | |||
| d649fb5651 | |||
| 3e7f7d2bff | |||
| e4ac77e77b | |||
| f3eedecfec | |||
| eee2e9f893 | |||
| fd069a68e7 | |||
| f81cf7e3e1 | |||
| 57bcedf022 | |||
| e03f1aaef8 | |||
| 587f62bc15 | |||
| 27627e2821 | |||
| 50e59c7217 | |||
| 22f8f09c56 | |||
| a0358d356d | |||
| 09e77e0eff | |||
| 44989dea5a | |||
| a58a583652 | |||
| 761f0e6a46 | |||
| 6783b2b7a8 | |||
| 81720caad7 | |||
| b48f6275d7 | |||
| e9bbd723de | |||
| db58dc9ac9 | |||
| 1b05113975 | |||
| 18184b447a | |||
| 75b1da5144 | |||
| e5259ea78f | |||
| 19e64aadfe | |||
| 1a00d3653f | |||
| 17633ccda7 | |||
| 457d216a0b | |||
| cbdff104e9 | |||
| 83eaa1b8f6 | |||
| e796c9e803 | |||
| 4d2d98774c | |||
| 7220f525d3 | |||
| 7ccd45159f | |||
| 6357cc17de | |||
| d3046994c7 | |||
| f799ff947a | |||
| d822ecd017 | |||
| 95ed2de093 | |||
| 3ec11a877f | |||
| 0714023504 | |||
| 9423bbd30a | |||
| a6f304c527 | |||
| bff1705c5b | |||
| d4407e1f50 | |||
| 2327be0f5d | |||
| 914bd5996c | |||
| 9e92c26926 | |||
| 4aa69f081d | |||
| 3f01ab6502 | |||
| 6558af7968 | |||
| 7c0077e4a6 | |||
| e090363418 | |||
| 3fab54e2e7 | |||
| 4208c4a73d | |||
| 14b841d002 | |||
| eb9ca71fcd | |||
| eaa448ccdd | |||
| 7305bbb207 | |||
| dfb90e6de0 | |||
| b1b6d7edf1 | |||
| f04f35dffd | |||
| 3bf17e5415 | |||
| 818297e96d | |||
| 1ae61bd48c | |||
| 0315f9966a | |||
| 1e3fb75a4f | |||
| e521c73720 | |||
| 05b7707b39 | |||
| 9d6c742298 | |||
| 668d5c42c4 | |||
| 086bf3dbd2 | |||
| b735454d05 | |||
| bedc3edbad | |||
| ee37de67a2 | |||
| d1638842e7 | |||
| 2ed0767515 | |||
| 3eb61b3aec | |||
| e3866a6dcb | |||
| e6074d2b14 | |||
| dc773b1960 | |||
| 96c7df5fff | |||
| 1f50317d5c | |||
| 93d881e8d2 | |||
| 6bd3f4ade5 | |||
| a7bfe53d37 | |||
| 9ba82f6cbe | |||
| 1f3e3fbc93 | |||
| 20bb73d391 | |||
| 354a1b8503 | |||
| bfadf56470 | |||
| a84a43649b | |||
| d48c7c9de1 | |||
| 3b83dc0c24 | |||
| 6d43b82170 | |||
| c2eaec7d39 | |||
| 3383ea3da8 | |||
| b54027c46f | |||
| 1668bdbeb8 | |||
| 96b9ece8aa | |||
| d157988850 | |||
| 40bda3ce1e | |||
| f92d545f80 | |||
| 42d6867be5 | |||
| e1cdf4ed93 | |||
| 6788447088 | |||
| 3da77518ec | |||
| f800ac1e92 | |||
| b6cf51ba08 | |||
| d1f5cfc441 | |||
| d701547928 | |||
| f7eaa877c8 | |||
| b2af609989 | |||
| dae51b99e2 | |||
| 3906f03b21 | |||
| 5aa90e3533 | |||
| 198d03d9ec | |||
| 1b205afa5d | |||
| fcf939a4c8 | |||
| f65b8d732f | |||
| cfaddcd249 | |||
| 9747759e32 | |||
| 575b7bf1a6 | |||
| 24c4344ac3 | |||
| 04ab30e4ae | |||
| 20494a5621 | |||
| e7fee71255 | |||
| 89c2113d96 | |||
| bdc2230d17 | |||
| 515fcf1ee7 | |||
| 1c6f629b24 | |||
| c0fbbd854a | |||
| 4eb2235351 | |||
| 902bde4637 | |||
| 1e2ac8ab13 | |||
| c637c776af | |||
| b48e2ee6c9 | |||
| 20558ddfb1 | |||
| 8d5428dc16 | |||
| 74adf88692 | |||
| a7a492b050 | |||
| 110c61e4aa | |||
| b6b5b5eaae | |||
| 9708b36438 | |||
| 9e7b299a09 | |||
| 8de9774813 | |||
| 4113f57a3d | |||
| 7bf6f0d0c2 | |||
| 7d9c2822e8 | |||
| 5c166b72c2 | |||
| d8c154ce19 | |||
| dd4e274579 | |||
| e29b5cb005 | |||
| f117350095 | |||
| e592e3e071 | |||
| cc4f3eb826 | |||
| 3fc0f5dcc6 | |||
| 636653be5b | |||
| a48ff9a4fe | |||
| 67e49df1c7 | |||
| 155adef231 | |||
| d8df7edaa3 | |||
| 66612aae14 | |||
| 66f82f5dfa | |||
| 9ab03280b3 | |||
| 238927a736 | |||
| e4efb0d485 | |||
| a506023585 | |||
| ac14569c1d | |||
| 25511f25b1 | |||
| d169443340 | |||
| 9c3cdf5a7c | |||
| 067058190e | |||
| a2ec93afb3 | |||
| 251a2d3239 | |||
| 63cde0d928 | |||
| 821b4a8260 | |||
| 0b7d0cd4b0 | |||
| 859a61621b | |||
| 0a7191267b | |||
| fc1477979b | |||
| d3e66e3743 | |||
| 1a62062356 | |||
| a67b0ad517 | |||
| 9f695f742d | |||
| b54dfcefdb | |||
| 0b3ff4bd05 | |||
| fa59da6630 | |||
| 65c31627e7 | |||
| 77a8827fbe | |||
| 7a9eef46b1 | |||
| 561f26f795 | |||
| f989812bfd | |||
| 831b1b38b9 | |||
| 8af9d93cff | |||
| 9c906bdd17 | |||
| afb53e4f63 | |||
| 6e784624dd | |||
| 9523fde5fc | |||
| 390be5333c | |||
| eb1e3c5efc | |||
| 8753f6c84a | |||
| 848973c168 | |||
| 954b3ed43d | |||
| ccd705d863 | |||
| d805ed379b | |||
| 9c68fe0eaf | |||
| 12e05c60d1 | |||
| 548d9d17a1 | |||
| fdb9bd07f8 | |||
| 5a803989c5 | |||
| 315c45a938 | |||
| 376ecf5161 | |||
| 95d0d0cf63 | |||
| 6826110fa0 | |||
| 2ac011c47c | |||
| 09be88a375 | |||
| edafed5d4e | |||
| e2029ede7a | |||
| 13301ae17f | |||
| ef3e117632 | |||
| 708962fb1d | |||
| 1d59b05dc8 | |||
| 5addd95c75 | |||
| 995455e12c | |||
| 218ba0eee9 |
117
.gitignore
vendored
117
.gitignore
vendored
@@ -1,39 +1,60 @@
|
|||||||
# Created by https://www.gitignore.io/api/intellij
|
# Created by https://www.toptal.com/developers/gitignore/api/intellij
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
|
||||||
|
|
||||||
### Intellij ###
|
### Intellij ###
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff:
|
# User-specific stuff
|
||||||
.idea/workspace.xml
|
.idea/**/workspace.xml
|
||||||
.idea/tasks.xml
|
.idea/**/tasks.xml
|
||||||
.idea/dictionaries
|
.idea/**/usage.statistics.xml
|
||||||
.idea/vcs.xml
|
.idea/**/dictionaries
|
||||||
.idea/jsLibraryMappings.xml
|
.idea/**/shelf
|
||||||
.shelf/*
|
|
||||||
|
|
||||||
# Sensitive or high-churn files:
|
# AWS User-specific
|
||||||
.idea/dataSources.ids
|
.idea/**/aws.xml
|
||||||
.idea/dataSources.xml
|
|
||||||
.idea/dataSources.local.xml
|
|
||||||
.idea/sqlDataSources.xml
|
|
||||||
.idea/dynamic.xml
|
|
||||||
.idea/uiDesigner.xml
|
|
||||||
|
|
||||||
# Gradle:
|
# Generated files
|
||||||
.idea/gradle.xml
|
.idea/**/contentModel.xml
|
||||||
.idea/libraries
|
|
||||||
|
|
||||||
# Mongo Explorer plugin:
|
# Sensitive or high-churn files
|
||||||
.idea/mongoSettings.xml
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
## File-based project format:
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
.idea/artifacts
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/*.iml
|
||||||
|
.idea/modules
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
*.iws
|
*.iws
|
||||||
|
|
||||||
## Plugin-specific files:
|
|
||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
/out/
|
out/
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
# mpeltonen/sbt-idea plugin
|
||||||
.idea_modules/
|
.idea_modules/
|
||||||
@@ -41,20 +62,62 @@
|
|||||||
# JIRA plugin
|
# JIRA plugin
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
|
||||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
com_crashlytics_export_strings.xml
|
com_crashlytics_export_strings.xml
|
||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
fabric.properties
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
### Intellij Patch ###
|
### Intellij Patch ###
|
||||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||||
|
|
||||||
*.iml
|
# *.iml
|
||||||
modules.xml
|
# modules.xml
|
||||||
|
# .idea/misc.xml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# Sonarlint plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||||
|
.idea/**/sonarlint/
|
||||||
|
|
||||||
|
# SonarQube Plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||||
|
.idea/**/sonarIssues.xml
|
||||||
|
|
||||||
|
# Markdown Navigator plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||||
|
.idea/**/markdown-navigator.xml
|
||||||
|
.idea/**/markdown-navigator-enh.xml
|
||||||
|
.idea/**/markdown-navigator/
|
||||||
|
|
||||||
|
# Cache file creation bug
|
||||||
|
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||||
|
.idea/$CACHE_FILE$
|
||||||
|
|
||||||
|
# CodeStream plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||||
|
.idea/codestream.xml
|
||||||
|
|
||||||
|
# Azure Toolkit for IntelliJ plugin
|
||||||
|
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
||||||
|
.idea/**/azureSettings.xml
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/intellij
|
||||||
|
|
||||||
# Integry
|
# Integry
|
||||||
*/target/*
|
*/target/*
|
||||||
*.ckie
|
*.ckie
|
||||||
/ts
|
/ts
|
||||||
|
/temp
|
||||||
|
|||||||
17
.idea/compiler.xml
generated
17
.idea/compiler.xml
generated
@@ -6,24 +6,9 @@
|
|||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
<module name="ems-core" />
|
|
||||||
<module name="ems-engine" />
|
<module name="ems-engine" />
|
||||||
|
<module name="ems-core" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
<bytecodeTargetLevel>
|
|
||||||
<module name="ems-activity" target="1.8" />
|
|
||||||
<module name="ems-contabil" target="1.8" />
|
|
||||||
<module name="ems-document" target="1.8" />
|
|
||||||
<module name="ems-engine-customizations" target="1.8" />
|
|
||||||
<module name="ems-logistic" target="1.8" />
|
|
||||||
<module name="ems-offer" target="1.8" />
|
|
||||||
<module name="ems-order" target="1.8" />
|
|
||||||
<module name="ems-ordikids" target="1.8" />
|
|
||||||
<module name="ems-product" target="1.8" />
|
|
||||||
<module name="ems-production" target="1.8" />
|
|
||||||
<module name="ems-retail" target="1.8" />
|
|
||||||
<module name="ems-system" target="1.8" />
|
|
||||||
<module name="ems-utility" target="1.8" />
|
|
||||||
</bytecodeTargetLevel>
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
26
.idea/encodings.xml
generated
26
.idea/encodings.xml
generated
@@ -1,36 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="Encoding">
|
<component name="Encoding">
|
||||||
<file url="file://$PROJECT_DIR$/ems-activity/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-activity/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-core/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/ems-core/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/ems-core/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/ems-core/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/ems-document/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-document/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-engine/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/ems-engine/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/ems-engine/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/ems-engine/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-offer/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-offer/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-order/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-order/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-product/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-product/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-production/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-production/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-retail/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-retail/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-system/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-system/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-utility/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/ems-utility/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
8
.idea/file.template.settings.xml
generated
Normal file
8
.idea/file.template.settings.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExportableFileTemplateSettings">
|
||||||
|
<default_templates>
|
||||||
|
<template name="IntegryMigrationClass.java" file-name="Migration_${YEAR}${MONTH}${DAY}${HOUR}${MINUTE}${SECOND}" reformat="true" live-template-enabled="false" />
|
||||||
|
</default_templates>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -16,4 +16,4 @@ public class ${NAME} extends EntityBase {
|
|||||||
|
|
||||||
private static final long serialVerionUID = 1L;
|
private static final long serialVerionUID = 1L;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,4 +13,4 @@ public class ${NAME} extends EntityBase {
|
|||||||
public static final String ENTITY = "${TABLE}";
|
public static final String ENTITY = "${TABLE}";
|
||||||
|
|
||||||
#[[$END$]]#
|
#[[$END$]]#
|
||||||
}
|
}
|
||||||
@@ -16,4 +16,4 @@ public class ${NAME} extends BaseMigration implements MigrationModelInterface{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
6
.idea/git_toolbox_blame.xml
generated
Normal file
6
.idea/git_toolbox_blame.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxBlameSettings">
|
||||||
|
<option name="version" value="2" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxProjectSettings">
|
||||||
|
<option name="commitMessageIssueKeyValidationOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
<option name="commitMessageValidationEnabledOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
2
.idea/inspectionProfiles/Project_Default.xml
generated
2
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -2,7 +2,7 @@
|
|||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,org.apache.http.impl.client.HttpClientBuilder,build,org.apache.http.impl.client.HttpClients,createDefault,com.annimon.stream.Stream,of" />
|
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,java.lang.foreign.Arena,ofAuto,java.lang.foreign.Arena,global,com.annimon.stream.Stream,of" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
||||||
15
.idea/jarRepositories.xml
generated
15
.idea/jarRepositories.xml
generated
@@ -1,31 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="repo-sqlserver" />
|
|
||||||
<option name="name" value="repo-sqlserver" />
|
|
||||||
<option name="url" value="http://maven.lib.umd.edu/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="central" />
|
<option name="id" value="central" />
|
||||||
<option name="name" value="Central Repository" />
|
<option name="name" value="Central Repository" />
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central-http" />
|
|
||||||
<option name="name" value="central-http" />
|
|
||||||
<option name="url" value="http://repo.maven.apache.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="central" />
|
<option name="id" value="central" />
|
||||||
<option name="name" value="Maven Central repository" />
|
<option name="name" value="Maven Central repository" />
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
</remote-repository>
|
</remote-repository>
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="AsposeJavaAPI" />
|
|
||||||
<option name="name" value="Aspose Java API" />
|
|
||||||
<option name="url" value="https://releases.aspose.com/java/repo/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
<remote-repository>
|
||||||
<option name="id" value="jboss.community" />
|
<option name="id" value="jboss.community" />
|
||||||
<option name="name" value="JBoss Community repository" />
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
|||||||
6
.idea/jenkinsSettings.xml
generated
Normal file
6
.idea/jenkinsSettings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Jenkins.Application.Settings">
|
||||||
|
<option name="serverUrl" value="https://ci.studioml.it" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@@ -7,7 +7,9 @@
|
|||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
</component>
|
||||||
|
<component name="PWA">
|
||||||
|
<option name="wasEnabledAtLeastOnce" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
||||||
15
.idea/runConfigurations/MenuStaticCreator.xml
generated
Normal file
15
.idea/runConfigurations/MenuStaticCreator.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="MenuStaticCreator" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="it.integry.ems.menu.MenuStaticCreator" />
|
||||||
|
<module name="ems-core" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="it.integry.ems.menu.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
107
.idea/runConfigurations/Tomcat.xml
generated
Normal file
107
.idea/runConfigurations/Tomcat.xml
generated
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" nameIsGenerated="true">
|
||||||
|
<option name="COMMON_VM_ARGUMENTS" value="-Xms512m -Xmx2048m" />
|
||||||
|
<deployment>
|
||||||
|
<artifact name="ems-engine:war exploded">
|
||||||
|
<settings>
|
||||||
|
<option name="CONTEXT_PATH" value="/ems-api" />
|
||||||
|
</settings>
|
||||||
|
</artifact>
|
||||||
|
</deployment>
|
||||||
|
<server-settings>
|
||||||
|
<option name="BASE_DIRECTORY_NAME" value="a89fc2ca-88f5-402a-95b3-33bd03a9c1ac" />
|
||||||
|
</server-settings>
|
||||||
|
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
|
||||||
|
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
|
||||||
|
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
|
||||||
|
<predefined_log_file enabled="true" id="Tomcat" />
|
||||||
|
<predefined_log_file enabled="true" id="Tomcat Catalina" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="javadebug" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<RunnerSettings RunnerId="JProfiler">
|
||||||
|
<option name="jreHome" value="$USER_HOME$/.jdks/openjdk-21.0.2" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
<option name="BuildArtifacts" enabled="true">
|
||||||
|
<artifact name="ems-engine:war exploded" />
|
||||||
|
</option>
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat_9__1__ServerDev_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat_9__1__ServerDev_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat 9 #1 (ServerDev)" type="Remote">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="serverdev" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
12
.idea/runConfigurations/Tomcat_9__2__ServerDev_.xml
generated
Normal file
12
.idea/runConfigurations/Tomcat_9__2__ServerDev_.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat 9 #2 (ServerDev)" type="Remote">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="serverdev" />
|
||||||
|
<option name="PORT" value="8002" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat_9__RistoCash_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat_9__RistoCash_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat 9 (RistoCash)" type="Remote">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="127.0.0.1" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat__1__GestSRV_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__1__GestSRV_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat #1 (GestSRV)" type="Remote" folderName="Carelli">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="172.16.30.238" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat__1__Rosso_Gargano_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__1__Rosso_Gargano_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat #1 (Rosso Gargano)" type="Remote" folderName="Rosso Gargano">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="192.168.1.13" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat__1__ServerTomcat_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__1__ServerTomcat_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat #1 (ServerTomcat)" type="Remote">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="localhost" />
|
||||||
|
<option name="PORT" value="8000" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8000" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat__2__GestSRV_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__2__GestSRV_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat #2 (GestSRV)" type="Remote" folderName="Carelli">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="172.16.30.238" />
|
||||||
|
<option name="PORT" value="8002" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8002" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tomcat__AnydeskTunnel_.xml
generated
Normal file
16
.idea/runConfigurations/Tomcat__AnydeskTunnel_.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat (AnydeskTunnel)" type="Remote">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="servertomcat" />
|
||||||
|
<option name="PORT" value="8000" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8000" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
107
.idea/runConfigurations/Tomcat__FAST_.xml
generated
Normal file
107
.idea/runConfigurations/Tomcat__FAST_.xml
generated
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tomcat (FAST)" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false">
|
||||||
|
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms6G -Xmx6G -XX:MaxPermSize=1G -XX:PermSize=512M" />
|
||||||
|
<deployment>
|
||||||
|
<artifact name="ems-engine:war exploded">
|
||||||
|
<settings>
|
||||||
|
<option name="CONTEXT_PATH" value="/ems-api" />
|
||||||
|
</settings>
|
||||||
|
</artifact>
|
||||||
|
</deployment>
|
||||||
|
<server-settings>
|
||||||
|
<option name="BASE_DIRECTORY_NAME" value="00c7852d-22fb-44e1-9140-8ae73b4192fd" />
|
||||||
|
</server-settings>
|
||||||
|
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
|
||||||
|
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
|
||||||
|
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
|
||||||
|
<predefined_log_file enabled="true" id="Tomcat" />
|
||||||
|
<predefined_log_file enabled="true" id="Tomcat Catalina" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="javadebug" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<RunnerSettings RunnerId="JProfiler">
|
||||||
|
<option name="jreHome" value="$PROJECT_DIR$/../../../Program Files/Java/jdk1.8.0_202" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
|
||||||
|
<option name="USE_ENV_VARIABLES" value="true" />
|
||||||
|
<STARTUP>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</STARTUP>
|
||||||
|
<SHUTDOWN>
|
||||||
|
<option name="USE_DEFAULT" value="true" />
|
||||||
|
<option name="SCRIPT" value="" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
</SHUTDOWN>
|
||||||
|
</ConfigurationWrapper>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
<option name="BuildArtifacts" enabled="true">
|
||||||
|
<artifact name="ems-engine:war exploded" />
|
||||||
|
</option>
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tosca_Cloud.xml
generated
Normal file
16
.idea/runConfigurations/Tosca_Cloud.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tosca Cloud" type="Remote" folderName="Tosca">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="4.232.161.31" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/Tosca_Verona.xml
generated
Normal file
16
.idea/runConfigurations/Tosca_Verona.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Tosca Verona" type="Remote" folderName="Tosca">
|
||||||
|
<module name="ems-engine" />
|
||||||
|
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||||
|
<option name="SERVER_MODE" value="false" />
|
||||||
|
<option name="SHMEM_ADDRESS" />
|
||||||
|
<option name="HOST" value="10.19.178.6" />
|
||||||
|
<option name="PORT" value="8001" />
|
||||||
|
<option name="AUTO_RESTART" value="false" />
|
||||||
|
<RunnerSettings RunnerId="Debug">
|
||||||
|
<option name="DEBUG_PORT" value="8001" />
|
||||||
|
<option name="LOCAL" value="false" />
|
||||||
|
</RunnerSettings>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
File diff suppressed because it is too large
Load Diff
122
build/Jenkinsfile.groovy
Normal file
122
build/Jenkinsfile.groovy
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage ('PreBuild Steps (Master)') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.GIT_BRANCH == "master"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
echo "Creo version tag su Git"
|
||||||
|
bat 'build\\create_build_tag.bat'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Maven Build') {
|
||||||
|
steps {
|
||||||
|
echo "${WORKSPACE}"
|
||||||
|
withMaven(jdk: 'JDK 17.0.6 x64', traceability: true, maven: 'Maven 3.9.5') {
|
||||||
|
bat(script: 'mvn clean install -t toolchains-jenkins.xml', returnStdout: true)
|
||||||
|
archiveArtifacts(artifacts: 'ems-engine/target/*.war*', onlyIfSuccessful: true)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish Develop') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.GIT_BRANCH == "develop"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parallel {
|
||||||
|
stage('Tomcat update') {
|
||||||
|
stages {
|
||||||
|
stage('Update Tomcat 1') {
|
||||||
|
steps {
|
||||||
|
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||||
|
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9\" -httpPort \"8081\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Update Tomcat 2') {
|
||||||
|
steps {
|
||||||
|
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||||
|
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9Backup\" -httpPort \"8082\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||||
|
bat 'curl -k https://devservices.studioml.it/ems-api/updateWMSApp'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish over FTP') {
|
||||||
|
steps {
|
||||||
|
echo "Publish over FTP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish Master') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.GIT_BRANCH == "master"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parallel {
|
||||||
|
stage('Tomcat update') {
|
||||||
|
stages {
|
||||||
|
stage('Update Tomcat 1') {
|
||||||
|
steps {
|
||||||
|
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||||
|
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9
|
||||||
|
rm -R tomcat9/webapps/ems-api
|
||||||
|
sudo /usr/bin/systemctl start tomcat9
|
||||||
|
|
||||||
|
/home/studioml/./wait_tomcat_startup.sh 8081''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Update Tomcat 2') {
|
||||||
|
steps {
|
||||||
|
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||||
|
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9backup
|
||||||
|
rm -R tomcat9backup/webapps/ems-api
|
||||||
|
sudo /usr/bin/systemctl start tomcat9backup
|
||||||
|
|
||||||
|
/home/studioml/./wait_tomcat_startup.sh 8082
|
||||||
|
|
||||||
|
sleep 10''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9backup/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
|
||||||
|
bat 'curl -k https://services.studioml.it/ems-api/updateWMSApp'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish over FTP') {
|
||||||
|
steps {
|
||||||
|
ftpPublisher alwaysPublishFromMaster: false,
|
||||||
|
continueOnError: false,
|
||||||
|
failOnError: false,
|
||||||
|
masterNodeName: '',
|
||||||
|
paramPublish: null,
|
||||||
|
publishers: [[configName: 'OVH Linux Web Server (51.38.112.23)',
|
||||||
|
transfers: [[asciiMode: false,
|
||||||
|
cleanRemote: false,
|
||||||
|
excludes: '',
|
||||||
|
flatten: false,
|
||||||
|
makeEmptyDirs: false,
|
||||||
|
noDefaultExcludes: false,
|
||||||
|
patternSeparator: '[, ]+',
|
||||||
|
remoteDirectory: '/download/Aggiornamenti',
|
||||||
|
remoteDirectorySDF: false,
|
||||||
|
removePrefix: 'ems-engine/target/',
|
||||||
|
sourceFiles: 'ems-engine/target/*.war*']],
|
||||||
|
usePromotionTimestamp: false,
|
||||||
|
useWorkspaceInPromotion: false,
|
||||||
|
verbose: true]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
43
build/create_build_tag.bat
Normal file
43
build/create_build_tag.bat
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
REM SET YEAR
|
||||||
|
set YEAR=%date:~6,4%
|
||||||
|
|
||||||
|
REM SET MONTH
|
||||||
|
set MONTH=%date:~3,2%
|
||||||
|
if %MONTH% LSS 10 set MONTH=%MONTH:~1,2%
|
||||||
|
if %MONTH% LSS 10 set MONTH=0%MONTH%
|
||||||
|
|
||||||
|
REM SET DAY
|
||||||
|
set DAY=%date:~0,2%
|
||||||
|
if %DAY% LSS 10 set DAY=%DAY:~1,2%
|
||||||
|
if %DAY% LSS 10 set DAY=0%DAY%
|
||||||
|
|
||||||
|
REM SET HOUR
|
||||||
|
set HOUR=%time:~0,2%
|
||||||
|
if %HOUR% LSS 10 set HOUR=%HOUR:~1,2%
|
||||||
|
if %HOUR% LSS 10 set HOUR=0%HOUR%
|
||||||
|
|
||||||
|
REM SET MINUTE
|
||||||
|
set MINUTE=%time:~3,2%
|
||||||
|
if %MINUTE% LSS 10 set MINUTE=%MINUTE:~1,2%
|
||||||
|
if %MINUTE% LSS 10 set MINUTE=0%MINUTE%
|
||||||
|
|
||||||
|
REM SET SECOND
|
||||||
|
set SECOND=%time:~6,2%
|
||||||
|
if %SECOND% LSS 10 set SECOND=%SECOND:~1,2%
|
||||||
|
if %SECOND% LSS 10 set SECOND=0%SECOND%
|
||||||
|
|
||||||
|
set mydate=%YEAR%%MONTH%%DAY%_%HOUR%%MINUTE%%SECOND%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo #spring.profiles.active=@activatedProperties@ > ems-core\src\main\resources\configs\env.properties
|
||||||
|
echo project.version=%mydate% >> ems-core\src\main\resources\configs\env.properties
|
||||||
|
|
||||||
|
|
||||||
|
git add . -A
|
||||||
|
git commit -m "%mydate%"
|
||||||
|
git tag "%mydate%"
|
||||||
|
|
||||||
|
|
||||||
|
git push https://git.studioml.it/Integry/IntegryManagementSystem.git --tags
|
||||||
|
git push https://git.studioml.it/Integry/IntegryManagementSystem.git --all
|
||||||
153
build/update_tomcat.ps1
Normal file
153
build/update_tomcat.ps1
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
Param(
|
||||||
|
[string]$serviceName, #Argomento passato dal chiamante
|
||||||
|
[Int32]$httpPort, #Argomento passato dal chiamante
|
||||||
|
[string]$updatedArtifactPath #Argomento passato dal chiamante
|
||||||
|
)
|
||||||
|
|
||||||
|
$max_attempts = 48
|
||||||
|
$attempt = 0
|
||||||
|
$webappsPath = "C:\Program Files\$serviceName\webapps"
|
||||||
|
|
||||||
|
# Funzione per eseguire la chiamata GET e controllare lo status code
|
||||||
|
function Check-Status {
|
||||||
|
try {
|
||||||
|
$request = Invoke-WebRequest -Uri "http://localhost:$httpPort/ems-api/system/ok" -Method Get -ErrorAction Stop
|
||||||
|
$statusCode = $request.StatusCode
|
||||||
|
if ($statusCode -eq 200) {
|
||||||
|
Write-Host "Status code 200 ricevuto, processo completato."
|
||||||
|
exit 0
|
||||||
|
} else {
|
||||||
|
Write-Host "Status code $statusCode ricevuto, continuo a provare..."
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Errore: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Funzione per cancellare una cartella e un file
|
||||||
|
function Delete-FilesAndFolder
|
||||||
|
{
|
||||||
|
param (
|
||||||
|
[string]$folderPath,
|
||||||
|
[string]$filePath
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Cancellare la cartella specificata
|
||||||
|
if (Test-Path -Path $folderPath) {
|
||||||
|
Remove-Item -Path $folderPath -Recurse -Force
|
||||||
|
Write-Host "Cartella $folderPath eliminata con successo."
|
||||||
|
} else {
|
||||||
|
Write-Host "La cartella $folderPath non esiste."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cancellare il file specificato
|
||||||
|
if (Test-Path -Path $filePath) {
|
||||||
|
Remove-Item -Path $filePath -Force
|
||||||
|
Write-Host "File $filePath eliminato con successo."
|
||||||
|
} else {
|
||||||
|
Write-Host "Il file $filePath non esiste."
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
Write-Host "Errore nella cancellazione di file o cartella: $_"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Funzione per copiare un file
|
||||||
|
function Copy-File {
|
||||||
|
param (
|
||||||
|
[string]$sourceFilePath,
|
||||||
|
[string]$destinationFilePath
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (Test-Path -Path $sourceFilePath) {
|
||||||
|
Copy-Item -Path $sourceFilePath -Destination $destinationFilePath -Force
|
||||||
|
Write-Host "File copiato da $sourceFilePath a $destinationFilePath con successo."
|
||||||
|
} else {
|
||||||
|
Write-Host "Il file sorgente $sourceFilePath non esiste."
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Errore nella copia del file: $_"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Funzione per stoppare un servizio e attendere che sia completamente fermato
|
||||||
|
function Stop-ServiceAndWait {
|
||||||
|
param (
|
||||||
|
[string]$serviceName
|
||||||
|
)
|
||||||
|
|
||||||
|
# Tentativo di stoppare il servizio
|
||||||
|
try {
|
||||||
|
Write-Host "Sto stoppando il servizio $serviceName..."
|
||||||
|
Stop-Service -Name $serviceName -Force
|
||||||
|
|
||||||
|
# Attesa finché il servizio non viene stoppato
|
||||||
|
$service = Get-Service -Name $serviceName
|
||||||
|
while ($service.Status -ne 'Stopped') {
|
||||||
|
Write-Host "Attendo che il servizio $serviceName si fermi..."
|
||||||
|
Start-Sleep -Seconds 5
|
||||||
|
$service = Get-Service -Name $serviceName
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Il servizio $serviceName è stato fermato con successo."
|
||||||
|
} catch {
|
||||||
|
Write-Host "Errore nello stoppare il servizio ${serviceName}: $_"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Funzione per avviare nuovamente un servizio e attendere che sia in esecuzione
|
||||||
|
function Start-ServiceAndWait {
|
||||||
|
param (
|
||||||
|
[string]$serviceName
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
Write-Host "Sto avviando il servizio $serviceName..."
|
||||||
|
Start-Service -Name $serviceName
|
||||||
|
|
||||||
|
# Attesa finché il servizio non viene avviato
|
||||||
|
$service = Get-Service -Name $serviceName
|
||||||
|
while ($service.Status -ne 'Running') {
|
||||||
|
Write-Host "Attendo che il servizio $serviceName si avvii..."
|
||||||
|
Start-Sleep -Seconds 5
|
||||||
|
$service = Get-Service -Name $serviceName
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Il servizio $serviceName è stato avviato con successo."
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
Write-Host "Errore nell'avvio del servizio ${serviceName}: $_"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Chiamare la funzione per stoppare il servizio
|
||||||
|
Stop-ServiceAndWait -serviceName $serviceName
|
||||||
|
|
||||||
|
# Subito dopo lo stop, cancellare la cartella e il file
|
||||||
|
$emsApiPath = "$webappsPath\ems-api"
|
||||||
|
$emsWarFilePath = "$webappsPath\ems-api.war"
|
||||||
|
Delete-FilesAndFolder -folderPath $emsApiPath -filePath $emsWarFilePath
|
||||||
|
|
||||||
|
# Chiamare la funzione per copiare il file
|
||||||
|
Write-Host "Copio $updatedArtifactPath in $emsWarFilePath"
|
||||||
|
Copy-File -sourceFilePath $updatedArtifactPath -destinationFilePath $emsWarFilePath
|
||||||
|
|
||||||
|
# Avvia nuovamente il servizio
|
||||||
|
Start-ServiceAndWait -serviceName $serviceName
|
||||||
|
|
||||||
|
# Ciclo fino a quando lo status code non è 200 o superiamo il numero massimo di tentativi
|
||||||
|
while ($attempt -lt $max_attempts) {
|
||||||
|
$attempt++
|
||||||
|
Check-Status
|
||||||
|
Start-Sleep -Seconds 5 # Attendere per 5 secondi prima di fare un altro tentativo
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Numero massimo di tentativi superato. Nessuna risposta 200 ricevuta."
|
||||||
|
exit 1
|
||||||
127
ems-core/pom.xml
127
ems-core/pom.xml
@@ -19,11 +19,6 @@
|
|||||||
<id>maven-public</id>
|
<id>maven-public</id>
|
||||||
<url>https://maven.studioml.it/repository/maven-public/</url>
|
<url>https://maven.studioml.it/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<id>AsposeJavaAPI</id>
|
|
||||||
<name>Aspose Java API</name>
|
|
||||||
<url>https://releases.aspose.com/java/repo/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -47,19 +42,38 @@
|
|||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>3.4.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<longClasspath>true</longClasspath>
|
||||||
<mainClass>it.integry.ems_model.rulescompleting.KieStaticCompiler</mainClass>
|
<longModulepath>true</longModulepath>
|
||||||
|
<toolchain>jdk</toolchain>
|
||||||
|
<executable>java</executable>
|
||||||
|
<cleanupDaemonThreads>false</cleanupDaemonThreads>
|
||||||
|
<skip>false</skip>
|
||||||
|
<arguments>
|
||||||
|
<argument>-classpath</argument>
|
||||||
|
<!-- automatically creates the classpath using all project dependencies,
|
||||||
|
also adding the project build directory -->
|
||||||
|
<classpath/>
|
||||||
|
<argument>it.integry.ems_model.rulescompleting.KieStaticCompiler</argument>
|
||||||
|
<argument>src/main/resources/rules/</argument>
|
||||||
|
<argument>../ems-engine/src/main/webapp/drools/</argument>
|
||||||
|
</arguments>
|
||||||
|
<systemProperties>
|
||||||
|
<projectProperties/>
|
||||||
|
<exec.longClasspath>true</exec.longClasspath>
|
||||||
|
</systemProperties>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>post-clean</phase>
|
<phase>process-classes</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>java</goal>
|
<goal>exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
@@ -125,7 +139,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.11.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -159,19 +173,24 @@
|
|||||||
<version>1.13</version>
|
<version>1.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.minio</groupId>
|
||||||
|
<artifactId>minio</artifactId>
|
||||||
|
<version>8.4.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- SWAGGER
|
<!-- SWAGGER -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<artifactId>springfox-oas</artifactId>
|
||||||
<version>${swagger.version}</version>
|
<version>${swagger.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
<version>${swagger.version}</version>
|
<version>${swagger.version}</version>
|
||||||
</dependency> -->
|
</dependency>
|
||||||
|
|
||||||
<!-- REST CLIENT -->
|
<!-- REST CLIENT -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -186,7 +205,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.resteasy</groupId>
|
<groupId>org.jboss.resteasy</groupId>
|
||||||
<artifactId>resteasy-jackson-provider</artifactId>
|
<artifactId>resteasy-jackson2-provider</artifactId>
|
||||||
<version>${resteasy.version}</version>
|
<version>${resteasy.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -221,7 +240,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
<artifactId>reflections</artifactId>
|
<artifactId>reflections</artifactId>
|
||||||
<version>0.9.10</version>
|
<version>0.10.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mail -->
|
<!-- Mail -->
|
||||||
@@ -231,29 +250,17 @@
|
|||||||
<version>1.4.7</version>
|
<version>1.4.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.xmlbeans</groupId>
|
|
||||||
<artifactId>xmlbeans</artifactId>
|
|
||||||
<version>2.3.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- JASPER REPORT -->
|
<!-- JASPER REPORT -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.jasperreports</groupId>
|
<groupId>net.sf.jasperreports</groupId>
|
||||||
<artifactId>jasperreports</artifactId>
|
<artifactId>jasperreports</artifactId>
|
||||||
<version>6.16.0</version>
|
<version>${jaspersoft.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.lowagie</groupId>
|
|
||||||
<artifactId>itext</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.lowagie</groupId>
|
|
||||||
<artifactId>itext</artifactId>
|
|
||||||
<version>2.1.7.js8</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>com.lowagie</groupId>-->
|
||||||
|
<!-- <artifactId>itext</artifactId>-->
|
||||||
|
<!-- <version>2.1.7.js8</version>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.jasperreports</groupId>
|
<groupId>net.sf.jasperreports</groupId>
|
||||||
<artifactId>jasperreports-htmlcomponent</artifactId>
|
<artifactId>jasperreports-htmlcomponent</artifactId>
|
||||||
@@ -262,12 +269,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.jasperreports</groupId>
|
<groupId>net.sf.jasperreports</groupId>
|
||||||
<artifactId>jasperreports-fonts</artifactId>
|
<artifactId>jasperreports-fonts</artifactId>
|
||||||
<version>6.16.0</version>
|
<version>${jaspersoft.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.jasperreports</groupId>
|
<groupId>net.sf.jasperreports</groupId>
|
||||||
<artifactId>jasperreports-functions</artifactId>
|
<artifactId>jasperreports-functions</artifactId>
|
||||||
<version>6.16.0</version>
|
<version>${jaspersoft.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>it.integry.font</groupId>
|
<groupId>it.integry.font</groupId>
|
||||||
@@ -363,14 +370,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>3.9</version>
|
<version>5.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>3.9</version>
|
<version>5.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -394,18 +401,13 @@
|
|||||||
<artifactId>utility-barcode</artifactId>
|
<artifactId>utility-barcode</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>it.integry</groupId>
|
|
||||||
<artifactId>utilityImage</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- IntegryUtility (Barcodes, ecc) -->
|
<!-- IntegryUtility (Barcodes, ecc) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>it.integry</groupId>
|
<groupId>it.integry</groupId>
|
||||||
<artifactId>Utility</artifactId>
|
<artifactId>Utility</artifactId>
|
||||||
<version>1.4</version>
|
<version>1.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
@@ -431,11 +433,21 @@
|
|||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
<artifactId>jackson-dataformat-csv</artifactId>
|
<artifactId>jackson-dataformat-csv</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
@@ -455,11 +467,6 @@
|
|||||||
<version>${spring.version}</version>
|
<version>${spring.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-instrument-tomcat</artifactId>
|
|
||||||
<version>${spring.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-oxm</artifactId>
|
<artifactId>spring-oxm</artifactId>
|
||||||
@@ -509,6 +516,7 @@
|
|||||||
<version>${drools.version}</version>
|
<version>${drools.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- log4j -->
|
<!-- log4j -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lmax</groupId>
|
<groupId>com.lmax</groupId>
|
||||||
@@ -547,7 +555,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<version>3.12.0</version>
|
<version>3.14.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -565,11 +573,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- UTILS -->
|
<!-- UTILS -->
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<version>${guava.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
@@ -696,7 +699,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.firebase</groupId>
|
<groupId>com.google.firebase</groupId>
|
||||||
<artifactId>firebase-admin</artifactId>
|
<artifactId>firebase-admin</artifactId>
|
||||||
<version>7.0.1</version>
|
<version>9.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
@@ -711,12 +714,6 @@
|
|||||||
<artifactId>jcodec-javase</artifactId>
|
<artifactId>jcodec-javase</artifactId>
|
||||||
<version>0.2.5</version>
|
<version>0.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.annimon</groupId>
|
|
||||||
<artifactId>stream</artifactId>
|
|
||||||
<version>1.2.2</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.docx4j</groupId>
|
<groupId>org.docx4j</groupId>
|
||||||
@@ -730,5 +727,11 @@
|
|||||||
<version>0.27.0</version>
|
<version>0.27.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.javaparser</groupId>
|
||||||
|
<artifactId>javaparser-symbol-solver-core</artifactId>
|
||||||
|
<version>3.26.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package it.integry.FoodProcess.api;
|
||||||
|
|
||||||
|
import javax.ws.rs.client.ClientRequestContext;
|
||||||
|
import javax.ws.rs.client.ClientRequestFilter;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class AddApiKeyHeaderRequestFilter implements ClientRequestFilter {
|
||||||
|
private final String apiKey;
|
||||||
|
|
||||||
|
public AddApiKeyHeaderRequestFilter(String apiKey) {
|
||||||
|
this.apiKey = apiKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void filter(ClientRequestContext clientRequestContext) throws IOException {
|
||||||
|
clientRequestContext.getHeaders().add("X-Api-Key", apiKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package it.integry.FoodProcess.api;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import it.integry.FoodProcess.dto.response.ErrorResponse;
|
||||||
|
|
||||||
|
import javax.ws.rs.*;
|
||||||
|
import javax.ws.rs.client.ClientRequestContext;
|
||||||
|
import javax.ws.rs.client.ClientResponseContext;
|
||||||
|
import javax.ws.rs.client.ClientResponseFilter;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class ErrorMessageResponseFilter implements ClientResponseFilter {
|
||||||
|
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
|
||||||
|
if (responseContext.getStatus() != Response.Status.OK.getStatusCode()) {
|
||||||
|
if (responseContext.hasEntity()) {
|
||||||
|
ErrorResponse error = objectMapper.readValue(responseContext.getEntityStream(), ErrorResponse.class);
|
||||||
|
String message = error.getErrorMessage();
|
||||||
|
|
||||||
|
Response.Status status = Response.Status.fromStatusCode(responseContext.getStatus());
|
||||||
|
WebApplicationException webAppException;
|
||||||
|
switch (status) {
|
||||||
|
case BAD_REQUEST:
|
||||||
|
webAppException = new BadRequestException(message);
|
||||||
|
break;
|
||||||
|
case UNAUTHORIZED:
|
||||||
|
webAppException = new NotAuthorizedException(message, Response.status(Response.Status.UNAUTHORIZED).build());
|
||||||
|
break;
|
||||||
|
case FORBIDDEN:
|
||||||
|
webAppException = new ForbiddenException(message);
|
||||||
|
break;
|
||||||
|
case NOT_FOUND:
|
||||||
|
webAppException = new NotFoundException(message);
|
||||||
|
break;
|
||||||
|
case METHOD_NOT_ALLOWED:
|
||||||
|
webAppException = new NotAllowedException(message);
|
||||||
|
break;
|
||||||
|
case NOT_ACCEPTABLE:
|
||||||
|
webAppException = new NotAcceptableException(message);
|
||||||
|
break;
|
||||||
|
case UNSUPPORTED_MEDIA_TYPE:
|
||||||
|
webAppException = new NotSupportedException(message);
|
||||||
|
break;
|
||||||
|
case INTERNAL_SERVER_ERROR:
|
||||||
|
webAppException = new InternalServerErrorException(message);
|
||||||
|
break;
|
||||||
|
case SERVICE_UNAVAILABLE:
|
||||||
|
webAppException = new ServiceUnavailableException(message);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
webAppException = new WebApplicationException(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw webAppException;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package it.integry.FoodProcess.api;
|
||||||
|
|
||||||
|
import it.integry.FoodProcess.dto.*;
|
||||||
|
import it.integry.FoodProcess.dto.response.*;
|
||||||
|
|
||||||
|
import javax.ws.rs.*;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface FoodProcessClient {
|
||||||
|
// Orders
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getorderstatuses")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
List<OrderStatusResponse> getOrderStatuses(@QueryParam("order_ids") List<String> orderIds);
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/importorders")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
ImportOrdersResponse importOrders(ImportOrdersRequest importOrdersRequest);
|
||||||
|
|
||||||
|
// Master data
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getarticles")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
List<Article> getArticles();
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/importarticles")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
ImportArticlesResponse importArticles(ImportArticlesRequest importArticlesRequest);
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getbusinesspartners")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
List<BusinessPartner> getBusinessPartners();
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/importbusinesspartners")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
ImportBusinessPartnersResponse importBusinessPartners(ImportBusinessPartnersRequest importBusinessPartnersRequest);
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getpackagingmaterials")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
List<PackagingMaterial> getPackagingMaterials();
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/importpackagingmaterials")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
ImportPackagingMaterialsResponse importPackagingMaterials(ImportPackagingMaterialsRequest importPackagingMaterialsRequest);
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getrawmaterials")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
List<RawMaterial> getRawMaterials();
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/importrawmaterials")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
ImportRawMaterialsResponse importRawMaterials(ImportRawMaterialsRequest importRawMaterialsRequest);
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.FoodProcess.api;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider;
|
||||||
|
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import javax.ws.rs.core.MultivaluedMap;
|
||||||
|
import javax.ws.rs.ext.Provider;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.lang.annotation.Annotation;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
|
@Provider
|
||||||
|
public class JacksonProvider extends ResteasyJackson2Provider {
|
||||||
|
@Override
|
||||||
|
public void writeTo(Object value, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException {
|
||||||
|
ObjectMapper mapper = locateMapper(type, MediaType.APPLICATION_JSON_TYPE);
|
||||||
|
|
||||||
|
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
|
||||||
|
super.writeTo(value, type, genericType, annotations, mediaType, httpHeaders, entityStream);
|
||||||
|
}
|
||||||
|
}
|
||||||
116
ems-core/src/main/java/it/integry/FoodProcess/dto/Article.java
Normal file
116
ems-core/src/main/java/it/integry/FoodProcess/dto/Article.java
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Article {
|
||||||
|
@SqlField
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@JsonProperty("raw_materials")
|
||||||
|
private List<ArticleRawMaterial> rawMaterials;
|
||||||
|
|
||||||
|
@JsonProperty("packaging_material_id")
|
||||||
|
private String packagingMaterialId;
|
||||||
|
|
||||||
|
@JsonProperty("packaging_material_code")
|
||||||
|
private String packagingMaterialCode;
|
||||||
|
|
||||||
|
@JsonProperty("packaging_material_name")
|
||||||
|
private String packagingMaterialName;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@JsonProperty("is_archived")
|
||||||
|
private boolean isArchived;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ArticleRawMaterial> getRawMaterials() {
|
||||||
|
return rawMaterials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setRawMaterials(List<ArticleRawMaterial> rawMaterials) {
|
||||||
|
this.rawMaterials = rawMaterials;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackagingMaterialId() {
|
||||||
|
return packagingMaterialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setPackagingMaterialId(String packagingMaterialId) {
|
||||||
|
this.packagingMaterialId = packagingMaterialId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackagingMaterialCode() {
|
||||||
|
return packagingMaterialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setPackagingMaterialCode(String packagingMaterialCode) {
|
||||||
|
this.packagingMaterialCode = packagingMaterialCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPackagingMaterialName() {
|
||||||
|
return packagingMaterialName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setPackagingMaterialName(String packagingMaterialName) {
|
||||||
|
this.packagingMaterialName = packagingMaterialName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsArchived() {
|
||||||
|
return isArchived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Article setIsArchived(boolean isArchived) {
|
||||||
|
this.isArchived = isArchived;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ArticleRawMaterial {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@JsonProperty("weight_kg")
|
||||||
|
private Double weightKg;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticleRawMaterial setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticleRawMaterial setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticleRawMaterial setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getWeightKg() {
|
||||||
|
return weightKg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticleRawMaterial setWeightKg(Double weightKg) {
|
||||||
|
this.weightKg = weightKg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
|
|
||||||
|
public class BusinessPartner {
|
||||||
|
@SqlField
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
@JsonProperty("is_customer")
|
||||||
|
private boolean isCustomer;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
@JsonProperty("is_supplier")
|
||||||
|
private boolean isSupplier;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@SqlField
|
||||||
|
@JsonProperty("is_archived")
|
||||||
|
private boolean isArchived;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsCustomer() {
|
||||||
|
return isCustomer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setIsCustomer(boolean isCustomer) {
|
||||||
|
this.isCustomer = isCustomer;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsSupplier() {
|
||||||
|
return isSupplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setIsSupplier(boolean isSupplier) {
|
||||||
|
this.isSupplier = isSupplier;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsArchived() {
|
||||||
|
return isArchived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BusinessPartner setIsArchived(boolean isArchived) {
|
||||||
|
this.isArchived = isArchived;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportArticlesRequest {
|
||||||
|
private List<Article> articles;
|
||||||
|
|
||||||
|
public List<Article> getArticles() {
|
||||||
|
return articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportArticlesRequest setArticles(List<Article> articles) {
|
||||||
|
this.articles = articles;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportBusinessPartnersRequest {
|
||||||
|
@JsonProperty("business_partners")
|
||||||
|
private List<BusinessPartner> businessPartners;
|
||||||
|
|
||||||
|
public List<BusinessPartner> getBusinessPartners() {
|
||||||
|
return businessPartners;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportBusinessPartnersRequest setBusinessPartners(List<BusinessPartner> businessPartners) {
|
||||||
|
this.businessPartners = businessPartners;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportOrdersRequest {
|
||||||
|
private List<RequestOrder> orders;
|
||||||
|
|
||||||
|
public List<RequestOrder> getOrders() {
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportOrdersRequest setOrders(List<RequestOrder> orders) {
|
||||||
|
this.orders = orders;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportPackagingMaterialsRequest {
|
||||||
|
@JsonProperty("packaging_materials")
|
||||||
|
private List<PackagingMaterial> packagingMaterials;
|
||||||
|
|
||||||
|
public List<PackagingMaterial> getPackagingMaterials() {
|
||||||
|
return packagingMaterials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportPackagingMaterialsRequest setPackagingMaterials(List<PackagingMaterial> packagingMaterials) {
|
||||||
|
this.packagingMaterials = packagingMaterials;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportRawMaterialsRequest {
|
||||||
|
@JsonProperty("raw_materials")
|
||||||
|
private List<RawMaterial> rawMaterials;
|
||||||
|
|
||||||
|
public List<RawMaterial> getRawMaterials() {
|
||||||
|
return rawMaterials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportRawMaterialsRequest setRawMaterials(List<RawMaterial> rawMaterials) {
|
||||||
|
this.rawMaterials = rawMaterials;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class PackagingMaterial {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private PackagingMaterialType type;
|
||||||
|
|
||||||
|
@JsonProperty("weight_kg")
|
||||||
|
private Double weightKg;
|
||||||
|
|
||||||
|
@JsonProperty("length_mm")
|
||||||
|
private Double lengthMm;
|
||||||
|
|
||||||
|
@JsonProperty("width_mm")
|
||||||
|
private Double widthMm;
|
||||||
|
|
||||||
|
@JsonProperty("height_mm")
|
||||||
|
private Double heightMm;
|
||||||
|
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@JsonProperty("is_archived")
|
||||||
|
private boolean isArchived;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterialType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setType(PackagingMaterialType type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getWeightKg() {
|
||||||
|
return weightKg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setWeightKg(Double weightKg) {
|
||||||
|
this.weightKg = weightKg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLengthMm() {
|
||||||
|
return lengthMm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setLengthMm(Double lengthMm) {
|
||||||
|
this.lengthMm = lengthMm;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getWidthMm() {
|
||||||
|
return widthMm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setWidthMm(Double widthMm) {
|
||||||
|
this.widthMm = widthMm;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getHeightMm() {
|
||||||
|
return heightMm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setHeightMm(Double heightMm) {
|
||||||
|
this.heightMm = heightMm;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsArchived() {
|
||||||
|
return isArchived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PackagingMaterial setIsArchived(boolean isArchived) {
|
||||||
|
this.isArchived = isArchived;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
public enum PackagingMaterialType {
|
||||||
|
PUNNET,
|
||||||
|
TRAY,
|
||||||
|
BAG,
|
||||||
|
CARTON,
|
||||||
|
CRATE,
|
||||||
|
PALLET
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class RawMaterial {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
@JsonProperty("is_archived")
|
||||||
|
private boolean isArchived;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RawMaterial setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RawMaterial setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RawMaterial setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RawMaterial setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsArchived() {
|
||||||
|
return isArchived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RawMaterial setIsArchived(boolean isArchived) {
|
||||||
|
this.isArchived = isArchived;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
public class RequestOrder {
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@JsonProperty("article_id")
|
||||||
|
private String articleId;
|
||||||
|
|
||||||
|
@JsonProperty("article_code")
|
||||||
|
private String articleCode;
|
||||||
|
|
||||||
|
@JsonProperty("customer_id")
|
||||||
|
private String customerId;
|
||||||
|
|
||||||
|
@JsonProperty("customer_code")
|
||||||
|
private String customerCode;
|
||||||
|
|
||||||
|
@JsonProperty("secondary_packaging_material_id")
|
||||||
|
private String secondaryPackagingMaterialId;
|
||||||
|
|
||||||
|
@JsonProperty("secondary_packaging_material_code")
|
||||||
|
private String secondaryPackagingMaterialCode;
|
||||||
|
|
||||||
|
@JsonProperty("tertiary_packaging_material_id")
|
||||||
|
private String tertiaryPackagingMaterialId;
|
||||||
|
|
||||||
|
@JsonProperty("tertiary_packaging_material_code")
|
||||||
|
private String tertiaryPackagingMaterialCode;
|
||||||
|
|
||||||
|
@JsonProperty("units_per_secondary_packaging")
|
||||||
|
private int unitsPerSecondaryPackaging;
|
||||||
|
|
||||||
|
@JsonProperty("units_per_pallet_layer")
|
||||||
|
private int unitsPerPalletLayer;
|
||||||
|
|
||||||
|
@JsonProperty("pallet_layer_quantity")
|
||||||
|
private int palletLayerQuantity;
|
||||||
|
|
||||||
|
@JsonProperty("target_quantity")
|
||||||
|
private double targetQuantity;
|
||||||
|
|
||||||
|
@JsonProperty("target_quantity_unit")
|
||||||
|
private TargetQuantityUnit targetQuantityUnit;
|
||||||
|
|
||||||
|
@JsonProperty("scheduled_for")
|
||||||
|
private LocalDateTime scheduledFor;
|
||||||
|
|
||||||
|
@JsonProperty("to_be_completed_until")
|
||||||
|
private LocalDateTime toBeCompletedUntil;
|
||||||
|
|
||||||
|
@JsonProperty("best_before_date")
|
||||||
|
private LocalDate bestBeforeDate;
|
||||||
|
|
||||||
|
@JsonProperty("production_lot")
|
||||||
|
private String productionLot;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArticleId() {
|
||||||
|
return articleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setArticleId(String articleId) {
|
||||||
|
this.articleId = articleId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArticleCode() {
|
||||||
|
return articleCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setArticleCode(String articleCode) {
|
||||||
|
this.articleCode = articleCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustomerId() {
|
||||||
|
return customerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setCustomerId(String customerId) {
|
||||||
|
this.customerId = customerId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustomerCode() {
|
||||||
|
return customerCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setCustomerCode(String customerCode) {
|
||||||
|
this.customerCode = customerCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSecondaryPackagingMaterialId() {
|
||||||
|
return secondaryPackagingMaterialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setSecondaryPackagingMaterialId(String secondaryPackagingMaterialId) {
|
||||||
|
this.secondaryPackagingMaterialId = secondaryPackagingMaterialId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSecondaryPackagingMaterialCode() {
|
||||||
|
return secondaryPackagingMaterialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setSecondaryPackagingMaterialCode(String secondaryPackagingMaterialCode) {
|
||||||
|
this.secondaryPackagingMaterialCode = secondaryPackagingMaterialCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTertiaryPackagingMaterialId() {
|
||||||
|
return tertiaryPackagingMaterialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setTertiaryPackagingMaterialId(String tertiaryPackagingMaterialId) {
|
||||||
|
this.tertiaryPackagingMaterialId = tertiaryPackagingMaterialId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTertiaryPackagingMaterialCode() {
|
||||||
|
return tertiaryPackagingMaterialCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setTertiaryPackagingMaterialCode(String tertiaryPackagingMaterialCode) {
|
||||||
|
this.tertiaryPackagingMaterialCode = tertiaryPackagingMaterialCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUnitsPerSecondaryPackaging() {
|
||||||
|
return unitsPerSecondaryPackaging;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setUnitsPerSecondaryPackaging(int unitsPerSecondaryPackaging) {
|
||||||
|
this.unitsPerSecondaryPackaging = unitsPerSecondaryPackaging;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUnitsPerPalletLayer() {
|
||||||
|
return unitsPerPalletLayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setUnitsPerPalletLayer(int unitsPerPalletLayer) {
|
||||||
|
this.unitsPerPalletLayer = unitsPerPalletLayer;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPalletLayerQuantity() {
|
||||||
|
return palletLayerQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setPalletLayerQuantity(int palletLayerQuantity) {
|
||||||
|
this.palletLayerQuantity = palletLayerQuantity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getTargetQuantity() {
|
||||||
|
return targetQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setTargetQuantity(double targetQuantity) {
|
||||||
|
this.targetQuantity = targetQuantity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TargetQuantityUnit getTargetQuantityUnit() {
|
||||||
|
return targetQuantityUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setTargetQuantityUnit(TargetQuantityUnit targetQuantityUnit) {
|
||||||
|
this.targetQuantityUnit = targetQuantityUnit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getScheduledFor() {
|
||||||
|
return scheduledFor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setScheduledFor(LocalDateTime scheduledFor) {
|
||||||
|
this.scheduledFor = scheduledFor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getToBeCompletedUntil() {
|
||||||
|
return toBeCompletedUntil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setToBeCompletedUntil(LocalDateTime toBeCompletedUntil) {
|
||||||
|
this.toBeCompletedUntil = toBeCompletedUntil;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getBestBeforeDate() {
|
||||||
|
return bestBeforeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setBestBeforeDate(LocalDate bestBeforeDate) {
|
||||||
|
this.bestBeforeDate = bestBeforeDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductionLot() {
|
||||||
|
return productionLot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestOrder setProductionLot(String productionLot) {
|
||||||
|
this.productionLot = productionLot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package it.integry.FoodProcess.dto;
|
||||||
|
|
||||||
|
public enum TargetQuantityUnit {
|
||||||
|
PIECE,
|
||||||
|
SECONDARY_PACKAGING,
|
||||||
|
TERTIARY_PACKAGING,
|
||||||
|
KILOGRAM
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ErrorResponse {
|
||||||
|
@JsonProperty("error_message")
|
||||||
|
private String errorMessage;
|
||||||
|
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ErrorResponse setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ImportArticleStatus extends ResponseStatus {
|
||||||
|
@JsonProperty("article_id")
|
||||||
|
private String articleId;
|
||||||
|
|
||||||
|
public String getArticleId() {
|
||||||
|
return articleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportArticleStatus setArticleId(String articleId) {
|
||||||
|
this.articleId = articleId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportArticlesResponse {
|
||||||
|
private List<ImportArticleStatus> statuses;
|
||||||
|
|
||||||
|
public List<ImportArticleStatus> getStatuses() {
|
||||||
|
return statuses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportArticlesResponse setStatuses(List<ImportArticleStatus> statuses) {
|
||||||
|
this.statuses = statuses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ImportBusinessPartnerStatus extends ResponseStatus {
|
||||||
|
@JsonProperty("business_partner_id")
|
||||||
|
private String businessPartnerId;
|
||||||
|
|
||||||
|
public String getBusinessPartnerId() {
|
||||||
|
return businessPartnerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportBusinessPartnerStatus setBusinessPartnerId(String businessPartnerId) {
|
||||||
|
this.businessPartnerId = businessPartnerId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportBusinessPartnersResponse {
|
||||||
|
private List<ImportBusinessPartnerStatus> statuses;
|
||||||
|
|
||||||
|
public List<ImportBusinessPartnerStatus> getStatuses() {
|
||||||
|
return statuses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportBusinessPartnersResponse setStatuses(List<ImportBusinessPartnerStatus> statuses) {
|
||||||
|
this.statuses = statuses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ImportOrderStatus extends ResponseStatus {
|
||||||
|
@JsonProperty("order_id")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
public String getOrderId() {
|
||||||
|
return orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportOrderStatus setOrderId(String orderId) {
|
||||||
|
this.orderId = orderId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportOrdersResponse {
|
||||||
|
private List<ImportOrderStatus> statuses;
|
||||||
|
|
||||||
|
public List<ImportOrderStatus> getStatuses() {
|
||||||
|
return statuses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportOrdersResponse setStatuses(List<ImportOrderStatus> statuses) {
|
||||||
|
this.statuses = statuses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ImportPackagingMaterialStatus extends ResponseStatus {
|
||||||
|
@JsonProperty("packaging_material_id")
|
||||||
|
private String packagingMaterialId;
|
||||||
|
|
||||||
|
public String getPackagingMaterialId() {
|
||||||
|
return packagingMaterialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportPackagingMaterialStatus setPackagingMaterialId(String packagingMaterialId) {
|
||||||
|
this.packagingMaterialId = packagingMaterialId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportPackagingMaterialsResponse {
|
||||||
|
private List<ImportPackagingMaterialStatus> statuses;
|
||||||
|
|
||||||
|
public List<ImportPackagingMaterialStatus> getStatuses() {
|
||||||
|
return statuses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportPackagingMaterialsResponse setStatuses(List<ImportPackagingMaterialStatus> statuses) {
|
||||||
|
this.statuses = statuses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class ImportRawMaterialStatus extends ResponseStatus {
|
||||||
|
@JsonProperty("raw_material_id")
|
||||||
|
private String rawMaterialId;
|
||||||
|
|
||||||
|
public String getRawMaterialId() {
|
||||||
|
return rawMaterialId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportRawMaterialStatus setRawMaterialId(String rawMaterialId) {
|
||||||
|
this.rawMaterialId = rawMaterialId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImportRawMaterialsResponse {
|
||||||
|
private List<ImportRawMaterialStatus> statuses;
|
||||||
|
|
||||||
|
public List<ImportRawMaterialStatus> getStatuses() {
|
||||||
|
return statuses;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportRawMaterialsResponse setStatuses(List<ImportRawMaterialStatus> statuses) {
|
||||||
|
this.statuses = statuses;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
public enum OrderStatus {
|
||||||
|
NEW,
|
||||||
|
ASSIGNED,
|
||||||
|
ACTIVE,
|
||||||
|
CLOSED,
|
||||||
|
CANCELED
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class OrderStatusResponse {
|
||||||
|
@JsonProperty("order_id")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@JsonProperty("order_status")
|
||||||
|
private OrderStatus orderStatus;
|
||||||
|
|
||||||
|
public String getOrderId() {
|
||||||
|
return orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderStatusResponse setOrderId(String orderId) {
|
||||||
|
this.orderId = orderId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderStatus getOrderStatus() {
|
||||||
|
return orderStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrderStatusResponse setOrderStatus(OrderStatus orderStatus) {
|
||||||
|
this.orderStatus = orderStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.FoodProcess.dto.response;
|
||||||
|
|
||||||
|
public class ResponseStatus {
|
||||||
|
private boolean success;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public boolean isSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseStatus setSuccess(boolean success) {
|
||||||
|
this.success = success;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseStatus setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
package it.integry.FoodProcess.service;
|
||||||
|
|
||||||
|
import it.integry.FoodProcess.api.AddApiKeyHeaderRequestFilter;
|
||||||
|
import it.integry.FoodProcess.api.ErrorMessageResponseFilter;
|
||||||
|
import it.integry.FoodProcess.api.FoodProcessClient;
|
||||||
|
import it.integry.FoodProcess.api.JacksonProvider;
|
||||||
|
import it.integry.FoodProcess.dto.Article;
|
||||||
|
import it.integry.FoodProcess.dto.ImportArticlesRequest;
|
||||||
|
import it.integry.FoodProcess.dto.response.ImportArticlesResponse;
|
||||||
|
import it.integry.ems.service.EntityProcessor;
|
||||||
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
|
import it.integry.ems.utility.UtilityEntity;
|
||||||
|
import it.integry.ems_model.entity.MtbAart;
|
||||||
|
import it.integry.ems_model.entity.MtbAartAnag;
|
||||||
|
import it.integry.ems_model.service.SetupGest;
|
||||||
|
import it.integry.ems_model.types.OperationType;
|
||||||
|
import it.integry.ems_model.utility.Query;
|
||||||
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
|
import it.integry.ems_model.utility.UtilityList;
|
||||||
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
|
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
|
||||||
|
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
|
||||||
|
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Scope("request")
|
||||||
|
public class FoodProcessRestService {
|
||||||
|
private final Pattern ID_REGEX = Pattern.compile("^[0-9A-Fa-f]{1,}$");
|
||||||
|
|
||||||
|
private final SetupGest setupGest;
|
||||||
|
private final MultiDBTransactionManager multiDBTransactionManager;
|
||||||
|
private final EntityProcessor entityProcessor;
|
||||||
|
|
||||||
|
public FoodProcessRestService(SetupGest setupGest, MultiDBTransactionManager multiDBTransactionManager, EntityProcessor entityProcessor) {
|
||||||
|
this.setupGest = setupGest;
|
||||||
|
this.multiDBTransactionManager = multiDBTransactionManager;
|
||||||
|
this.entityProcessor = entityProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FoodProcessClient makeInstance() throws Exception {
|
||||||
|
String endpoint = setupGest.getSetup("FOODPROCESS", "SETUP", "ENDPOINT");
|
||||||
|
|
||||||
|
if (UtilityString.isNullOrEmpty(endpoint)) {
|
||||||
|
throw new Exception("Endpoint per il servizio di FoodProcess non configurato.\nImpostarlo in FOODPROCESS->SETUP->ENDPOINT.");
|
||||||
|
}
|
||||||
|
|
||||||
|
String apiKey = setupGest.getSetup("FOODPROCESS", "SETUP", "API_KEY");
|
||||||
|
|
||||||
|
if (UtilityString.isNullOrEmpty(apiKey)) {
|
||||||
|
throw new Exception("Api key per il servizio di FoodProcess non configurato.\nImpostarlo in FOODPROCESS->SETUP->API_KEY.");
|
||||||
|
}
|
||||||
|
|
||||||
|
ResteasyClient client = new ResteasyClientBuilder().build();
|
||||||
|
|
||||||
|
client.register(new JacksonProvider());
|
||||||
|
client.register(new ErrorMessageResponseFilter());
|
||||||
|
client.register(new AddApiKeyHeaderRequestFilter(apiKey));
|
||||||
|
|
||||||
|
ResteasyWebTarget target = client.target(endpoint);
|
||||||
|
|
||||||
|
return target.proxy(FoodProcessClient.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportArticlesResponse importArticles(ImportArticlesRequest importArticlesRequest) throws Exception {
|
||||||
|
if (UtilityList.isNullOrEmpty(importArticlesRequest.getArticles())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
String codAnagTopControl = setupGest.getSetup("FOODPROCESS", "SETUP", "TOPCONTROL_CODANAG");
|
||||||
|
|
||||||
|
if (UtilityString.isNullOrEmpty(codAnagTopControl)) {
|
||||||
|
throw new Exception("Cod. anag. di Top Control non configurato.\nImpostarlo in FOODPROCESS->SETUP->TOPCONTROL_CODANAG.");
|
||||||
|
}
|
||||||
|
|
||||||
|
FoodProcessClient client = makeInstance();
|
||||||
|
|
||||||
|
List<Article> foodProcessArticles = client.getArticles();
|
||||||
|
|
||||||
|
List<MtbAart> entityList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Article article : importArticlesRequest.getArticles()) {
|
||||||
|
if (UtilityString.isNullOrEmpty(article.getId()) || !ID_REGEX.matcher(article.getId()).matches()) {
|
||||||
|
String sql;
|
||||||
|
MtbAartAnag mtbAartAnag = null;
|
||||||
|
|
||||||
|
// Cerco negli articoli loro
|
||||||
|
Optional<Article> optionalFoodProcessArticle = foodProcessArticles.stream()
|
||||||
|
.filter(x -> !x.getIsArchived())
|
||||||
|
.filter(x -> x.getCode().equalsIgnoreCase(article.getCode()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (optionalFoodProcessArticle.isPresent()) {
|
||||||
|
Article foodProcessArticle = optionalFoodProcessArticle.get();
|
||||||
|
|
||||||
|
mtbAartAnag = new MtbAartAnag()
|
||||||
|
.setCodAnag(codAnagTopControl)
|
||||||
|
.setCodMartAnag(foodProcessArticle.getId())
|
||||||
|
.setCodMart(article.getId());
|
||||||
|
|
||||||
|
mtbAartAnag.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cerco id in nostra anagrafica
|
||||||
|
if (mtbAartAnag == null && !UtilityString.isNullOrEmpty(article.getId())) {
|
||||||
|
sql = Query.format(
|
||||||
|
"SELECT id, cod_mart_anag\n" +
|
||||||
|
"FROM mtb_aart_anag\n" +
|
||||||
|
"WHERE cod_anag = %s\n" +
|
||||||
|
" AND cod_mart = %s",
|
||||||
|
codAnagTopControl,
|
||||||
|
article.getId()
|
||||||
|
);
|
||||||
|
|
||||||
|
mtbAartAnag = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(multiDBTransactionManager.getPrimaryConnection(), sql, MtbAartAnag.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Articolo nuovo, creo un nuovo id
|
||||||
|
if (mtbAartAnag == null) {
|
||||||
|
sql = Query.format(
|
||||||
|
"SELECT CAST(ISNULL(MAX(CAST(cod_mart_anag AS INT)), 0) + 1 AS VARCHAR) AS cod_mart_anag\n" +
|
||||||
|
"FROM mtb_aart_anag\n" +
|
||||||
|
"WHERE cod_anag = %s",
|
||||||
|
codAnagTopControl
|
||||||
|
);
|
||||||
|
|
||||||
|
String codMartAnag = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||||
|
|
||||||
|
mtbAartAnag = new MtbAartAnag()
|
||||||
|
.setCodAnag(codAnagTopControl)
|
||||||
|
.setCodMartAnag(codMartAnag);
|
||||||
|
|
||||||
|
mtbAartAnag.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(mtbAartAnag)) {
|
||||||
|
if (!mtbAartAnag.getOperation().equals(OperationType.SELECT_OBJECT)) {
|
||||||
|
MtbAart mtbAart = entityList.stream()
|
||||||
|
.filter(x -> x.getCodMart().equalsIgnoreCase(article.getId()))
|
||||||
|
.findFirst()
|
||||||
|
.orElseGet(() -> {
|
||||||
|
MtbAart newMtbAart = new MtbAart()
|
||||||
|
.setCodMart(article.getId())
|
||||||
|
.setMtbAartAnag(new ArrayList<>());
|
||||||
|
|
||||||
|
newMtbAart.setOperation(OperationType.NO_OP);
|
||||||
|
|
||||||
|
entityList.add(newMtbAart);
|
||||||
|
|
||||||
|
return newMtbAart;
|
||||||
|
});
|
||||||
|
|
||||||
|
mtbAart.getMtbAartAnag().add(mtbAartAnag);
|
||||||
|
}
|
||||||
|
|
||||||
|
article.setId(mtbAartAnag.getCodMartAnag());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UtilityList.isNullOrEmpty(entityList)) {
|
||||||
|
entityProcessor.processEntityList(entityList, false);
|
||||||
|
|
||||||
|
UtilityEntity.throwEntitiesException(entityList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return client.importArticles(importArticlesRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
|||||||
import it.integry.WooCommerce.dto.order.WooCommerceOrderDTO;
|
import it.integry.WooCommerce.dto.order.WooCommerceOrderDTO;
|
||||||
import it.integry.WooCommerce.service.WooCommerceService;
|
import it.integry.WooCommerce.service.WooCommerceService;
|
||||||
import it.integry.common.var.CommonConstants;
|
import it.integry.common.var.CommonConstants;
|
||||||
import it.integry.ems.json.JSONObjectMapper;
|
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||||
import it.integry.ems.response.ServiceRestResponse;
|
import it.integry.ems.response.ServiceRestResponse;
|
||||||
import it.integry.ems_model.config.EmsRestConstants;
|
import it.integry.ems_model.config.EmsRestConstants;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@@ -26,7 +26,7 @@ public class WooCommerceController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WooCommerceService wooService;
|
private WooCommerceService wooService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private JSONObjectMapper jsonObjectMapper;
|
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_WOO_NEW_ORDER, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_WOO_NEW_ORDER, method = RequestMethod.POST)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package it.integry.WooCommerce.dto;
|
package it.integry.WooCommerce.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import it.integry.ems_model.annotation.SqlField;
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
import org.codehaus.jackson.annotate.JsonProperty;
|
|
||||||
|
|
||||||
public class AttributeDTO {
|
public class AttributeDTO {
|
||||||
@SqlField("attributo")
|
@SqlField("attributo")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package it.integry.WooCommerce.dto.order;
|
package it.integry.WooCommerce.dto.order;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import it.integry.WooCommerce.enums.OrderStatus;
|
import it.integry.WooCommerce.enums.OrderStatus;
|
||||||
import org.codehaus.jackson.JsonNode;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -768,7 +768,8 @@ public class WooCommerceService {
|
|||||||
|
|
||||||
private void sendErrorMail(String errorMsg, String service, byte[] content, String filename, List<AnomalieDTO> anomalie) {
|
private void sendErrorMail(String errorMsg, String service, byte[] content, String filename, List<AnomalieDTO> anomalie) {
|
||||||
try {
|
try {
|
||||||
mailService.sendErrorMail(multiDBTransactionManager, service, "WOOCOMMERCE", null, content, filename, anomalie);
|
mailService.sendErrorMailByGestNameSection(multiDBTransactionManager, service, "WOOCOMMERCE", "Errore WooCommerce",
|
||||||
|
null, content, filename, anomalie);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error(service, exception);
|
logger.error(service, exception);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package it.integry.annotations;
|
package it.integry.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.FIELD;
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
@Target(FIELD)
|
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
|
||||||
public @interface PostContextAutowired {
|
public @interface PostContextAutowired {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ public class CommonConstants {
|
|||||||
public static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss")
|
public static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss")
|
||||||
.withZone(ZoneId.systemDefault());
|
.withZone(ZoneId.systemDefault());
|
||||||
|
|
||||||
public static final DateTimeFormatter DATESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
|
public static final DateTimeFormatter DATESTAMP_YMD_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
|
||||||
|
.withZone(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
public static final DateTimeFormatter DATESTAMP_DMY_FORMATTER = DateTimeFormatter.ofPattern("ddMMyy")
|
||||||
.withZone(ZoneId.systemDefault());
|
.withZone(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,21 +9,21 @@ import java.util.HashMap;
|
|||||||
public class EmsDBConst {
|
public class EmsDBConst {
|
||||||
|
|
||||||
|
|
||||||
private HashMap<String, Const> typesBindingTable = new HashMap<String, Const>() {{
|
private HashMap<String, Const> datiAziendaBindingTable = new HashMap<String, Const>() {{
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public Const getConsts(String azienda) {
|
public Const getConsts(String profileDb) {
|
||||||
String aziendaUp = azienda.toUpperCase();
|
String aziendaUp = profileDb.toUpperCase();
|
||||||
|
|
||||||
if (!typesBindingTable.containsKey(aziendaUp)) {
|
if (!datiAziendaBindingTable.containsKey(aziendaUp)) {
|
||||||
typesBindingTable.put(aziendaUp, new Const());
|
datiAziendaBindingTable.put(aziendaUp, new Const());
|
||||||
}
|
}
|
||||||
|
|
||||||
return typesBindingTable.get(aziendaUp);
|
return datiAziendaBindingTable.get(aziendaUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroyAll() {
|
public void destroyAll() {
|
||||||
typesBindingTable = new HashMap<String, Const>();
|
datiAziendaBindingTable = new HashMap<String, Const>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ public enum EntityImportType {
|
|||||||
ORDINI("ORDINI"),
|
ORDINI("ORDINI"),
|
||||||
ORDINI_WEB("ORDINI WEB"),
|
ORDINI_WEB("ORDINI WEB"),
|
||||||
ORDINI_ACQUISTO("ORDINI ACQUISTO"),
|
ORDINI_ACQUISTO("ORDINI ACQUISTO"),
|
||||||
|
ORDINI_VENDITA("ORDINI VENDITA"),
|
||||||
DOCUMENTI("DOCUMENTI"),
|
DOCUMENTI("DOCUMENTI"),
|
||||||
DOCUMENTI_ACQUISTO("DOCUMENTI ACQUISTO"),
|
DOCUMENTI_ACQUISTO("DOCUMENTI ACQUISTO"),
|
||||||
DOCUMENTI_LAVORAZIONE("DOCUMENTI LAVORAZIONE"),
|
DOCUMENTI_LAVORAZIONE("DOCUMENTI LAVORAZIONE"),
|
||||||
@@ -22,7 +23,9 @@ public enum EntityImportType {
|
|||||||
RAPPORTINI_FG("RAPPORTINI FG"),
|
RAPPORTINI_FG("RAPPORTINI FG"),
|
||||||
SCONTRINI("SCONTRINI"),
|
SCONTRINI("SCONTRINI"),
|
||||||
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
|
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
|
||||||
GRIGLIA_ACQUISTO("GRIGLIA ACQUISTO");
|
GRIGLIA_VENDITA("GRIGLIA VENDITA"),
|
||||||
|
GRIGLIA_ACQUISTO("GRIGLIA ACQUISTO"),
|
||||||
|
SCADENZE("SCADENZE");
|
||||||
|
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,9 @@ import com.microsoft.sqlserver.jdbc.SQLServerDriver;
|
|||||||
import it.integry.annotations.PostContextAutowired;
|
import it.integry.annotations.PostContextAutowired;
|
||||||
import it.integry.annotations.PostContextConstruct;
|
import it.integry.annotations.PostContextConstruct;
|
||||||
import it.integry.annotations.PostWebServerConstruct;
|
import it.integry.annotations.PostWebServerConstruct;
|
||||||
import it.integry.ems.properties.EmsProperties;
|
|
||||||
import it.integry.ems.schedule.new_cron_job.dto.AutomatedOperationTypeEnum;
|
|
||||||
import it.integry.ems.schedule.new_cron_job.dto.operations.ServiceCallAutomatedOperationDTO;
|
|
||||||
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
|
|
||||||
import it.integry.ems.schedule.new_cron_job.service.AutomatedOperationHandlerComponent;
|
|
||||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
|
||||||
import it.integry.ems.settings.Model.SettingsModel;
|
import it.integry.ems.settings.Model.SettingsModel;
|
||||||
import it.integry.ems.settings.SettingsController;
|
import it.integry.ems.settings.SettingsController;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
|
||||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
import it.integry.ems.utility.UtilityDebug;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.postgresql.Driver;
|
import org.postgresql.Driver;
|
||||||
@@ -33,10 +25,12 @@ import java.lang.reflect.Field;
|
|||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.util.ArrayList;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static org.reflections.scanners.Scanners.TypesAnnotated;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent> {
|
public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent> {
|
||||||
@@ -53,9 +47,6 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SettingsModel settingsModel;
|
private SettingsModel settingsModel;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private EmsProperties emsProperties;
|
|
||||||
|
|
||||||
private boolean contextInitialized = false;
|
private boolean contextInitialized = false;
|
||||||
|
|
||||||
private boolean firstStart = true;
|
private boolean firstStart = true;
|
||||||
@@ -108,6 +99,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
dispatchPostWebServerConstruct(multiDBTransactionManager);
|
dispatchPostWebServerConstruct(multiDBTransactionManager);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
logger.error("EmsCoreContext.onPostDBLoaded", e);
|
logger.error("EmsCoreContext.onPostDBLoaded", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,13 +107,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
|
|
||||||
private void dispatchPostContextConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
private void dispatchPostContextConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
||||||
Reflections reflections = new Reflections("it.integry");
|
Reflections reflections = new Reflections("it.integry");
|
||||||
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
|
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
|
||||||
|
|
||||||
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
|
|
||||||
|
|
||||||
List<Class<?>> classesWithPostContextConstruct = Stream.of(typesAnnotatedWith)
|
List<Class<?>> classesWithPostContextConstruct = Stream.of(typesAnnotatedWith)
|
||||||
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
|
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
|
||||||
.sortBy(x -> Stream.of(x.getDeclaredMethods())
|
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
|
||||||
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
|
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.get()
|
.get()
|
||||||
@@ -133,9 +123,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
logger.debug("PostContextConstruct - " + classType.getSimpleName() + " - START");
|
logger.debug("PostContextConstruct - " + classType.getSimpleName() + " - START");
|
||||||
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
|
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
|
||||||
|
|
||||||
List<Field> fieldsToInject = Stream.of(classType.getDeclaredFields())
|
List<Field> fieldsToInject = Arrays.stream(classType.getDeclaredFields())
|
||||||
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
|
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
for (Field fieldToInject : fieldsToInject) {
|
for (Field fieldToInject : fieldsToInject) {
|
||||||
fieldToInject.setAccessible(true);
|
fieldToInject.setAccessible(true);
|
||||||
@@ -145,7 +135,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method constructor = Stream.of(classType.getDeclaredMethods())
|
Method constructor = Arrays.stream(classType.getDeclaredMethods())
|
||||||
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
|
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.get();
|
.get();
|
||||||
@@ -158,13 +148,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
|
|
||||||
private void dispatchPostWebServerConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
private void dispatchPostWebServerConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
||||||
Reflections reflections = new Reflections("it.integry");
|
Reflections reflections = new Reflections("it.integry");
|
||||||
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
|
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
|
||||||
|
|
||||||
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
|
|
||||||
|
|
||||||
List<Class<?>> classesWithPostWebServerConstruct = Stream.of(typesAnnotatedWith)
|
List<Class<?>> classesWithPostWebServerConstruct = Stream.of(typesAnnotatedWith)
|
||||||
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
|
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
|
||||||
.sortBy(x -> Stream.of(x.getDeclaredMethods())
|
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
|
||||||
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
|
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.get()
|
.get()
|
||||||
@@ -176,9 +164,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
logger.debug("PostWebServerConstruct - " + classType.getSimpleName() + " - START");
|
logger.debug("PostWebServerConstruct - " + classType.getSimpleName() + " - START");
|
||||||
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
|
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
|
||||||
|
|
||||||
List<Field> fieldsToInject = Stream.of(classType.getDeclaredFields())
|
List<Field> fieldsToInject = Arrays.stream(classType.getDeclaredFields())
|
||||||
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
|
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
|
||||||
.toList();
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
for (Field fieldToInject : fieldsToInject) {
|
for (Field fieldToInject : fieldsToInject) {
|
||||||
fieldToInject.setAccessible(true);
|
fieldToInject.setAccessible(true);
|
||||||
@@ -188,7 +176,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method constructor = Stream.of(classType.getDeclaredMethods())
|
Method constructor = Arrays.stream(classType.getDeclaredMethods())
|
||||||
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
|
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.get();
|
.get();
|
||||||
|
|||||||
@@ -3,18 +3,16 @@ package it.integry.ems._context;
|
|||||||
import it.integry.annotations.PostContextConstruct;
|
import it.integry.annotations.PostContextConstruct;
|
||||||
import it.integry.common.var.EmsDBConst;
|
import it.integry.common.var.EmsDBConst;
|
||||||
import it.integry.ems.datasource.DataSource;
|
import it.integry.ems.datasource.DataSource;
|
||||||
import it.integry.ems.dynamic_cache.DynamicCacheService;
|
|
||||||
import it.integry.ems.expansion.RunnableArgs;
|
import it.integry.ems.expansion.RunnableArgs;
|
||||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||||
import it.integry.ems.settings.Model.SettingsModel;
|
import it.integry.ems.settings.Model.SettingsModel;
|
||||||
import it.integry.ems.settings.SettingsController;
|
import it.integry.ems.settings.SettingsController;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
import it.integry.ems.user.UserCacheService;
|
import it.integry.ems.user.service.UserCacheService;
|
||||||
import it.integry.ems_model.entity.Azienda;
|
import it.integry.ems_model.entity.Azienda;
|
||||||
import it.integry.ems_model.service.SetupGest;
|
import it.integry.ems_model.service.SetupGest;
|
||||||
import it.integry.ems_model.utility.UtilityDB;
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
import it.integry.ems_model.utility.UtilityHashMap;
|
|
||||||
import it.integry.ems_model.utility.UtilityString;
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -22,9 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class EmsCoreDBLoader {
|
public class EmsCoreDBLoader {
|
||||||
|
|||||||
@@ -1,20 +1,27 @@
|
|||||||
package it.integry.ems.adapter;
|
package it.integry.ems.adapter;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParser;
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
import it.integry.ems_model.config.EmsRestConstants;
|
import it.integry.ems_model.config.EmsRestConstants;
|
||||||
import it.integry.ems_model.utility.UtilityString;
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class JsonDateAdapterDeserializer extends JsonDeserializer<Date> {
|
public class JsonDateAdapterDeserializer extends StdDeserializer<Date> {
|
||||||
|
|
||||||
|
public JsonDateAdapterDeserializer() {
|
||||||
|
this(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected JsonDateAdapterDeserializer(Class<?> vc) {
|
||||||
|
super(vc);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Date deserialize(JsonParser jp, DeserializationContext arg1)
|
public Date deserialize(JsonParser jp, DeserializationContext arg1)
|
||||||
throws IOException, JsonProcessingException {
|
throws IOException {
|
||||||
|
|
||||||
if (UtilityString.isNullOrEmpty(jp.getText()))
|
if (UtilityString.isNullOrEmpty(jp.getText()))
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package it.integry.ems.configuration;
|
||||||
|
|
||||||
|
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
|
||||||
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableWebMvc
|
||||||
|
public class JsonConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ResponseJSONObjectMapper jacksonResponseObjectMapper() {
|
||||||
|
final ResponseJSONObjectMapper objectMapper = new ResponseJSONObjectMapper();
|
||||||
|
|
||||||
|
return objectMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
||||||
|
configurer.defaultContentType(MediaType.APPLICATION_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||||
|
final MappingJackson2HttpMessageConverter httpMessageConverter = converters.stream()
|
||||||
|
.filter(x -> x instanceof MappingJackson2HttpMessageConverter)
|
||||||
|
.map(x -> (MappingJackson2HttpMessageConverter) x)
|
||||||
|
.findFirst()
|
||||||
|
.get();
|
||||||
|
|
||||||
|
httpMessageConverter.setDefaultCharset(StandardCharsets.UTF_8);
|
||||||
|
httpMessageConverter.setObjectMapper(jacksonResponseObjectMapper());
|
||||||
|
|
||||||
|
int oldIndex = converters.indexOf(httpMessageConverter);
|
||||||
|
converters.remove(oldIndex);
|
||||||
|
|
||||||
|
converters.add(0, httpMessageConverter);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package it.integry.ems.configuration;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.oas.annotations.EnableOpenApi;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
//@EnableSwagger2
|
||||||
|
@EnableWebMvc
|
||||||
|
@EnableOpenApi
|
||||||
|
public class SwaggerConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Docket api() {
|
||||||
|
return new Docket(DocumentationType.OAS_30)
|
||||||
|
.select()
|
||||||
|
.apis(RequestHandlerSelectors.any())
|
||||||
|
.paths(PathSelectors.any())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
|
registry.addResourceHandler("/swagger-ui/**")
|
||||||
|
.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
|
||||||
|
.resourceChain(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addViewControllers(ViewControllerRegistry registry) {
|
||||||
|
registry.addViewController("/swagger-ui/")
|
||||||
|
.setViewName("forward:" + "swagger-ui/index.html");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,13 +7,13 @@ import it.integry.ems.Import.base.EntityImportResponse;
|
|||||||
import it.integry.ems.Import.dto.ImportRequestDTO;
|
import it.integry.ems.Import.dto.ImportRequestDTO;
|
||||||
import it.integry.ems.download.DownloadFileHandlerService;
|
import it.integry.ems.download.DownloadFileHandlerService;
|
||||||
import it.integry.ems.download.dto.DownloadFileDto;
|
import it.integry.ems.download.dto.DownloadFileDto;
|
||||||
import it.integry.ems.dto.EntityHierarchyDTO;
|
import it.integry.ems.dto.CreateZipDTO;
|
||||||
|
import it.integry.ems.dto.EntityHierarchy;
|
||||||
import it.integry.ems.export.base.EntityExportResponse;
|
import it.integry.ems.export.base.EntityExportResponse;
|
||||||
import it.integry.ems.export.base.EntityExportedFile;
|
import it.integry.ems.export.base.EntityExportedFile;
|
||||||
import it.integry.ems.javabeans.RequestDataDTO;
|
import it.integry.ems.javabeans.RequestDataDTO;
|
||||||
import it.integry.ems.media.MediaImageService;
|
import it.integry.ems.media.MediaImageService;
|
||||||
import it.integry.ems.media.MimeTypesHandler;
|
import it.integry.ems.media.MimeTypesHandler;
|
||||||
import it.integry.ems.metrics.service.MetricService;
|
|
||||||
import it.integry.ems.model.EntityModel;
|
import it.integry.ems.model.EntityModel;
|
||||||
import it.integry.ems.model.FieldModel;
|
import it.integry.ems.model.FieldModel;
|
||||||
import it.integry.ems.model.PKFieldModel;
|
import it.integry.ems.model.PKFieldModel;
|
||||||
@@ -49,6 +49,8 @@ import org.quartz.*;
|
|||||||
import org.quartz.impl.matchers.GroupMatcher;
|
import org.quartz.impl.matchers.GroupMatcher;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.mail.javamail.ConfigurableMimeFileTypeMap;
|
import org.springframework.mail.javamail.ConfigurableMimeFileTypeMap;
|
||||||
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -96,9 +98,6 @@ public class EmsController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ServiceChecker serviceChecker;
|
private ServiceChecker serviceChecker;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private MetricService metricService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SchedulerFactoryBean quartzScheduler;
|
private SchedulerFactoryBean quartzScheduler;
|
||||||
|
|
||||||
@@ -183,17 +182,6 @@ public class EmsController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/metric/count", method = RequestMethod.GET)
|
|
||||||
public @ResponseBody
|
|
||||||
ServiceRestResponse metricCount(HttpServletRequest request) {
|
|
||||||
try {
|
|
||||||
return ServiceRestResponse.createPositiveResponse(metricService.getJsonCountMetric());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
return ServiceRestResponse.createNegativeResponse(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping(value = "/decodeUcs", method = RequestMethod.POST)
|
@RequestMapping(value = "/decodeUcs", method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
String decodeUcs(@RequestBody String encodedUcs) {
|
String decodeUcs(@RequestBody String encodedUcs) {
|
||||||
@@ -557,8 +545,7 @@ public class EmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_EXPORT, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_EXPORT, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody ServiceRestResponse export(
|
||||||
ServiceRestResponse export(
|
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
@RequestParam(CommonConstants.PROFILE_DB) String configuration,
|
||||||
@RequestParam(value = EmsRestConstants.TYPE) String typeExport,
|
@RequestParam(value = EmsRestConstants.TYPE) String typeExport,
|
||||||
@@ -566,44 +553,39 @@ public class EmsController {
|
|||||||
@RequestParam(required = false, defaultValue = "false") Boolean binaryDownload,
|
@RequestParam(required = false, defaultValue = "false") Boolean binaryDownload,
|
||||||
@RequestParam(required = false, defaultValue = "true") boolean headless,
|
@RequestParam(required = false, defaultValue = "true") boolean headless,
|
||||||
@RequestBody(required = false) JsonNode body) throws Exception {
|
@RequestBody(required = false) JsonNode body) throws Exception {
|
||||||
ServiceRestResponse sr = null;
|
|
||||||
|
|
||||||
try {
|
EntityExportResponse<?> entityExportResponse = emsServices.export(typeExport, formatExport, body, headless);
|
||||||
EntityExportResponse<?> entityExportResponse = emsServices.export(typeExport, formatExport, body, headless);
|
|
||||||
|
|
||||||
sr = new ServiceRestResponse(EsitoType.OK);
|
ServiceRestResponse sr = ServiceRestResponse.createPositiveResponse();
|
||||||
if (entityExportResponse != null) {
|
if (entityExportResponse != null) {
|
||||||
|
|
||||||
if (binaryDownload) {
|
if (binaryDownload) {
|
||||||
List<DownloadFileDto> downloadableFileList = new ArrayList<>();
|
List<DownloadFileDto> downloadableFileList = new ArrayList<>();
|
||||||
for (EntityExportedFile exportedFile : (List<EntityExportedFile>) entityExportResponse.getResponse()) {
|
for (EntityExportedFile exportedFile : (List<EntityExportedFile>) entityExportResponse.getResponse()) {
|
||||||
downloadableFileList.add(downloadFileHandlerService.generateDownloadItem(exportedFile.getFile()));
|
downloadableFileList.add(downloadFileHandlerService.generateDownloadItem(exportedFile.getFile()));
|
||||||
}
|
|
||||||
sr.setJsonObject(downloadableFileList);
|
|
||||||
|
|
||||||
|
|
||||||
} else if (entityExportResponse.isResponseToB64()) {
|
|
||||||
List<File> listaFile = new ArrayList<>();
|
|
||||||
|
|
||||||
for (EntityExportedFile exportedFile : (List<EntityExportedFile>) entityExportResponse.getResponse()) {
|
|
||||||
listaFile.add(exportedFile.getFile());
|
|
||||||
}
|
|
||||||
|
|
||||||
sr.setJsonObject(EncodedB64File.fromFileList(listaFile));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
sr.setJsonObject(entityExportResponse.getResponse());
|
|
||||||
}
|
}
|
||||||
if (!UtilityString.isNullOrEmpty(entityExportResponse.getMessageContent())) {
|
sr.setJsonObject(downloadableFileList);
|
||||||
sr.initMessageList();
|
|
||||||
sr.getMessages().add(new MessageDTO()
|
|
||||||
.setLevel(MessageDTO.Level.INFO)
|
} else if (entityExportResponse.isResponseToB64()) {
|
||||||
.setText(entityExportResponse.getMessageContent()));
|
List<File> listaFile = new ArrayList<>();
|
||||||
|
|
||||||
|
for (EntityExportedFile exportedFile : (List<EntityExportedFile>) entityExportResponse.getResponse()) {
|
||||||
|
listaFile.add(exportedFile.getFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sr.setJsonObject(EncodedB64File.fromFileList(listaFile));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sr.setJsonObject(entityExportResponse.getResponse());
|
||||||
|
}
|
||||||
|
if (!UtilityString.isNullOrEmpty(entityExportResponse.getMessageContent())) {
|
||||||
|
sr.initMessageList();
|
||||||
|
sr.getMessages()
|
||||||
|
.add(new MessageDTO()
|
||||||
|
.setLevel(MessageDTO.Level.INFO)
|
||||||
|
.setText(entityExportResponse.getMessageContent()));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(request.getRequestURI(), e);
|
|
||||||
sr = new ServiceRestResponse(EsitoType.KO, multiDBTransactionManager.getPrimaryDatasource().getProfile(), e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sr;
|
return sr;
|
||||||
@@ -616,70 +598,64 @@ public class EmsController {
|
|||||||
@RequestParam(value = EmsRestConstants.TYPE) String importType,
|
@RequestParam(value = EmsRestConstants.TYPE) String importType,
|
||||||
@RequestParam(value = EmsRestConstants.FORMAT) String importFormat,
|
@RequestParam(value = EmsRestConstants.FORMAT) String importFormat,
|
||||||
@RequestParam(required = false, defaultValue = "true") boolean headless,
|
@RequestParam(required = false, defaultValue = "true") boolean headless,
|
||||||
@RequestBody(required = false) ImportRequestDTO requestBody) {
|
@RequestBody(required = false) ImportRequestDTO requestBody) throws Exception {
|
||||||
|
|
||||||
|
EntityImportResponse<List<EntityBase>> importResponse = emsServices.importEntity(importType, importFormat, requestBody, headless);
|
||||||
|
List<EntityBase> entities = importResponse.getResponse();
|
||||||
|
|
||||||
|
|
||||||
ServiceRestResponse response;
|
ServiceRestResponse response;
|
||||||
|
if (entities != null && entities.size() > 0 && Stream.of(entities).anyMatch(x -> x instanceof EntityBase)) {
|
||||||
|
List<MessageDTO> errorMessages = Stream.of(entities)
|
||||||
|
.filter(x -> x.getException() != null)
|
||||||
|
.map(x -> MessageDTO.error(x.getException().getMessage()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
try {
|
List<MessageDTO> messages = Stream.of(importResponse.getAnomalie())
|
||||||
EntityImportResponse<List<EntityBase>> importResponse = emsServices.importEntity(importType, importFormat, requestBody, headless);
|
.filter(x -> x.getTipo() != null)
|
||||||
List<EntityBase> entities = importResponse.getResponse();
|
.map(x -> {
|
||||||
|
switch (x.getTipo()) {
|
||||||
|
case ERROR:
|
||||||
|
return MessageDTO.error(x.getMessage());
|
||||||
|
case WARNING:
|
||||||
|
default:
|
||||||
|
return MessageDTO.warning(x.getMessage());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
errorMessages.addAll(messages);
|
||||||
|
|
||||||
if (entities != null && entities.size() > 0 && Stream.of(entities).anyMatch(x -> x instanceof EntityBase)) {
|
if (errorMessages.size() > 0) {
|
||||||
List<MessageDTO> errorMessages = Stream.of(entities)
|
response = ServiceRestResponse.createNegativeResponse();
|
||||||
.filter(x -> x.getException() != null)
|
|
||||||
.map(x -> MessageDTO.error(x.getException().getMessage()))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
List<MessageDTO> messages = Stream.of(importResponse.getAnomalie())
|
|
||||||
.filter(x -> x.getTipo() != null)
|
|
||||||
.map(x -> {
|
|
||||||
switch (x.getTipo()) {
|
|
||||||
case ERROR:
|
|
||||||
return MessageDTO.error(x.getMessage());
|
|
||||||
case WARNING:
|
|
||||||
default:
|
|
||||||
return MessageDTO.warning(x.getMessage());
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
errorMessages.addAll(messages);
|
|
||||||
|
|
||||||
if (errorMessages.size() > 0) {
|
|
||||||
response = ServiceRestResponse.createNegativeResponse();
|
|
||||||
} else {
|
|
||||||
response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
}
|
|
||||||
response.setMessages(errorMessages);
|
|
||||||
response.setEntityList(Stream.of(entities).filter(x -> x.getException() == null).toList());
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (importResponse.getAnomalie() != null) {
|
response = ServiceRestResponse.createPositiveResponse();
|
||||||
|
|
||||||
if (!importResponse.getAnomalie().isEmpty()) {
|
|
||||||
|
|
||||||
List<MessageDTO> messages = Stream.of(importResponse.getAnomalie())
|
|
||||||
.map(x -> {
|
|
||||||
switch (x.getTipo()) {
|
|
||||||
case ERROR:
|
|
||||||
return MessageDTO.error(x.getMessage());
|
|
||||||
case WARNING:
|
|
||||||
default:
|
|
||||||
return MessageDTO.warning(x.getMessage());
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
response = ServiceRestResponse.createNegativeResponse();
|
|
||||||
response.setMessages(messages);
|
|
||||||
} else response = ServiceRestResponse.createPositiveResponse();
|
|
||||||
|
|
||||||
} else throw new Exception("Non ci sono dati da importare");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
response.setMessages(errorMessages);
|
||||||
response = ServiceRestResponse.createNegativeResponse(e);
|
response.setEntityList(Stream.of(entities).filter(x -> x.getException() == null).toList());
|
||||||
logger.error("Import " + httpRequest.getRequestURI(), e.getMessage());
|
|
||||||
|
} else {
|
||||||
|
if (importResponse.getAnomalie() != null) {
|
||||||
|
|
||||||
|
if (!importResponse.getAnomalie().isEmpty()) {
|
||||||
|
|
||||||
|
List<MessageDTO> messages = Stream.of(importResponse.getAnomalie())
|
||||||
|
.map(x -> {
|
||||||
|
switch (x.getTipo()) {
|
||||||
|
case ERROR:
|
||||||
|
return MessageDTO.error(x.getMessage());
|
||||||
|
case WARNING:
|
||||||
|
default:
|
||||||
|
return MessageDTO.warning(x.getMessage());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
response = ServiceRestResponse.createNegativeResponse();
|
||||||
|
response.setMessages(messages);
|
||||||
|
} else response = ServiceRestResponse.createPositiveResponse();
|
||||||
|
|
||||||
|
} else throw new Exception("Non ci sono dati da importare");
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
@@ -778,47 +754,42 @@ public class EmsController {
|
|||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_FILE_ATTACHMENT + "/{idAttach}/{filename}", method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_FILE_ATTACHMENT + "/{idAttach}/{filename}", method = RequestMethod.GET)
|
||||||
public byte[] downloadStbFileAttachment(HttpServletRequest request, HttpServletResponse response,
|
@ResponseBody
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
public ResponseEntity<byte[]> downloadStbFileAttachment(
|
||||||
@PathVariable String idAttach,
|
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||||
@PathVariable String filename,
|
@PathVariable String idAttach,
|
||||||
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
|
@PathVariable String filename,
|
||||||
|
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
|
||||||
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
|
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
|
||||||
|
|
||||||
if (attachmentDTO != null) {
|
if (attachmentDTO != null) {
|
||||||
response.setContentType(attachmentDTO.getMimeType());
|
return ResponseEntity.ok()
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
.contentType(MediaType.parseMediaType(attachmentDTO.getMimeType()))
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + attachmentDTO.getFileName() + "\"");
|
.contentLength(attachmentDTO.getFileSize())
|
||||||
|
.header("Content-Disposition", "attachment; filename=\"" + attachmentDTO.getFileName() + "\"")
|
||||||
response.setContentLength((int) attachmentDTO.getFileSize());
|
.body(attachmentDTO.getFileContent());
|
||||||
return attachmentDTO.getFileContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
response.sendError(404, "Allegato non trovato");
|
return ResponseEntity.notFound().build();
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_FILE_ATTACHMENT, method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_FILE_ATTACHMENT, method = RequestMethod.GET)
|
||||||
public byte[] downloadStbFileAttachmentPath(HttpServletRequest request, HttpServletResponse response,
|
public ResponseEntity<byte[]> downloadStbFileAttachmentPath(
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||||
@RequestParam String idAttach,
|
@RequestParam String idAttach,
|
||||||
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
|
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
|
||||||
|
|
||||||
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
|
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
|
||||||
|
|
||||||
if (attachmentDTO != null) {
|
if (attachmentDTO != null) {
|
||||||
response.setContentType(attachmentDTO.getMimeType());
|
return ResponseEntity.ok()
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
.contentType(MediaType.parseMediaType(attachmentDTO.getMimeType()))
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + attachmentDTO.getFileName() + "\"");
|
.contentLength(attachmentDTO.getFileSize())
|
||||||
|
.header("Content-Disposition", "attachment; filename=\"" + attachmentDTO.getFileName() + "\"")
|
||||||
response.setContentLength((int) attachmentDTO.getFileSize());
|
.body(attachmentDTO.getFileContent());
|
||||||
return attachmentDTO.getFileContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
response.sendError(404, "Allegato non trovato");
|
return ResponseEntity.notFound().build();
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -859,7 +830,7 @@ public class EmsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_PDF, method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_PDF, method = RequestMethod.GET)
|
||||||
public byte[] downloadDtbDocPdf(HttpServletRequest request, HttpServletResponse response,
|
public byte[] downloadDtbDocPdf(HttpServletResponse response,
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||||
@RequestParam String dataDoc,
|
@RequestParam String dataDoc,
|
||||||
@RequestParam String serDoc,
|
@RequestParam String serDoc,
|
||||||
@@ -943,6 +914,7 @@ public class EmsController {
|
|||||||
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
@RequestParam(CommonConstants.PROFILE_DB) String config,
|
||||||
@RequestParam(required = false) String idAttach,
|
@RequestParam(required = false) String idAttach,
|
||||||
@RequestParam(required = false) String descrizione,
|
@RequestParam(required = false) String descrizione,
|
||||||
|
@RequestParam(required = false) String typeAttach,
|
||||||
@RequestPart() MultipartFile[] files
|
@RequestPart() MultipartFile[] files
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
@@ -957,6 +929,7 @@ public class EmsController {
|
|||||||
files[0].getBytes(),
|
files[0].getBytes(),
|
||||||
descrizione,
|
descrizione,
|
||||||
files[0].getContentType(),
|
files[0].getContentType(),
|
||||||
|
typeAttach,
|
||||||
null, null);
|
null, null);
|
||||||
|
|
||||||
stbFilesAttached.setOnlyPkMaster(false);
|
stbFilesAttached.setOnlyPkMaster(false);
|
||||||
@@ -1101,6 +1074,11 @@ public class EmsController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "createZipFromFiles", method = RequestMethod.POST)
|
||||||
|
public @ResponseBody
|
||||||
|
ServiceRestResponse createZipFromFiles(@RequestBody CreateZipDTO createZipDTO) throws Exception {
|
||||||
|
return ServiceRestResponse.createPositiveResponse(emsServices.createZipFromFiles(createZipDTO));
|
||||||
|
}
|
||||||
|
|
||||||
// @RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_EMAIL_CONTENT, method = RequestMethod.POST)
|
// @RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_EMAIL_CONTENT, method = RequestMethod.POST)
|
||||||
// public ServiceRestResponse uploadStbFileAttachment(HttpServletRequest request, HttpServletResponse response,
|
// public ServiceRestResponse uploadStbFileAttachment(HttpServletRequest request, HttpServletResponse response,
|
||||||
@@ -1147,8 +1125,7 @@ public class EmsController {
|
|||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_CLEAN_DIRECTORIES, method = RequestMethod.POST)
|
@RequestMapping(value = EmsRestConstants.PATH_CLEAN_DIRECTORIES, method = RequestMethod.POST)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse cleanDirectories(HttpServletRequest httpRequest, HttpServletResponse httpResponse,
|
ServiceRestResponse cleanDirectories(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
|
||||||
try {
|
try {
|
||||||
emsServices.cleanDirectories();
|
emsServices.cleanDirectories();
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
@@ -1167,11 +1144,9 @@ public class EmsController {
|
|||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_MAPPING, method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_MAPPING, method = RequestMethod.GET)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse getEntityMapping(HttpServletRequest httpRequest,
|
ServiceRestResponse getEntityMapping(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||||
HttpServletResponse httpResponse,
|
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
|
||||||
try {
|
try {
|
||||||
List<EntityHierarchyDTO> mapping = emsServices.getEntityMapping();
|
List<EntityHierarchy> mapping = emsServices.getEntityMapping();
|
||||||
return ServiceRestResponse.createPositiveResponse(mapping);
|
return ServiceRestResponse.createPositiveResponse(mapping);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
@@ -1181,9 +1156,7 @@ public class EmsController {
|
|||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_GET_HISTORY_PROFILE_DB, method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_GET_HISTORY_PROFILE_DB, method = RequestMethod.GET)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse getHistoryProfileDb(HttpServletRequest httpRequest,
|
ServiceRestResponse getHistoryProfileDb(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||||
HttpServletResponse httpResponse,
|
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
|
||||||
try {
|
try {
|
||||||
String historyProfileDb = settingsController.getHistoryProfileDb();
|
String historyProfileDb = settingsController.getHistoryProfileDb();
|
||||||
return ServiceRestResponse.createPositiveResponse(historyProfileDb);
|
return ServiceRestResponse.createPositiveResponse(historyProfileDb);
|
||||||
@@ -1195,9 +1168,7 @@ public class EmsController {
|
|||||||
|
|
||||||
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_DETAILS, method = RequestMethod.GET)
|
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_DETAILS, method = RequestMethod.GET)
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
ServiceRestResponse getEntityDetails(HttpServletRequest httpRequest,
|
ServiceRestResponse getEntityDetails(@RequestParam("entityName") String entityName,
|
||||||
HttpServletResponse httpResponse,
|
|
||||||
@RequestParam("entityName") String entityName,
|
|
||||||
@RequestParam(CommonConstants.PROFILE_DB) String config
|
@RequestParam(CommonConstants.PROFILE_DB) String config
|
||||||
) throws Exception {
|
) throws Exception {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ public class EmsResponseEntityExceptionHandler extends ResponseEntityExceptionHa
|
|||||||
logger.error("Eccezione non gestita", ex);
|
logger.error("Eccezione non gestita", ex);
|
||||||
|
|
||||||
ServiceRestResponse serviceRestResponse = ServiceRestResponse.createNegativeResponse(ex);
|
ServiceRestResponse serviceRestResponse = ServiceRestResponse.createNegativeResponse(ex);
|
||||||
return new ResponseEntity(serviceRestResponse, headers, status);
|
return new ResponseEntity<>(serviceRestResponse, headers, status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,26 +4,17 @@ package it.integry.ems.devices;
|
|||||||
import it.integry.ems.service.EntityProcessor;
|
import it.integry.ems.service.EntityProcessor;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
import it.integry.ems.user.UserSession;
|
import it.integry.ems.user.UserSession;
|
||||||
import it.integry.ems_model.config.EmsRestConstants;
|
import it.integry.ems_model.entity.StbDevices;
|
||||||
import it.integry.ems_model.entity.StbDevice;
|
|
||||||
import it.integry.ems_model.types.OperationType;
|
import it.integry.ems_model.types.OperationType;
|
||||||
import it.integry.ems_model.utility.Query;
|
import it.integry.ems_model.utility.Query;
|
||||||
import it.integry.ems_model.utility.UtilityDB;
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
import it.integry.ems_model.utility.UtilityDate;
|
|
||||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.context.ContextLoader;
|
import org.springframework.web.context.ContextLoader;
|
||||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import javax.naming.Context;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -57,14 +48,14 @@ public class DevicesService {
|
|||||||
UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), selectSql);
|
UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), selectSql);
|
||||||
|
|
||||||
if(!exists) {
|
if(!exists) {
|
||||||
StbDevice stbDevice = new StbDevice()
|
StbDevices stbDevices = new StbDevices()
|
||||||
.setName(appName)
|
.setName(appName)
|
||||||
.setIdentificationId(deviceId)
|
.setIdentificationId(deviceId)
|
||||||
.setCreatedAt(new Date())
|
.setCreatedAt(new Date())
|
||||||
.setLastUse(new Date());
|
.setLastUse(new Date());
|
||||||
|
|
||||||
stbDevice.setOperation(OperationType.INSERT_OR_UPDATE);
|
stbDevices.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||||
entityProcessor.processEntity(stbDevice, multiDBTransactionManager);
|
entityProcessor.processEntity(stbDevices, multiDBTransactionManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package it.integry.ems.directory;
|
|||||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
import it.integry.common.var.CommonConstants;
|
import it.integry.common.var.CommonConstants;
|
||||||
import it.integry.ems.datasource.DataSource;
|
import it.integry.ems.datasource.DataSource;
|
||||||
import it.integry.ems.json.JSONObjectMapper;
|
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||||
import it.integry.ems.properties.EmsProperties;
|
import it.integry.ems.properties.EmsProperties;
|
||||||
import it.integry.ems.response.EsitoType;
|
import it.integry.ems.response.EsitoType;
|
||||||
import it.integry.ems.response.FileItem;
|
import it.integry.ems.response.FileItem;
|
||||||
@@ -39,10 +39,10 @@ public class EmailWatcherListener extends TimerTask {
|
|||||||
private EmailListenerInfo emailListenerInfo;
|
private EmailListenerInfo emailListenerInfo;
|
||||||
private EmsProperties prop;
|
private EmsProperties prop;
|
||||||
private SetupGest setupGest;
|
private SetupGest setupGest;
|
||||||
private JSONObjectMapper jsonObjectMapper;
|
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||||
|
|
||||||
public EmailWatcherListener(EmailListenerInfo emailListenerInfo, EmsProperties prop,
|
public EmailWatcherListener(EmailListenerInfo emailListenerInfo, EmsProperties prop,
|
||||||
SetupGest setupGest, JSONObjectMapper jsonObjectMapper) {
|
SetupGest setupGest, ResponseJSONObjectMapper jsonObjectMapper) {
|
||||||
super();
|
super();
|
||||||
this.emailListenerInfo = emailListenerInfo;
|
this.emailListenerInfo = emailListenerInfo;
|
||||||
this.prop = prop;
|
this.prop = prop;
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ public class ApplicationInfoDTO {
|
|||||||
private String loadMenuPvm;
|
private String loadMenuPvm;
|
||||||
private List<String> salvataggiSoap;
|
private List<String> salvataggiSoap;
|
||||||
|
|
||||||
|
private boolean delimitedIdentifier;
|
||||||
|
private boolean ansiPadding;
|
||||||
|
private boolean concatNullYieldsNull;
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@@ -74,4 +78,31 @@ public class ApplicationInfoDTO {
|
|||||||
this.salvataggiSoap = salvataggiSoap;
|
this.salvataggiSoap = salvataggiSoap;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isConcatNullYieldsNull() {
|
||||||
|
return concatNullYieldsNull;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplicationInfoDTO setConcatNullYieldsNull(boolean concatNullYieldNulls) {
|
||||||
|
this.concatNullYieldsNull = concatNullYieldNulls;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAnsiPadding() {
|
||||||
|
return ansiPadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplicationInfoDTO setAnsiPadding(boolean ansiPadding) {
|
||||||
|
this.ansiPadding = ansiPadding;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDelimitedIdentifier() {
|
||||||
|
return delimitedIdentifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplicationInfoDTO setDelimitedIdentifier(boolean delimitedIdentifier) {
|
||||||
|
this.delimitedIdentifier = delimitedIdentifier;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
132
ems-core/src/main/java/it/integry/ems/dto/CreateZipDTO.java
Normal file
132
ems-core/src/main/java/it/integry/ems/dto/CreateZipDTO.java
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
package it.integry.ems.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import it.integry.ems.report.dto.JasperDTO;
|
||||||
|
import it.integry.ems_model.base.EntityBase;
|
||||||
|
import it.integry.ems_model.entity.DtbDocPdf;
|
||||||
|
import it.integry.ems_model.entity.MtbAartLink;
|
||||||
|
import it.integry.ems_model.entity.MtbUntMis;
|
||||||
|
import it.integry.ems_model.entity.StbActivityFile;
|
||||||
|
import it.integry.ems_model.entity._enum.IBaseEnum;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class CreateZipDTO {
|
||||||
|
private List<String> listIdAttach;
|
||||||
|
|
||||||
|
private List<StbActivityFile> listStbActivityFile;
|
||||||
|
|
||||||
|
private List<MtbAartLink> listMtbAartLink;
|
||||||
|
|
||||||
|
private List<DtbDocPdf> listDtbDocPdf;
|
||||||
|
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
private SaveMode saveMode = SaveMode.STB_FILES_ATTACHED;
|
||||||
|
|
||||||
|
private EntityBase entityToSaveTo;
|
||||||
|
|
||||||
|
public List<String> getListIdAttach() {
|
||||||
|
return listIdAttach;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setListIdAttach(List<String> listIdAttach) {
|
||||||
|
this.listIdAttach = listIdAttach;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<StbActivityFile> getListStbActivityFile() {
|
||||||
|
return listStbActivityFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setListStbActivityFile(List<StbActivityFile> listStbActivityFile) {
|
||||||
|
this.listStbActivityFile = listStbActivityFile;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MtbAartLink> getListMtbAartLink() {
|
||||||
|
return listMtbAartLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setListMtbAartLink(List<MtbAartLink> listMtbAartLink) {
|
||||||
|
this.listMtbAartLink = listMtbAartLink;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DtbDocPdf> getListDtbDocPdf() {
|
||||||
|
return listDtbDocPdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setListDtbDocPdf(List<DtbDocPdf> listDtbDocPdf) {
|
||||||
|
this.listDtbDocPdf = listDtbDocPdf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setFileName(String fileName) {
|
||||||
|
this.fileName = fileName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SaveMode getSaveMode() {
|
||||||
|
return saveMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setSaveMode(SaveMode saveMode) {
|
||||||
|
this.saveMode = saveMode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityBase getEntityToSaveTo() {
|
||||||
|
return entityToSaveTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateZipDTO setEntityToSaveTo(EntityBase entityToSaveTo) {
|
||||||
|
this.entityToSaveTo = entityToSaveTo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SaveMode implements IBaseEnum<SaveMode> {
|
||||||
|
STB_FILES_ATTACHED((short) 0),
|
||||||
|
STB_ACTIVITY_FILE((short) 1);
|
||||||
|
|
||||||
|
private final short value;
|
||||||
|
|
||||||
|
SaveMode(final short value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SaveMode from(Object value) {
|
||||||
|
short castValue = (short) value;
|
||||||
|
for (SaveMode b : SaveMode.values()) {
|
||||||
|
if (b.value == castValue)
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
public short getValue() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object get() {
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SaveMode fromInternal(Object val) {
|
||||||
|
return from(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
180
ems-core/src/main/java/it/integry/ems/dto/EntityHierarchy.java
Normal file
180
ems-core/src/main/java/it/integry/ems/dto/EntityHierarchy.java
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
package it.integry.ems.dto;
|
||||||
|
|
||||||
|
import it.integry.ems_model.annotation.*;
|
||||||
|
import it.integry.ems_model.base.EntityBase;
|
||||||
|
import it.integry.ems_model.base.EntityInterface;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EntityHierarchy {
|
||||||
|
|
||||||
|
private Class<? extends EntityBase> clazz;
|
||||||
|
private String entityName;
|
||||||
|
private String tableName;
|
||||||
|
private java.lang.reflect.Field parentField; //Used for entityChild
|
||||||
|
private boolean master;
|
||||||
|
private boolean equatable;
|
||||||
|
private List<EntityHierarchy> children;
|
||||||
|
private List<Field> fields;
|
||||||
|
|
||||||
|
public Class<? extends EntityInterface> getClazz() {
|
||||||
|
return clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityHierarchy setClazz(Class<? extends EntityBase> clazz) {
|
||||||
|
this.clazz = clazz;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEntityName() {
|
||||||
|
return entityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntityName(String entityName) {
|
||||||
|
this.entityName = entityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTableName(String tableName) {
|
||||||
|
this.tableName = tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public java.lang.reflect.Field getParentField() {
|
||||||
|
return parentField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityHierarchy setParentField(java.lang.reflect.Field parentField) {
|
||||||
|
this.parentField = parentField;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMaster() {
|
||||||
|
return master;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityHierarchy setMaster(boolean master) {
|
||||||
|
this.master = master;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<EntityHierarchy> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<EntityHierarchy> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addChild(EntityHierarchy child) {
|
||||||
|
this.children.add(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeChild(EntityHierarchy child) {
|
||||||
|
this.children.remove(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Field> getFields() {
|
||||||
|
return fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityHierarchy setFields(List<Field> fields) {
|
||||||
|
this.fields = fields;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEquatable() {
|
||||||
|
return equatable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityHierarchy setEquatable(boolean equatable) {
|
||||||
|
this.equatable = equatable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class Field {
|
||||||
|
private java.lang.reflect.Field field;
|
||||||
|
private Identity identity;
|
||||||
|
private SqlField sqlField;
|
||||||
|
private ObjectStorage objectStorage;
|
||||||
|
private Blob blob;
|
||||||
|
private Clob clob;
|
||||||
|
|
||||||
|
public java.lang.reflect.Field getField() {
|
||||||
|
return field;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setField(java.lang.reflect.Field field) {
|
||||||
|
this.field = field;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSqlField() {
|
||||||
|
return sqlField != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isObjectStorage() {
|
||||||
|
return objectStorage != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBlob() {
|
||||||
|
return blob != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isClob() {
|
||||||
|
return clob != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isIdentity() {
|
||||||
|
return identity != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Identity getIdentity() {
|
||||||
|
return identity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setIdentity(Identity identity) {
|
||||||
|
this.identity = identity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SqlField getSqlField() {
|
||||||
|
return sqlField;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setSqlField(SqlField sqlField) {
|
||||||
|
this.sqlField = sqlField;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectStorage getObjectStorage() {
|
||||||
|
return objectStorage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setObjectStorage(ObjectStorage objectStorage) {
|
||||||
|
this.objectStorage = objectStorage;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Blob getBlob() {
|
||||||
|
return blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setBlob(Blob blob) {
|
||||||
|
this.blob = blob;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Clob getClob() {
|
||||||
|
return clob;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Field setClob(Clob clob) {
|
||||||
|
this.clob = clob;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
package it.integry.ems.dto;
|
|
||||||
|
|
||||||
import it.integry.ems_model.base.EntityBase;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class EntityHierarchyDTO {
|
|
||||||
|
|
||||||
private Class<? extends EntityBase> clazz;
|
|
||||||
private String entityName;
|
|
||||||
private String tableName;
|
|
||||||
private Field field;
|
|
||||||
private boolean master;
|
|
||||||
private List<EntityHierarchyDTO> children;
|
|
||||||
|
|
||||||
public Class<? extends EntityBase> getClazz() {
|
|
||||||
return clazz;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EntityHierarchyDTO setClazz(Class<? extends EntityBase> clazz) {
|
|
||||||
this.clazz = clazz;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEntityName() {
|
|
||||||
return entityName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEntityName(String entityName) {
|
|
||||||
this.entityName = entityName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTableName() {
|
|
||||||
return tableName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTableName(String tableName) {
|
|
||||||
this.tableName = tableName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Field getField() {
|
|
||||||
return field;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EntityHierarchyDTO setField(Field field) {
|
|
||||||
this.field = field;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isMaster() {
|
|
||||||
return master;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EntityHierarchyDTO setMaster(boolean master) {
|
|
||||||
this.master = master;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EntityHierarchyDTO> getChildren() {
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setChildren(List<EntityHierarchyDTO> children) {
|
|
||||||
this.children = children;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addChild(EntityHierarchyDTO child) {
|
|
||||||
this.children.add(child);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeChild(EntityHierarchyDTO child) {
|
|
||||||
this.children.remove(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
46
ems-core/src/main/java/it/integry/ems/dto/Result.java
Normal file
46
ems-core/src/main/java/it/integry/ems/dto/Result.java
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
package it.integry.ems.dto;
|
||||||
|
|
||||||
|
public abstract class Result<T> {
|
||||||
|
private Result() {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
if (this instanceof Result.Success) {
|
||||||
|
Result.Success<?> success = (Result.Success<?>) this;
|
||||||
|
return "Success[data=" + success.getData().toString() + "]";
|
||||||
|
} else if (this instanceof Result.Error) {
|
||||||
|
Result.Error error = (Result.Error) this;
|
||||||
|
return "Error[exception=" + error.getError().toString() + "]";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Success<T> extends Result<T> {
|
||||||
|
private final T data;
|
||||||
|
|
||||||
|
public Success() {
|
||||||
|
data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Success(T data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final class Error<T> extends Result<T> {
|
||||||
|
private final Exception exception;
|
||||||
|
|
||||||
|
public Error(Exception exception) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
this.exception = exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Exception getError() {
|
||||||
|
return exception;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.ems.dynamic_cache;
|
package it.integry.ems.dynamic_cache;
|
||||||
|
|
||||||
|
import it.integry.ems.expansion.RunnableArgsWithReturn;
|
||||||
import it.integry.ems.expansion.RunnableWithReturn;
|
import it.integry.ems.expansion.RunnableWithReturn;
|
||||||
import it.integry.ems.looper.service.LooperService;
|
import it.integry.ems.looper.service.LooperService;
|
||||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||||
@@ -12,6 +13,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -34,17 +36,46 @@ public class DynamicCacheService {
|
|||||||
public enum Keys {
|
public enum Keys {
|
||||||
DATI_AZIENDA_KEY,
|
DATI_AZIENDA_KEY,
|
||||||
ENTITY_LOGGER_SETUP,
|
ENTITY_LOGGER_SETUP,
|
||||||
GRIGLIA_ACQUISTO_KEY
|
GRIGLIA_ACQUISTO_KEY,
|
||||||
|
ENTITY_SYNC_KEY
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addItem(Keys key, int invalidateTimeInMins, RunnableWithReturn<Object> refreshAction) {
|
public void addItem(Keys key, int invalidateTimeInMins, RunnableWithReturn<Object> refreshAction) {
|
||||||
//cacheData.put(key, refreshAction.run());
|
|
||||||
|
|
||||||
this.looperService.add(() -> {
|
this.looperService.add(() -> {
|
||||||
cacheData.put(key, refreshAction.run());
|
cacheData.put(key, refreshAction.run());
|
||||||
}, invalidateTimeInMins * 60 * 1000, "dynamic-cache-" + key);
|
}, invalidateTimeInMins * 60 * 1000, "dynamic-cache-" + key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T>void addDbItem(Keys key, int invalidateTimeInMins, RunnableArgsWithReturn<Connection, T> refreshAction, List<String> dbNames) {
|
||||||
|
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
|
||||||
|
RunnableWithReturn<Object> internalRefreshAction = () -> {
|
||||||
|
|
||||||
|
Map<String, List<AvailableConnectionsModel>> databases = settingsModel.getAvailableConnections()
|
||||||
|
.stream()
|
||||||
|
.filter(AvailableConnectionsModel::getInternalDb)
|
||||||
|
.filter(x -> finalDbNames.contains(x.getDbName().toLowerCase()))
|
||||||
|
.collect(Collectors.groupingBy(AvailableConnectionsModel::getDbName));
|
||||||
|
|
||||||
|
final HashMap<String, T> cachedDataByDB = new HashMap<>();
|
||||||
|
|
||||||
|
for (String dbName : databases.keySet()) {
|
||||||
|
String profileName = databases.get(dbName).get(0).getProfileName();
|
||||||
|
|
||||||
|
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false)) {
|
||||||
|
T data = refreshAction.run(multiDBTransactionManager.getPrimaryConnection());
|
||||||
|
|
||||||
|
cachedDataByDB.putIfAbsent(dbName.toLowerCase(), data);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.error(ex.getMessage(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return cachedDataByDB;
|
||||||
|
};
|
||||||
|
|
||||||
|
addItem(key, invalidateTimeInMins, internalRefreshAction);
|
||||||
|
}
|
||||||
|
|
||||||
public void addEntity(Keys key, int invalidateTimeInMins, Class<? extends EntityBase> clazz, List<String> dbNames) {
|
public void addEntity(Keys key, int invalidateTimeInMins, Class<? extends EntityBase> clazz, List<String> dbNames) {
|
||||||
|
|
||||||
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
|
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
|
||||||
@@ -92,16 +123,12 @@ public class DynamicCacheService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void cacheEntityByDB(String dbName, String profileName, Class<? extends EntityBase> clazz, HashMap<String, List<? extends EntityBase>> cachedEntitiesByDB) throws Exception {
|
private void cacheEntityByDB(String dbName, String profileName, Class<? extends EntityBase> clazz, HashMap<String, List<? extends EntityBase>> cachedEntitiesByDB) throws Exception {
|
||||||
MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false);
|
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false)) {
|
||||||
|
|
||||||
try {
|
|
||||||
String tableName = clazz.newInstance().getTableName();
|
String tableName = clazz.newInstance().getTableName();
|
||||||
String sql = "SELECT * FROM " + tableName;
|
String sql = "SELECT * FROM " + tableName;
|
||||||
List<? extends EntityBase> entities = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, clazz);
|
List<? extends EntityBase> entities = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, clazz);
|
||||||
|
|
||||||
cachedEntitiesByDB.putIfAbsent(dbName.toLowerCase(), entities);
|
cachedEntitiesByDB.putIfAbsent(dbName.toLowerCase(), entities);
|
||||||
} finally {
|
|
||||||
multiDBTransactionManager.closeAll();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,4 +182,13 @@ public class DynamicCacheService {
|
|||||||
|
|
||||||
return cachedEntityList;
|
return cachedEntityList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T>T getDbItem(Keys key, String dbName) {
|
||||||
|
dbName = dbName.toLowerCase();
|
||||||
|
final HashMap<String, T> cacheObjectByDB = (HashMap<String, T>) cacheData.getOrDefault(key, null);
|
||||||
|
if (cacheObjectByDB == null) return null;
|
||||||
|
|
||||||
|
final T cachedEntityValue = cacheObjectByDB.getOrDefault(dbName, null);
|
||||||
|
return cachedEntityValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.ems.ecedi.dto;
|
|||||||
import it.integry.ems_model.annotation.SqlField;
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
import it.integry.ems_model.entity.MtbColt;
|
import it.integry.ems_model.entity.MtbColt;
|
||||||
import it.integry.ems_model.types.OperationType;
|
import it.integry.ems_model.types.OperationType;
|
||||||
|
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||||
import it.integry.ems_model.utility.UtilityString;
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -508,7 +509,7 @@ public class EuritmoTestata {
|
|||||||
|
|
||||||
// Chiave collo
|
// Chiave collo
|
||||||
mtbColt.setGestione("A");
|
mtbColt.setGestione("A");
|
||||||
mtbColt.setDataCollo(this.dataDoc);
|
mtbColt.setDataCollo(UtilityLocalDate.localDateFromDate(this.dataDoc));
|
||||||
|
|
||||||
mtbColt.setRifOrd(String.format("%s_%s", dataDocString, this.numDoc));
|
mtbColt.setRifOrd(String.format("%s_%s", dataDocString, this.numDoc));
|
||||||
mtbColt.setAnnotazioni(annotazioni);
|
mtbColt.setAnnotazioni(annotazioni);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.ems.ecedi.enums;
|
package it.integry.ems.ecedi.enums;
|
||||||
|
|
||||||
public enum EuritmoCCIAppIdentifier {
|
public enum EuritmoCCIAppIdentifier {
|
||||||
|
CCI37("37"),
|
||||||
CCI00("00"),
|
CCI00("00"),
|
||||||
CCI10("10"),
|
CCI10("10"),
|
||||||
CCI17("17"),
|
CCI17("17"),
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package it.integry.ems.entity_development;
|
||||||
|
|
||||||
|
import it.integry.common.var.CommonConstants;
|
||||||
|
import it.integry.ems.devices.DevicesService;
|
||||||
|
import it.integry.ems.devices.dto.RegisterDeviceRequestDTO;
|
||||||
|
import it.integry.ems.entity_development.dto.CreateEntityItemRequestDTO;
|
||||||
|
import it.integry.ems.response.ServiceRestResponse;
|
||||||
|
import it.integry.ems.utility.UtilityDebug;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Scope("request")
|
||||||
|
@RequestMapping("entity-development")
|
||||||
|
public class EntityDevelopmentController {
|
||||||
|
|
||||||
|
private final Logger logger = LogManager.getLogger();
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EntityDevelopmentService entityDevelopmentService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "create", method = RequestMethod.POST)
|
||||||
|
public @ResponseBody
|
||||||
|
ServiceRestResponse create(@RequestBody CreateEntityItemRequestDTO[] createEntityItemRequestList) throws Exception {
|
||||||
|
if (!UtilityDebug.isDebugExecution())
|
||||||
|
throw new Exception("Puoi eseguire questa procedura solo in ambiente DEBUG!");
|
||||||
|
|
||||||
|
if (UtilityDebug.isIntegryServerDev())
|
||||||
|
throw new Exception("Non puoi eseguire questa azione su SERVERDEV!");
|
||||||
|
|
||||||
|
entityDevelopmentService.create(createEntityItemRequestList);
|
||||||
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
package it.integry.ems.entity_development;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.github.javaparser.ast.CompilationUnit;
|
||||||
|
import com.github.javaparser.ast.NodeList;
|
||||||
|
import com.github.javaparser.ast.body.*;
|
||||||
|
import com.github.javaparser.ast.expr.*;
|
||||||
|
import com.github.javaparser.ast.stmt.BlockStmt;
|
||||||
|
import com.github.javaparser.ast.stmt.ExpressionStmt;
|
||||||
|
import com.github.javaparser.ast.stmt.ReturnStmt;
|
||||||
|
import com.github.javaparser.ast.type.ClassOrInterfaceType;
|
||||||
|
import it.integry.ems.entity_development.dto.CreateEntityItemRequestDTO;
|
||||||
|
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
|
||||||
|
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseForeignKey;
|
||||||
|
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumn;
|
||||||
|
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableView;
|
||||||
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
|
import it.integry.ems.utility.UtilityDirs;
|
||||||
|
import it.integry.ems_model.annotation.*;
|
||||||
|
import it.integry.ems_model.base.EntityBase;
|
||||||
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.kie.api.definition.type.PropertyReactive;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.AbstractMap;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.github.javaparser.ast.Modifier.Keyword.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Scope("request")
|
||||||
|
public class EntityDevelopmentService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MultiDBTransactionManager multiDBTransactionManager;
|
||||||
|
|
||||||
|
public void create(CreateEntityItemRequestDTO[] createEntityItemRequestList) throws Exception {
|
||||||
|
SQLServerDBSchemaManager sourceDBSchema = new SQLServerDBSchemaManager(multiDBTransactionManager.getPrimaryConnection());
|
||||||
|
|
||||||
|
List<AbstractMap.SimpleEntry<Boolean, CompilationUnit>> masterDetailClassesDeclaration = new ArrayList<>();
|
||||||
|
|
||||||
|
final List<CreateEntityItemRequestDTO> entityChilds = Arrays.stream(createEntityItemRequestList)
|
||||||
|
.filter(x -> !x.isMaster())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (CreateEntityItemRequestDTO createEntityItemRequestDTO : createEntityItemRequestList) {
|
||||||
|
final DatabaseTableView tableData = sourceDBSchema.getTable(createEntityItemRequestDTO.getTableName());
|
||||||
|
final CompilationUnit javaClassDeclaration =
|
||||||
|
createJavaClassDeclaration(createEntityItemRequestDTO, tableData, createEntityItemRequestDTO.isMaster() ? entityChilds : null);
|
||||||
|
|
||||||
|
masterDetailClassesDeclaration.add(new AbstractMap.SimpleEntry<>(createEntityItemRequestDTO.isMaster(), javaClassDeclaration));
|
||||||
|
}
|
||||||
|
|
||||||
|
final String entitiesJavaPath = UtilityDirs.getDevelopmentJavaBaseFolder() + "it\\integry\\ems_model\\entity\\";
|
||||||
|
|
||||||
|
for (AbstractMap.SimpleEntry<Boolean, CompilationUnit> booleanClassOrInterfaceDeclarationSimpleEntry : masterDetailClassesDeclaration) {
|
||||||
|
final TypeDeclaration<?> classDeclaration = booleanClassOrInterfaceDeclarationSimpleEntry.getValue().getType(0);
|
||||||
|
|
||||||
|
writeJavaClassToFile(booleanClassOrInterfaceDeclarationSimpleEntry.getValue(), entitiesJavaPath, classDeclaration.getNameAsString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private CompilationUnit createJavaClassDeclaration(CreateEntityItemRequestDTO createEntityItemRequestDTO, final DatabaseTableView databaseTable, final List<CreateEntityItemRequestDTO> childEntities) throws Exception {
|
||||||
|
CompilationUnit javaClassCompilation = new CompilationUnit();
|
||||||
|
|
||||||
|
javaClassCompilation.setPackageDeclaration("it.integry.ems_model.entity");
|
||||||
|
javaClassCompilation.addImport(LogManager.class);
|
||||||
|
javaClassCompilation.addImport(List.class);
|
||||||
|
javaClassCompilation.addImport(ArrayList.class);
|
||||||
|
|
||||||
|
String javaClassName = UtilityString.sqlToCamelCase(databaseTable.getTableName());
|
||||||
|
javaClassName = javaClassName.substring(0, 1).toUpperCase() + javaClassName.substring(1);
|
||||||
|
|
||||||
|
|
||||||
|
ClassOrInterfaceDeclaration javaClass = javaClassCompilation
|
||||||
|
.addClass(javaClassName)
|
||||||
|
.addExtendedType(EntityBase.class)
|
||||||
|
.setPublic(true);
|
||||||
|
|
||||||
|
if (createEntityItemRequestDTO.isMaster())
|
||||||
|
javaClass.addAnnotation(Master.class);
|
||||||
|
|
||||||
|
javaClass
|
||||||
|
.addAnnotation(PropertyReactive.class);
|
||||||
|
|
||||||
|
|
||||||
|
javaClass.addAndGetAnnotation(Table.class)
|
||||||
|
.addPair("value", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"));
|
||||||
|
|
||||||
|
javaClass.addAndGetAnnotation(JsonTypeName.class)
|
||||||
|
.addPair("value", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"));
|
||||||
|
|
||||||
|
final FieldDeclaration entityField = javaClass.addFieldWithInitializer(String.class, "ENTITY", new StringLiteralExpr(databaseTable.getTableName()), PUBLIC, FINAL, STATIC);
|
||||||
|
final FieldDeclaration serialVersionUIDField = javaClass.addFieldWithInitializer(Long.class, "serialVersionUID", new LongLiteralExpr("1L"), PRIVATE, FINAL, STATIC);
|
||||||
|
final FieldDeclaration loggerField = javaClass.addFieldWithInitializer(Logger.class, "logger", new MethodCallExpr("LogManager.getLogger"), PRIVATE, FINAL, STATIC);
|
||||||
|
|
||||||
|
|
||||||
|
createEntityConstructor(javaClass);
|
||||||
|
|
||||||
|
List<FieldDeclaration> entityFields = new ArrayList<>();
|
||||||
|
|
||||||
|
for (DatabaseTableColumn databaseColumn : databaseTable.getColumns()) {
|
||||||
|
entityFields.add(createEntityField(javaClass, databaseColumn));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (childEntities != null) {
|
||||||
|
for (CreateEntityItemRequestDTO child : childEntities) {
|
||||||
|
String entityChildClassName = UtilityString.sqlToCamelCase(child.getTableName());
|
||||||
|
entityChildClassName = entityChildClassName.substring(0, 1).toUpperCase() + entityChildClassName.substring(1);
|
||||||
|
|
||||||
|
String variableName = entityChildClassName.substring(0, 1).toLowerCase() + entityChildClassName.substring(1);
|
||||||
|
|
||||||
|
final FieldDeclaration fieldDeclaration = javaClass.addField(
|
||||||
|
"List<" + entityChildClassName + ">",
|
||||||
|
variableName,
|
||||||
|
PRIVATE);
|
||||||
|
|
||||||
|
//final InitializerDeclaration initializerDeclaration = new InitializerDeclaration(false, new BlockStmt().addStatement("new ArrayList<>()"));
|
||||||
|
|
||||||
|
fieldDeclaration.setVariable(0, new VariableDeclarator(fieldDeclaration.getElementType(), variableName, new MethodCallExpr("new ArrayList<>")));
|
||||||
|
entityFields.add(fieldDeclaration);
|
||||||
|
|
||||||
|
fieldDeclaration.addAnnotation(EntityChild.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (FieldDeclaration field : entityFields) {
|
||||||
|
field.createGetter();
|
||||||
|
field.createSetter()
|
||||||
|
.setType(javaClassName)
|
||||||
|
.getBody().ifPresent(x -> x.addStatement(new ReturnStmt("this")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (childEntities != null && !childEntities.isEmpty()) {
|
||||||
|
createDeleteChildsMethod(javaClass, childEntities);
|
||||||
|
}
|
||||||
|
|
||||||
|
return javaClassCompilation;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createEntityConstructor(ClassOrInterfaceDeclaration javaClass) {
|
||||||
|
final ConstructorDeclaration constructorDeclaration = javaClass.addConstructor(PUBLIC);
|
||||||
|
|
||||||
|
final BlockStmt constructorBlockStmt = constructorDeclaration.getBody();
|
||||||
|
|
||||||
|
constructorBlockStmt.addStatement(new MethodCallExpr("super",
|
||||||
|
new NameExpr("logger")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private FieldDeclaration createEntityField(ClassOrInterfaceDeclaration javaClass, DatabaseTableColumn databaseColumn) throws Exception {
|
||||||
|
final Class<?> aClass = UtilityDB.sqlTypeToJavaClass(databaseColumn.getDataType().toSqlDataType());
|
||||||
|
|
||||||
|
FieldDeclaration fieldDeclaration = javaClass.addField(aClass, UtilityString.sqlToField(databaseColumn.getColumnName()), PRIVATE);
|
||||||
|
|
||||||
|
//Create @PK annotation
|
||||||
|
if (databaseColumn.isPrimaryKey())
|
||||||
|
fieldDeclaration.addAnnotation(PK.class);
|
||||||
|
|
||||||
|
if (databaseColumn.isIdentity())
|
||||||
|
fieldDeclaration.addAnnotation(Identity.class);
|
||||||
|
|
||||||
|
//Create @SqlField annotation
|
||||||
|
final NormalAnnotationExpr sqlFieldAnnotation = fieldDeclaration.addAndGetAnnotation(SqlField.class)
|
||||||
|
.addPair("value", new StringLiteralExpr(databaseColumn.getColumnName()));
|
||||||
|
|
||||||
|
if (databaseColumn.getCharacterMaximumLength() != null)
|
||||||
|
sqlFieldAnnotation.addPair("maxLength", new IntegerLiteralExpr(databaseColumn.getCharacterMaximumLength().toString()));
|
||||||
|
|
||||||
|
sqlFieldAnnotation
|
||||||
|
.addPair("nullable", new BooleanLiteralExpr(databaseColumn.isNullable()));
|
||||||
|
|
||||||
|
//Create @FK annotations
|
||||||
|
if (databaseColumn.getForeignKeys() != null) {
|
||||||
|
for (DatabaseForeignKey fkInfo : databaseColumn.getForeignKeys()) {
|
||||||
|
String javaClassName = UtilityString.sqlToCamelCase(fkInfo.getTableName());
|
||||||
|
javaClassName = javaClassName.substring(0, 1).toUpperCase() + javaClassName.substring(1);
|
||||||
|
|
||||||
|
fieldDeclaration.addAndGetAnnotation(FK.class)
|
||||||
|
.addPair("tableName", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"))
|
||||||
|
.addPair("columnName", new StringLiteralExpr(fkInfo.getColumnName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return fieldDeclaration;
|
||||||
|
}
|
||||||
|
|
||||||
|
private MethodDeclaration createDeleteChildsMethod(ClassOrInterfaceDeclaration classDefinition, final List<CreateEntityItemRequestDTO> childEntities) {
|
||||||
|
|
||||||
|
final MethodDeclaration deleteChilds = classDefinition.addMethod("deleteChilds", PROTECTED);
|
||||||
|
deleteChilds.addThrownException(Exception.class);
|
||||||
|
|
||||||
|
final BlockStmt blockStmt = deleteChilds.getBody().get();
|
||||||
|
|
||||||
|
for (CreateEntityItemRequestDTO childEntity : childEntities) {
|
||||||
|
String entityChildClassName = UtilityString.sqlToCamelCase(childEntity.getTableName());
|
||||||
|
entityChildClassName = entityChildClassName.substring(0, 1).toUpperCase() + entityChildClassName.substring(1);
|
||||||
|
|
||||||
|
String variableName = entityChildClassName.substring(0, 1).toLowerCase() + entityChildClassName.substring(1);
|
||||||
|
|
||||||
|
ClassOrInterfaceType classOrInterfaceType = new ClassOrInterfaceType()
|
||||||
|
.setName(entityChildClassName);
|
||||||
|
final VariableDeclarationExpr variableDeclarationExpr = new VariableDeclarationExpr(classOrInterfaceType, variableName);
|
||||||
|
|
||||||
|
variableDeclarationExpr.getVariable(0).setInitializer("new " + entityChildClassName + "()");
|
||||||
|
|
||||||
|
blockStmt.addStatement(
|
||||||
|
new ExpressionStmt(variableDeclarationExpr));
|
||||||
|
|
||||||
|
final NodeList<Expression> nodes = new NodeList<>();
|
||||||
|
nodes.add(new NameExpr("connection"));
|
||||||
|
nodes.add(new NameExpr("this"));
|
||||||
|
|
||||||
|
MethodCallExpr methodCallExpr = new MethodCallExpr(variableDeclarationExpr.getVariable(0).getNameAsExpression(), "deleteAllEntities", nodes);
|
||||||
|
blockStmt.addStatement(methodCallExpr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void writeJavaClassToFile(CompilationUnit classDefinition, String directoryPath, String nameAsString) throws Exception {
|
||||||
|
String filePath = directoryPath + nameAsString + ".java";
|
||||||
|
File f = new File(filePath);
|
||||||
|
if (f.exists()) throw new Exception("Esiste già un file per " + nameAsString);
|
||||||
|
|
||||||
|
FileOutputStream outputStream = new FileOutputStream(filePath);
|
||||||
|
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);
|
||||||
|
outputStreamWriter.write(classDefinition.toString());
|
||||||
|
|
||||||
|
outputStreamWriter.close();
|
||||||
|
outputStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.ems.entity_development.dto;
|
||||||
|
|
||||||
|
public class CreateEntityItemRequestDTO {
|
||||||
|
|
||||||
|
private String tableName;
|
||||||
|
private boolean master;
|
||||||
|
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateEntityItemRequestDTO setTableName(String tableName) {
|
||||||
|
this.tableName = tableName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMaster() {
|
||||||
|
return master;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateEntityItemRequestDTO setMaster(boolean master) {
|
||||||
|
this.master = master;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import com.microsoft.sqlserver.jdbc.SQLServerException;
|
|||||||
import it.integry.ems.entity_logger.db_schema_manager.dto.*;
|
import it.integry.ems.entity_logger.db_schema_manager.dto.*;
|
||||||
import it.integry.ems_model.utility.UtilityDB;
|
import it.integry.ems_model.utility.UtilityDB;
|
||||||
import it.integry.ems_model.utility.UtilityHashMap;
|
import it.integry.ems_model.utility.UtilityHashMap;
|
||||||
|
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||||
import it.integry.ems_model.utility.UtilityString;
|
import it.integry.ems_model.utility.UtilityString;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
@@ -32,6 +33,10 @@ public class SQLServerDBSchemaManager {
|
|||||||
this.mPassword = password;
|
this.mPassword = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SQLServerDBSchemaManager(Connection connection) {
|
||||||
|
this.mConnection = connection;
|
||||||
|
}
|
||||||
|
|
||||||
public void connect() throws SQLException {
|
public void connect() throws SQLException {
|
||||||
mConnection = DriverManager.getConnection(getConnectionString(mHost), mUsername, mPassword);
|
mConnection = DriverManager.getConnection(getConnectionString(mHost), mUsername, mPassword);
|
||||||
mConnection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
|
mConnection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
|
||||||
@@ -77,44 +82,168 @@ public class SQLServerDBSchemaManager {
|
|||||||
return UtilityDB.executeSimpleQueryDTO(this.mConnection, sql, DatabaseFile.class);
|
return UtilityDB.executeSimpleQueryDTO(this.mConnection, sql, DatabaseFile.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DatabaseTable getTable(String tableName) throws Exception {
|
||||||
|
return getTableOrView(tableName, DatabaseObjectTypeEnum.TABLE, DatabaseTable.class);
|
||||||
|
}
|
||||||
|
|
||||||
public List<DatabaseTable> getTables() throws Exception {
|
public DatabaseView getView(String viewName) throws Exception {
|
||||||
List<DatabaseTable> tableList = new ArrayList<>();
|
return getTableOrView(viewName, DatabaseObjectTypeEnum.VIEW, DatabaseView.class);
|
||||||
|
}
|
||||||
|
|
||||||
String sql = "SELECT TABLE_CATALOG," +
|
public <T extends DatabaseTableView> T getTableOrView(String objectName, DatabaseObjectTypeEnum type, Class<T> classType) throws Exception {
|
||||||
" TABLE_SCHEMA," +
|
String sql = "SELECT TABLE_CATALOG,\n" +
|
||||||
" TABLE_NAME," +
|
" COLUMNS.TABLE_SCHEMA,\n" +
|
||||||
" COLUMN_NAME," +
|
" COLUMNS.TABLE_NAME,\n" +
|
||||||
" ORDINAL_POSITION," +
|
" COLUMNS.COLUMN_NAME,\n" +
|
||||||
" COLUMN_DEFAULT," +
|
" ISNULL(IS_PRIMARY_KEY, 0) AS IS_PRIMARY_KEY,\n" +
|
||||||
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE," +
|
" CAST(OBJECTPROPERTY(OBJECT_ID(COLUMNS.TABLE_NAME), 'TableHasIdentity') AS BIT) AS TABLE_HAS_IDENTITY,\n" +
|
||||||
" DATA_TYPE," +
|
" ORDINAL_POSITION,\n" +
|
||||||
" CHARACTER_MAXIMUM_LENGTH," +
|
" COLUMN_DEFAULT,\n" +
|
||||||
" CHARACTER_OCTET_LENGTH," +
|
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE,\n" +
|
||||||
" NUMERIC_PRECISION," +
|
" DATA_TYPE,\n" +
|
||||||
" NUMERIC_PRECISION_RADIX," +
|
" CHARACTER_MAXIMUM_LENGTH,\n" +
|
||||||
" NUMERIC_SCALE," +
|
" CHARACTER_OCTET_LENGTH,\n" +
|
||||||
" DATETIME_PRECISION," +
|
" NUMERIC_PRECISION,\n" +
|
||||||
" CHARACTER_SET_CATALOG," +
|
" NUMERIC_PRECISION_RADIX,\n" +
|
||||||
" CHARACTER_SET_SCHEMA," +
|
" NUMERIC_SCALE,\n" +
|
||||||
" CHARACTER_SET_NAME," +
|
" DATETIME_PRECISION,\n" +
|
||||||
" COLLATION_CATALOG," +
|
" CHARACTER_SET_CATALOG,\n" +
|
||||||
" COLLATION_SCHEMA," +
|
" CHARACTER_SET_SCHEMA,\n" +
|
||||||
" COLLATION_NAME," +
|
" CHARACTER_SET_NAME,\n" +
|
||||||
" DOMAIN_CATALOG," +
|
" COLLATION_CATALOG,\n" +
|
||||||
" DOMAIN_SCHEMA," +
|
" COLLATION_SCHEMA,\n" +
|
||||||
" DOMAIN_NAME" +
|
" COLLATION_NAME,\n" +
|
||||||
" FROM INFORMATION_SCHEMA.COLUMNS" +
|
" DOMAIN_CATALOG,\n" +
|
||||||
" INNER JOIN sys.objects ON TABLE_NAME = name " +
|
" DOMAIN_SCHEMA,\n" +
|
||||||
" WHERE type = " + UtilityDB.valueToString(DatabaseObjectTypeEnum.TABLE.getText());
|
" DOMAIN_NAME\n" +
|
||||||
|
"FROM INFORMATION_SCHEMA.COLUMNS\n" +
|
||||||
|
" INNER JOIN sys.objects ON TABLE_NAME = name\n" +
|
||||||
|
" LEFT OUTER JOIN (SELECT TABLE_NAME,\n" +
|
||||||
|
" TABLE_SCHEMA,\n" +
|
||||||
|
" COLUMN_NAME,\n" +
|
||||||
|
" CAST(1 AS BIT) AS IS_PRIMARY_KEY\n" +
|
||||||
|
" FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n" +
|
||||||
|
" WHERE OBJECTPROPERTY(OBJECT_ID(CONSTRAINT_SCHEMA + '.' + QUOTENAME(CONSTRAINT_NAME)),\n" +
|
||||||
|
" 'IsPrimaryKey') = 1) pk\n" +
|
||||||
|
" ON pk.TABLE_NAME = COLUMNS.TABLE_NAME AND\n" +
|
||||||
|
" pk.COLUMN_NAME = COLUMNS.COLUMN_NAME AND\n" +
|
||||||
|
" pk.TABLE_SCHEMA = COLUMNS.TABLE_SCHEMA\n" +
|
||||||
|
" WHERE type = " + UtilityDB.valueToString(type.getText()) +
|
||||||
|
" AND COLUMNS.TABLE_NAME = " + UtilityDB.valueToString(objectName);
|
||||||
|
|
||||||
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
||||||
|
|
||||||
|
if (result.isEmpty())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
HashMap<String, ArrayList<DatabaseForeignKey>> foreignKeysResults = getForeignKeys(objectName);
|
||||||
|
|
||||||
|
T databaseTable = (T) classType.newInstance()
|
||||||
|
.setTableName(objectName);
|
||||||
|
|
||||||
|
List<DatabaseTableColumn> databaseTableColumns = new ArrayList<>();
|
||||||
|
for (HashMap<String, Object> column : result) {
|
||||||
|
|
||||||
|
DatabaseTableColumn databaseTableColumn = new DatabaseTableColumn()
|
||||||
|
.setColumnName(UtilityHashMap.getValueIfExists(column, "COLUMN_NAME"))
|
||||||
|
.setOrdinalPosition(UtilityHashMap.getValueIfExists(column, "ORDINAL_POSITION"))
|
||||||
|
.setColumnDefault(UtilityHashMap.getValueIfExists(column, "COLUMN_DEFAULT"))
|
||||||
|
.setNullable(UtilityHashMap.getValueIfExists(column, "IS_NULLABLE"))
|
||||||
|
.setPrimaryKey(UtilityHashMap.getValueIfExists(column, "IS_PRIMARY_KEY"))
|
||||||
|
.setDataType(DatabaseTableColumnDataType.fromString(UtilityHashMap.getValueIfExists(column, "DATA_TYPE")))
|
||||||
|
.setCharacterMaximumLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_MAXIMUM_LENGTH"))
|
||||||
|
.setCharacterOctetLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_OCTET_LENGTH"))
|
||||||
|
.setNumericPrecision(UtilityHashMap.getValueIfExists(column, "NUMERIC_PRECISION"))
|
||||||
|
.setNumericPrecisionRadix(UtilityHashMap.getValueIfExists(column, "NUMERIC_PRECISION_RADIX"))
|
||||||
|
.setNumericScale(UtilityHashMap.getValueIfExists(column, "NUMERIC_SCALE"))
|
||||||
|
.setDatetimePrecision(UtilityHashMap.getValueIfExists(column, "DATETIME_PRECISION"))
|
||||||
|
.setCharacterSetCatalog(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_CATALOG"))
|
||||||
|
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
|
||||||
|
.setCharacterSetName(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_NAME"));
|
||||||
|
|
||||||
|
databaseTableColumn.setIdentity(databaseTableColumn.isPrimaryKey() && UtilityHashMap.<Boolean>getValueIfExists(column, "TABLE_HAS_IDENTITY"));
|
||||||
|
|
||||||
|
if (foreignKeysResults.containsKey(databaseTableColumn.getColumnName()))
|
||||||
|
databaseTableColumn.setForeignKeys(foreignKeysResults.get(databaseTableColumn.getColumnName()));
|
||||||
|
|
||||||
|
databaseTableColumns.add(databaseTableColumn);
|
||||||
|
}
|
||||||
|
|
||||||
|
databaseTable.setColumns(databaseTableColumns);
|
||||||
|
return databaseTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DatabaseTable> getTables() throws Exception {
|
||||||
|
return getTablesOrViews(DatabaseObjectTypeEnum.TABLE, DatabaseTable.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DatabaseView> getViews() throws Exception {
|
||||||
|
return getTablesOrViews(DatabaseObjectTypeEnum.VIEW, DatabaseView.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private <T extends DatabaseTableView> List<T> getTablesOrViews(DatabaseObjectTypeEnum type, Class<T> classType) throws Exception {
|
||||||
|
List<T> tableList = new ArrayList<>();
|
||||||
|
|
||||||
|
String sql = "SELECT TABLE_CATALOG,\n" +
|
||||||
|
" COLUMNS.TABLE_SCHEMA,\n" +
|
||||||
|
" COLUMNS.TABLE_NAME,\n" +
|
||||||
|
" COLUMNS.COLUMN_NAME,\n" +
|
||||||
|
" ISNULL(IS_PRIMARY_KEY, 0) AS IS_PRIMARY_KEY,\n" +
|
||||||
|
" CAST(OBJECTPROPERTY(OBJECT_ID(COLUMNS.TABLE_NAME), 'TableHasIdentity') AS BIT) AS TABLE_HAS_IDENTITY,\n" +
|
||||||
|
" ORDINAL_POSITION,\n" +
|
||||||
|
" COLUMN_DEFAULT,\n" +
|
||||||
|
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE,\n" +
|
||||||
|
" DATA_TYPE,\n" +
|
||||||
|
" CHARACTER_MAXIMUM_LENGTH,\n" +
|
||||||
|
" CHARACTER_OCTET_LENGTH,\n" +
|
||||||
|
" NUMERIC_PRECISION,\n" +
|
||||||
|
" NUMERIC_PRECISION_RADIX,\n" +
|
||||||
|
" NUMERIC_SCALE,\n" +
|
||||||
|
" DATETIME_PRECISION,\n" +
|
||||||
|
" CHARACTER_SET_CATALOG,\n" +
|
||||||
|
" CHARACTER_SET_SCHEMA,\n" +
|
||||||
|
" CHARACTER_SET_NAME,\n" +
|
||||||
|
" COLLATION_CATALOG,\n" +
|
||||||
|
" COLLATION_SCHEMA,\n" +
|
||||||
|
" COLLATION_NAME,\n" +
|
||||||
|
" DOMAIN_CATALOG,\n" +
|
||||||
|
" DOMAIN_SCHEMA,\n" +
|
||||||
|
" DOMAIN_NAME,\n" +
|
||||||
|
" CAST(create_date AS DATE) AS CREATE_DATE\n" +
|
||||||
|
"FROM INFORMATION_SCHEMA.COLUMNS\n" +
|
||||||
|
" INNER JOIN sys.objects ON TABLE_NAME = name\n" +
|
||||||
|
" LEFT OUTER JOIN (SELECT TABLE_NAME,\n" +
|
||||||
|
" TABLE_SCHEMA,\n" +
|
||||||
|
" COLUMN_NAME,\n" +
|
||||||
|
" CAST(1 AS BIT) AS IS_PRIMARY_KEY\n" +
|
||||||
|
" FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n" +
|
||||||
|
" WHERE OBJECTPROPERTY(OBJECT_ID(CONSTRAINT_SCHEMA + '.' + QUOTENAME(CONSTRAINT_NAME)),\n" +
|
||||||
|
" 'IsPrimaryKey') = 1) pk\n" +
|
||||||
|
" ON pk.TABLE_NAME = COLUMNS.TABLE_NAME AND\n" +
|
||||||
|
" pk.COLUMN_NAME = COLUMNS.COLUMN_NAME AND\n" +
|
||||||
|
" pk.TABLE_SCHEMA = COLUMNS.TABLE_SCHEMA\n" +
|
||||||
|
" WHERE type = " + UtilityDB.valueToString(type.getText());
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
||||||
|
final HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> foreignKeys = getForeignKeys();
|
||||||
|
|
||||||
|
|
||||||
Stream.of(result)
|
Stream.of(result)
|
||||||
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "TABLE_NAME"))
|
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "TABLE_NAME"))
|
||||||
.forEach(x -> {
|
.forEach(x -> {
|
||||||
DatabaseTable databaseTable = new DatabaseTable()
|
T databaseTable = null;
|
||||||
.setTableName(x.getKey());
|
try {
|
||||||
|
databaseTable = (T) classType.newInstance();
|
||||||
|
} catch (InstantiationException | IllegalAccessException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
databaseTable
|
||||||
|
.setTableName(x.getKey())
|
||||||
|
.setCreationDate(UtilityLocalDate.localDateFromDate(UtilityHashMap.getValueIfExists(x.getValue().get(0), "CREATE_DATE")));
|
||||||
|
|
||||||
|
HashMap<String, ArrayList<DatabaseForeignKey>> foreignKeysResults = foreignKeys.getOrDefault(x.getKey(), new HashMap<>());
|
||||||
|
|
||||||
List<DatabaseTableColumn> databaseTableColumns = new ArrayList<>();
|
List<DatabaseTableColumn> databaseTableColumns = new ArrayList<>();
|
||||||
for (HashMap<String, Object> column : x.getValue()) {
|
for (HashMap<String, Object> column : x.getValue()) {
|
||||||
@@ -124,6 +253,7 @@ public class SQLServerDBSchemaManager {
|
|||||||
.setOrdinalPosition(UtilityHashMap.getValueIfExists(column, "ORDINAL_POSITION"))
|
.setOrdinalPosition(UtilityHashMap.getValueIfExists(column, "ORDINAL_POSITION"))
|
||||||
.setColumnDefault(UtilityHashMap.getValueIfExists(column, "COLUMN_DEFAULT"))
|
.setColumnDefault(UtilityHashMap.getValueIfExists(column, "COLUMN_DEFAULT"))
|
||||||
.setNullable(UtilityHashMap.getValueIfExists(column, "IS_NULLABLE"))
|
.setNullable(UtilityHashMap.getValueIfExists(column, "IS_NULLABLE"))
|
||||||
|
.setPrimaryKey(UtilityHashMap.getValueIfExists(column, "IS_PRIMARY_KEY"))
|
||||||
.setDataType(DatabaseTableColumnDataType.fromString(UtilityHashMap.getValueIfExists(column, "DATA_TYPE")))
|
.setDataType(DatabaseTableColumnDataType.fromString(UtilityHashMap.getValueIfExists(column, "DATA_TYPE")))
|
||||||
.setCharacterMaximumLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_MAXIMUM_LENGTH"))
|
.setCharacterMaximumLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_MAXIMUM_LENGTH"))
|
||||||
.setCharacterOctetLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_OCTET_LENGTH"))
|
.setCharacterOctetLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_OCTET_LENGTH"))
|
||||||
@@ -135,6 +265,12 @@ public class SQLServerDBSchemaManager {
|
|||||||
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
|
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
|
||||||
.setCharacterSetName(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_NAME"));
|
.setCharacterSetName(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_NAME"));
|
||||||
|
|
||||||
|
Boolean tableHasIdentity = UtilityHashMap.<Boolean>getValueIfExists(column, "TABLE_HAS_IDENTITY", false);
|
||||||
|
databaseTableColumn.setIdentity(databaseTableColumn.isPrimaryKey() && tableHasIdentity != null && tableHasIdentity);
|
||||||
|
|
||||||
|
if (foreignKeysResults != null && foreignKeysResults.containsKey(databaseTableColumn.getColumnName()))
|
||||||
|
databaseTableColumn.setForeignKeys(foreignKeysResults.get(databaseTableColumn.getColumnName()));
|
||||||
|
|
||||||
databaseTableColumns.add(databaseTableColumn);
|
databaseTableColumns.add(databaseTableColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +282,91 @@ public class SQLServerDBSchemaManager {
|
|||||||
return tableList;
|
return tableList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String createTableSyntax(DatabaseTable databaseTable) throws Exception {
|
|
||||||
|
private HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> getForeignKeys() throws Exception {
|
||||||
|
String sql = "SELECT DISTINCT\n" +
|
||||||
|
" tab1.name AS [table],\n" +
|
||||||
|
" col1.name AS [column],\n" +
|
||||||
|
" tab2.name AS [referenced_table],\n" +
|
||||||
|
" col2.name AS [referenced_column]\n" +
|
||||||
|
" FROM sys.foreign_key_columns fkc\n" +
|
||||||
|
" INNER JOIN sys.objects obj\n" +
|
||||||
|
" ON obj.object_id = fkc.constraint_object_id\n" +
|
||||||
|
" INNER JOIN sys.tables tab1\n" +
|
||||||
|
" ON tab1.object_id = fkc.parent_object_id\n" +
|
||||||
|
" INNER JOIN sys.schemas sch\n" +
|
||||||
|
" ON tab1.schema_id = sch.schema_id\n" +
|
||||||
|
" INNER JOIN sys.columns col1\n" +
|
||||||
|
" ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id\n" +
|
||||||
|
" INNER JOIN sys.tables tab2\n" +
|
||||||
|
" ON tab2.object_id = fkc.referenced_object_id\n" +
|
||||||
|
" INNER JOIN sys.columns col2\n" +
|
||||||
|
" ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id";
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> resultList = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
||||||
|
|
||||||
|
HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> allTablesResult = new HashMap<>();
|
||||||
|
|
||||||
|
Stream.of(resultList)
|
||||||
|
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "table"))
|
||||||
|
.forEach(x -> {
|
||||||
|
|
||||||
|
HashMap<String, ArrayList<DatabaseForeignKey>> hashMap = new HashMap<>();
|
||||||
|
for (HashMap<String, Object> resultRow : x.getValue()) {
|
||||||
|
if (!hashMap.containsKey(UtilityHashMap.<String>getValueIfExists(resultRow, "column")))
|
||||||
|
hashMap.put(UtilityHashMap.getValueIfExists(resultRow, "column"), new ArrayList<>());
|
||||||
|
|
||||||
|
hashMap.get(UtilityHashMap.<String>getValueIfExists(resultRow, "column"))
|
||||||
|
.add(new DatabaseForeignKey()
|
||||||
|
.setColumnName(UtilityHashMap.getValueIfExists(resultRow, "referenced_column"))
|
||||||
|
.setTableName(UtilityHashMap.getValueIfExists(resultRow, "referenced_table")));
|
||||||
|
|
||||||
|
}
|
||||||
|
allTablesResult.put(x.getKey(), hashMap);
|
||||||
|
});
|
||||||
|
return allTablesResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private HashMap<String, ArrayList<DatabaseForeignKey>> getForeignKeys(String tableName) throws Exception {
|
||||||
|
String sql = "SELECT DISTINCT\n" +
|
||||||
|
" tab1.name AS [table],\n" +
|
||||||
|
" col1.name AS [column],\n" +
|
||||||
|
" tab2.name AS [referenced_table],\n" +
|
||||||
|
" col2.name AS [referenced_column]\n" +
|
||||||
|
" FROM sys.foreign_key_columns fkc\n" +
|
||||||
|
" INNER JOIN sys.objects obj\n" +
|
||||||
|
" ON obj.object_id = fkc.constraint_object_id\n" +
|
||||||
|
" INNER JOIN sys.tables tab1\n" +
|
||||||
|
" ON tab1.object_id = fkc.parent_object_id\n" +
|
||||||
|
" INNER JOIN sys.schemas sch\n" +
|
||||||
|
" ON tab1.schema_id = sch.schema_id\n" +
|
||||||
|
" INNER JOIN sys.columns col1\n" +
|
||||||
|
" ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id\n" +
|
||||||
|
" INNER JOIN sys.tables tab2\n" +
|
||||||
|
" ON tab2.object_id = fkc.referenced_object_id\n" +
|
||||||
|
" INNER JOIN sys.columns col2\n" +
|
||||||
|
" ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id\n" +
|
||||||
|
" WHERE tab1.name = " + UtilityDB.valueToString(tableName);
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> resultList = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
||||||
|
|
||||||
|
HashMap<String, ArrayList<DatabaseForeignKey>> hashMap = new HashMap<>();
|
||||||
|
|
||||||
|
for (HashMap<String, Object> resultRow : resultList) {
|
||||||
|
if (!hashMap.containsKey(UtilityHashMap.<String>getValueIfExists(resultRow, "column")))
|
||||||
|
hashMap.put(UtilityHashMap.getValueIfExists(resultRow, "column"), new ArrayList<>());
|
||||||
|
|
||||||
|
hashMap.get(UtilityHashMap.<String>getValueIfExists(resultRow, "column"))
|
||||||
|
.add(new DatabaseForeignKey()
|
||||||
|
.setColumnName(UtilityHashMap.getValueIfExists(resultRow, "referenced_column"))
|
||||||
|
.setTableName(UtilityHashMap.getValueIfExists(resultRow, "referenced_table")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return hashMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String createTableSyntax(DatabaseTableView databaseTable) throws Exception {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("CREATE TABLE [" + databaseTable.getTableName() + "] (");
|
sb.append("CREATE TABLE [" + databaseTable.getTableName() + "] (");
|
||||||
|
|
||||||
@@ -161,14 +381,29 @@ public class SQLServerDBSchemaManager {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createTable(DatabaseTable databaseTable) throws Exception {
|
public void createTable(DatabaseTableView databaseTable) throws Exception {
|
||||||
String sql = createTableSyntax(databaseTable);
|
String sql = createTableSyntax(databaseTable);
|
||||||
|
|
||||||
execTableAlterSQL(sql);
|
execTableAlterSQL(sql);
|
||||||
this.mConnection.commit();
|
this.mConnection.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String addTableColumnsSyntax(DatabaseTable deltaTable) throws Exception {
|
|
||||||
|
public void dropTable(DatabaseTable databaseTable) throws Exception {
|
||||||
|
String dropSql = "DROP TABLE " + databaseTable.getTableName();
|
||||||
|
execTableAlterSQL(dropSql);
|
||||||
|
this.mConnection.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void dropView(DatabaseView databaseTable) throws Exception {
|
||||||
|
String dropSql = "DROP VIEW " + databaseTable.getTableName();
|
||||||
|
execTableAlterSQL(dropSql);
|
||||||
|
this.mConnection.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String addTableColumnsSyntax(DatabaseTableView deltaTable) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("ALTER TABLE [" + deltaTable.getTableName() + "] ADD ");
|
sb.append("ALTER TABLE [" + deltaTable.getTableName() + "] ADD ");
|
||||||
@@ -184,7 +419,7 @@ public class SQLServerDBSchemaManager {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTableColumns(DatabaseTable deltaTable) throws Exception {
|
public void addTableColumns(DatabaseTableView deltaTable) throws Exception {
|
||||||
|
|
||||||
String sql = addTableColumnsSyntax(deltaTable);
|
String sql = addTableColumnsSyntax(deltaTable);
|
||||||
execTableAlterSQL(sql);
|
execTableAlterSQL(sql);
|
||||||
@@ -192,6 +427,74 @@ public class SQLServerDBSchemaManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String dropTableColumnsSyntax(DatabaseTableView deltaTable) {
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("ALTER TABLE [" + deltaTable.getTableName() + "] DROP COLUMN ");
|
||||||
|
|
||||||
|
List<DatabaseTableColumn> sourceColumns = deltaTable.getColumns();
|
||||||
|
List<String> columnsTempSql = new ArrayList<>();
|
||||||
|
for (DatabaseTableColumn sourceColumn : sourceColumns) {
|
||||||
|
columnsTempSql.add(sourceColumn.getColumnName());
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(StringUtils.join(columnsTempSql, ", "));
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dropTableColumns(DatabaseTableView deltaTable) throws Exception {
|
||||||
|
|
||||||
|
String sql = dropTableColumnsSyntax(deltaTable);
|
||||||
|
execTableAlterSQL(sql);
|
||||||
|
this.mConnection.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> updateTableColumnsSyntax(DatabaseTableView deltaTable) {
|
||||||
|
List<String> alterSqls = new ArrayList<>();
|
||||||
|
|
||||||
|
List<DatabaseTableColumn> sourceColumns = deltaTable.getColumns();
|
||||||
|
|
||||||
|
for (DatabaseTableColumn sourceColumn : sourceColumns) {
|
||||||
|
alterSqls.add("ALTER TABLE [" + deltaTable.getTableName() + "] ALTER COLUMN " + generateAddColumnSyntax(sourceColumn));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return alterSqls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateTableColumns(DatabaseTableView deltaTable) throws Exception {
|
||||||
|
|
||||||
|
List<String> sqls = updateTableColumnsSyntax(deltaTable);
|
||||||
|
for (String sql : sqls)
|
||||||
|
execTableAlterSQL(sql);
|
||||||
|
|
||||||
|
this.mConnection.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<String> generateAlterTableToDisableAnsiPadding() throws SQLException {
|
||||||
|
return UtilityDB.executeSimpleQueryOnlyFirstColumn(this.mConnection, "SELECT 'ALTER TABLE ' + OBJECT_SCHEMA_NAME(sys.objects.object_id) + '.' + \n" +
|
||||||
|
" sys.objects.name + ' ALTER COLUMN [' + sys.columns.name + '] ' + \n" +
|
||||||
|
" sys.types.name + CASE WHEN sys.types.name IN ('text','ntext') THEN ''\n" +
|
||||||
|
" WHEN sys.types.name IN ('char','varchar') \n" +
|
||||||
|
" THEN '('+IIF(sys.columns.max_length = -1, 'MAX', CAST(sys.columns.max_length AS varchar(10)))+')'\n" +
|
||||||
|
" WHEN sys.types.name IN ('nchar','nvarchar') \n" +
|
||||||
|
" THEN '('+CAST(sys.columns.max_length/2 AS varchar(10))+')' END +\n" +
|
||||||
|
" ' ' + CASE WHEN sys.columns.is_nullable = 0 \n" +
|
||||||
|
" THEN 'NOT NULL' ELSE 'NULL' END\n" +
|
||||||
|
"FROM sys.columns\n" +
|
||||||
|
"JOIN sys.types\n" +
|
||||||
|
" ON sys.columns.user_type_id = sys.types.user_type_id\n" +
|
||||||
|
"JOIN sys.objects\n" +
|
||||||
|
" ON sys.columns.object_id = sys.objects.object_id\n" +
|
||||||
|
"WHERE is_ansi_padded = 0\n" +
|
||||||
|
" AND sys.types.name in ('char','varchar')\n" +
|
||||||
|
" AND sys.objects.type = 'U'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String generateAddColumnSyntax(DatabaseTableColumn tableColumn) {
|
private String generateAddColumnSyntax(DatabaseTableColumn tableColumn) {
|
||||||
String columnSize = null;
|
String columnSize = null;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
|
import it.integry.ems_model.annotation.SqlField;
|
||||||
|
|
||||||
|
public class DatabaseForeignKey {
|
||||||
|
@SqlField("referenced_table")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
@SqlField("referenced_column")
|
||||||
|
private String columnName;
|
||||||
|
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseForeignKey setTableName(String tableName) {
|
||||||
|
this.tableName = tableName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColumnName() {
|
||||||
|
return columnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseForeignKey setColumnName(String columnName) {
|
||||||
|
this.columnName = columnName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,37 +1,10 @@
|
|||||||
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public class DatabaseTable extends DatabaseTableView {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class DatabaseTable implements Cloneable {
|
private final DatabaseObjectTypeEnum type = DatabaseObjectTypeEnum.TABLE;
|
||||||
|
|
||||||
private String tableName;
|
public DatabaseObjectTypeEnum getType() {
|
||||||
private List<DatabaseTableColumn> columns = new ArrayList<>();
|
return type;
|
||||||
|
|
||||||
public String getTableName() {
|
|
||||||
return tableName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DatabaseTable setTableName(String tableName) {
|
|
||||||
this.tableName = tableName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<DatabaseTableColumn> getColumns() {
|
|
||||||
return columns;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DatabaseTable setColumns(List<DatabaseTableColumn> columns) {
|
|
||||||
this.columns = columns;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DatabaseTable clone() {
|
|
||||||
try {
|
|
||||||
return (DatabaseTable) super.clone();
|
|
||||||
} catch (CloneNotSupportedException e) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class DatabaseTableColumn {
|
public class DatabaseTableColumn {
|
||||||
|
|
||||||
private String columnName;
|
private String columnName;
|
||||||
private Integer ordinalPosition;
|
private Integer ordinalPosition;
|
||||||
private String columnDefault;
|
private String columnDefault;
|
||||||
private boolean nullable;
|
private boolean nullable;
|
||||||
|
private boolean primaryKey;
|
||||||
|
private boolean identity;
|
||||||
private DatabaseTableColumnDataType dataType;
|
private DatabaseTableColumnDataType dataType;
|
||||||
private Integer characterMaximumLength;
|
private Integer characterMaximumLength;
|
||||||
private Integer characterOctetLength;
|
private Integer characterOctetLength;
|
||||||
@@ -17,6 +21,8 @@ public class DatabaseTableColumn {
|
|||||||
private String characterSetSchema;
|
private String characterSetSchema;
|
||||||
private String characterSetName;
|
private String characterSetName;
|
||||||
|
|
||||||
|
private ArrayList<DatabaseForeignKey> foreignKeys;
|
||||||
|
|
||||||
public String getColumnName() {
|
public String getColumnName() {
|
||||||
return columnName;
|
return columnName;
|
||||||
}
|
}
|
||||||
@@ -142,4 +148,31 @@ public class DatabaseTableColumn {
|
|||||||
this.characterSetName = characterSetName;
|
this.characterSetName = characterSetName;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<DatabaseForeignKey> getForeignKeys() {
|
||||||
|
return foreignKeys;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableColumn setForeignKeys(ArrayList<DatabaseForeignKey> foreignKeys) {
|
||||||
|
this.foreignKeys = foreignKeys;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPrimaryKey() {
|
||||||
|
return primaryKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableColumn setPrimaryKey(boolean primaryKey) {
|
||||||
|
this.primaryKey = primaryKey;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isIdentity() {
|
||||||
|
return identity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableColumn setIdentity(boolean identity) {
|
||||||
|
this.identity = identity;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
|
import java.sql.Types;
|
||||||
|
|
||||||
public enum DatabaseTableColumnDataType {
|
public enum DatabaseTableColumnDataType {
|
||||||
|
|
||||||
BIGINT("bigint"),
|
BIGINT("bigint"),
|
||||||
@@ -38,7 +40,7 @@ public enum DatabaseTableColumnDataType {
|
|||||||
GEOGRAPHY("geography");
|
GEOGRAPHY("geography");
|
||||||
|
|
||||||
|
|
||||||
private String text;
|
private final String text;
|
||||||
|
|
||||||
private DatabaseTableColumnDataType(String text) {
|
private DatabaseTableColumnDataType(String text) {
|
||||||
this.text = text;
|
this.text = text;
|
||||||
@@ -55,4 +57,52 @@ public enum DatabaseTableColumnDataType {
|
|||||||
return this.text;
|
return this.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int toSqlDataType() throws Exception {
|
||||||
|
switch (this) {
|
||||||
|
case BIGINT:
|
||||||
|
return Types.BIGINT;
|
||||||
|
case BIT:
|
||||||
|
return Types.BIT;
|
||||||
|
case DECIMAL:
|
||||||
|
return Types.DECIMAL;
|
||||||
|
case INT:
|
||||||
|
return Types.INTEGER;
|
||||||
|
case NUMERIC:
|
||||||
|
return Types.NUMERIC;
|
||||||
|
case SMALLINT:
|
||||||
|
return Types.SMALLINT;
|
||||||
|
case TINYINT:
|
||||||
|
return Types.TINYINT;
|
||||||
|
case FLOAT:
|
||||||
|
return Types.FLOAT;
|
||||||
|
case REAL:
|
||||||
|
return Types.REAL;
|
||||||
|
case DATE:
|
||||||
|
case DATETIME:
|
||||||
|
case DATETIME2:
|
||||||
|
case SMALLDATETIME:
|
||||||
|
return Types.DATE;
|
||||||
|
case TIME:
|
||||||
|
return Types.TIME;
|
||||||
|
case TIMESTAMP:
|
||||||
|
return Types.TIMESTAMP;
|
||||||
|
case CHAR:
|
||||||
|
return Types.CHAR;
|
||||||
|
case NCHAR:
|
||||||
|
return Types.NCHAR;
|
||||||
|
case VARCHAR:
|
||||||
|
case TEXT:
|
||||||
|
return Types.VARCHAR;
|
||||||
|
case NVARCHAR:
|
||||||
|
case NTEXT:
|
||||||
|
return Types.NVARCHAR;
|
||||||
|
case BINARY:
|
||||||
|
return Types.BINARY;
|
||||||
|
case VARBINARY:
|
||||||
|
return Types.VARBINARY;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Exception("Type not recognized");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DatabaseTableView implements Cloneable {
|
||||||
|
|
||||||
|
private String tableName;
|
||||||
|
private LocalDate creationDate;
|
||||||
|
private List<DatabaseTableColumn> columns = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTableName() {
|
||||||
|
return tableName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableView setTableName(String tableName) {
|
||||||
|
this.tableName = tableName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getCreationDate() {
|
||||||
|
return creationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableView setCreationDate(LocalDate creationDate) {
|
||||||
|
this.creationDate = creationDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DatabaseTableColumn> getColumns() {
|
||||||
|
return columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatabaseTableView setColumns(List<DatabaseTableColumn> columns) {
|
||||||
|
this.columns = columns;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DatabaseTableView clone() {
|
||||||
|
try {
|
||||||
|
return (DatabaseTableView) super.clone();
|
||||||
|
} catch (CloneNotSupportedException e) {
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||||
|
|
||||||
|
public class DatabaseView extends DatabaseTableView {
|
||||||
|
|
||||||
|
private final DatabaseObjectTypeEnum type = DatabaseObjectTypeEnum.VIEW;
|
||||||
|
|
||||||
|
public DatabaseObjectTypeEnum getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,12 +3,8 @@ package it.integry.ems.entity_logger.service;
|
|||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import it.integry.annotations.PostContextConstruct;
|
import it.integry.annotations.PostContextConstruct;
|
||||||
import it.integry.ems.dynamic_cache.DynamicCacheService;
|
|
||||||
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
|
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
|
||||||
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseFile;
|
import it.integry.ems.entity_logger.db_schema_manager.dto.*;
|
||||||
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTable;
|
|
||||||
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumn;
|
|
||||||
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumnDataType;
|
|
||||||
import it.integry.ems.looper.service.LooperService;
|
import it.integry.ems.looper.service.LooperService;
|
||||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||||
import it.integry.ems.settings.Model.SettingsModel;
|
import it.integry.ems.settings.Model.SettingsModel;
|
||||||
@@ -130,16 +126,16 @@ public class EntityLoggerComponent {
|
|||||||
|
|
||||||
for (DatabaseTable sourceTable : sourceTables) {
|
for (DatabaseTable sourceTable : sourceTables) {
|
||||||
|
|
||||||
Optional<DatabaseTable> optDestTable = Stream.of(destTables)
|
java.util.Optional<DatabaseTable> optDestTable = destTables.stream()
|
||||||
.filter(x -> x.getTableName().equalsIgnoreCase(sourceTable.getTableName()))
|
.filter(x -> x.getTableName().equalsIgnoreCase(sourceTable.getTableName()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
DatabaseTable destTable;
|
DatabaseTableView destTable;
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
if (optDestTable.isEmpty()) {
|
if (!optDestTable.isPresent()) {
|
||||||
|
|
||||||
Stream.of(sourceTable.getColumns())
|
sourceTable.getColumns()
|
||||||
.forEach(x -> x.setNullable(true));
|
.forEach(x -> x.setNullable(true));
|
||||||
|
|
||||||
int maxOrdinalPosition = Stream.of(sourceTable.getColumns())
|
int maxOrdinalPosition = Stream.of(sourceTable.getColumns())
|
||||||
@@ -182,7 +178,7 @@ public class EntityLoggerComponent {
|
|||||||
} else {
|
} else {
|
||||||
destTable = optDestTable.get();
|
destTable = optDestTable.get();
|
||||||
|
|
||||||
DatabaseTable cloneDatabaseTableADD = destTable.clone();
|
DatabaseTable cloneDatabaseTableADD = (DatabaseTable) destTable.clone();
|
||||||
cloneDatabaseTableADD.setColumns(new ArrayList<>());
|
cloneDatabaseTableADD.setColumns(new ArrayList<>());
|
||||||
|
|
||||||
List<DatabaseTableColumn> sourceColumns = sourceTable.getColumns();
|
List<DatabaseTableColumn> sourceColumns = sourceTable.getColumns();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user