Compare commits
724 Commits
feature/SD
...
20240609_0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
005cfae6dc | ||
| 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 | |||
| 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 | |||
| b192f0db5d | |||
| 5e975a62b9 | |||
| 65cbe8644b | |||
| 997cd9ee31 | |||
| 78b68dc135 | |||
| 0b62b93484 | |||
| 3831cfd4c7 | |||
| efa2b3a8af | |||
| 862ca8fbbd | |||
| 6cca2bf89e | |||
| 2620d061b4 | |||
| bf4a4359f7 | |||
| 075d441ecc | |||
| ed0a654e9a | |||
| a37a878c92 | |||
| 32d888472f | |||
| 68f7123eec | |||
| 099093c66a | |||
| 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 | |||
| 63b067cb7e | |||
| abf274f0c5 | |||
| fd01e0446d | |||
| 4a371cda80 | |||
| d1da0d0f9e | |||
| 6fe356bad7 | |||
| 40d9aa1790 | |||
| b7cac443c1 | |||
| 93fbd9d154 | |||
| 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 | |||
| 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 | |||
| 144b26bd5d | |||
| 0fbfffbdea | |||
| a599c46cfc | |||
| 1c2ec14677 | |||
| b0d18a151d | |||
| 2d2d5d6bae | |||
| 374fe08fe2 | |||
| 3f8bb86e15 | |||
| 1e2190b1ad | |||
| 09bb658367 | |||
| c91e4f83e0 | |||
| 8c0fbede36 | |||
| 61788b2c7f | |||
| 58e8c56d37 | |||
| 9b615738f3 | |||
| 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 ###
|
||||
# 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
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/dictionaries
|
||||
.idea/vcs.xml
|
||||
.idea/jsLibraryMappings.xml
|
||||
.shelf/*
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/dataSources.ids
|
||||
.idea/dataSources.xml
|
||||
.idea/dataSources.local.xml
|
||||
.idea/sqlDataSources.xml
|
||||
.idea/dynamic.xml
|
||||
.idea/uiDesigner.xml
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/gradle.xml
|
||||
.idea/libraries
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/mongoSettings.xml
|
||||
# Sensitive or high-churn files
|
||||
.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
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
@@ -41,20 +62,62 @@
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### Intellij Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
*.iml
|
||||
modules.xml
|
||||
# *.iml
|
||||
# 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
|
||||
*/target/*
|
||||
*.ckie
|
||||
/ts
|
||||
/temp
|
||||
|
||||
17
.idea/compiler.xml
generated
17
.idea/compiler.xml
generated
@@ -6,24 +6,9 @@
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="ems-core" />
|
||||
<module name="ems-engine" />
|
||||
<module name="ems-core" />
|
||||
</profile>
|
||||
</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>
|
||||
</project>
|
||||
26
.idea/encodings.xml
generated
26
.idea/encodings.xml
generated
@@ -1,36 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<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/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/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/resources" charset="UTF-8" />
|
||||
</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;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,4 +13,4 @@ public class ${NAME} extends EntityBase {
|
||||
public static final String ENTITY = "${TABLE}";
|
||||
|
||||
#[[$END$]]#
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,4 @@ public class ${NAME} extends BaseMigration implements MigrationModelInterface{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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>
|
||||
8
.idea/inspectionProfiles/Project_Default.xml
generated
8
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,8 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<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" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
15
.idea/jarRepositories.xml
generated
15
.idea/jarRepositories.xml
generated
@@ -1,31 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<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>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</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>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</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>
|
||||
<option name="id" value="jboss.community" />
|
||||
<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" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
||||
</component>
|
||||
<component name="PWA">
|
||||
<option name="wasEnabledAtLeastOnce" value="true" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</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__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>
|
||||
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>
|
||||
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>
|
||||
@@ -28,6 +28,42 @@
|
||||
<element id="module-output" name="ems-engine" />
|
||||
</element>
|
||||
<element id="directory" name="lib">
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-retail:1.0" />
|
||||
<element id="archive" name="ems-logistic-1.0.jar">
|
||||
<element id="module-output" name="ems-logistic" />
|
||||
</element>
|
||||
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.6" />
|
||||
<element id="library" level="project" name="Maven: com.ancientprogramming.fixedformat4j:fixedformat4j:1.4.0" />
|
||||
<element id="archive" name="ems-document-1.0.jar">
|
||||
<element id="module-output" name="ems-document" />
|
||||
</element>
|
||||
<element id="library" level="project" name="Maven: xalan:xalan:2.7.2" />
|
||||
<element id="library" level="project" name="Maven: xalan:serializer:2.7.2" />
|
||||
<element id="library" level="project" name="Maven: org.apache.axis:axis:1.4" />
|
||||
<element id="library" level="project" name="Maven: javax.xml.rpc:javax.xml.rpc-api:1.1.1" />
|
||||
<element id="library" level="project" name="Maven: commons-discovery:commons-discovery:0.2" />
|
||||
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.2" />
|
||||
<element id="library" level="project" name="Maven: javax.xml.soap:saaj-api:1.3.5" />
|
||||
<element id="library" level="project" name="Maven: wsdl4j:wsdl4j:1.6.3" />
|
||||
<element id="archive" name="ems-offer-1.0.jar">
|
||||
<element id="module-output" name="ems-offer" />
|
||||
</element>
|
||||
<element id="library" level="project" name="Maven: javax.mail:mail:1.4.7" />
|
||||
<element id="library" level="project" name="Maven: org.apache.pdfbox:pdfbox:2.0.22" />
|
||||
<element id="library" level="project" name="Maven: org.apache.pdfbox:fontbox:2.0.22" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSOrders_2013-09-01:1.0" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MaWSJavaClientLibrary:1.1" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:4.2.5.RELEASE" />
|
||||
<element id="archive" name="ems-order-1.0.jar">
|
||||
<element id="module-output" name="ems-order" />
|
||||
</element>
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-product:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-production:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-system:1.0" />
|
||||
<element id="archive" name="ems-contabil-1.0.jar">
|
||||
<element id="module-output" name="ems-contabil" />
|
||||
</element>
|
||||
<element id="archive" name="ems-core-1.0.jar">
|
||||
<element id="module-output" name="ems-core" />
|
||||
</element>
|
||||
@@ -47,7 +83,6 @@
|
||||
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore-nio:4.3.2" />
|
||||
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpmime:4.3.6" />
|
||||
<element id="library" level="project" name="Maven: org.json:json:20200518" />
|
||||
<element id="library" level="project" name="Maven: javax.mail:mail:1.4.7" />
|
||||
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports:6.16.0" />
|
||||
<element id="library" level="project" name="Maven: commons-digester:commons-digester:2.1" />
|
||||
<element id="library" level="project" name="Maven: org.apache.commons:commons-collections4:4.2" />
|
||||
@@ -63,7 +98,6 @@
|
||||
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports-fonts:6.16.0" />
|
||||
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports-functions:6.16.0" />
|
||||
<element id="library" level="project" name="Maven: joda-time:joda-time:2.9.9" />
|
||||
<element id="library" level="project" name="Maven: it.integry.font:Arial:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.font:ArialBlack:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.font:ArialNarrow:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.font:Calibri:1.0" />
|
||||
@@ -73,8 +107,6 @@
|
||||
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-bridge:1.9" />
|
||||
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-anim:1.9" />
|
||||
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-script:1.9" />
|
||||
<element id="library" level="project" name="Maven: xalan:xalan:2.7.2" />
|
||||
<element id="library" level="project" name="Maven: xalan:serializer:2.7.2" />
|
||||
<element id="library" level="project" name="Maven: xml-apis:xml-apis:1.3.04" />
|
||||
<element id="library" level="project" name="Maven: xml-apis:xml-apis-ext:1.3.04" />
|
||||
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-css:1.9" />
|
||||
@@ -103,14 +135,9 @@
|
||||
<element id="library" level="project" name="Maven: it.integry:utility-barcode:1.1" />
|
||||
<element id="library" level="project" name="Maven: it.integry:utilityImage:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry:Utility:1.4" />
|
||||
<element id="library" level="project" name="Maven: org.apache.pdfbox:pdfbox:2.0.22" />
|
||||
<element id="library" level="project" name="Maven: org.apache.pdfbox:fontbox:2.0.22" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.4" />
|
||||
<element id="library" level="project" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.4" />
|
||||
<element id="library" level="project" name="Maven: com.alibaba:fastjson:2.0.47" />
|
||||
<element id="library" level="project" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.47" />
|
||||
<element id="library" level="project" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.47" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-aop:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-core:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-instrument-tomcat:4.2.5.RELEASE" />
|
||||
@@ -118,7 +145,6 @@
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-orm:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-jdbc:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-tx:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.drools:drools-compiler:6.4.0.Final" />
|
||||
<element id="library" level="project" name="Maven: org.kie:kie-api:6.4.0.Final" />
|
||||
<element id="library" level="project" name="Maven: org.kie:kie-internal:6.4.0.Final" />
|
||||
@@ -244,6 +270,14 @@
|
||||
<element id="library" level="project" name="Maven: com.hierynomus:sshj:0.27.0" />
|
||||
<element id="library" level="project" name="Maven: com.jcraft:jzlib:1.1.3" />
|
||||
<element id="library" level="project" name="Maven: net.i2p.crypto:eddsa:0.2.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-ordikids:1.0" />
|
||||
<element id="library" level="project" name="Maven: it.integry.ims:ems-utility:1.0" />
|
||||
<element id="archive" name="ems-activity-1.0.jar">
|
||||
<element id="module-output" name="ems-activity" />
|
||||
</element>
|
||||
<element id="archive" name="ems-engine-customizations-1.0.jar">
|
||||
<element id="module-output" name="ems-engine-customizations" />
|
||||
</element>
|
||||
<element id="library" level="project" name="Maven: commons-net:commons-net:3.5" />
|
||||
<element id="library" level="project" name="Maven: com.thetransactioncompany:cors-filter:2.5" />
|
||||
<element id="library" level="project" name="Maven: com.thetransactioncompany:java-property-utils:1.9.1" />
|
||||
@@ -260,8 +294,6 @@
|
||||
<element id="library" level="project" name="Maven: com.google.code.gson:gson:2.9.1" />
|
||||
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpclient:4.3.6" />
|
||||
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore:4.3.3" />
|
||||
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.3" />
|
||||
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.6" />
|
||||
<element id="library" level="project" name="Maven: org.jboss.resteasy:resteasy-jaxrs:3.0.12.Final" />
|
||||
<element id="library" level="project" name="Maven: org.jboss.resteasy:jaxrs-api:3.0.12.Final" />
|
||||
<element id="library" level="project" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:1.0.1.Final" />
|
||||
@@ -279,10 +311,6 @@
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-web:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: org.springframework:spring-webmvc:4.2.5.RELEASE" />
|
||||
<element id="library" level="project" name="Maven: javax:javaee-web-api:7.0" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSOrders_2013-09-01:1.0" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MaWSJavaClientLibrary:1.1" />
|
||||
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" />
|
||||
<element id="library" level="project" name="Maven: com.ancientprogramming.fixedformat4j:fixedformat4j:1.4.0" />
|
||||
</element>
|
||||
</element>
|
||||
<element id="directory" name="META-INF">
|
||||
@@ -298,9 +326,22 @@
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="ems-engine" />
|
||||
<module name="ems-order" />
|
||||
<module name="ems-core" />
|
||||
<module name="ems-document" />
|
||||
<module name="ems-engine-customizations" />
|
||||
<module name="ems-system" />
|
||||
<module name="ems-logistic" />
|
||||
<module name="ems-product" />
|
||||
<module name="ems-retail" />
|
||||
<module name="ems-engine" />
|
||||
<module name="ems-contabil" />
|
||||
<module name="ems-utility" />
|
||||
<module name="ems-ordikids" />
|
||||
<module name="ems-activity" />
|
||||
<module name="ems-offer" />
|
||||
<module name="ems-calendar" />
|
||||
<module name="ems-production" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
@@ -412,9 +453,6 @@
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Annotator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<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,com.annimon.stream.Stream,of" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<Languages>
|
||||
<language minSize="53" name="Java" />
|
||||
@@ -475,61 +513,61 @@
|
||||
<injection language="SpEL" injector-id="java">
|
||||
<display-name>Spring @Cacheable and @CacheEvict</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
|
||||
<place>psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")</place>
|
||||
<place>psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")</place>
|
||||
<place>psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")</place>
|
||||
<place>psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")</place>
|
||||
<place>psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")</place>
|
||||
<place>psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")</place>
|
||||
<place>psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")</place>
|
||||
<place>psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")</place>
|
||||
</injection>
|
||||
<injection language="http-header-reference" injector-id="java">
|
||||
<display-name>Spring HttpHeaders (org.springframework.http)</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.http.ResponseEntity.HeadersBuilder"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.web.servlet.function.ServerResponse.HeadersBuilder"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("set", "add", "addAll", "getFirst", "containsKey", "get", "put", "getFirstDate", "setDate", "setInstant", "setZonedDateTime").definedInClass("org.springframework.http.HttpHeaders"))]]></place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.http.ResponseEntity.HeadersBuilder"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.web.servlet.function.ServerResponse.HeadersBuilder"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("set", "add", "addAll", "getFirst", "containsKey", "get", "put", "getFirstDate", "setDate", "setInstant", "setZonedDateTime").definedInClass("org.springframework.http.HttpHeaders"))</place>
|
||||
</injection>
|
||||
<injection language="SpEL" injector-id="java">
|
||||
<display-name>Spring Integration/Messaging</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.integration.annotation.Payload")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
|
||||
<place>psiMethod().withName("expression").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.integration.annotation.Payload")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")</place>
|
||||
</injection>
|
||||
<injection language="SQL" injector-id="java">
|
||||
<display-name>Spring JDBC (org.springframework.jdbc.core.PreparedStatementCreatorFactory)</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "int[]").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "java.util.List").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "int[]").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "java.util.List").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))</place>
|
||||
</injection>
|
||||
<injection language="SQL" injector-id="java">
|
||||
<display-name>Spring JDBC (org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator)</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createCustomException").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "java.lang.Class").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("customTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("doTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("logTranslation").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "boolean").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("createCustomException").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "java.lang.Class").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("customTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("doTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("logTranslation").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "boolean").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))</place>
|
||||
</injection>
|
||||
<injection language="SpEL" injector-id="java">
|
||||
<display-name>Spring Security @PostAuthorize/@PostFilter/@PreAuthorize/@PreFilter/@AuthenticationPrincipal</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.AuthenticationPrincipal")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.CurrentSecurityContext")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostAuthorize")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostFilter")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreAuthorize")]]></place>
|
||||
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreFilter")]]></place>
|
||||
<place>psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.AuthenticationPrincipal")</place>
|
||||
<place>psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.CurrentSecurityContext")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostAuthorize")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostFilter")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreAuthorize")</place>
|
||||
<place>psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreFilter")</place>
|
||||
</injection>
|
||||
<injection language="SpEL" injector-id="java">
|
||||
<display-name>Spring State Machine</display-name>
|
||||
<single-file value="true" />
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("event").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("guardExpression").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("secured").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
|
||||
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("transition").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("event").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("guardExpression").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("secured").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))</place>
|
||||
<place>psiParameter().ofMethod(0, psiMethod().withName("transition").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))</place>
|
||||
</injection>
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
@@ -544,14 +582,6 @@
|
||||
<option value="$PROJECT_DIR$/ems-logistic/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="ignoredFiles">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/ems-document/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/ems-engine-customizations/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/ems-production/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/ems-retail/pom.xml" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="PWA">
|
||||
<option name="wasEnabledAtLeastOnce" value="true" />
|
||||
@@ -714,8 +744,21 @@
|
||||
</component>
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-activity/ems-activity.iml" filepath="$PROJECT_DIR$/ems-activity/ems-activity.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-contabil/ems-contabil.iml" filepath="$PROJECT_DIR$/ems-contabil/ems-contabil.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-core/ems-core.iml" filepath="$PROJECT_DIR$/ems-core/ems-core.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-document/ems-document.iml" filepath="$PROJECT_DIR$/ems-document/ems-document.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-engine/ems-engine.iml" filepath="$PROJECT_DIR$/ems-engine/ems-engine.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-engine-customizations/ems-engine-customizations.iml" filepath="$PROJECT_DIR$/ems-engine-customizations/ems-engine-customizations.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-logistic/ems-logistic.iml" filepath="$PROJECT_DIR$/ems-logistic/ems-logistic.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-offer/ems-offer.iml" filepath="$PROJECT_DIR$/ems-offer/ems-offer.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-order/ems-order.iml" filepath="$PROJECT_DIR$/ems-order/ems-order.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-ordikids/ems-ordikids.iml" filepath="$PROJECT_DIR$/ems-ordikids/ems-ordikids.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-product/ems-product.iml" filepath="$PROJECT_DIR$/ems-product/ems-product.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-production/ems-production.iml" filepath="$PROJECT_DIR$/ems-production/ems-production.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-retail/ems-retail.iml" filepath="$PROJECT_DIR$/ems-retail/ems-retail.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-system/ems-system.iml" filepath="$PROJECT_DIR$/ems-system/ems-system.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ems-utility/ems-utility.iml" filepath="$PROJECT_DIR$/ems-utility/ems-utility.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/ims.iml" filepath="$PROJECT_DIR$/ims.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
@@ -831,44 +874,6 @@
|
||||
</option>
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="false" name="Tomcat 7 #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>
|
||||
<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>
|
||||
<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="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>
|
||||
<configuration default="false" name="Tomcat (FAST)" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" show_console_on_std_err="true" show_console_on_std_out="true">
|
||||
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms256m -Xmx1024m -XX:PermSize=1024m" />
|
||||
<deployment>
|
||||
@@ -940,21 +945,6 @@
|
||||
<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>
|
||||
@@ -1027,11 +1017,6 @@
|
||||
<option name="name" value="maven-central" />
|
||||
<option name="url" value="http://serverdev:9091/repository/maven-central/" />
|
||||
</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>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
@@ -1068,7 +1053,6 @@
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
||||
<component name="libraryTable">
|
||||
@@ -1120,42 +1104,6 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.47" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="com.alibaba.fastjson2" artifactId="fastjson2-extension" version="2.0.47" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: com.alibaba.fastjson2:fastjson2:2.0.47" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="com.alibaba.fastjson2" artifactId="fastjson2" version="2.0.47" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: com.alibaba:fastjson:2.0.47" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="com.alibaba" artifactId="fastjson" version="2.0.47" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="com.amazonservices.mws" artifactId="MWSClientJavaRuntime" version="1.1" />
|
||||
<CLASSES>
|
||||
@@ -1960,6 +1908,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-digester/commons-digester/2.1/commons-digester-2.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-discovery:commons-discovery:0.2" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-discovery" artifactId="commons-discovery" version="0.2" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-fileupload:commons-fileupload:1.3.3" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-fileupload" artifactId="commons-fileupload" version="1.3.3" />
|
||||
<CLASSES>
|
||||
@@ -1972,6 +1932,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.3.3/commons-fileupload-1.3.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-io:commons-io:2.1" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-io" artifactId="commons-io" version="2.1" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-io:commons-io:2.2" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-io" artifactId="commons-io" version="2.2" />
|
||||
<CLASSES>
|
||||
@@ -2008,6 +1980,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-logging:commons-logging:1.2" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-logging" artifactId="commons-logging" version="1.2" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: commons-net:commons-net:3.5" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="commons-net" artifactId="commons-net" version="3.5" />
|
||||
<CLASSES>
|
||||
@@ -2320,18 +2304,6 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/perfmark/perfmark-api/0.19.0/perfmark-api-0.19.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.font:Arial:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.font" artifactId="Arial" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.font:ArialBlack:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.font" artifactId="ArialBlack" version="1.0" />
|
||||
<CLASSES>
|
||||
@@ -2380,6 +2352,78 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Tahoma/1.1/Tahoma-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-ordikids:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-ordikids" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-product:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-product" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-production:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-production" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-retail:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-retail" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-system:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-system" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry.ims:ems-utility:1.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry.ims" artifactId="ems-utility" version="1.0" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: it.integry:Utility:1.4" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="it.integry" artifactId="Utility" version="1.4" />
|
||||
<CLASSES>
|
||||
@@ -2416,6 +2460,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/it/integry/utilityImage/1.0/utilityImage-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: javax.activation:activation:1.1" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="javax.activation" artifactId="activation" version="1.1" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: javax.activation:activation:1.1.1" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="javax.activation" artifactId="activation" version="1.1.1" />
|
||||
<CLASSES>
|
||||
@@ -2500,6 +2556,30 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: javax.xml.rpc:javax.xml.rpc-api:1.1.1" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="javax.xml.rpc" artifactId="javax.xml.rpc-api" version="1.1.1" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: javax.xml.soap:saaj-api:1.3.5" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="javax.xml.soap" artifactId="saaj-api" version="1.3.5" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: javax:javaee-web-api:7.0" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="javax" artifactId="javaee-web-api" version="7.0" />
|
||||
<CLASSES>
|
||||
@@ -2752,6 +2832,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant/1.7.1/ant-1.7.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: org.apache.axis:axis:1.4" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="org.apache.axis" artifactId="axis" version="1.4" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: org.apache.commons:commons-collections4:4.2" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="org.apache.commons" artifactId="commons-collections4" version="4.2" />
|
||||
<CLASSES>
|
||||
@@ -4048,6 +4140,18 @@
|
||||
<root url="jar://$MAVEN_REPOSITORY$/stax/stax-api/1.0.1/stax-api-1.0.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: wsdl4j:wsdl4j:1.6.3" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="wsdl4j" artifactId="wsdl4j" version="1.6.3" />
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
<library name="Maven: xalan:serializer:2.7.2" type="java-imported" external-system-id="Maven">
|
||||
<properties groupId="xalan" artifactId="serializer" version="2.7.2" />
|
||||
<CLASSES>
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
<id>maven-public</id>
|
||||
<url>https://maven.studioml.it/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>AsposeJavaAPI</id>
|
||||
<name>Aspose Java API</name>
|
||||
<url>https://releases.aspose.com/java/repo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<properties>
|
||||
@@ -159,19 +154,24 @@
|
||||
<version>1.13</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>8.4.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SWAGGER
|
||||
<!-- SWAGGER -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<artifactId>springfox-oas</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency> -->
|
||||
</dependency>
|
||||
|
||||
<!-- REST CLIENT -->
|
||||
<dependency>
|
||||
@@ -221,7 +221,7 @@
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.9.10</version>
|
||||
<version>0.10.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mail -->
|
||||
@@ -231,29 +231,17 @@
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JASPER REPORT -->
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports</artifactId>
|
||||
<version>6.16.0</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>
|
||||
<version>${jaspersoft.version}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.lowagie</groupId>-->
|
||||
<!-- <artifactId>itext</artifactId>-->
|
||||
<!-- <version>2.1.7.js8</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports-htmlcomponent</artifactId>
|
||||
@@ -262,12 +250,12 @@
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports-fonts</artifactId>
|
||||
<version>6.16.0</version>
|
||||
<version>${jaspersoft.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports-functions</artifactId>
|
||||
<version>6.16.0</version>
|
||||
<version>${jaspersoft.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>it.integry.font</groupId>
|
||||
@@ -394,18 +382,13 @@
|
||||
<artifactId>utility-barcode</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>it.integry</groupId>
|
||||
<artifactId>utilityImage</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- IntegryUtility (Barcodes, ecc) -->
|
||||
<dependency>
|
||||
<groupId>it.integry</groupId>
|
||||
<artifactId>Utility</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -431,11 +414,21 @@
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-csv</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
@@ -455,11 +448,6 @@
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-instrument-tomcat</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-oxm</artifactId>
|
||||
@@ -547,7 +535,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
<version>3.14.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -565,11 +553,6 @@
|
||||
</dependency>
|
||||
|
||||
<!-- UTILS -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
@@ -696,7 +679,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.firebase</groupId>
|
||||
<artifactId>firebase-admin</artifactId>
|
||||
<version>7.0.1</version>
|
||||
<version>9.2.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -711,12 +694,6 @@
|
||||
<artifactId>jcodec-javase</artifactId>
|
||||
<version>0.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.annimon</groupId>
|
||||
<artifactId>stream</artifactId>
|
||||
<version>1.2.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.docx4j</groupId>
|
||||
@@ -730,5 +707,11 @@
|
||||
<version>0.27.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.javaparser</groupId>
|
||||
<artifactId>javaparser-symbol-solver-core</artifactId>
|
||||
<version>3.25.9</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import it.integry.WooCommerce.dto.order.WooCommerceOrderDTO;
|
||||
import it.integry.WooCommerce.service.WooCommerceService;
|
||||
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_model.config.EmsRestConstants;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -26,7 +26,7 @@ public class WooCommerceController {
|
||||
@Autowired
|
||||
private WooCommerceService wooService;
|
||||
@Autowired
|
||||
private JSONObjectMapper jsonObjectMapper;
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_WOO_NEW_ORDER, method = RequestMethod.POST)
|
||||
|
||||
@@ -768,7 +768,8 @@ public class WooCommerceService {
|
||||
|
||||
private void sendErrorMail(String errorMsg, String service, byte[] content, String filename, List<AnomalieDTO> anomalie) {
|
||||
try {
|
||||
mailService.sendErrorMail(multiDBTransactionManager, service, "WOOCOMMERCE", null, content, filename, anomalie);
|
||||
mailService.sendErrorMailByGestNameSection(multiDBTransactionManager, service, "WOOCOMMERCE", "Errore WooCommerce",
|
||||
null, content, filename, anomalie);
|
||||
} catch (Exception exception) {
|
||||
logger.error(service, exception);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,10 @@ public class CommonConstants {
|
||||
public static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss")
|
||||
.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());
|
||||
|
||||
|
||||
|
||||
@@ -9,21 +9,21 @@ import java.util.HashMap;
|
||||
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) {
|
||||
String aziendaUp = azienda.toUpperCase();
|
||||
public Const getConsts(String profileDb) {
|
||||
String aziendaUp = profileDb.toUpperCase();
|
||||
|
||||
if (!typesBindingTable.containsKey(aziendaUp)) {
|
||||
typesBindingTable.put(aziendaUp, new Const());
|
||||
if (!datiAziendaBindingTable.containsKey(aziendaUp)) {
|
||||
datiAziendaBindingTable.put(aziendaUp, new Const());
|
||||
}
|
||||
|
||||
return typesBindingTable.get(aziendaUp);
|
||||
return datiAziendaBindingTable.get(aziendaUp);
|
||||
}
|
||||
|
||||
public void destroyAll() {
|
||||
typesBindingTable = new HashMap<String, Const>();
|
||||
datiAziendaBindingTable = new HashMap<String, Const>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public enum EntityImportType {
|
||||
RAPPORTINI_FG("RAPPORTINI FG"),
|
||||
SCONTRINI("SCONTRINI"),
|
||||
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
|
||||
GRIGLIA_VENDITA("GRIGLIA VENDITA"),
|
||||
GRIGLIA_ACQUISTO("GRIGLIA ACQUISTO");
|
||||
|
||||
private String text;
|
||||
|
||||
@@ -5,17 +5,9 @@ import com.microsoft.sqlserver.jdbc.SQLServerDriver;
|
||||
import it.integry.annotations.PostContextAutowired;
|
||||
import it.integry.annotations.PostContextConstruct;
|
||||
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.SettingsController;
|
||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.utility.UtilityDebug;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.postgresql.Driver;
|
||||
@@ -33,10 +25,12 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.DriverManager;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.reflections.scanners.Scanners.TypesAnnotated;
|
||||
|
||||
@Component
|
||||
public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent> {
|
||||
@@ -53,9 +47,6 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
@Autowired
|
||||
private SettingsModel settingsModel;
|
||||
|
||||
@Autowired
|
||||
private EmsProperties emsProperties;
|
||||
|
||||
private boolean contextInitialized = false;
|
||||
|
||||
private boolean firstStart = true;
|
||||
@@ -108,6 +99,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
dispatchPostWebServerConstruct(multiDBTransactionManager);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("EmsCoreContext.onPostDBLoaded", e);
|
||||
}
|
||||
}
|
||||
@@ -115,13 +107,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
|
||||
private void dispatchPostContextConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
||||
Reflections reflections = new Reflections("it.integry");
|
||||
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
|
||||
|
||||
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
|
||||
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
|
||||
|
||||
List<Class<?>> classesWithPostContextConstruct = Stream.of(typesAnnotatedWith)
|
||||
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
|
||||
.sortBy(x -> Stream.of(x.getDeclaredMethods())
|
||||
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
|
||||
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
|
||||
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
|
||||
.findFirst()
|
||||
.get()
|
||||
@@ -133,9 +123,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
logger.debug("PostContextConstruct - " + classType.getSimpleName() + " - START");
|
||||
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))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (Field fieldToInject : fieldsToInject) {
|
||||
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))
|
||||
.findFirst()
|
||||
.get();
|
||||
@@ -158,13 +148,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
|
||||
private void dispatchPostWebServerConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
|
||||
Reflections reflections = new Reflections("it.integry");
|
||||
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
|
||||
|
||||
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
|
||||
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
|
||||
|
||||
List<Class<?>> classesWithPostWebServerConstruct = Stream.of(typesAnnotatedWith)
|
||||
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
|
||||
.sortBy(x -> Stream.of(x.getDeclaredMethods())
|
||||
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
|
||||
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
|
||||
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
|
||||
.findFirst()
|
||||
.get()
|
||||
@@ -176,9 +164,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
|
||||
logger.debug("PostWebServerConstruct - " + classType.getSimpleName() + " - START");
|
||||
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))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (Field fieldToInject : fieldsToInject) {
|
||||
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))
|
||||
.findFirst()
|
||||
.get();
|
||||
|
||||
@@ -3,18 +3,16 @@ package it.integry.ems._context;
|
||||
import it.integry.annotations.PostContextConstruct;
|
||||
import it.integry.common.var.EmsDBConst;
|
||||
import it.integry.ems.datasource.DataSource;
|
||||
import it.integry.ems.dynamic_cache.DynamicCacheService;
|
||||
import it.integry.ems.expansion.RunnableArgs;
|
||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||
import it.integry.ems.settings.Model.SettingsModel;
|
||||
import it.integry.ems.settings.SettingsController;
|
||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||
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.service.SetupGest;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -22,9 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class EmsCoreDBLoader {
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
package it.integry.ems.adapter;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
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.utility.UtilityString;
|
||||
|
||||
import java.io.IOException;
|
||||
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
|
||||
public Date deserialize(JsonParser jp, DeserializationContext arg1)
|
||||
throws IOException, JsonProcessingException {
|
||||
throws IOException {
|
||||
|
||||
if (UtilityString.isNullOrEmpty(jp.getText()))
|
||||
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,14 @@ import it.integry.ems.Import.base.EntityImportResponse;
|
||||
import it.integry.ems.Import.dto.ImportRequestDTO;
|
||||
import it.integry.ems.download.DownloadFileHandlerService;
|
||||
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.exception.MissingDataException;
|
||||
import it.integry.ems.export.base.EntityExportResponse;
|
||||
import it.integry.ems.export.base.EntityExportedFile;
|
||||
import it.integry.ems.javabeans.RequestDataDTO;
|
||||
import it.integry.ems.media.MediaImageService;
|
||||
import it.integry.ems.media.MimeTypesHandler;
|
||||
import it.integry.ems.metrics.service.MetricService;
|
||||
import it.integry.ems.model.EntityModel;
|
||||
import it.integry.ems.model.FieldModel;
|
||||
import it.integry.ems.model.PKFieldModel;
|
||||
@@ -58,7 +59,9 @@ import org.springframework.web.util.HtmlUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
@@ -70,6 +73,7 @@ import java.util.Date;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@RestController
|
||||
@Scope("request")
|
||||
@@ -96,9 +100,6 @@ public class EmsController {
|
||||
@Autowired
|
||||
private ServiceChecker serviceChecker;
|
||||
|
||||
@Autowired
|
||||
private MetricService metricService;
|
||||
|
||||
@Autowired
|
||||
private SchedulerFactoryBean quartzScheduler;
|
||||
|
||||
@@ -183,17 +184,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)
|
||||
public @ResponseBody
|
||||
String decodeUcs(@RequestBody String encodedUcs) {
|
||||
@@ -859,7 +849,7 @@ public class EmsController {
|
||||
}
|
||||
|
||||
@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 String dataDoc,
|
||||
@RequestParam String serDoc,
|
||||
@@ -1101,6 +1091,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)
|
||||
// public ServiceRestResponse uploadStbFileAttachment(HttpServletRequest request, HttpServletResponse response,
|
||||
@@ -1147,8 +1142,7 @@ public class EmsController {
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_CLEAN_DIRECTORIES, method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse cleanDirectories(HttpServletRequest httpRequest, HttpServletResponse httpResponse,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
ServiceRestResponse cleanDirectories(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
try {
|
||||
emsServices.cleanDirectories();
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
@@ -1167,11 +1161,9 @@ public class EmsController {
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_MAPPING, method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse getEntityMapping(HttpServletRequest httpRequest,
|
||||
HttpServletResponse httpResponse,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
ServiceRestResponse getEntityMapping(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
try {
|
||||
List<EntityHierarchyDTO> mapping = emsServices.getEntityMapping();
|
||||
List<EntityHierarchy> mapping = emsServices.getEntityMapping();
|
||||
return ServiceRestResponse.createPositiveResponse(mapping);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
@@ -1181,9 +1173,7 @@ public class EmsController {
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_GET_HISTORY_PROFILE_DB, method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse getHistoryProfileDb(HttpServletRequest httpRequest,
|
||||
HttpServletResponse httpResponse,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
ServiceRestResponse getHistoryProfileDb(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
|
||||
try {
|
||||
String historyProfileDb = settingsController.getHistoryProfileDb();
|
||||
return ServiceRestResponse.createPositiveResponse(historyProfileDb);
|
||||
@@ -1195,9 +1185,7 @@ public class EmsController {
|
||||
|
||||
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_DETAILS, method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse getEntityDetails(HttpServletRequest httpRequest,
|
||||
HttpServletResponse httpResponse,
|
||||
@RequestParam("entityName") String entityName,
|
||||
ServiceRestResponse getEntityDetails(@RequestParam("entityName") String entityName,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String config
|
||||
) throws Exception {
|
||||
try {
|
||||
|
||||
@@ -30,6 +30,6 @@ public class EmsResponseEntityExceptionHandler extends ResponseEntityExceptionHa
|
||||
logger.error("Eccezione non gestita", 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.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.user.UserSession;
|
||||
import it.integry.ems_model.config.EmsRestConstants;
|
||||
import it.integry.ems_model.entity.StbDevice;
|
||||
import it.integry.ems_model.entity.StbDevices;
|
||||
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.UtilityDate;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
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.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
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.util.Date;
|
||||
|
||||
@@ -57,14 +48,14 @@ public class DevicesService {
|
||||
UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), selectSql);
|
||||
|
||||
if(!exists) {
|
||||
StbDevice stbDevice = new StbDevice()
|
||||
StbDevices stbDevices = new StbDevices()
|
||||
.setName(appName)
|
||||
.setIdentificationId(deviceId)
|
||||
.setCreatedAt(new Date())
|
||||
.setLastUse(new Date());
|
||||
|
||||
stbDevice.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||
entityProcessor.processEntity(stbDevice, multiDBTransactionManager);
|
||||
stbDevices.setOperation(OperationType.INSERT_OR_UPDATE);
|
||||
entityProcessor.processEntity(stbDevices, multiDBTransactionManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package it.integry.ems.directory;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import it.integry.common.var.CommonConstants;
|
||||
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.response.EsitoType;
|
||||
import it.integry.ems.response.FileItem;
|
||||
@@ -39,10 +39,10 @@ public class EmailWatcherListener extends TimerTask {
|
||||
private EmailListenerInfo emailListenerInfo;
|
||||
private EmsProperties prop;
|
||||
private SetupGest setupGest;
|
||||
private JSONObjectMapper jsonObjectMapper;
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
|
||||
public EmailWatcherListener(EmailListenerInfo emailListenerInfo, EmsProperties prop,
|
||||
SetupGest setupGest, JSONObjectMapper jsonObjectMapper) {
|
||||
SetupGest setupGest, ResponseJSONObjectMapper jsonObjectMapper) {
|
||||
super();
|
||||
this.emailListenerInfo = emailListenerInfo;
|
||||
this.prop = prop;
|
||||
|
||||
@@ -12,6 +12,10 @@ public class ApplicationInfoDTO {
|
||||
private String loadMenuPvm;
|
||||
private List<String> salvataggiSoap;
|
||||
|
||||
private boolean delimitedIdentifier;
|
||||
private boolean ansiPadding;
|
||||
private boolean concatNullYieldsNull;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -74,4 +78,31 @@ public class ApplicationInfoDTO {
|
||||
this.salvataggiSoap = salvataggiSoap;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
108
ems-core/src/main/java/it/integry/ems/dto/CreateZipDTO.java
Normal file
108
ems-core/src/main/java/it/integry/ems/dto/CreateZipDTO.java
Normal file
@@ -0,0 +1,108 @@
|
||||
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.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 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 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
169
ems-core/src/main/java/it/integry/ems/dto/EntityHierarchy.java
Normal file
169
ems-core/src/main/java/it/integry/ems/dto/EntityHierarchy.java
Normal file
@@ -0,0 +1,169 @@
|
||||
package it.integry.ems.dto;
|
||||
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
|
||||
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 List<EntityHierarchy> children;
|
||||
private List<Field> fields;
|
||||
|
||||
public Class<? extends EntityBase> 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 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);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.ems.dynamic_cache;
|
||||
|
||||
import it.integry.ems.expansion.RunnableArgsWithReturn;
|
||||
import it.integry.ems.expansion.RunnableWithReturn;
|
||||
import it.integry.ems.looper.service.LooperService;
|
||||
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.stereotype.Service;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -34,17 +36,46 @@ public class DynamicCacheService {
|
||||
public enum Keys {
|
||||
DATI_AZIENDA_KEY,
|
||||
ENTITY_LOGGER_SETUP,
|
||||
GRIGLIA_ACQUISTO_KEY
|
||||
GRIGLIA_ACQUISTO_KEY,
|
||||
ENTITY_SYNC_KEY
|
||||
}
|
||||
|
||||
public void addItem(Keys key, int invalidateTimeInMins, RunnableWithReturn<Object> refreshAction) {
|
||||
//cacheData.put(key, refreshAction.run());
|
||||
|
||||
this.looperService.add(() -> {
|
||||
cacheData.put(key, refreshAction.run());
|
||||
}, 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) {
|
||||
|
||||
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 {
|
||||
MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false);
|
||||
|
||||
try {
|
||||
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false)) {
|
||||
String tableName = clazz.newInstance().getTableName();
|
||||
String sql = "SELECT * FROM " + tableName;
|
||||
List<? extends EntityBase> entities = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, clazz);
|
||||
|
||||
cachedEntitiesByDB.putIfAbsent(dbName.toLowerCase(), entities);
|
||||
} finally {
|
||||
multiDBTransactionManager.closeAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,4 +182,13 @@ public class DynamicCacheService {
|
||||
|
||||
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.entity.MtbColt;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -508,7 +509,7 @@ public class EuritmoTestata {
|
||||
|
||||
// Chiave collo
|
||||
mtbColt.setGestione("A");
|
||||
mtbColt.setDataCollo(this.dataDoc);
|
||||
mtbColt.setDataCollo(UtilityLocalDate.localDateFromDate(this.dataDoc));
|
||||
|
||||
mtbColt.setRifOrd(String.format("%s_%s", dataDocString, this.numDoc));
|
||||
mtbColt.setAnnotazioni(annotazioni);
|
||||
|
||||
@@ -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,241 @@
|
||||
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.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();
|
||||
// addImportInstructions(javaClassCompilation);
|
||||
|
||||
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.addField(String.class, "ENTITY", PUBLIC, FINAL, STATIC);
|
||||
ClassOrInterfaceType entityFieldType = entityField.getElementType().asClassOrInterfaceType();
|
||||
entityFieldType.setName("String");
|
||||
|
||||
entityField.setVariable(0, new VariableDeclarator(entityFieldType, "ENTITY",
|
||||
new StringLiteralExpr(databaseTable.getTableName())));
|
||||
|
||||
|
||||
final FieldDeclaration serialVersionUIDField = javaClass.addField(Long.class, "serialVersionUID", PRIVATE, FINAL, STATIC);
|
||||
ClassOrInterfaceType serialVersionUIDFieldType = serialVersionUIDField.getElementType().asClassOrInterfaceType();
|
||||
serialVersionUIDFieldType.setName("long");
|
||||
|
||||
serialVersionUIDField.setVariable(0, new VariableDeclarator(serialVersionUIDFieldType, "serialVersionUID",
|
||||
new LongLiteralExpr("1L")));
|
||||
|
||||
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);
|
||||
|
||||
final FieldDeclaration fieldDeclaration = javaClass.addField(
|
||||
"List<" + entityChildClassName + ">",
|
||||
entityChildClassName.substring(0, 1).toLowerCase() + entityChildClassName.substring(1),
|
||||
PRIVATE);
|
||||
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 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()));
|
||||
|
||||
// if (databaseColumn.getColumnDefault() != null)
|
||||
// sqlFieldValues.add(new MemberValuePair("defaultObjectValue", new StringLiteralExpr(databaseColumn.getColumnDefault())));
|
||||
|
||||
|
||||
|
||||
//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_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -32,6 +33,10 @@ public class SQLServerDBSchemaManager {
|
||||
this.mPassword = password;
|
||||
}
|
||||
|
||||
public SQLServerDBSchemaManager(Connection connection) {
|
||||
this.mConnection = connection;
|
||||
}
|
||||
|
||||
public void connect() throws SQLException {
|
||||
mConnection = DriverManager.getConnection(getConnectionString(mHost), mUsername, mPassword);
|
||||
mConnection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
|
||||
@@ -78,43 +83,161 @@ public class SQLServerDBSchemaManager {
|
||||
}
|
||||
|
||||
|
||||
public List<DatabaseTable> getTables() throws Exception {
|
||||
List<DatabaseTable> tableList = new ArrayList<>();
|
||||
|
||||
String sql = "SELECT TABLE_CATALOG," +
|
||||
" TABLE_SCHEMA," +
|
||||
" TABLE_NAME," +
|
||||
" COLUMN_NAME," +
|
||||
" ORDINAL_POSITION," +
|
||||
" COLUMN_DEFAULT," +
|
||||
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE," +
|
||||
" DATA_TYPE," +
|
||||
" CHARACTER_MAXIMUM_LENGTH," +
|
||||
" CHARACTER_OCTET_LENGTH," +
|
||||
" NUMERIC_PRECISION," +
|
||||
" NUMERIC_PRECISION_RADIX," +
|
||||
" NUMERIC_SCALE," +
|
||||
" DATETIME_PRECISION," +
|
||||
" CHARACTER_SET_CATALOG," +
|
||||
" CHARACTER_SET_SCHEMA," +
|
||||
" CHARACTER_SET_NAME," +
|
||||
" COLLATION_CATALOG," +
|
||||
" COLLATION_SCHEMA," +
|
||||
" COLLATION_NAME," +
|
||||
" DOMAIN_CATALOG," +
|
||||
" DOMAIN_SCHEMA," +
|
||||
" DOMAIN_NAME" +
|
||||
" FROM INFORMATION_SCHEMA.COLUMNS" +
|
||||
" INNER JOIN sys.objects ON TABLE_NAME = name " +
|
||||
" WHERE type = " + UtilityDB.valueToString(DatabaseObjectTypeEnum.TABLE.getText());
|
||||
public DatabaseTableView getTable(String tableName) throws Exception {
|
||||
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" +
|
||||
"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(DatabaseObjectTypeEnum.TABLE.getText()) +
|
||||
" AND COLUMNS.TABLE_NAME = " + UtilityDB.valueToString(tableName);
|
||||
|
||||
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
|
||||
|
||||
if (result.isEmpty())
|
||||
return null;
|
||||
|
||||
HashMap<String, ArrayList<DatabaseForeignKey>> foreignKeysResults = getForeignKeys(tableName);
|
||||
|
||||
DatabaseTableView databaseTable = new DatabaseTableView()
|
||||
.setTableName(tableName);
|
||||
|
||||
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)
|
||||
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "TABLE_NAME"))
|
||||
.forEach(x -> {
|
||||
DatabaseTable databaseTable = new DatabaseTable()
|
||||
.setTableName(x.getKey());
|
||||
T databaseTable = null;
|
||||
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<>();
|
||||
for (HashMap<String, Object> column : x.getValue()) {
|
||||
@@ -124,6 +247,7 @@ public class SQLServerDBSchemaManager {
|
||||
.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"))
|
||||
@@ -135,6 +259,12 @@ public class SQLServerDBSchemaManager {
|
||||
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
|
||||
.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);
|
||||
}
|
||||
|
||||
@@ -146,7 +276,91 @@ public class SQLServerDBSchemaManager {
|
||||
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();
|
||||
sb.append("CREATE TABLE [" + databaseTable.getTableName() + "] (");
|
||||
|
||||
@@ -161,14 +375,29 @@ public class SQLServerDBSchemaManager {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void createTable(DatabaseTable databaseTable) throws Exception {
|
||||
public void createTable(DatabaseTableView databaseTable) throws Exception {
|
||||
String sql = createTableSyntax(databaseTable);
|
||||
|
||||
execTableAlterSQL(sql);
|
||||
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) throws Exception {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("ALTER TABLE [" + deltaTable.getTableName() + "] ADD ");
|
||||
@@ -184,7 +413,7 @@ public class SQLServerDBSchemaManager {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void addTableColumns(DatabaseTable deltaTable) throws Exception {
|
||||
public void addTableColumns(DatabaseTableView deltaTable) throws Exception {
|
||||
|
||||
String sql = addTableColumnsSyntax(deltaTable);
|
||||
execTableAlterSQL(sql);
|
||||
@@ -192,6 +421,27 @@ public class SQLServerDBSchemaManager {
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
public class DatabaseTable extends DatabaseTableView {
|
||||
|
||||
public class DatabaseTable implements Cloneable {
|
||||
private final DatabaseObjectTypeEnum type = DatabaseObjectTypeEnum.TABLE;
|
||||
|
||||
private String tableName;
|
||||
private List<DatabaseTableColumn> columns = new ArrayList<>();
|
||||
|
||||
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();
|
||||
}
|
||||
public DatabaseObjectTypeEnum getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package it.integry.ems.entity_logger.db_schema_manager.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DatabaseTableColumn {
|
||||
|
||||
private String columnName;
|
||||
private Integer ordinalPosition;
|
||||
private String columnDefault;
|
||||
private boolean nullable;
|
||||
private boolean primaryKey;
|
||||
private boolean identity;
|
||||
private DatabaseTableColumnDataType dataType;
|
||||
private Integer characterMaximumLength;
|
||||
private Integer characterOctetLength;
|
||||
@@ -17,6 +21,8 @@ public class DatabaseTableColumn {
|
||||
private String characterSetSchema;
|
||||
private String characterSetName;
|
||||
|
||||
private ArrayList<DatabaseForeignKey> foreignKeys;
|
||||
|
||||
public String getColumnName() {
|
||||
return columnName;
|
||||
}
|
||||
@@ -142,4 +148,31 @@ public class DatabaseTableColumn {
|
||||
this.characterSetName = characterSetName;
|
||||
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;
|
||||
|
||||
import java.sql.Types;
|
||||
|
||||
public enum DatabaseTableColumnDataType {
|
||||
|
||||
BIGINT("bigint"),
|
||||
@@ -38,7 +40,7 @@ public enum DatabaseTableColumnDataType {
|
||||
GEOGRAPHY("geography");
|
||||
|
||||
|
||||
private String text;
|
||||
private final String text;
|
||||
|
||||
private DatabaseTableColumnDataType(String text) {
|
||||
this.text = text;
|
||||
@@ -55,4 +57,52 @@ public enum DatabaseTableColumnDataType {
|
||||
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.Stream;
|
||||
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.dto.DatabaseFile;
|
||||
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.entity_logger.db_schema_manager.dto.*;
|
||||
import it.integry.ems.looper.service.LooperService;
|
||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||
import it.integry.ems.settings.Model.SettingsModel;
|
||||
@@ -130,16 +126,16 @@ public class EntityLoggerComponent {
|
||||
|
||||
for (DatabaseTable sourceTable : sourceTables) {
|
||||
|
||||
Optional<DatabaseTable> optDestTable = Stream.of(destTables)
|
||||
java.util.Optional<DatabaseTable> optDestTable = destTables.stream()
|
||||
.filter(x -> x.getTableName().equalsIgnoreCase(sourceTable.getTableName()))
|
||||
.findFirst();
|
||||
DatabaseTable destTable;
|
||||
DatabaseTableView destTable;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (optDestTable.isEmpty()) {
|
||||
if (!optDestTable.isPresent()) {
|
||||
|
||||
Stream.of(sourceTable.getColumns())
|
||||
sourceTable.getColumns()
|
||||
.forEach(x -> x.setNullable(true));
|
||||
|
||||
int maxOrdinalPosition = Stream.of(sourceTable.getColumns())
|
||||
@@ -182,7 +178,7 @@ public class EntityLoggerComponent {
|
||||
} else {
|
||||
destTable = optDestTable.get();
|
||||
|
||||
DatabaseTable cloneDatabaseTableADD = destTable.clone();
|
||||
DatabaseTable cloneDatabaseTableADD = (DatabaseTable) destTable.clone();
|
||||
cloneDatabaseTableADD.setColumns(new ArrayList<>());
|
||||
|
||||
List<DatabaseTableColumn> sourceColumns = sourceTable.getColumns();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package it.integry.ems.exception;
|
||||
|
||||
public class MissingDataException extends Exception {
|
||||
public MissingDataException(String method) {
|
||||
super("Dati mancanti in " + method);
|
||||
public MissingDataException(String error) {
|
||||
super("Dati mancanti: " + error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package it.integry.ems.expansion;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
public interface RunnableArgsWithReturn<T, R> {
|
||||
|
||||
R run(T data);
|
||||
R run(T data) throws SQLException;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package it.integry.ems.export.base;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
|
||||
@@ -20,7 +19,7 @@ import it.integry.ems.file_sharer.sharers.ftp.FTPFileSharerSettings;
|
||||
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileAttachment;
|
||||
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileSharer;
|
||||
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileSharerSettings;
|
||||
import it.integry.ems.json.JSONObjectMapper;
|
||||
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||
import it.integry.ems.properties.EmsProperties;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.response.FileItem;
|
||||
@@ -29,7 +28,6 @@ import it.integry.ems.service.HttpRestWrapper;
|
||||
import it.integry.ems.service.MailService;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.utility.UtilityDirs;
|
||||
import it.integry.ems_model.entity.Azienda;
|
||||
import it.integry.ems_model.entity.WtbUsersInfo;
|
||||
import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
@@ -41,8 +39,10 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -251,7 +251,7 @@ public abstract class BaseEntityExporter implements IEntityExporter {
|
||||
|
||||
case WEBSERVICES:
|
||||
|
||||
JSONObjectMapper objectMapper = new JSONObjectMapper();
|
||||
ResponseJSONObjectMapper objectMapper = new ResponseJSONObjectMapper();
|
||||
|
||||
String url = wtbUserInfo.getWsEndpoint();
|
||||
|
||||
@@ -399,7 +399,7 @@ public abstract class BaseEntityExporter implements IEntityExporter {
|
||||
}
|
||||
}
|
||||
|
||||
if (counterTotalSend > 0 && counterFailedSend != 0 && retException != null) {
|
||||
if (counterTotalSend > 0 && counterFailedSend != counterTotalSend && retException != null) {
|
||||
//Se gli invii precedenti sono andati bene usciamo
|
||||
throw retException;
|
||||
}
|
||||
@@ -421,20 +421,10 @@ public abstract class BaseEntityExporter implements IEntityExporter {
|
||||
private void sendNotificationMail(String notificationEmail) {
|
||||
|
||||
try {
|
||||
String nomeDitta = Azienda.getDefaultAzienda(multiDBTransactionManager.getPrimaryConnection()).getNomeDitta();
|
||||
|
||||
String mailSubject = String.format("Esportazione di %s - %s (%s)", getType(), getFormat(), nomeDitta);
|
||||
|
||||
URL url = new URL("https://www2.studioml.it/ems-api/mail_models/info_mail.php");
|
||||
InputStream is = url.openStream();
|
||||
String htmlMailBody = IOUtils.toString(is);
|
||||
|
||||
htmlMailBody = htmlMailBody.replaceAll("%%USER%%", "cliente");
|
||||
htmlMailBody = htmlMailBody.replaceAll("%%MESSAGE%%", String.format("come da accordi, l'esportazione %s - %s è stata completata.", getType(), getFormat()));
|
||||
htmlMailBody = htmlMailBody.replaceAll("%%NOME_DITTA%%", nomeDitta);
|
||||
|
||||
MailService mailService = ContextLoader.getCurrentWebApplicationContext().getBean(MailService.class);
|
||||
mailService.sendMailPrimary(null, null, notificationEmail, null, null, mailSubject, htmlMailBody, true, false, null, null, null);
|
||||
mailService.sendInfoMail(multiDBTransactionManager, notificationEmail,
|
||||
String.format("Esportazione di %s - %s", getType(), getFormat()),
|
||||
String.format("come da accordi, l'esportazione %s - %s è stata completata.", getType(), getFormat()));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -11,6 +11,7 @@ public enum EntityExportType {
|
||||
ORDINI("ORDINI"),
|
||||
ORDINI_ACQUISTO("ORDINI ACQUISTO"),
|
||||
ORDINI_VENDITA("ORDINI VENDITA"),
|
||||
RISORSE_UMANE("RISORSE UMANE"),
|
||||
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
|
||||
OFFERTE("OFFERTE"),
|
||||
RAPPORTINI("RAPPORTINI"),
|
||||
|
||||
@@ -2,7 +2,7 @@ package it.integry.ems.javabeans;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.json.JSONObjectMapper;
|
||||
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||
import it.integry.ems.model.IntegryApplicationEnum;
|
||||
import it.integry.ems.user.dto.UserDTO;
|
||||
import it.integry.ems_model.config.EmsRestConstants;
|
||||
@@ -31,7 +31,7 @@ public class RequestDataDTO {
|
||||
private HttpServletRequest request;
|
||||
|
||||
@Autowired
|
||||
private JSONObjectMapper jsonObjectMapper;
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
|
||||
private String requestURI;
|
||||
private String requestClientIP;
|
||||
@@ -89,9 +89,9 @@ public class RequestDataDTO {
|
||||
}
|
||||
|
||||
if (shouldIncludeNulls()) {
|
||||
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
} else {
|
||||
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.USE_DEFAULTS);
|
||||
} else {
|
||||
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
package it.integry.ems.json;
|
||||
|
||||
import com.fasterxml.jackson.core.Version;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import it.integry.ems.adapter.*;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.schedule.new_cron_job.controller.AutomatedOperationController;
|
||||
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
|
||||
import it.integry.ems_model.base.ComposedEntityBase;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.resolver.EntitySubTypeHolder;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
public class CommonObjectMapper extends ObjectMapper {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void setupModules(SimpleModule module) {
|
||||
registerModule(module);
|
||||
|
||||
SimpleModule moduleSubType = new SimpleModule("test", Version.unknownVersion());
|
||||
Reflections reflections = new Reflections("it.integry");
|
||||
Set<Class<? extends EntityBase>> clssList = reflections.getSubTypesOf(EntityBase.class);
|
||||
final Set<Class<? extends ComposedEntityBase>> subTypesOfComposed = reflections.getSubTypesOf(ComposedEntityBase.class);
|
||||
clssList.addAll(subTypesOfComposed);
|
||||
for (Class<? extends EntityBase> clazz : clssList) {
|
||||
try {
|
||||
Field f = clazz.getDeclaredField("ENTITY");
|
||||
f.setAccessible(true);
|
||||
String keyType = (String) f.get(null);
|
||||
EntitySubTypeHolder.getMapType().put(keyType, clazz);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
moduleSubType.addAbstractTypeMapping(EntityBase.class, clazz);
|
||||
registerSubtypes(clazz);
|
||||
}
|
||||
registerModule(moduleSubType);
|
||||
}
|
||||
|
||||
protected SimpleModule setupAdapters() {
|
||||
SimpleModule module = new SimpleModule();
|
||||
|
||||
module.addSerializer(Date.class, new JsonDateAdapterSerializer());
|
||||
module.addDeserializer(Date.class, new JsonDateAdapterDeserializer());
|
||||
|
||||
module.addSerializer(LocalDate.class, new JsonLocalDateAdapterSerializer());
|
||||
module.addDeserializer(LocalDate.class, new JsonLocalDateAdapterDeserializer());
|
||||
|
||||
module.addSerializer(LocalDateTime.class, new JsonLocalDateTimeAdapterSerializer());
|
||||
module.addDeserializer(LocalDateTime.class, new JsonLocalDateTimeAdapterDeserializer());
|
||||
|
||||
module.addSerializer(EsitoType.class, new EsitoSerialize());
|
||||
module.addDeserializer(EsitoType.class, new EsitoDeserialize());
|
||||
|
||||
module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize());
|
||||
module.addDeserializer(Integer.class, new IntegerDeserializer());
|
||||
|
||||
module.addDeserializer(String.class, new StringUnicodeDeserialize());
|
||||
|
||||
module.addDeserializer(Boolean.class, new BooleanDeserializer());
|
||||
|
||||
|
||||
module.addDeserializer(BaseAutomatedOperationDTO.class, new AutomatedOperationController.AutomatedOperationsDeserializer());
|
||||
return module;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package it.integry.ems.json;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
||||
|
||||
public class JSONObjectMapper extends CommonObjectMapper {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public JSONObjectMapper() {
|
||||
SimpleModule module = setupAdapters();
|
||||
|
||||
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
|
||||
@Override
|
||||
public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider,
|
||||
PropertyWriter writer) throws Exception {
|
||||
if (include(writer)) {
|
||||
try {
|
||||
writer.serializeAsField(pojo, jgen, provider);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
} else if (!jgen.canOmitFields()) { // since 2.3
|
||||
writer.serializeAsOmittedField(pojo, jgen, provider);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean include(BeanPropertyWriter writer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean include(PropertyWriter writer) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter);
|
||||
|
||||
setFilterProvider(filters);
|
||||
|
||||
// setSerializationInclusion(Include.NON_NULL);
|
||||
|
||||
// escape dei caratteri non standard
|
||||
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
|
||||
|
||||
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
|
||||
setupModules(module);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package it.integry.ems.json;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
||||
import it.integry.ems_model.annotation.EntityChild;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class OrdikidsResponseJSONObjectMapper extends CommonObjectMapper {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public OrdikidsResponseJSONObjectMapper() {
|
||||
SimpleModule module = setupAdapters();
|
||||
|
||||
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
|
||||
@Override
|
||||
public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider,
|
||||
PropertyWriter writer) throws Exception {
|
||||
if (include(writer)) {
|
||||
try {
|
||||
if ("operation".equals(writer.getName())) {
|
||||
writer.serializeAsField(pojo, jgen, provider);
|
||||
return;
|
||||
} else {
|
||||
Field f = pojo.getClass().getDeclaredField(writer.getName());
|
||||
if (f != null) {
|
||||
PK pk = f.getAnnotation(PK.class);
|
||||
SqlField sqlField = f.getAnnotation(SqlField.class);
|
||||
EntityChild child = f.getAnnotation(EntityChild.class);
|
||||
if (pk != null || child != null || (sqlField != null && sqlField.isReturned()))
|
||||
writer.serializeAsField(pojo, jgen, provider);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
} else if (!jgen.canOmitFields()) { // since 2.3
|
||||
writer.serializeAsOmittedField(pojo, jgen, provider);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean include(BeanPropertyWriter writer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean include(PropertyWriter writer) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter);
|
||||
|
||||
setFilterProvider(filters);
|
||||
|
||||
// escape dei caratteri non standard
|
||||
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
|
||||
|
||||
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
|
||||
setupModules(module);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package it.integry.ems.json;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
|
||||
@@ -11,21 +12,62 @@ import com.fasterxml.jackson.databind.ser.PropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.PropertyWriter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
||||
import it.integry.ems.adapter.*;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.schedule.new_cron_job.controller.AutomatedOperationController;
|
||||
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
|
||||
import it.integry.ems_model.annotation.EntityChild;
|
||||
import it.integry.ems_model.annotation.PK;
|
||||
import it.integry.ems_model.annotation.SqlField;
|
||||
import it.integry.ems_model.annotation.Table;
|
||||
import it.integry.ems_model.base.ComposedEntityBase;
|
||||
import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.resolver.EntitySubTypeHolder;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ResponseJSONObjectMapper extends CommonObjectMapper {
|
||||
import static org.reflections.scanners.Scanners.SubTypes;
|
||||
|
||||
public class ResponseJSONObjectMapper extends ObjectMapper {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public SimpleModule addDefaultAdapters(SimpleModule module) {
|
||||
module.addSerializer(Date.class, new JsonDateAdapterSerializer());
|
||||
module.addDeserializer(Date.class, new JsonDateAdapterDeserializer());
|
||||
|
||||
module.addSerializer(LocalDate.class, new JsonLocalDateAdapterSerializer());
|
||||
module.addDeserializer(LocalDate.class, new JsonLocalDateAdapterDeserializer());
|
||||
|
||||
module.addSerializer(LocalDateTime.class, new JsonLocalDateTimeAdapterSerializer());
|
||||
module.addDeserializer(LocalDateTime.class, new JsonLocalDateTimeAdapterDeserializer());
|
||||
|
||||
module.addSerializer(EsitoType.class, new EsitoSerialize());
|
||||
module.addDeserializer(EsitoType.class, new EsitoDeserialize());
|
||||
|
||||
module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize());
|
||||
module.addDeserializer(Integer.class, new IntegerDeserializer());
|
||||
|
||||
module.addDeserializer(String.class, new StringUnicodeDeserialize());
|
||||
|
||||
module.addDeserializer(Boolean.class, new BooleanDeserializer());
|
||||
|
||||
|
||||
module.addDeserializer(BaseAutomatedOperationDTO.class, new AutomatedOperationController.AutomatedOperationsDeserializer());
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
public ResponseJSONObjectMapper() {
|
||||
SimpleModule module = setupAdapters();
|
||||
|
||||
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
|
||||
@Override
|
||||
@@ -60,7 +102,7 @@ public class ResponseJSONObjectMapper extends CommonObjectMapper {
|
||||
if (onlyPkMaster && child != null)
|
||||
return;
|
||||
|
||||
if (pk != null || child != null || (sqlField != null && sqlField.isReturned())) {
|
||||
if (pk != null || child != null || (sqlField != null && sqlField.isReturned()) || !onlyPkMaster) {
|
||||
|
||||
writer.serializeAsField(pojo, jgen, provider);
|
||||
}
|
||||
@@ -92,14 +134,41 @@ public class ResponseJSONObjectMapper extends CommonObjectMapper {
|
||||
|
||||
setFilterProvider(filters);
|
||||
|
||||
setSerializationInclusion(Include.NON_NULL);
|
||||
|
||||
// escape dei caratteri non standard
|
||||
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
simpleModule = addDefaultAdapters(simpleModule);
|
||||
|
||||
setupEntityModules(simpleModule);
|
||||
registerModule(simpleModule);
|
||||
|
||||
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false);
|
||||
configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
|
||||
configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);
|
||||
// configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); // escape dei caratteri non standard
|
||||
|
||||
setupModules(module);
|
||||
setSerializationInclusion(Include.NON_NULL);
|
||||
}
|
||||
|
||||
public void setupEntityModules(SimpleModule module) {
|
||||
|
||||
Reflections reflections = new Reflections("it.integry");
|
||||
final List<AbstractMap.SimpleEntry<String, Class<? extends EntityBase>>> classList = reflections.get(SubTypes.of(EntityBase.class, ComposedEntityBase.class).asClass())
|
||||
.stream()
|
||||
.filter(x -> x.isAnnotationPresent(Table.class))
|
||||
.map(x ->
|
||||
new AbstractMap.SimpleEntry<String, Class<? extends EntityBase>>(
|
||||
x.getAnnotation(Table.class).value(), (Class<? extends EntityBase>) x))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
for (AbstractMap.SimpleEntry<String, Class<? extends EntityBase>> classData : classList) {
|
||||
EntitySubTypeHolder.getMapType().put(classData.getKey(), classData.getValue());
|
||||
|
||||
module.addAbstractTypeMapping(EntityBase.class, classData.getValue());
|
||||
}
|
||||
|
||||
registerSubtypes(classList.stream().map(AbstractMap.SimpleEntry::getValue).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package it.integry.ems.license;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import it.integry.annotations.PostContextConstruct;
|
||||
import it.integry.ems.datasource.DataSource;
|
||||
import it.integry.ems.json.JSONObjectMapper;
|
||||
import it.integry.ems.json.ResponseJSONObjectMapper;
|
||||
import it.integry.ems.looper.service.LooperService;
|
||||
import it.integry.ems.response.EsitoType;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
@@ -37,7 +37,7 @@ public class LicenseComponent {
|
||||
private LooperService looperService;
|
||||
|
||||
@Autowired
|
||||
private JSONObjectMapper jsonObjectMapper;
|
||||
private ResponseJSONObjectMapper jsonObjectMapper;
|
||||
|
||||
private final HashMap<String, LicenseStatusDTO> cachedLicenseStatus = new HashMap<>();
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ import it.integry.ems.menu.dto.MenuConfigDTO;
|
||||
import it.integry.ems.menu.dto.StbMenuDTO;
|
||||
import it.integry.ems.menu.dto.StbMenuOpzDTO;
|
||||
import it.integry.ems.menu.dto.StbTipoAziendaDTO;
|
||||
import it.integry.ems.utility.UtilityDirs;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.util.List;
|
||||
@@ -31,9 +34,11 @@ public class MenuStaticCreator {
|
||||
connection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
|
||||
connection.setAutoCommit(false);
|
||||
|
||||
final String baseProjectPath = new File("").getAbsolutePath() + "\\ems-core\\src\\main\\";
|
||||
final String menuJsonResourceFolder = baseProjectPath + "resources\\menus\\";
|
||||
createMenu(connection, UtilityDirs.getDevelopmentMenusFolder());
|
||||
}
|
||||
|
||||
|
||||
public static void createMenu(Connection connection, String menuJsonResourceFolder) throws Exception {
|
||||
ObjectMapper jsonObjectMapper = new ObjectMapper();
|
||||
|
||||
final List<StbMenuOpzDTO> stbMenuOpzs = UtilityDB.executeSimpleQueryDTO(connection, "SELECT * FROM stb_menu_opz", StbMenuOpzDTO.class);
|
||||
@@ -43,8 +48,7 @@ public class MenuStaticCreator {
|
||||
final List<StbMenuDTO> stbMenus = UtilityDB.executeSimpleQueryDTO(connection, "SELECT * FROM stb_menu", StbMenuDTO.class);
|
||||
final Map<String, List<StbMenuDTO>> menusByAzienda = stbMenus.stream().collect(Collectors.groupingBy(StbMenuDTO::getTipoAzienda));
|
||||
|
||||
|
||||
MenuConfigDTO menuConfigDTO = new MenuConfigDTO(Integer.parseInt(CommonConstants.DATESTAMP_FORMATTER.format(UtilityLocalDate.getNow())))
|
||||
MenuConfigDTO menuConfigDTO = new MenuConfigDTO(Integer.parseInt(CommonConstants.DATESTAMP_YMD_FORMATTER.format(UtilityLocalDate.getNow())))
|
||||
.setStbMenuOpz(stbMenuOpzs)
|
||||
.setStbTipoAzienda(stbTipoAziendas)
|
||||
.setMenusByAzienda(menusByAzienda);
|
||||
@@ -55,15 +59,15 @@ public class MenuStaticCreator {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void writeContentToFile(String filePath, String content, boolean overwrite) throws IOException {
|
||||
File f = new File(filePath);
|
||||
if (overwrite && f.exists()) f.delete();
|
||||
|
||||
FileOutputStream outputStream = new FileOutputStream(filePath);
|
||||
byte[] strToBytes = content.getBytes();
|
||||
outputStream.write(strToBytes);
|
||||
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);
|
||||
outputStreamWriter.write(content);
|
||||
|
||||
outputStreamWriter.close();
|
||||
outputStream.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.menu.service.MenuConfigurationService;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
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;
|
||||
@@ -30,4 +31,17 @@ public class MenuConfigurationController {
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "generate", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse generate() 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!");
|
||||
|
||||
menuConfigurationService.generate();
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,36 +23,8 @@ public class StbMenuDTO {
|
||||
@SqlField(value = "descrizione_estesa", maxLength = 8000, nullable = true)
|
||||
private String descrizioneEstesa;
|
||||
|
||||
@SqlField(value = "entity_name", maxLength = 40, nullable = true)
|
||||
private String entityName;
|
||||
|
||||
@SqlField(value = "flag_attivo", maxLength = 1, nullable = true, defaultObjectValue = "S")
|
||||
private String flagAttivo;
|
||||
|
||||
@SqlField(value = "flag_printer_setup", maxLength = 1, nullable = true, defaultObjectValue = "N")
|
||||
private String flagPrinterSetup;
|
||||
|
||||
@SqlField(value = "gest_name", maxLength = 40, nullable = true)
|
||||
private String gestName;
|
||||
|
||||
@SqlField(value = "note", maxLength = 255, nullable = true)
|
||||
private String note;
|
||||
|
||||
@SqlField(value = "object_type", maxLength = 5, nullable = true)
|
||||
private String objectType;
|
||||
|
||||
@SqlField(value = "open_type", maxLength = 1, nullable = true)
|
||||
private String openType;
|
||||
|
||||
@SqlField(value = "parameter", maxLength = 255, nullable = true)
|
||||
private String parameter;
|
||||
|
||||
@SqlField(value = "picture_menu", maxLength = 1024, nullable = true)
|
||||
private String pictureMenu;
|
||||
|
||||
@SqlField(value = "picture_select", maxLength = 1024, nullable = true)
|
||||
private String pictureSelect;
|
||||
|
||||
@SqlField(value = "pos", nullable = true)
|
||||
private Integer pos;
|
||||
|
||||
@@ -62,9 +34,6 @@ public class StbMenuDTO {
|
||||
@SqlField(value = "pos_tipo_azienda", nullable = true)
|
||||
private Integer posTipoAzienda;
|
||||
|
||||
@SqlField(value = "type", maxLength = -1, nullable = true, defaultObjectValue = "F")
|
||||
private String menuType;
|
||||
|
||||
@SqlField(value = "url_descrizione", maxLength = 1024, nullable = true)
|
||||
private String urlDescrizione;
|
||||
|
||||
@@ -122,15 +91,6 @@ public class StbMenuDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEntityName() {
|
||||
return entityName;
|
||||
}
|
||||
|
||||
public StbMenuDTO setEntityName(String entityName) {
|
||||
this.entityName = entityName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagAttivo() {
|
||||
return flagAttivo;
|
||||
}
|
||||
@@ -140,78 +100,6 @@ public class StbMenuDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagPrinterSetup() {
|
||||
return flagPrinterSetup;
|
||||
}
|
||||
|
||||
public StbMenuDTO setFlagPrinterSetup(String flagPrinterSetup) {
|
||||
this.flagPrinterSetup = flagPrinterSetup;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestName() {
|
||||
return gestName;
|
||||
}
|
||||
|
||||
public StbMenuDTO setGestName(String gestName) {
|
||||
this.gestName = gestName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public StbMenuDTO setNote(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getObjectType() {
|
||||
return objectType;
|
||||
}
|
||||
|
||||
public StbMenuDTO setObjectType(String objectType) {
|
||||
this.objectType = objectType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOpenType() {
|
||||
return openType;
|
||||
}
|
||||
|
||||
public StbMenuDTO setOpenType(String openType) {
|
||||
this.openType = openType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return parameter;
|
||||
}
|
||||
|
||||
public StbMenuDTO setParameter(String parameter) {
|
||||
this.parameter = parameter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPictureMenu() {
|
||||
return pictureMenu;
|
||||
}
|
||||
|
||||
public StbMenuDTO setPictureMenu(String pictureMenu) {
|
||||
this.pictureMenu = pictureMenu;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPictureSelect() {
|
||||
return pictureSelect;
|
||||
}
|
||||
|
||||
public StbMenuDTO setPictureSelect(String pictureSelect) {
|
||||
this.pictureSelect = pictureSelect;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPos() {
|
||||
return pos;
|
||||
}
|
||||
@@ -239,15 +127,6 @@ public class StbMenuDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMenuType() {
|
||||
return menuType;
|
||||
}
|
||||
|
||||
public StbMenuDTO setMenuType(String menuType) {
|
||||
this.menuType = menuType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUrlDescrizione() {
|
||||
return urlDescrizione;
|
||||
}
|
||||
@@ -264,20 +143,10 @@ public class StbMenuDTO {
|
||||
.setTipoAzienda(getTipoAzienda())
|
||||
.setDescrizione(getDescrizione())
|
||||
.setDescrizioneEstesa(getDescrizioneEstesa())
|
||||
.setEntityName(getEntityName())
|
||||
.setFlagAttivo(getFlagAttivo())
|
||||
.setFlagPrinterSetup(getFlagPrinterSetup())
|
||||
.setGestName(getGestName())
|
||||
.setNote(getNote())
|
||||
.setObjectType(getObjectType())
|
||||
.setOpenType(getOpenType())
|
||||
.setParameter(getParameter())
|
||||
.setPictureMenu(getPictureMenu())
|
||||
.setPictureSelect(getPictureSelect())
|
||||
.setPos(getPos())
|
||||
.setPosCliente(getPosCliente())
|
||||
.setPosTipoAzienda(getPosTipoAzienda())
|
||||
.setMenuType(getMenuType())
|
||||
.setUrlDescrizione(getUrlDescrizione());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package it.integry.ems.menu.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement;
|
||||
import it.integry.annotations.PostContextAutowired;
|
||||
import it.integry.annotations.PostContextConstruct;
|
||||
import it.integry.ems.menu.MenuStaticCreator;
|
||||
import it.integry.ems.menu.dto.MenuConfigDTO;
|
||||
import it.integry.ems.menu.dto.StbMenuDTO;
|
||||
import it.integry.ems.menu.dto.StbMenuOpzDTO;
|
||||
@@ -10,7 +12,7 @@ import it.integry.ems.menu.dto.StbTipoAziendaDTO;
|
||||
import it.integry.ems.settings.SettingsController;
|
||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems.utility.UtilityDebug;
|
||||
import it.integry.ems.utility.UtilityDirs;
|
||||
import it.integry.ems_model.entity.Azienda;
|
||||
import it.integry.ems_model.entity.StbMenu;
|
||||
import it.integry.ems_model.entity.StbMenuOpz;
|
||||
@@ -43,7 +45,7 @@ public class MenuConfigurationService {
|
||||
|
||||
@PostContextConstruct(priority = 5)
|
||||
public void init() throws Exception {
|
||||
if(UtilityDebug.isDebugExecution()) return;
|
||||
//if(UtilityDebug.isDebugExecution()) return;
|
||||
|
||||
logger.debug(MenuConfigurationService.class.getSimpleName() + ": Refresh menu");
|
||||
|
||||
@@ -63,6 +65,8 @@ public class MenuConfigurationService {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug(MenuConfigurationService.class.getSimpleName() + ": Fine refresh menu");
|
||||
}
|
||||
|
||||
private boolean isHistoryDB(AdvancedDataSource advancedDataSource) throws Exception {
|
||||
@@ -90,7 +94,7 @@ public class MenuConfigurationService {
|
||||
final Azienda azienda = Azienda.getDefaultAzienda(connection);
|
||||
int lastMenuUpd = Integer.parseInt(azienda.getLastUpgDbMenu().replace("QM", ""));
|
||||
|
||||
if (menuConfig.getVersion() <= lastMenuUpd)
|
||||
if (lastMenuUpd >= menuConfig.getVersion())
|
||||
return;
|
||||
|
||||
executeStatement(connection, "DELETE FROM stb_menu",
|
||||
@@ -98,10 +102,30 @@ public class MenuConfigurationService {
|
||||
"DELETE FROM stb_tipo_azienda",
|
||||
"DELETE FROM stb_menu_opz");
|
||||
|
||||
for (StbMenuOpzDTO stbMenuOpzDto : menuConfig.getStbMenuOpz()) {
|
||||
StbMenuOpz stbMenuOpz = stbMenuOpzDto.toEntity();
|
||||
stbMenuOpz.setOperation(OperationType.INSERT);
|
||||
stbMenuOpz.manageWithParentConnection(connection);
|
||||
String insertStbMenuOpzSQL = "INSERT INTO " + StbMenuOpz.ENTITY + " (cod_opz, " +
|
||||
"descrizione, gest_name, entity_name, picture_menu, picture_select, object_type, flag_printer_setup, parameter, note, open_type, is_deprecated)" +
|
||||
" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (SQLServerPreparedStatement insertBulkPs = (SQLServerPreparedStatement) connection.prepareStatement(insertStbMenuOpzSQL)) {
|
||||
for (StbMenuOpzDTO stbMenuOpzDto : menuConfig.getStbMenuOpz()) {
|
||||
|
||||
insertBulkPs.setString(1, stbMenuOpzDto.getCodOpz());
|
||||
insertBulkPs.setString(2, stbMenuOpzDto.getDescrizione());
|
||||
insertBulkPs.setString(3, stbMenuOpzDto.getGestName());
|
||||
insertBulkPs.setString(4, stbMenuOpzDto.getEntityName());
|
||||
insertBulkPs.setString(5, stbMenuOpzDto.getPictureMenu());
|
||||
insertBulkPs.setString(6, stbMenuOpzDto.getPictureSelect());
|
||||
insertBulkPs.setString(7, stbMenuOpzDto.getObjectType());
|
||||
insertBulkPs.setString(8, stbMenuOpzDto.getFlagPrinterSetup());
|
||||
insertBulkPs.setString(9, stbMenuOpzDto.getParameter());
|
||||
insertBulkPs.setString(10, stbMenuOpzDto.getNote());
|
||||
insertBulkPs.setString(11, stbMenuOpzDto.getOpenType());
|
||||
insertBulkPs.setString(12, stbMenuOpzDto.getIsDeprecated());
|
||||
|
||||
insertBulkPs.addBatch();
|
||||
}
|
||||
|
||||
insertBulkPs.executeLargeBatch();
|
||||
}
|
||||
|
||||
for (StbTipoAziendaDTO stbTipoAziendaDto : menuConfig.getStbTipoAzienda()) {
|
||||
@@ -114,12 +138,39 @@ public class MenuConfigurationService {
|
||||
|
||||
if (stbMenus == null)
|
||||
logger.error("Nessuna configurazione trovata per il menu " + azienda.getTipoAzienda() + " di " + azienda.getNomeDitta());
|
||||
else
|
||||
for (StbMenuDTO stbMenuDto : stbMenus) {
|
||||
StbMenu stbMenu = stbMenuDto.toEntity();
|
||||
stbMenu.setOperation(OperationType.INSERT);
|
||||
stbMenu.manageWithParentConnection(connection);
|
||||
else {
|
||||
String insertStbMenuSql = "INSERT INTO " + StbMenu.ENTITY + " (cod_opz, descrizione, cod_parent, pos, tipo_azienda, flag_attivo, url_descrizione, " +
|
||||
"pos_tipo_azienda, pos_cliente, descrizione_estesa) " +
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (SQLServerPreparedStatement insertBulkPs = (SQLServerPreparedStatement) connection.prepareStatement(insertStbMenuSql)) {
|
||||
for (StbMenuDTO stbMenuDto : stbMenus) {
|
||||
|
||||
insertBulkPs.setString(1, stbMenuDto.getCodOpz());
|
||||
insertBulkPs.setString(2, stbMenuDto.getDescrizione());
|
||||
insertBulkPs.setString(3, stbMenuDto.getCodParent());
|
||||
|
||||
if(stbMenuDto.getPos() != null) insertBulkPs.setInt(4, stbMenuDto.getPos());
|
||||
else insertBulkPs.setObject(4, null);
|
||||
|
||||
insertBulkPs.setString(5, stbMenuDto.getTipoAzienda());
|
||||
insertBulkPs.setString(6, stbMenuDto.getFlagAttivo());
|
||||
insertBulkPs.setString(7, stbMenuDto.getUrlDescrizione());
|
||||
|
||||
if(stbMenuDto.getPosTipoAzienda() != null) insertBulkPs.setInt(8, stbMenuDto.getPosTipoAzienda());
|
||||
else insertBulkPs.setObject(8, null);
|
||||
|
||||
if(stbMenuDto.getPosCliente() != null) insertBulkPs.setInt(9, stbMenuDto.getPosCliente());
|
||||
else insertBulkPs.setObject(9, null);
|
||||
|
||||
insertBulkPs.setString(10, stbMenuDto.getDescrizioneEstesa());
|
||||
|
||||
insertBulkPs.addBatch();
|
||||
}
|
||||
|
||||
insertBulkPs.executeLargeBatch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
executeStatement(connection, "ALTER TABLE azienda ADD CONSTRAINT FK_azienda_stb_tipo_azienda FOREIGN KEY (tipo_azienda) REFERENCES stb_tipo_azienda ( tipo_azienda )",
|
||||
@@ -137,9 +188,15 @@ public class MenuConfigurationService {
|
||||
" AND abil.flag_Abil <> 'N') Opz2Abil\n" +
|
||||
" LEFT OUTER JOIN stb_Abil ON stb_Abil.cod_opz = Opz2Abil.cod_parent AND stb_abil.user_name = Opz2Abil.user_name\n" +
|
||||
"WHERE stb_abil.cod_opz IS NULL",
|
||||
"UPDATE azienda SET last_upg_db_menu = " + UtilityDB.valueToString("QM" + menuConfig.getVersion()));
|
||||
"UPDATE azienda SET last_upg_db_menu = " + UtilityDB.valueToString(menuConfig.getVersion()));
|
||||
|
||||
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
public void generate() throws Exception {
|
||||
try (MultiDBTransactionManager studioMlMultiDb = new MultiDBTransactionManager("INTEGRY")) {
|
||||
MenuStaticCreator.createMenu(studioMlMultiDb.getPrimaryConnection(), UtilityDirs.getDevelopmentMenusFolder());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package it.integry.ems.metrics.filter;
|
||||
|
||||
import it.integry.ems.metrics.service.MetricService;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Component
|
||||
public class MetricFilter implements Filter {
|
||||
|
||||
@Autowired
|
||||
private MetricService metricService;
|
||||
|
||||
@Override
|
||||
public void init(final FilterConfig config) throws ServletException {
|
||||
if (metricService == null) {
|
||||
metricService = (MetricService) WebApplicationContextUtils.
|
||||
getRequiredWebApplicationContext(config.getServletContext()).getBean("metricService");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws java.io.IOException, ServletException {
|
||||
final HttpServletRequest httpRequest = ((HttpServletRequest) request);
|
||||
if (!UtilityString.isNullOrEmpty(httpRequest.getServletPath())) {
|
||||
final String req = httpRequest.getServletPath().substring(1);
|
||||
long startTime = System.nanoTime();
|
||||
|
||||
chain.doFilter(request, response);
|
||||
|
||||
double stopTime = System.nanoTime();
|
||||
double execTime = (stopTime - startTime) / 1000000000;
|
||||
// final int status = ((HttpServletResponse) response).getStatus();
|
||||
|
||||
metricService.updateCountTimeForService(req, execTime);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package it.integry.ems.metrics.service;
|
||||
|
||||
import it.integry.ems.json.JSONObjectMapper;
|
||||
import org.joda.time.LocalDateTime;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.StringWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
@Service
|
||||
public class MetricService {
|
||||
|
||||
private static int DAY_HOUR = 24;
|
||||
|
||||
private final ConcurrentMap<String, Integer> barchartCountService;
|
||||
private final ConcurrentMap<String, List<Double>> barchartTimeExecService;
|
||||
|
||||
private final int[] dayHalfHourLoad = new int[DAY_HOUR * 2];
|
||||
|
||||
@Autowired
|
||||
private JSONObjectMapper jsonObjectMapper;
|
||||
|
||||
private Integer totCount = 0;
|
||||
private AtomicInteger totCountHalfHour = new AtomicInteger(0);
|
||||
private AtomicInteger idxArray;
|
||||
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
|
||||
|
||||
public MetricService() {
|
||||
barchartCountService = new ConcurrentHashMap<>();
|
||||
barchartTimeExecService = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
public void updateCountTimeForService(String serviceName, Double timeExec) {
|
||||
|
||||
if(!serviceName.startsWith("metric") &&
|
||||
!serviceName.startsWith("js") &&
|
||||
!serviceName.startsWith("font") &&
|
||||
!serviceName.startsWith("assets") &&
|
||||
!serviceName.startsWith("css") &&
|
||||
!serviceName.startsWith("index.html") &&
|
||||
!serviceName.endsWith("favicon.ico") &&
|
||||
!serviceName.endsWith("/status") &&
|
||||
!serviceName.contains("system/ok") &&
|
||||
!serviceName.contains("logs")){
|
||||
|
||||
String[] hourMin = sdf.format(new Date()).split(":");
|
||||
idxArray = new AtomicInteger(Integer.parseInt(hourMin[0]));
|
||||
|
||||
int incr = 0;
|
||||
if (Integer.parseInt(hourMin[1]) > 29) {
|
||||
incr = 1;
|
||||
totCountHalfHour.getAndSet(0);
|
||||
}
|
||||
|
||||
totCountHalfHour.getAndIncrement();
|
||||
|
||||
dayHalfHourLoad[idxArray.get() * 2 + incr] = totCountHalfHour.get();
|
||||
|
||||
totCount++;
|
||||
|
||||
Integer count = barchartCountService.get(serviceName);
|
||||
|
||||
if (count == null)
|
||||
count = 0;
|
||||
|
||||
count++;
|
||||
barchartCountService.put(serviceName, count);
|
||||
|
||||
List<Double> list = barchartTimeExecService.get(serviceName);
|
||||
|
||||
if (list == null)
|
||||
list = new ArrayList<>();
|
||||
list.add(timeExec);
|
||||
barchartTimeExecService.put(serviceName, list);
|
||||
}
|
||||
}
|
||||
|
||||
public String getJsonCountMetric() throws Exception {
|
||||
StringWriter sw = new StringWriter();
|
||||
jsonObjectMapper.writeValue(sw, barchartCountService);
|
||||
|
||||
return sw.toString();
|
||||
}
|
||||
|
||||
public void resetMetric() {
|
||||
totCount = 0;
|
||||
barchartCountService.clear();
|
||||
barchartTimeExecService.clear();
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.reflections.Reflections;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Modifier;
|
||||
@@ -32,8 +32,10 @@ import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class MigrationService {
|
||||
import static org.reflections.scanners.Scanners.SubTypes;
|
||||
|
||||
@Component
|
||||
public class MigrationComponent {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@@ -60,11 +62,12 @@ public class MigrationService {
|
||||
public void init() {
|
||||
Reflections reflections = new Reflections("it.integry.ems.migration.model");
|
||||
|
||||
allMigrationsList = new ArrayList<>(Stream.of(reflections.getSubTypesOf(MigrationModelInterface.class))
|
||||
.map(x -> x)
|
||||
allMigrationsList = reflections.get(SubTypes.of(MigrationModelInterface.class).asClass())
|
||||
.stream()
|
||||
.map(x -> (Class<? extends MigrationModelInterface>) x)
|
||||
.filter(x -> !Modifier.isAbstract(x.getModifiers()))
|
||||
.sortBy(Class::getSimpleName)
|
||||
.toList());
|
||||
.sorted(Comparator.comparing(Class::getSimpleName))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (UtilityDebug.isDebugExecution())
|
||||
return;
|
||||
@@ -161,9 +164,12 @@ public class MigrationService {
|
||||
.setSkipped(false);
|
||||
stbMigrationStatus.setOperation(OperationType.INSERT);
|
||||
} else {
|
||||
stbMigrationStatus.setCompleted(true)
|
||||
.setSkipped(false)
|
||||
.setErrorMessage(EmsRestConstants.NULL);
|
||||
stbMigrationStatus
|
||||
.setCompleted(true);
|
||||
if (UtilityDebug.isDebugExecution())
|
||||
stbMigrationStatus
|
||||
.setErrorMessage(EmsRestConstants.NULL);
|
||||
|
||||
stbMigrationStatus.setOperation(OperationType.UPDATE);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
package it.integry.ems.migration._base;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import it.integry.ems.migration.dto.SqlObjectTypeEnum;
|
||||
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseScheduledOperationDTO;
|
||||
import it.integry.ems.schedule.new_cron_job.service.AutomatedOperationHandlerComponent;
|
||||
import it.integry.ems.settings.Model.SettingsModel;
|
||||
import it.integry.ems.settings.SettingsController;
|
||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||
import it.integry.ems.utility.UtilityDebug;
|
||||
import it.integry.ems_model.entity.Azienda;
|
||||
import it.integry.ems_model.entity.StbGestSetup;
|
||||
import it.integry.ems_model.entity.StbGestSetupQuery;
|
||||
import it.integry.ems_model.exception.DataConverterNotFoundException;
|
||||
import it.integry.ems_model.rulescompleting.DroolsDataCompleting;
|
||||
import it.integry.ems_model.types.ApplicationName;
|
||||
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.UtilityString;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bouncycastle.its.operator.ITSContentSigner;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BaseMigration implements MigrationModelInterface {
|
||||
@@ -52,6 +61,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
}
|
||||
|
||||
|
||||
protected void executeStatement(String... sqls) throws SQLException, IOException {
|
||||
executeStatement(advancedDataSource.getConnection(), sqls);
|
||||
}
|
||||
|
||||
protected void executeStatement(Connection connection, String... sqls) throws SQLException {
|
||||
Statement statement = connection.createStatement();
|
||||
|
||||
@@ -62,32 +75,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
statement.close();
|
||||
}
|
||||
|
||||
protected boolean existsColumn(Connection connection, String tableName, String columnName) throws SQLException {
|
||||
String sql = Query.format("SELECT 1 FROM sys.columns\n" +
|
||||
" WHERE Name = N{}\n" +
|
||||
" AND Object_ID = Object_ID(N{})", columnName, "dbo." + tableName);
|
||||
|
||||
Integer val = UtilityDB.<Integer>executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
|
||||
return val != null && val == 1;
|
||||
}
|
||||
|
||||
protected void renameColumn(Connection connection, String tableName, String oldColumnname, String newColumnName) throws SQLException {
|
||||
String sql = "exec sp_rename 'dbo." + tableName + "." + oldColumnname + "', " + newColumnName + ", 'COLUMN'";
|
||||
executeStatement(connection, sql);
|
||||
}
|
||||
|
||||
protected boolean existsTable(Connection connection, String tableName) throws SQLException {
|
||||
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N%s", tableName);
|
||||
|
||||
return UtilityDB.<Boolean>executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
|
||||
}
|
||||
|
||||
|
||||
protected long executeInsertStatement(Connection connection, String sql) throws SQLException {
|
||||
protected long executeInsertStatement(String sql) throws SQLException {
|
||||
long generatedId = -1;
|
||||
|
||||
try (PreparedStatement pstmt = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
|
||||
try (PreparedStatement pstmt = advancedDataSource.getConnection().prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
|
||||
|
||||
int affectedRows = pstmt.executeUpdate();
|
||||
|
||||
@@ -99,51 +90,242 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return generatedId;
|
||||
}
|
||||
|
||||
public void updateFunction(Connection connection, String sql) throws SQLException {
|
||||
executeStatement(connection, sql);
|
||||
|
||||
protected void createOrUpdateFunction(String objectName, String createFunctionSql) throws SQLException, IOException {
|
||||
alterObject(SqlObjectTypeEnum.FUNCTION, objectName, createFunctionSql);
|
||||
}
|
||||
|
||||
protected void dropTable(Connection connection, String tableName) throws SQLException {
|
||||
protected void createOrUpdateView(String objectName, String createViewSql) throws SQLException, IOException {
|
||||
alterObject(SqlObjectTypeEnum.VIEW, objectName, createViewSql);
|
||||
}
|
||||
|
||||
protected void createOrUpdateProcedure(String objectName, String createProcedureSql) throws SQLException, IOException {
|
||||
alterObject(SqlObjectTypeEnum.PROCEDURE, objectName, createProcedureSql);
|
||||
}
|
||||
|
||||
protected void createOrUpdateTrigger(String objectName, String createTriggerSql) throws SQLException, IOException {
|
||||
alterObject(SqlObjectTypeEnum.TRIGGER, objectName, createTriggerSql);
|
||||
}
|
||||
|
||||
private void alterObject(SqlObjectTypeEnum sqlObject, String objectName, String sql) throws SQLException, IOException {
|
||||
executeStatement("IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + objectName + "'))\r\n" +
|
||||
"\tDROP " + sqlObject.toString() + " " + objectName,
|
||||
sql);
|
||||
}
|
||||
|
||||
|
||||
protected boolean existsColumn(String tableName, String columnName) throws SQLException, IOException {
|
||||
String schema = null;
|
||||
if (tableName.contains(".")) {
|
||||
schema = tableName.substring(0, tableName.indexOf("."));
|
||||
tableName = tableName.replace(schema + ".", "");
|
||||
}
|
||||
|
||||
String sql = Query.format("SELECT 1 FROM sys.columns\n" +
|
||||
" WHERE Name = N{}\n" +
|
||||
" AND Object_ID = Object_ID(N{})", columnName, (schema != null ? schema : "dbo") + "." + tableName);
|
||||
|
||||
Integer val = UtilityDB.<Integer>executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
|
||||
return val != null && val == 1;
|
||||
}
|
||||
|
||||
protected void renameColumn(String tableName, String oldColumnname, String newColumnName) throws SQLException, IOException {
|
||||
String sql = "exec sp_rename 'dbo." + tableName + "." + oldColumnname + "', " + newColumnName + ", 'COLUMN'";
|
||||
executeStatement(sql);
|
||||
}
|
||||
|
||||
protected void dropColumn(String tableName, String columnName) throws SQLException, IOException {
|
||||
executeStatement("EXEC DropDefault '" + tableName + "', '" + columnName + "'",
|
||||
"ALTER TABLE " + tableName + " DROP COLUMN " + columnName);
|
||||
}
|
||||
|
||||
protected <T> void addDefault(String tableName, String columnName, T defaultValue) throws SQLException, IOException {
|
||||
boolean existDefault = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(),
|
||||
Query.format("SELECT CAST(COUNT(*) AS BIT)\n" +
|
||||
"FROM sys.syscolumns\n" +
|
||||
"WHERE name = %s\n" +
|
||||
" AND OBJECT_NAME(id) = %s\n" +
|
||||
" AND cdefault <> 0", columnName, tableName));
|
||||
if (!existDefault)
|
||||
executeStatement(Query.format("ALTER TABLE dbo." + tableName + " ADD DEFAULT (%s) FOR "+ columnName, defaultValue));
|
||||
}
|
||||
|
||||
protected boolean existsTable(String tableName) throws SQLException, IOException {
|
||||
String schema = null;
|
||||
if (tableName.contains(".")) {
|
||||
schema = tableName.substring(0, tableName.indexOf("."));
|
||||
tableName = tableName.replace(schema + ".", "");
|
||||
}
|
||||
|
||||
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM INFORMATION_SCHEMA.TABLES " +
|
||||
"WHERE TABLE_NAME = N%s ", tableName);
|
||||
|
||||
if (schema != null)
|
||||
sql += Query.format("AND TABLE_SCHEMA = N%s", schema);
|
||||
|
||||
return UtilityDB.<Boolean>executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
}
|
||||
|
||||
protected void dropTable(String tableName) throws SQLException, IOException {
|
||||
String dropSql = "DROP TABLE " + tableName;
|
||||
executeStatement(connection, dropSql);
|
||||
executeStatement(dropSql);
|
||||
}
|
||||
|
||||
protected void createSetupQuery(String codQuery, String name, String query, boolean override) throws SQLException, IOException {
|
||||
if (UtilityString.isNullOrEmpty(codQuery)) {
|
||||
executeStatement(Query.format("EXEC sp_insertQuerySetup %s", query));
|
||||
return;
|
||||
}
|
||||
String sql = Query.format("SELECT cast(count(*) as bit) FROM stb_gest_setup_query WHERE cod_query = %s", codQuery);
|
||||
boolean existQuery = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
|
||||
|
||||
|
||||
|
||||
protected void createSetup(Connection connection, String gestName, String section, String keySection, String value, String description, String codQuery) throws Exception {
|
||||
StbGestSetup stbGestSetup = new StbGestSetup()
|
||||
.setGestName(gestName)
|
||||
.setSection(section)
|
||||
.setKeySection(keySection)
|
||||
.setValue(value)
|
||||
.setDescription(description)
|
||||
.setQueryDefault(codQuery);
|
||||
|
||||
stbGestSetup.setOperation(OperationType.INSERT);
|
||||
|
||||
stbGestSetup.manageWithParentConnection(connection);
|
||||
if ( existQuery )
|
||||
executeStatement(Query.format("UPDATE stb_gest_setup_query SET query_default = %S, description = %S WHERE cod_query = %s ",
|
||||
query, name, codQuery));
|
||||
else
|
||||
executeStatement(Query.format("INSERT INTO stb_gest_setup_query (cod_query, query_default, description)"+
|
||||
" VALUES (%s, %s, %s);", codQuery, query, name));
|
||||
}
|
||||
|
||||
protected boolean existsSetup(String gestName, String section, String keySection) throws SQLException, IOException {
|
||||
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM " + StbGestSetup.ENTITY +
|
||||
" WHERE gest_name = %s AND" +
|
||||
" section = %s AND" +
|
||||
" key_section = %s", gestName, section, keySection);
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
}
|
||||
|
||||
protected void deleteSetup(Connection connection, String gestName, String section, String keySection) throws Exception {
|
||||
protected boolean existsSetupQuery(String codQuery) throws SQLException, IOException {
|
||||
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM " + StbGestSetupQuery.ENTITY +
|
||||
" WHERE cod_query = %s", codQuery);
|
||||
|
||||
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
}
|
||||
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery) throws Exception {
|
||||
if (existsSetup(gestName, section, keySection))
|
||||
return;
|
||||
|
||||
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
|
||||
"(gest_name, section, key_section, value, description, query_default) VALUES (?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
|
||||
ps.setString(1, gestName);
|
||||
ps.setString(2, section);
|
||||
ps.setString(3, keySection);
|
||||
ps.setString(4, value);
|
||||
ps.setString(5, description);
|
||||
ps.setString(6, codQuery);
|
||||
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery, boolean flagMultiValue) throws Exception {
|
||||
if (existsSetup(gestName, section, keySection))
|
||||
return;
|
||||
|
||||
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
|
||||
"(gest_name, section, key_section, value, description, query_default, flag_multi_value) VALUES (?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
|
||||
ps.setString(1, gestName);
|
||||
ps.setString(2, section);
|
||||
ps.setString(3, keySection);
|
||||
ps.setString(4, value);
|
||||
ps.setString(5, description);
|
||||
ps.setString(6, codQuery);
|
||||
ps.setBoolean(7, flagMultiValue);
|
||||
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery, boolean flagMultiValue, boolean flagSetupUserWeb) throws Exception {
|
||||
if (existsSetup(gestName, section, keySection))
|
||||
return;
|
||||
|
||||
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
|
||||
"(gest_name, section, key_section, value, description, query_default, flag_multi_value, flag_setup_user_web) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
|
||||
ps.setString(1, gestName);
|
||||
ps.setString(2, section);
|
||||
ps.setString(3, keySection);
|
||||
ps.setString(4, value);
|
||||
ps.setString(5, description);
|
||||
ps.setString(6, codQuery);
|
||||
ps.setBoolean(7, flagMultiValue);
|
||||
ps.setString(8, flagSetupUserWeb ? "S" : "N");
|
||||
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, boolean flagSync,
|
||||
String codQuery, boolean flagUserView, boolean flagSetupDepo, boolean flagSetupUserWeb,
|
||||
boolean flagTipoJson, boolean flagTipoColore, String tipoSetup, boolean flagMultiValue ) throws Exception {
|
||||
createSetup(gestName, section,keySection, value, description, flagSync, codQuery, flagUserView, flagSetupDepo,
|
||||
flagSetupUserWeb, flagTipoJson, flagTipoColore, tipoSetup, flagMultiValue, null);
|
||||
}
|
||||
|
||||
protected void createSetup(String gestName, String section, String keySection, String value, String description, boolean flagSync,
|
||||
String codQuery, boolean flagUserView, boolean flagSetupDepo, boolean flagSetupUserWeb,
|
||||
boolean flagTipoJson, boolean flagTipoColore, String tipoSetup, boolean flagMultiValue,
|
||||
String query) throws Exception {
|
||||
if (existsSetup(gestName, section, keySection))
|
||||
return;
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(query) && UtilityString.isNullOrEmpty(codQuery)) {
|
||||
codQuery = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(),
|
||||
Query.format("SELECT cod_query FROM stb_gest_setup_query WHERE query_default = %s", query));
|
||||
}
|
||||
|
||||
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
|
||||
" (gest_name, section, key_section, value, description, flag_sync, query_default,\n" +
|
||||
"flag_user_view, flag_setup_depo, flag_setup_user_web,\n" +
|
||||
"flag_tipo_json, flag_tipo_colore, tipo_setup, flag_multi_value) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
|
||||
ps.setString(1, gestName);
|
||||
ps.setString(2, section);
|
||||
ps.setString(3, keySection);
|
||||
ps.setString(4, value);
|
||||
ps.setString(5, description);
|
||||
ps.setString(6, (flagSync?"S":"N"));
|
||||
ps.setString(7, codQuery);
|
||||
ps.setString(8, (flagUserView?"S":"N"));
|
||||
ps.setString(9, (flagSetupDepo?"S":"N"));
|
||||
ps.setString(10, (flagSetupUserWeb?"S":"N"));
|
||||
ps.setString(11, (flagTipoJson?"S":"N"));
|
||||
ps.setString(12, (flagTipoColore?"S":"N"));
|
||||
ps.setString(13, tipoSetup);
|
||||
ps.setBoolean(14, flagMultiValue);
|
||||
|
||||
ps.executeUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void deleteSetup(String gestName, String section, String keySection) throws Exception {
|
||||
StbGestSetup stbGestSetup = new StbGestSetup()
|
||||
.setGestName(gestName)
|
||||
.setSection(section)
|
||||
.setKeySection(keySection);
|
||||
|
||||
stbGestSetup.setOperation(OperationType.DELETE);
|
||||
stbGestSetup.manageWithParentConnection(connection);
|
||||
stbGestSetup.manageWithParentConnection(advancedDataSource.getConnection());
|
||||
}
|
||||
|
||||
protected void updateSetupValue(Connection connection, String gestName, String section, String keySection, String newValue) throws Exception {
|
||||
protected void updateSetupValue(String gestName, String section, String keySection, String newValue) throws Exception {
|
||||
StbGestSetup stbGestSetup = new StbGestSetup()
|
||||
.setGestName(gestName)
|
||||
.setSection(section)
|
||||
@@ -151,9 +333,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
.setValue(newValue);
|
||||
|
||||
stbGestSetup.setOperation(OperationType.UPDATE);
|
||||
stbGestSetup.manageWithParentConnection(connection);
|
||||
stbGestSetup.manageWithParentConnection(advancedDataSource.getConnection());
|
||||
}
|
||||
|
||||
|
||||
protected void addAutomatedOperation(BaseScheduledOperationDTO operation) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
@@ -182,4 +365,33 @@ public abstract class BaseMigration implements MigrationModelInterface {
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
||||
protected boolean isCustomer(IntegryCustomer... customers) {
|
||||
String currentDbName = advancedDataSource.getDataSource().getDbName();
|
||||
|
||||
return Arrays.stream(customers)
|
||||
.anyMatch(x ->
|
||||
Arrays.stream(x.getValues())
|
||||
.anyMatch(y -> y.getValue().equalsIgnoreCase(currentDbName)));
|
||||
}
|
||||
|
||||
protected boolean isCustomerDb(IntegryCustomerDB... customersDbs) {
|
||||
String currentDbName = advancedDataSource.getDataSource().getDbName();
|
||||
|
||||
return Arrays.stream(customersDbs)
|
||||
.anyMatch(y -> y.getValue().equalsIgnoreCase(currentDbName));
|
||||
}
|
||||
|
||||
|
||||
protected boolean isWingest() throws SQLException, IOException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
|
||||
Azienda currentAzienda = Azienda.getDefaultAzienda(advancedDataSource.getConnection());
|
||||
return currentAzienda.getApplicationNameEnum() == ApplicationName.WINGEST;
|
||||
}
|
||||
|
||||
protected boolean isTextiles() throws SQLException, IOException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
|
||||
Azienda currentAzienda = Azienda.getDefaultAzienda(advancedDataSource.getConnection());
|
||||
return currentAzienda.getApplicationNameEnum() == ApplicationName.TEXTILES;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
package it.integry.ems.migration._base;
|
||||
|
||||
public enum IntegryCustomer {
|
||||
|
||||
Agricoper(IntegryCustomerDB.Agricoper_Agricoper,
|
||||
IntegryCustomerDB.Agricoper_IlVisone,
|
||||
IntegryCustomerDB.Agricoper_Luva),
|
||||
Auricchio(IntegryCustomerDB.Auricchio_Auricchio,
|
||||
IntegryCustomerDB.Auricchio_AuricchioMiki,
|
||||
IntegryCustomerDB.Auricchio_AuricchioSrl,
|
||||
IntegryCustomerDB.Auricchio_Ind01,
|
||||
IntegryCustomerDB.Auricchio_Ind02,
|
||||
IntegryCustomerDB.Auricchio_Ind04,
|
||||
IntegryCustomerDB.Auricchio_Ind05,
|
||||
IntegryCustomerDB.Auricchio_AuricchioSons),
|
||||
Biolevante(IntegryCustomerDB.Biolevante_Biolevante),
|
||||
Carelli(IntegryCustomerDB.Carelli_Carelli,
|
||||
IntegryCustomerDB.Carelli_GestFood,
|
||||
IntegryCustomerDB.Carelli_Chiuso,
|
||||
IntegryCustomerDB.Carelli_Format,
|
||||
IntegryCustomerDB.Carelli_Murgia,
|
||||
IntegryCustomerDB.Carelli_Panimal,
|
||||
IntegryCustomerDB.Carelli_Winact,
|
||||
IntegryCustomerDB.Carelli_Csgr),
|
||||
Cosmapack(IntegryCustomerDB.Cosmapack_Cosmint,
|
||||
IntegryCustomerDB.Cosmapack_MrSolution),
|
||||
Didonna(
|
||||
IntegryCustomerDB.Didonna_Didonna,
|
||||
IntegryCustomerDB.Didonna_AADidonna,
|
||||
IntegryCustomerDB.Didonna_Badessa,
|
||||
IntegryCustomerDB.Didonna_DidonnaBio,
|
||||
IntegryCustomerDB.Didonna_FlliDidonna,
|
||||
IntegryCustomerDB.Didonna_Messapi,
|
||||
IntegryCustomerDB.Didonna_Nicola,
|
||||
IntegryCustomerDB.Didonna_OpDidonna,
|
||||
IntegryCustomerDB.Didonna_Piervito,
|
||||
IntegryCustomerDB.Didonna_Pietro,
|
||||
IntegryCustomerDB.Didonna_SanGiuliano,
|
||||
IntegryCustomerDB.Didonna_Treddi,
|
||||
IntegryCustomerDB.Didonna_SanGiuseppe,
|
||||
IntegryCustomerDB.Didonna_Mediimpex,
|
||||
IntegryCustomerDB.Didonna_Raffaella,
|
||||
IntegryCustomerDB.Didonna_Diba,
|
||||
IntegryCustomerDB.Didonna_MediimpexLiq,
|
||||
IntegryCustomerDB.Didonna_DibaLiq),
|
||||
DolceBonta(IntegryCustomerDB.DolceBonta_DolceBo,
|
||||
IntegryCustomerDB.DolceBonta_Emanuela),
|
||||
Dulciar(IntegryCustomerDB.Dulciar_Dulciar,
|
||||
IntegryCustomerDB.Dulciar_Lanciok),
|
||||
Fiume(IntegryCustomerDB.Fiume_Alambicco,
|
||||
IntegryCustomerDB.Fiume_Licor,
|
||||
IntegryCustomerDB.Fiume_LicorFood),
|
||||
Florapulia(IntegryCustomerDB.Florapulia_Immobiliare,
|
||||
IntegryCustomerDB.Florapulia_ImmobiliareSrl,
|
||||
IntegryCustomerDB.Florapulia_Florapulia,
|
||||
IntegryCustomerDB.Florapulia_FlorapuliaSrl,
|
||||
IntegryCustomerDB.Florapulia_PaparellaP,
|
||||
IntegryCustomerDB.Florapulia_PaparellaPietro,
|
||||
IntegryCustomerDB.Florapulia_PaparellaD),
|
||||
FolliesGroup(IntegryCustomerDB.FolliesGroup_FolliesGroup),
|
||||
Frudis(IntegryCustomerDB.Frudis_Frudis),
|
||||
Gramm(IntegryCustomerDB.Gramm_Gramm,
|
||||
IntegryCustomerDB.Gramm_PrimeOlive,
|
||||
IntegryCustomerDB.Gramm_ProveStage),
|
||||
Idrotecnica(IntegryCustomerDB.Idrotecnica_Idrotecnica),
|
||||
Igood(IntegryCustomerDB.Igood_Igood,
|
||||
IntegryCustomerDB.Igood_ShopService),
|
||||
Ime(IntegryCustomerDB.Ime_ImeTe),
|
||||
Ivr(IntegryCustomerDB.Ivr_Vetta, IntegryCustomerDB.Ivr_Varci),
|
||||
Lamonarca(IntegryCustomerDB.Lamonarca_Lamonarca),
|
||||
Levanplast(IntegryCustomerDB.Levanplast_Levanplast,
|
||||
IntegryCustomerDB.Levanplast_Perilflor,
|
||||
IntegryCustomerDB.Levanplast_PerilflorSrl),
|
||||
Maggio(IntegryCustomerDB.Maggio_MaggioSrl,
|
||||
IntegryCustomerDB.Maggio_GiovMaggio),
|
||||
Materica(IntegryCustomerDB.Materica_ImeBa),
|
||||
MFI(IntegryCustomerDB.MFI_FashionGroup),
|
||||
Midel(IntegryCustomerDB.Midel_Midel),
|
||||
Morgante(IntegryCustomerDB.Morgante_Morgante),
|
||||
ResinaColor(IntegryCustomerDB.ResinaColor_ResinaColor),
|
||||
RistoCash(IntegryCustomerDB.RistoCash_RistoCash),
|
||||
RossoGargano(IntegryCustomerDB.RossoGargano_RossoGargano),
|
||||
Salpar(IntegryCustomerDB.Salpar_AlfaImmobiliare,
|
||||
IntegryCustomerDB.Salpar_MasabaSrl,
|
||||
IntegryCustomerDB.Salpar_Salpar,
|
||||
IntegryCustomerDB.Salpar_VgAlimenti),
|
||||
Santoro(IntegryCustomerDB.Santoro_ApuliaEngineering),
|
||||
SaporiVeri(IntegryCustomerDB.SaporiVeri_SaporiVeri,
|
||||
IntegryCustomerDB.SaporiVeri_Dispensa),
|
||||
Sardinya(IntegryCustomerDB.Sardinya_Daga,
|
||||
IntegryCustomerDB.Sardinya_Demetra,
|
||||
IntegryCustomerDB.Sardinya_Sarca,
|
||||
IntegryCustomerDB.Sardinya_Sardinya),
|
||||
Smetar(IntegryCustomerDB.Smetar_Smetar),
|
||||
Suit(IntegryCustomerDB.Suit_BioSuit,
|
||||
IntegryCustomerDB.Suit_CarniSardegna,
|
||||
IntegryCustomerDB.Suit_Granlucano,
|
||||
IntegryCustomerDB.Suit_Puglia,
|
||||
IntegryCustomerDB.Suit_SantAntonio,
|
||||
IntegryCustomerDB.Suit_Suit,
|
||||
IntegryCustomerDB.Suit_TenutaArianna,
|
||||
IntegryCustomerDB.Suit_Valpietro),
|
||||
Tempesta(IntegryCustomerDB.Tempesta_Tempesta,
|
||||
IntegryCustomerDB.Tempesta_VivaiTempesta),
|
||||
Tosca(IntegryCustomerDB.Tosca_Ba,
|
||||
IntegryCustomerDB.Tosca_Ce,
|
||||
IntegryCustomerDB.Tosca_Cz,
|
||||
IntegryCustomerDB.Tosca_Fc,
|
||||
IntegryCustomerDB.Tosca_Mi,
|
||||
IntegryCustomerDB.Tosca_Rg,
|
||||
IntegryCustomerDB.Tosca_Rm,
|
||||
IntegryCustomerDB.Tosca_Vr,
|
||||
IntegryCustomerDB.Tosca_Cloud),
|
||||
TwoBrothers(IntegryCustomerDB.TwoBrothers_TwoBrothers),
|
||||
Vinella(IntegryCustomerDB.Vinella_Vinella,
|
||||
IntegryCustomerDB.Vinella_VQuadro,
|
||||
IntegryCustomerDB.Vinella_TeknoSport);
|
||||
|
||||
|
||||
private final IntegryCustomerDB[] values;
|
||||
|
||||
IntegryCustomer(IntegryCustomerDB... values) {
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
|
||||
public IntegryCustomerDB[] getValues() {
|
||||
return values;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package it.integry.ems.migration._base;
|
||||
|
||||
public enum IntegryCustomerDB {
|
||||
Agricoper_Agricoper("agricoper"),
|
||||
Agricoper_IlVisone("ilvisone"),
|
||||
Agricoper_Luva("ilvisone"),
|
||||
|
||||
|
||||
Auricchio_Auricchio("auricchio"),
|
||||
Auricchio_AuricchioMiki("auricchio_miki"),
|
||||
Auricchio_AuricchioSrl("auricchiosrl"),
|
||||
Auricchio_Ind01("ind01"),
|
||||
Auricchio_Ind02("ind02"),
|
||||
Auricchio_Ind04("ind04"),
|
||||
Auricchio_Ind05("ind05"),
|
||||
Auricchio_AuricchioSons("auricchiosons"),
|
||||
|
||||
|
||||
Biolevante_Biolevante("biolevante"),
|
||||
|
||||
|
||||
Carelli_Carelli("carelli"),
|
||||
Carelli_GestFood("gestfood"),
|
||||
Carelli_Chiuso("chiuso"),
|
||||
Carelli_Format("format"),
|
||||
Carelli_Murgia("murgia"),
|
||||
Carelli_Panimal("panimal"),
|
||||
Carelli_Winact("winact"),
|
||||
Carelli_Csgr("csgr"),
|
||||
|
||||
|
||||
|
||||
Cosmapack_Cosmint("cosmint"),
|
||||
Cosmapack_MrSolution("mrsolution"),
|
||||
|
||||
Didonna_Didonna("didonna"),
|
||||
Didonna_AADidonna("aadidonna"),
|
||||
Didonna_Badessa("badessa"),
|
||||
Didonna_DidonnaBio("didonnabio"),
|
||||
Didonna_FlliDidonna("fllididonna"),
|
||||
Didonna_Messapi("messapi"),
|
||||
Didonna_Nicola("nicola"),
|
||||
Didonna_OpDidonna("opdidonna"),
|
||||
Didonna_Piervito("piervito"),
|
||||
Didonna_Pietro("pietro"),
|
||||
Didonna_SanGiuliano("sangiuliano"),
|
||||
Didonna_Treddi("treddi"),
|
||||
Didonna_SanGiuseppe("sangiuseppe"),
|
||||
Didonna_Mediimpex("mediimpex"),
|
||||
Didonna_Raffaella("raffaella"),
|
||||
Didonna_Diba("diba"),
|
||||
Didonna_MediimpexLiq("mediimpexliq"),
|
||||
Didonna_DibaLiq("dibaliq"),
|
||||
|
||||
|
||||
DolceBonta_DolceBo("dolce_bo"),
|
||||
DolceBonta_Emanuela("emanuela"),
|
||||
|
||||
|
||||
Dulciar_Dulciar("dulciar"),
|
||||
Dulciar_Lanciok("lanciok"),
|
||||
|
||||
|
||||
Fiume_Alambicco("alambicco"),
|
||||
Fiume_Licor("licor"),
|
||||
Fiume_LicorFood("licorFood"),
|
||||
|
||||
|
||||
Florapulia_Immobiliare("immobiliare"),
|
||||
Florapulia_Florapulia("florapulia"),
|
||||
Florapulia_FlorapuliaSrl("florapuliasrl"),
|
||||
Florapulia_PaparellaP("paparellap"),
|
||||
Florapulia_PaparellaPietro("paparellapietro"),
|
||||
Florapulia_ImmobiliareSrl("immobiliaresrl"),
|
||||
Florapulia_PaparellaD("paparellad"),
|
||||
|
||||
|
||||
FolliesGroup_FolliesGroup("folliesgroup"),
|
||||
|
||||
|
||||
Frudis_Frudis("frudis"),
|
||||
|
||||
|
||||
Gramm_Gramm("gramm"),
|
||||
Gramm_PrimeOlive("primeolive"),
|
||||
Gramm_ProveStage("grammprovestage"),
|
||||
|
||||
|
||||
Idrotecnica_Idrotecnica("idrotecnica"),
|
||||
|
||||
|
||||
Igood_Igood("igood"),
|
||||
Igood_ShopService("shop_service"),
|
||||
|
||||
|
||||
Ime_ImeTe("ime_te"),
|
||||
|
||||
|
||||
Ivr_Vetta("vetta"),
|
||||
Ivr_Varci("varci"),
|
||||
|
||||
|
||||
Lamonarca_Lamonarca("lamonarca"),
|
||||
|
||||
|
||||
Levanplast_Perilflor("perilflor"),
|
||||
Levanplast_PerilflorSrl("perilflorsrl"),
|
||||
Levanplast_Levanplast("levanplast"),
|
||||
|
||||
Maggio_MaggioSrl("maggiosrl"),
|
||||
Maggio_GiovMaggio("giovmaggio"),
|
||||
|
||||
|
||||
|
||||
Materica_ImeBa("ime_ba"),
|
||||
|
||||
|
||||
MFI_FashionGroup("fashiongroup"),
|
||||
|
||||
|
||||
Midel_Midel("midel"),
|
||||
|
||||
|
||||
Morgante_Morgante("morgante"),
|
||||
|
||||
|
||||
ResinaColor_ResinaColor("resinacolor"),
|
||||
|
||||
|
||||
RistoCash_RistoCash("risto_cash"),
|
||||
|
||||
|
||||
RossoGargano_RossoGargano("rossogargano"),
|
||||
|
||||
|
||||
Salpar_VgAlimenti("vgalimenti"),
|
||||
Salpar_Salpar("salpar"),
|
||||
Salpar_MasabaSrl("masabasrl"),
|
||||
Salpar_AlfaImmobiliare("alfaimmobiliare"),
|
||||
|
||||
|
||||
Santoro_ApuliaEngineering("apuliaengineering"),
|
||||
|
||||
|
||||
SaporiVeri_SaporiVeri("sapori_veri"),
|
||||
SaporiVeri_Dispensa("dispensa"),
|
||||
|
||||
|
||||
Sardinya_Sardinya("sardinya"),
|
||||
Sardinya_Demetra("demetra"),
|
||||
Sardinya_Daga("daga"),
|
||||
Sardinya_Sarca("sarca"),
|
||||
|
||||
|
||||
Smetar_Smetar("smetar"),
|
||||
|
||||
|
||||
Suit_Suit("suit"),
|
||||
Suit_SantAntonio("santantonio"),
|
||||
Suit_BioSuit("biosuit"),
|
||||
Suit_Granlucano("granlucano"),
|
||||
Suit_Puglia("suit_puglia"),
|
||||
Suit_TenutaArianna("tenuta_arianna"),
|
||||
Suit_CarniSardegna("carni_sardegna"),
|
||||
Suit_Valpietro("valpietro"),
|
||||
|
||||
|
||||
Tempesta_Tempesta("tempesta"),
|
||||
Tempesta_VivaiTempesta("vivaitempesta"),
|
||||
|
||||
|
||||
Tosca_Ba("tosca_ba"),
|
||||
Tosca_Cz("tosca_cz"),
|
||||
Tosca_Rm("tosca_rm"),
|
||||
Tosca_Mi("tosca_mi"),
|
||||
Tosca_Ce("tosca_ce"),
|
||||
Tosca_Vr("tosca_vr"),
|
||||
Tosca_Rg("tosca_rg"),
|
||||
Tosca_Fc("tosca_fc"),
|
||||
Tosca_Cloud("tosca_cloud"),
|
||||
|
||||
|
||||
TwoBrothers_TwoBrothers("twobrothers"),
|
||||
|
||||
|
||||
Vinella_Vinella("vinella"),
|
||||
Vinella_VQuadro("vquadro"),
|
||||
Vinella_TeknoSport("teknosport");
|
||||
|
||||
|
||||
private final String value;
|
||||
|
||||
IntegryCustomerDB(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@ public class MigrationStatusDTO {
|
||||
private MigrationStatusEnum status;
|
||||
private String errorMessage;
|
||||
|
||||
public String getId() {
|
||||
return this.profileDb + "-" + this.migrationCode;
|
||||
}
|
||||
|
||||
public long getMigrationCode() {
|
||||
return migrationCode;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package it.integry.ems.migration.dto;
|
||||
|
||||
public enum SqlObjectTypeEnum {
|
||||
VIEW,
|
||||
FUNCTION,
|
||||
PROCEDURE,
|
||||
TRIGGER
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public class Migration_20221128123233 extends BaseMigration implements Migration
|
||||
secretKeyToUse = Encoders.BASE64.encode(key.getEncoded());
|
||||
}
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"ALTER TABLE azienda\n" +
|
||||
" ADD jwt_secret_key VARCHAR(MAX)");
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Migration_20221128132717 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"CREATE TABLE dbo.stb_devices\n" +
|
||||
"(\n" +
|
||||
" id BIGINT IDENTITY\n" +
|
||||
|
||||
@@ -11,7 +11,7 @@ public class Migration_20230406164731 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"UPDATE mtb_partita_mag_carat" +
|
||||
" SET carat = 'qta-residua'" +
|
||||
" WHERE carat = 'qta_residua'",
|
||||
|
||||
@@ -20,8 +20,8 @@ public class Migration_20230411163906 extends BaseMigration implements Migration
|
||||
|
||||
MimeTypesHandler mimeTypesHandler = getContextBean(MimeTypesHandler.class);
|
||||
|
||||
if (!existsColumn(advancedDataSource.getConnection(), "stb_files_attached", "mime_type"))
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
if (!existsColumn("stb_files_attached", "mime_type"))
|
||||
executeStatement(
|
||||
"ALTER TABLE stb_files_attached\n" +
|
||||
" ADD mime_type VARCHAR(MAX)");
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Migration_20230414183851 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"ALTER TABLE stb_files_attached\n" +
|
||||
" ADD ref_uuid1 VARCHAR(36)");
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Migration_20230419161529 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"ALTER TABLE stb_devices\n" +
|
||||
" ADD created_at DATETIME",
|
||||
"ALTER TABLE stb_devices\n" +
|
||||
|
||||
@@ -18,7 +18,7 @@ public class Migration_20231201094005 extends BaseMigration implements Migration
|
||||
boolean existColumn = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
|
||||
|
||||
if (!existColumn )
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
"ALTER TABLE mtb_colt\n" +
|
||||
" ADD id_lotto INT");
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Migration_20231201161808 extends BaseMigration implements Migration
|
||||
|
||||
for (String query : queries) {
|
||||
System.out.println(query);
|
||||
executeStatement(advancedDataSource.getConnection(), query);
|
||||
executeStatement(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Migration_20240125114347 extends BaseMigration implements Migration
|
||||
|
||||
for (String query : queries) {
|
||||
System.out.println(query);
|
||||
executeStatement(advancedDataSource.getConnection(), query);
|
||||
executeStatement(query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Migration_20240201160125 extends BaseMigration implements Migration
|
||||
" skipped BIT DEFAULT 0 NOT NULL\n" +
|
||||
")";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), createTable);
|
||||
executeStatement(createTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Migration_20240205105025 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
updateFunction(advancedDataSource.getConnection(), "ALTER FUNCTION [dbo].[f_getEAN128UL](@gestione VARCHAR(1), @dataCollo DATETIME, @serCollo VARCHAR(2), @numCollo int, @customPrefissoEan VARCHAR(7))\n" +
|
||||
createOrUpdateFunction("f_getEAN128UL", "CREATE FUNCTION [dbo].[f_getEAN128UL](@gestione VARCHAR(1), @dataCollo DATETIME, @serCollo VARCHAR(2), @numCollo int, @customPrefissoEan VARCHAR(7))\n" +
|
||||
" RETURNS TABLE AS\n" +
|
||||
" RETURN\n" +
|
||||
"\n" +
|
||||
|
||||
@@ -7,6 +7,7 @@ import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
@@ -25,7 +26,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
|
||||
sql = "SELECT * FROM stb_publications_detail";
|
||||
final List<HashMap<String, Object>> oldStbPublicationsDetails = UtilityDB.executeSimpleQuery(advancedDataSource.getConnection(), sql);
|
||||
|
||||
dropOldTables(advancedDataSource.getConnection());
|
||||
dropOldTables();
|
||||
createNewTables(advancedDataSource.getConnection());
|
||||
|
||||
|
||||
@@ -33,7 +34,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
|
||||
String publicationDescription = UtilityHashMap.getValueIfExists(oldStbPublication, "publication_description");
|
||||
|
||||
String insertSql = Query.format("INSERT INTO stb_publications (publication_description) VALUES (%s)", publicationDescription);
|
||||
long generatedId = executeInsertStatement(advancedDataSource.getConnection(), insertSql);
|
||||
long generatedId = executeInsertStatement(insertSql);
|
||||
oldStbPublication.putIfAbsent("id", generatedId);
|
||||
}
|
||||
|
||||
@@ -58,7 +59,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
|
||||
active.equalsIgnoreCase("S") || active.equalsIgnoreCase("R"),
|
||||
whereCond,
|
||||
true);
|
||||
long generatedId = executeInsertStatement(advancedDataSource.getConnection(), insertSql);
|
||||
long generatedId = executeInsertStatement(insertSql);
|
||||
oldStbPublicationDetail.putIfAbsent("id", generatedId);
|
||||
}
|
||||
}
|
||||
@@ -69,9 +70,9 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
|
||||
}
|
||||
|
||||
|
||||
private void dropOldTables(@NotNull Connection connection) throws SQLException {
|
||||
dropTable(connection, "stb_publications_detail");
|
||||
dropTable(connection, "stb_publications");
|
||||
private void dropOldTables() throws SQLException, IOException {
|
||||
dropTable("stb_publications_detail");
|
||||
dropTable("stb_publications");
|
||||
}
|
||||
|
||||
private void createNewTables(@NotNull Connection connection) throws SQLException {
|
||||
|
||||
@@ -10,11 +10,11 @@ public class Migration_20240212000001 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if(!existsTable(advancedDataSource.getConnection(), "stb_transaction_log_db"))
|
||||
if(!existsTable("stb_transaction_log_db"))
|
||||
return;
|
||||
|
||||
dropTable(advancedDataSource.getConnection(), "stb_transaction_log_db");
|
||||
dropTable(advancedDataSource.getConnection(), "stb_transaction_log");
|
||||
dropTable("stb_transaction_log_db");
|
||||
dropTable("stb_transaction_log");
|
||||
|
||||
String createTransactionTableSql = "\n" +
|
||||
"CREATE TABLE dbo.stb_transaction_log\n" +
|
||||
@@ -30,7 +30,7 @@ public class Migration_20240212000001 extends BaseMigration implements Migration
|
||||
" group_id BIGINT NOT NULL\n" +
|
||||
")";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), createTransactionTableSql);
|
||||
executeStatement(createTransactionTableSql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ public class Migration_20240212000002 extends BaseMigration implements Migration
|
||||
String sql = "ALTER TABLE dbo.stb_publications_detail\n" +
|
||||
" ADD export_history BIT DEFAULT 0 NOT NULL";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), sql);
|
||||
executeStatement(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ public class Migration_20240219094933 extends BaseMigration implements Migration
|
||||
String sql = "ALTER TABLE mtb_colt\n" +
|
||||
" ADD barcode_ul VARCHAR(20)";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), sql);
|
||||
executeStatement(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,8 +10,7 @@ public class Migration_20240219103840 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup(advancedDataSource.getConnection(),
|
||||
"PICKING", "ACCETTAZIONE", "FLAG_ALLOW_BARCODE_FORNITORE", "N",
|
||||
createSetup("PICKING", "ACCETTAZIONE", "FLAG_ALLOW_BARCODE_FORNITORE", "N",
|
||||
"Abilita la possibilità di effettuare l'accettazione merci utilizzando direttamente l'SSCC del fornitore (salvato poi nella colonna barcode_pedana)",
|
||||
"SI_NO");
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class Migration_20240220114903 extends BaseMigration implements Migration
|
||||
"ALTER TABLE mtb_colr\n" +
|
||||
" ADD DEFAULT 0 FOR causale;";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), sql);
|
||||
executeStatement(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,13 +10,11 @@ public class Migration_20240221190821 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup(advancedDataSource.getConnection(),
|
||||
"DATI_AZIENDA", "SETUP", "FLAG_ANSI_PADDING", "N",
|
||||
createSetup("DATI_AZIENDA", "SETUP", "FLAG_ANSI_PADDING", "N",
|
||||
"Abilita l'ansi padding nella connessione del gestionale. Il valore suggerito è ON (prima era OFF).",
|
||||
"SI_NO");
|
||||
|
||||
createSetup(advancedDataSource.getConnection(),
|
||||
"DATI_AZIENDA", "SETUP", "FLAG_CONCAT_NULL_YIELDS_NULL", "N",
|
||||
createSetup("DATI_AZIENDA", "SETUP", "FLAG_CONCAT_NULL_YIELDS_NULL", "N",
|
||||
"Abilita il concat null yields null nella connessione del gestionale. Il valore suggerito è ON (prima era OFF).",
|
||||
"SI_NO");
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ public class Migration_20240228160024 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
dropTable(advancedDataSource.getConnection(), "stb_subscriptions_user_detail");
|
||||
dropTable(advancedDataSource.getConnection(), "stb_subscriptions_user");
|
||||
dropTable("stb_subscriptions_user_detail");
|
||||
dropTable("stb_subscriptions_user");
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(),
|
||||
executeStatement(
|
||||
|
||||
"CREATE TABLE dbo.stb_remote_subscription\n" +
|
||||
"(\n" +
|
||||
|
||||
@@ -2,7 +2,6 @@ package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
|
||||
public class Migration_20240304165725 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@@ -19,7 +18,7 @@ public class Migration_20240304165725 extends BaseMigration implements Migration
|
||||
"SET tipo_car = 'R'\n" +
|
||||
"WHERE tipo_car = 'C'";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), sql);
|
||||
executeStatement(sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Migration_20240307123633 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
@@ -13,16 +11,13 @@ public class Migration_20240307123633 extends BaseMigration implements Migration
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
List<String> elencoDb = new ArrayList<String>() {{
|
||||
add("CARELLI");
|
||||
add("GESTFOOD");
|
||||
add("PANIMAL");
|
||||
}};
|
||||
|
||||
if (elencoDb.stream().noneMatch(x -> x.equalsIgnoreCase(advancedDataSource.getDataSource().getDbName())))
|
||||
if (!isCustomerDb(
|
||||
IntegryCustomerDB.Carelli_Carelli,
|
||||
IntegryCustomerDB.Carelli_GestFood,
|
||||
IntegryCustomerDB.Carelli_Panimal))
|
||||
return;
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), "UPDATE vtb_promo SET flag_tipo_promo = 'T' WHERE cod_promo like '%TAGLIO%'");
|
||||
executeStatement("UPDATE vtb_promo SET flag_tipo_promo = 'T' WHERE cod_promo like '%TAGLIO%'");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240311102717 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createSetup("PICKING", "ACCETTAZIONE_BOLLA", "FLAG_USE_QTA_ORD", "S",
|
||||
"Questo flag permette, durante il picking, di proporre automaticamente la qta ordinata al posto del valore di default di 1 confezione",
|
||||
"SI_NO");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
import it.integry.ems_model.utility.Query;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
|
||||
import java.sql.Statement;
|
||||
|
||||
public class Migration_20240312093539 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String tableName = "wtb_jrept_setup";
|
||||
boolean existTable = existsTable(tableName);
|
||||
|
||||
if (existTable) {
|
||||
boolean existRow = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), "SELECT cast(count(*) as bit) FROM " + tableName);
|
||||
if (existRow) return;
|
||||
dropTable(tableName);
|
||||
}
|
||||
|
||||
String createSql = "create table wtb_jrept_setup\n" +
|
||||
"(\n" +
|
||||
" id bigint identity\n" +
|
||||
" constraint wtb_jrept_setup_pk\n" +
|
||||
" primary key,\n" +
|
||||
" report_id bigint not null\n" +
|
||||
" constraint wtb_jrept_setup_wtb_jrept_id_fk\n" +
|
||||
" references wtb_jrept,\n" +
|
||||
" cod_mdep varchar(5)\n" +
|
||||
" constraint wtb_jrept_setup_mtb_depo_cod_mdep_fk\n" +
|
||||
" references mtb_depo,\n" +
|
||||
" cod_anag varchar(5)\n" +
|
||||
" constraint wtb_jrept_setup_gtb_anag_cod_anag_fk\n" +
|
||||
" foreign key (cod_anag) references gtb_anag," +
|
||||
" tipo int not null,\n" +
|
||||
" printer_name varchar(255),\n" +
|
||||
" print_quantity int default 1 not null,\n" +
|
||||
" orientation int default 0 not null\n" +
|
||||
")";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), createSql);
|
||||
|
||||
String createIndex = "create unique index wtb_jrept_setup_cod_mdep_tipo_cod_anag_uindex" +
|
||||
" on wtb_jrept_setup (cod_mdep, tipo, cod_anag)";
|
||||
|
||||
executeStatement(advancedDataSource.getConnection(), createIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.IntegryCustomerDB;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240312161313 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
String value = "N";
|
||||
|
||||
if (isCustomerDb(IntegryCustomerDB.Gramm_Gramm)){
|
||||
value = "S";
|
||||
}
|
||||
|
||||
createSetup("PICKING", "SETUP", "FLAG_WARNING_NEW_PARTITA_MAG", value,
|
||||
"Questo flag permette di avvisare l'utente se è stato inserito un nuovo lotto per quell'articolo",
|
||||
"SI_NO");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240312175552 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createOrUpdateView("MES_MachineStatusByOrder", "CREATE VIEW MES_MachineStatusByOrder AS\n" +
|
||||
"WITH base AS (\n" +
|
||||
" SELECT gestione,\n" +
|
||||
" data_ord,\n" +
|
||||
" num_ord,\n" +
|
||||
" id_riga,\n" +
|
||||
" data_mov,\n" +
|
||||
" ISNULL(LEAD(data_mov)\n" +
|
||||
" OVER (PARTITION BY cod_cmac, data_ord, num_ord, gestione ORDER BY id_riga),\n" +
|
||||
" DATEADD(MINUTE, 1, data_mov)) AS data_mov_fine,\n" +
|
||||
" cod_cmac,\n" +
|
||||
" CASE WHEN evento <> 'START' THEN 'STOP' ELSE evento END as evento,\n" +
|
||||
" evento AS causale,\n" +
|
||||
" descrizione,\n" +
|
||||
" qta_mov,\n" +
|
||||
" num_fase,\n" +
|
||||
" activity_id\n" +
|
||||
" FROM dtb_ord_macc\n" +
|
||||
"),\n" +
|
||||
"\n" +
|
||||
" statuses AS (\n" +
|
||||
" SELECT cod_cmac,\n" +
|
||||
" id_riga,\n" +
|
||||
" LAG(evento)\n" +
|
||||
" OVER (PARTITION BY cod_cmac, data_ord, num_ord, gestione ORDER BY id_riga) AS prev_evento,\n" +
|
||||
" evento,\n" +
|
||||
" num_ord,\n" +
|
||||
" data_ord,\n" +
|
||||
" gestione,\n" +
|
||||
" data_mov,\n" +
|
||||
" data_mov_fine,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN MAX(id_riga) OVER ( PARTITION BY cod_cmac, data_ord, num_ord, gestione ) = id_riga\n" +
|
||||
" THEN evento END AS last_evento\n" +
|
||||
" FROM base\n" +
|
||||
" WHERE DATEDIFF(MINUTE, data_mov, data_mov_fine) > 0\n" +
|
||||
" ),\n" +
|
||||
" steps AS (\n" +
|
||||
" SELECT data_ord,\n" +
|
||||
" num_ord,\n" +
|
||||
" gestione,\n" +
|
||||
" MIN(data_iniz) AS data_iniz,\n" +
|
||||
" MAX(ISNULL(data_fine, GETDATE())) AS data_fine,\n" +
|
||||
" cod_jfas\n" +
|
||||
" FROM dtb_ord_steps\n" +
|
||||
" WHERE data_iniz IS NOT NULL\n" +
|
||||
" GROUP BY data_ord, num_ord, gestione, cod_jfas\n" +
|
||||
" ),\n" +
|
||||
" advanced_statuses AS (\n" +
|
||||
" SELECT statuses.cod_cmac,\n" +
|
||||
" statuses.id_riga,\n" +
|
||||
" statuses.prev_evento,\n" +
|
||||
" statuses.evento,\n" +
|
||||
" MAX(last_evento)\n" +
|
||||
" OVER ( PARTITION BY statuses.cod_cmac, statuses.data_ord, statuses.num_ord, statuses.gestione) AS last_evento,\n" +
|
||||
" CASE\n" +
|
||||
" WHEN statuses.evento = 'START' AND ISNULL(statuses.prev_evento, '') <> 'START' THEN 1\n" +
|
||||
" ELSE\n" +
|
||||
" CASE\n" +
|
||||
" WHEN statuses.evento <> 'START' AND ISNULL(statuses.prev_evento, '') = 'START' THEN -1\n" +
|
||||
" ELSE 0 END\n" +
|
||||
" END AS value,\n" +
|
||||
" DATEADD(MINUTE, DATEDIFF(MINUTE, 0, ISNULL(statuses.data_mov, steps.data_iniz)),\n" +
|
||||
" 0) as data_mov,\n" +
|
||||
" DATEADD(MINUTE, DATEDIFF(MINUTE, 0, ISNULL(statuses.data_mov_fine, steps.data_fine)),\n" +
|
||||
" 0) as data_mov_fine,\n" +
|
||||
" statuses.num_ord,\n" +
|
||||
" statuses.data_ord,\n" +
|
||||
" statuses.gestione,\n" +
|
||||
" steps.cod_jfas\n" +
|
||||
" FROM statuses\n" +
|
||||
" INNER JOIN steps ON statuses.num_ord = steps.num_ord\n" +
|
||||
" AND statuses.data_ord = steps.data_ord\n" +
|
||||
" AND statuses.gestione = steps.gestione\n" +
|
||||
" ),\n" +
|
||||
" grouped_events AS (\n" +
|
||||
" SELECT cod_cmac,\n" +
|
||||
" evento,\n" +
|
||||
" value,\n" +
|
||||
" SUM(ABS(value))\n" +
|
||||
" OVER (PARTITION BY cod_cmac, num_ord, data_ord, gestione ORDER BY cod_cmac, num_ord, data_ord, gestione, data_mov\n" +
|
||||
" ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS event_groups,\n" +
|
||||
" data_mov,\n" +
|
||||
" data_mov_fine,\n" +
|
||||
" DATEDIFF(SECOND, data_mov, data_mov_fine) AS duration_seconds,\n" +
|
||||
" DATEDIFF(MINUTE, data_mov, data_mov_fine) AS duration_minutes,\n" +
|
||||
" num_ord,\n" +
|
||||
" data_ord,\n" +
|
||||
" gestione,\n" +
|
||||
" cod_jfas\n" +
|
||||
" FROM advanced_statuses\n" +
|
||||
" WHERE DATEDIFF(MINUTE, data_mov, data_mov_fine) > 0\n" +
|
||||
" )\n" +
|
||||
"\n" +
|
||||
"SELECT cod_cmac,\n" +
|
||||
" evento,\n" +
|
||||
" value,\n" +
|
||||
" MIN(data_mov) AS data_mov_iniz,\n" +
|
||||
" MAX(data_mov_fine) AS data_mov_fine,\n" +
|
||||
" SUM(duration_minutes) AS duration_minutes,\n" +
|
||||
" num_ord,\n" +
|
||||
" data_ord,\n" +
|
||||
" gestione,\n" +
|
||||
" cod_jfas\n" +
|
||||
"FROM grouped_events\n" +
|
||||
"group by cod_cmac, evento, value, event_groups, num_ord, data_ord, gestione, cod_jfas");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
import java.sql.Statement;
|
||||
|
||||
public class Migration_20240313163623 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
if (!existsColumn("stb_gest_setup", "flag_multi_value")) {
|
||||
executeStatement("ALTER TABLE stb_gest_setup ADD flag_multi_value BIT DEFAULT 0");
|
||||
}
|
||||
|
||||
createSetup("PVM", "PIAN_ACC_ROSSG", "TIPI_FORN_ACQ", null,
|
||||
"Identifica i tipi di fornitore su cui è possibile creare un ordine di acquisto per la materia prima.",
|
||||
"COD_ATIP", true);
|
||||
|
||||
createSetup(
|
||||
"PVM", "PIAN_ACC_ROSSG", "COD_MGRP_MP", null,
|
||||
"Identifica i gruppi merceologici di materia prima per cui è possibile creare un ordine di acquisto",
|
||||
"COD_MGRP", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user