You've already forked reflex-wms-connector
Compare commits
720 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 033ff99037 | |||
| 9165592815 | |||
| ed7726de60 | |||
| ac18299345 | |||
| 148d0daffd | |||
| 4e5070a902 | |||
| 2b25c4853d | |||
| 844ecb1558 | |||
| 837b8f86ed | |||
| 4e7d98144d | |||
| 3a061c2374 | |||
| ce7104ee9f | |||
| 846641ac35 | |||
| 50771c3268 | |||
| 7deb33a7e0 | |||
| d8c87881f5 | |||
| c9070dd01e | |||
| 3915c83146 | |||
| bf3f30190d | |||
| c67ca71693 | |||
| 17263f024f | |||
| e8afce8ef0 | |||
| e03a017118 | |||
| 2bfb866dcc | |||
| 68f99e1435 | |||
| 13fe55ae1a | |||
| 4f0874a7dc | |||
| 62984a07f4 | |||
| 2008f01f6f | |||
| a37d43f50f | |||
| 10fa7309fa | |||
| 8a810c8a14 | |||
| 8e1d0e3a17 | |||
| e12c6e64e4 | |||
| eaaa9bbea5 | |||
| 6c0deafd93 | |||
| 62cdd584d3 | |||
| 97f93a1f26 | |||
| ee7e5bb8c9 | |||
| 4e3162556c | |||
| 20437cace5 | |||
| 93effa78ff | |||
| 085f0ae4f8 | |||
| 3d585203ef | |||
| 57576b1ac0 | |||
| 83260c7ac5 | |||
| 8ebaa8e15a | |||
| f602f74da1 | |||
| 37495ca141 | |||
| 217a2680de | |||
| 6fd708cf58 | |||
| e5482ad09c | |||
| 33ea0af1b9 | |||
| f7394986c2 | |||
| 6ae3af7139 | |||
| c89c74d2e2 | |||
| d02e6feead | |||
| 6ce6ac0b8d | |||
| 647e2d45af | |||
| f26dda887a | |||
| 9dd59d75f3 | |||
| 48be4322cb | |||
| 07a50a71d9 | |||
| af0dd3fc66 | |||
| a8c85b40b4 | |||
| 88550b45ac | |||
| e0f46af99e | |||
| 81c6dec4f2 | |||
| 64fc9f3e15 | |||
| 5dd16bf4b5 | |||
| a43e59f7cb | |||
| eea2a41313 | |||
| 89b7ce149b | |||
| e673f7c134 | |||
| 8898467d7c | |||
| cd9db2ddb0 | |||
| 7844fdd015 | |||
| 2a908a85d7 | |||
| 8d806117fa | |||
| 84d0f73281 | |||
| 70ec04c65a | |||
| 4784cc2bc1 | |||
| ac5219b94a | |||
| 127a662057 | |||
| da53dc05fc | |||
| 4823bc6fed | |||
| b1577d1791 | |||
| 1352a36a21 | |||
| 57113f4c51 | |||
| 1de2a47dae | |||
| 02de559235 | |||
| b1527f9e7e | |||
| 7bb190e4f5 | |||
| c561f9674b | |||
| d2b5eeafdf | |||
| d1c3bb9d16 | |||
| dca0fa7fe4 | |||
| c3364d77a2 | |||
| e24e537650 | |||
| 71bd4918a9 | |||
| 8974632c22 | |||
| cb59aa28b5 | |||
| 868cc19e12 | |||
| c334ee1fdc | |||
| 50ca244177 | |||
| 45aac87589 | |||
| 95f07b1ae0 | |||
| 650990b045 | |||
| 5b316bb395 | |||
| 24d7ad81bd | |||
| 456b304879 | |||
| 1772ed970b | |||
| 8d4eb4ec4c | |||
| 04a72fcda4 | |||
| 264257fcd0 | |||
| 944f3a2da5 | |||
| 1c07a8dd77 | |||
| 0f4191012d | |||
| 27ea4f3795 | |||
| 5492139935 | |||
| c1ea6e46af | |||
| efeb0c0185 | |||
| 91467086c4 | |||
| b68855504a | |||
| 2d022ccf47 | |||
| 9b5eec0f7f | |||
| e12235319e | |||
| 289b8c3fc1 | |||
| 4e436a918d | |||
| b21e75c8e2 | |||
| caefae873c | |||
| f5c5afac1b | |||
| c324773fad | |||
| 5552265833 | |||
| 1864bef8bb | |||
| 8fe3dd364c | |||
| 4b5e20e6a9 | |||
| 5fa439f297 | |||
| 39914dbdde | |||
| fde8ffe813 | |||
| 833821a8a3 | |||
| c556124565 | |||
| 83d1fbfcaa | |||
| 509d47a979 | |||
| 8128e55ede | |||
| 0ef7219e29 | |||
| 9a130211ba | |||
| 6def04b358 | |||
| cd63035277 | |||
| 2f04415f2e | |||
| 8821916dc6 | |||
| 474061200b | |||
| 2098be0ce7 | |||
| e8bcece299 | |||
| cff6c1fd3f | |||
| 46260b8241 | |||
| 3e3091f194 | |||
| efddfdc821 | |||
| e03da2db8d | |||
| f5c8640d11 | |||
| adf81809db | |||
| cdcae921fd | |||
| 109b8eb119 | |||
| a6fec0c333 | |||
| 45258af56e | |||
| 11c4386aaa | |||
| 4d4578a88c | |||
| c0ebc698c8 | |||
| 81c67a8426 | |||
| 8a6260f54d | |||
| aba0cf5629 | |||
| 6bdd925601 | |||
| 9e8e20f6ce | |||
| 5006beed8c | |||
| e2eb764e2e | |||
| 6b86a61015 | |||
| b1c46cd0f1 | |||
| e7c3154c56 | |||
| 706c73a530 | |||
| 955928a754 | |||
| ec76673e95 | |||
| e6cd04b6bf | |||
| 2e3cd66843 | |||
| 2987a4fb38 | |||
| d4a389737e | |||
| 3a14a46b18 | |||
| 808b2072ce | |||
| 9c22f7786f | |||
| dcbd037b22 | |||
| 44a4f5f0cc | |||
| 03b2104500 | |||
| e1b1b8ad2d | |||
| f66912121e | |||
| b361f1fcf7 | |||
| 51b5fd7d17 | |||
| e1d6e3ca3f | |||
| 861cd70eb9 | |||
| b14e6c21ff | |||
| c352775cd4 | |||
| f1b0d1a5d4 | |||
| fad0c31ae8 | |||
| f81591371f | |||
| 7d0d4d5538 | |||
| 481bbcb1af | |||
| 6e4cc5549a | |||
| ce415efc4e | |||
| a6262045f4 | |||
| 3a7cfb555f | |||
| 249f9e3fbe | |||
| 3bd0cd26fd | |||
| 369a8b7e10 | |||
| a3fc98c8d9 | |||
| 613cfcd377 | |||
| c0bec9085b | |||
| 72143d38bd | |||
| 4faf7a3753 | |||
| 6ae403817f | |||
| a661bcc5e6 | |||
| 82c4aea28e | |||
| 420d1cd0ef | |||
| b173ee9ef0 | |||
| 9b7ba855d5 | |||
| dbe31fbb78 | |||
| 3d957d8572 | |||
| edd5562ed5 | |||
| 0917a0b435 | |||
| d94ba65307 | |||
| 0c3d1e2136 | |||
| f0145706a6 | |||
| 190d484c9b | |||
| e69022df0a | |||
| 2603c4ee27 | |||
| eea8276d78 | |||
| 437a39f115 | |||
| b2afedf9f8 | |||
| a3283f5531 | |||
| 608bbb4aee | |||
| 793abba25f | |||
| 0ac201dbc5 | |||
| 1006b619d8 | |||
| 9d3c536993 | |||
| 95ba5b5990 | |||
| 29aa9fa187 | |||
| 68e695c084 | |||
| 91d134d02d | |||
| f46aa46ae4 | |||
| e73fb15ffe | |||
| 3504515b03 | |||
| 55c3d24f79 | |||
| d6331bd8ca | |||
| 32c47dcf22 | |||
| 574cc16f10 | |||
| 0db8396224 | |||
| f242bf0d95 | |||
| 80e25c18d1 | |||
| f7d10368f2 | |||
| 59d170c599 | |||
| 17ae3b23bf | |||
| 7f3d3abb08 | |||
| 29e35d8ed1 | |||
| dbb4a21e66 | |||
| 34133aabec | |||
| cd7f2ecb22 | |||
| 67fb97753d | |||
| c654ef5cf9 | |||
| 8caed06a9e | |||
| c15b087c68 | |||
| 84bb2ca294 | |||
| ecb0ede86e | |||
| 540a6c9da6 | |||
| 21516ad815 | |||
| a4b2fb2eef | |||
| 8f66226519 | |||
| f0f0078e08 | |||
| 85e1dfd7d3 | |||
| 51198beafd | |||
| 503481e410 | |||
| 57db370c4c | |||
| c47da0ae86 | |||
| fbd3e74906 | |||
| de2a95e83c | |||
| ca1989b91a | |||
| 863253b7e0 | |||
| a75167d7f0 | |||
| 108d29b5b3 | |||
| be4dcf11f6 | |||
| ce9e528b70 | |||
| 261549ed60 | |||
| 825ca2bc54 | |||
| 9c5741cc7f | |||
| 0113829f9b | |||
| 08e1ac8c11 | |||
| 18c8a344bf | |||
| 87a120bb55 | |||
| b1d66f66aa | |||
| b0e231a38d | |||
| e8551aa698 | |||
| b24fe76a81 | |||
| 26e143efb0 | |||
| 65b34e6fe4 | |||
| cb5f3aaa4e | |||
| 719f0ed475 | |||
| c78be4ac9b | |||
| 268642a1fa | |||
| bb20aae908 | |||
| 23de1ee9b1 | |||
| 396ad187da | |||
| 832efcc8f6 | |||
| 92eecba160 | |||
| c635353b69 | |||
| 63a668340d | |||
| 7feb4a8242 | |||
| f5b20c2ac3 | |||
| 3e9cc53ced | |||
| 30cd227b41 | |||
| efc642999d | |||
| 0180dfb342 | |||
| 562d8fbba8 | |||
| c382107adc | |||
| f3c607ce94 | |||
| de580e5b2c | |||
| 7be9de856a | |||
| a933def832 | |||
| 133050bf8c | |||
| 14ce3c586f | |||
| 5c52f62b1e | |||
| ad040f82d0 | |||
| fe0f78a42e | |||
| 44187e0c24 | |||
| b259f1762f | |||
| 5c23ec6dec | |||
| ad15120def | |||
| ff28804bd5 | |||
| 8a43500c2b | |||
| 52b8e3d68d | |||
| a4c892b9e7 | |||
| 16f533bed4 | |||
| 07482da77d | |||
| df3df0e933 | |||
| 135862972d | |||
| b2ca7897eb | |||
| d7c78145ea | |||
| d355aa5676 | |||
| 979b90fdb3 | |||
| 64e46cace2 | |||
| c004d7f36c | |||
| 65b4ed7482 | |||
| 2f09297593 | |||
| 22d11ff07e | |||
| d3ffb379b6 | |||
| 39f654c95a | |||
| 97ed60c7fa | |||
| d6724025ee | |||
| 178e73d81b | |||
| 7bf4f67caf | |||
| 9150d2fe1b | |||
| e81c062092 | |||
| efd6a52332 | |||
| 613bd9739b | |||
| e0c159215b | |||
| 899b0fd4c2 | |||
| df49304c05 | |||
| 2f4280a4da | |||
| 806af7a011 | |||
| 1caf5b830f | |||
| 6eea1ad67f | |||
| 243482af3b | |||
| a678df969c | |||
| d4b7b7de82 | |||
| 0b03e04865 | |||
| 9129186a5a | |||
| 2a9162f31b | |||
| b691a8bf21 | |||
| 359b416b97 | |||
| c273754d49 | |||
| 64f3a77fb5 | |||
| 429d9588b2 | |||
| e3bbaa0211 | |||
| 9a458be469 | |||
| 8be4f0e949 | |||
| c0aeb305af | |||
| 39e2272e67 | |||
| 4d9f26f260 | |||
| 7233859ed8 | |||
| 5f9f912347 | |||
| f0d37c04ed | |||
| a5891999f2 | |||
| d7693249ca | |||
| 65ba8e94c9 | |||
| ced9c8adab | |||
| db60006e94 | |||
| 52cbace27a | |||
| 2a129f1b9c | |||
| 45e2779b58 | |||
| 1bff43fe8d | |||
| 08e9b9b9eb | |||
| a176edd4c6 | |||
| 35440a5eb3 | |||
| 2432b37d64 | |||
| 8cbfa04ac1 | |||
| 28c5cabbc3 | |||
| 861766cbe4 | |||
| 1168bfc50f | |||
| 3f1711728a | |||
| 256e747c48 | |||
| d03f3bb7a0 | |||
| 9018609ca1 | |||
| ae47fda38f | |||
| f57276f088 | |||
| 138dd801d2 | |||
| db0e4df78d | |||
| 5df1ebe54b | |||
| 4bfd6e7a4f | |||
| cdab58da71 | |||
| 065d4c026b | |||
| b930c0eb40 | |||
| 6c1a19ad04 | |||
| 7ff859420a | |||
| 789e2e6c19 | |||
| 1dcf91bf71 | |||
| 068ef56d25 | |||
| c9050d837a | |||
| e83186cc3f | |||
| 355e170831 | |||
| 53006d3fa1 | |||
| 4648c02a2c | |||
| 8f8f26d2a2 | |||
| b4f11ef83d | |||
| a2fd6f1145 | |||
| bd7b24fed7 | |||
| 9c38272c6c | |||
| e09c0fecda | |||
| 5477fbd66a | |||
| a151a0b655 | |||
| bf365ba170 | |||
| 894031cc49 | |||
| d895bac137 | |||
| ab9e892640 | |||
| 00f34c1bc2 | |||
| 0406c9b8cc | |||
| ceb33abfca | |||
| 9214df8b96 | |||
| bfbf654ee2 | |||
| 0adef4a1f3 | |||
| 9521679a8d | |||
| 3dfb366ac7 | |||
| 5b6d3749bc | |||
| cc7da39c20 | |||
| e9c7594555 | |||
| 18473a26a1 | |||
| a46b06fa3d | |||
| ebd45f67bc | |||
| d116ab3856 | |||
| d4bca7fabc | |||
| c93657a95f | |||
| 01b70e6bb2 | |||
| 498e9ab448 | |||
| 9d7b3ec2f1 | |||
| 4f7255d9e8 | |||
| b3366a3597 | |||
| f8c4e5d79d | |||
| 4f8317f007 | |||
| b783e7dcc1 | |||
| 0336a69c3a | |||
| 42cf113e71 | |||
| 30c48670c3 | |||
| 794d9a3b69 | |||
| 549767f035 | |||
| 91916d9100 | |||
| 039e984ec0 | |||
| 791a958b4d | |||
| 0732360ff3 | |||
| 5bdd9fbfe1 | |||
| 15430bea94 | |||
| 93a0fbd79c | |||
| ae27efacf3 | |||
| b4677ea095 | |||
| eafbf7a6e3 | |||
| a262140b4b | |||
| dd3fb8c1a9 | |||
| 3525d80390 | |||
| 6080d1a959 | |||
| a98b0ef16b | |||
| 8ca640ca38 | |||
| 4129dfdd58 | |||
| b29f28997a | |||
| fc18c04521 | |||
| f4b0561643 | |||
| a6628be34e | |||
| 12e157078c | |||
| ac7936a675 | |||
| 36804fef81 | |||
| 4fd4007794 | |||
| c1023741bb | |||
| db40be98f4 | |||
| 6b7592559b | |||
| 9b07206cf4 | |||
| 9db774f2b1 | |||
| 8d4721576f | |||
| 8cb5f4d0b5 | |||
| 75f791bf62 | |||
| aab63ed3ee | |||
| 6b0d53926f | |||
| 7c15a16e57 | |||
| 3c579500ef | |||
| c04c8c581f | |||
| 7cdacb981b | |||
| 18adbf609d | |||
| 9a456ac412 | |||
| cb8f9d84b2 | |||
| f6fb052e8c | |||
| 828fe74f5b | |||
| fa59170f4d | |||
| db7d673b07 | |||
| 92b4f80170 | |||
| 5063703e56 | |||
| 544cecb4f2 | |||
| 06bd2c2520 | |||
| c4d328235f | |||
| 6adc190531 | |||
| 4419794595 | |||
| 2544ee3983 | |||
| 3e978f8d75 | |||
| bef91763b1 | |||
| f7ff9071af | |||
| 0f5052308b | |||
| 842bdac857 | |||
| 974cb0a3d4 | |||
| 3d2670b9a2 | |||
| 43855289ed | |||
| 25044dca56 | |||
| 7f6442450b | |||
| 9d6fabef0b | |||
| 577d5272e9 | |||
| 42fd531289 | |||
| bc7b677ada | |||
| f829fa6310 | |||
| d9445d9ad5 | |||
| 6f361e1ffe | |||
| 43e0a5ad0d | |||
| a605e98ccd | |||
| 804ceb25f3 | |||
| 17184ed314 | |||
| 2a036decc0 | |||
| 70b437619a | |||
| a60c20d707 | |||
| da69788478 | |||
| 5d7427b0a0 | |||
| 94e988ac56 | |||
| a5e4cad965 | |||
| c33c54ed92 | |||
| 03ca7d0ef7 | |||
| 4ffaf0ec73 | |||
| bcd2d995c2 | |||
| 578afb23ef | |||
| a85eb86c99 | |||
| fb329894cc | |||
| f5971a6b06 | |||
| 4256228eb1 | |||
| a610e0b077 | |||
| 6fb9fd6685 | |||
| b40bde6d19 | |||
| cfc2c35e4f | |||
| bdc59a2c20 | |||
| 706d1d057a | |||
| af99f0d11f | |||
| 645a1cda86 | |||
| 18cecd64aa | |||
| 93db70c433 | |||
| 0e9d31ea17 | |||
| 9c27dbf768 | |||
| 877e31529a | |||
| 6ebda9ab09 | |||
| 54d0fc4575 | |||
| 8d74d8f085 | |||
| 53640ab313 | |||
| 8d9072da4a | |||
| fa17314de3 | |||
| b01ba5205b | |||
| 2abe538825 | |||
| f1ef756198 | |||
| ab6aef0026 | |||
| 122122db8c | |||
| 14b8a9a534 | |||
| 372f5d2239 | |||
| 4c3d6fbea6 | |||
| 5e4bcbccbe | |||
| 72ec763cc5 | |||
| a17bfd876c | |||
| bbe97fba7f | |||
| 44830bcd10 | |||
| a6a42f79a6 | |||
| 1be3af7cf1 | |||
| 44e8afd18c | |||
| 236dc49de2 | |||
| 3f916b564d | |||
| 5b74e7f1d3 | |||
| c3163e39d3 | |||
| 34beb5fddf | |||
| 1d6222e6cc | |||
| 40f4396dfa | |||
| 8d453bd599 | |||
| 6e855c31dd | |||
| 2e68e1e839 | |||
| 8ea0c3a1c2 | |||
| 6823a0aeb1 | |||
| fcc7d30336 | |||
| ca36d6688e | |||
| 20404a16df | |||
| 7d4a28d5bb | |||
| 78642ec0d6 | |||
| 9a7f669192 | |||
| 425bf5cb16 | |||
| e7a39a2c5d | |||
| d87942900b | |||
| b0e7dc18d7 | |||
| 6b1d598a75 | |||
| 871648ca6d | |||
| 003a4e1e59 | |||
| b7743f00fb | |||
| ffad895309 | |||
| c7bce6018b | |||
| 362f34f2be | |||
| 1ced677ec6 | |||
| cd1fcf8876 | |||
| 06ebe4b5e0 | |||
| a33210827a | |||
| 7b054e1f57 | |||
| 2752e5b26e | |||
| 6b0a3f0b24 | |||
| c4f2161edb | |||
| a1c4b8a4ac | |||
| 80736c4a30 | |||
| 269c22e434 | |||
| e2a8404311 | |||
| b72199c8b2 | |||
| 11ab7068cd | |||
| 3aee512fa1 | |||
| 40d767406a | |||
| d5efde68a9 | |||
| f31be2092e | |||
| 24564d199e | |||
| 5397b211b4 | |||
| c3e584c43b | |||
| cdc4ab6c3c | |||
| 9b4506912c | |||
| e7fa9ec7b7 | |||
| 53c400be49 | |||
| bb6e68a697 | |||
| 969560a0d1 | |||
| 3f693dc4cb | |||
| 02e8dc2566 | |||
| 546891463b | |||
| c5afde166a | |||
| 9e16ebae85 | |||
| 546d46fc42 | |||
| f14616784a | |||
| 2cae8c7a7c | |||
| 4115d9ec5f | |||
| 9d99c0c65e | |||
| ff25781b84 | |||
| a045b37b7b | |||
| 337b011d4e | |||
| 7b4dfe0288 | |||
| da75ead70f | |||
| b168b16931 | |||
| 04ce7e61f8 | |||
| f76d632303 | |||
| 5963948635 | |||
| 80965f3927 | |||
| 7ae70dae92 | |||
| dbffc01a70 | |||
| 2681a4dc24 | |||
| 9380d39bb6 | |||
| ba13f7cf59 | |||
| 707078c27c | |||
| 8257084a45 | |||
| 23149a2bfe | |||
| 6857ee0697 | |||
| a8ede37b09 | |||
| 41195c4b84 | |||
| 640c0f119a | |||
| b745622d48 | |||
| c017ca670c | |||
| 7b22eea31d | |||
| 3d29596c22 | |||
| 6c52bee18a | |||
| a44ebe1430 | |||
| 2beeac8a8a | |||
| 5b7f1808af | |||
| 16b439d07c | |||
| 03cbf4c93f | |||
| 156b06dc3b | |||
| 4a6998f885 | |||
| 4cc36121ec | |||
| 8c8d20a6d5 | |||
| cb262cfe37 | |||
| 1f4903ea3c | |||
| 562928a7cc | |||
| da5513612b | |||
| 24ae26673f | |||
| b290285e74 | |||
| 3f3253c58b | |||
| fdb7cf7d2c | |||
| 5b18bb79d9 | |||
| 2e95864d6f | |||
| 01439a2f5f | |||
| 1145f22401 | |||
| 3cad254046 | |||
| 0b36faa2ae | |||
| 295731a1c1 | |||
| cc5a3521d3 | |||
| 4f102c94be | |||
| 9fc489a1ac | |||
| ac18cc3db9 | |||
| b0b4a1a953 | |||
| 9e398a0ea6 | |||
| d66baafc55 | |||
| 0da464c8b9 | |||
| 8ea7fcca53 |
11
InternalSettings.ftl
Normal file
11
InternalSettings.ftl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#-- DeleteEF est un paramètre qui permet de déterminer si l’exécution logistique doit être supprimée lors de la création d’une commande.-->
|
||||||
|
<#-- Attention : si vous choisissez de la supprimer, toutes les métadonnées associées à cette exécution logistique seront également supprimées. -->
|
||||||
|
<#-- Si DeleteEF_False = true, nous ne supprimons pas l'exécution logistique, Si DeleteEF_False = false, nous supprimons l'exécution logistique.-->
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#-- DeleteEF is a parameter used to determine whether the logistics execution should be deleted when creating an order.-->
|
||||||
|
<#-- Warning: if deletion is selected, all metadata related to the logistics execution will also be removed. -->
|
||||||
|
<#-- If DeleteEF_False = true, we do not delete the logistics execution. If DeleteEF_False = false, we delete the logistics execution. -->
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#assign DeleteEF_False = true>
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
# HARDIS SC NETWORK Core FTLs
|
# HARDIS SC NETWORK Core FTLs
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**.
|
||||||
|
|
||||||
|
This connector does not contain any standalone executable code: it is intended to be used by **HARDIS WMS integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
|
||||||
This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files.
|
|
||||||
|
|
||||||
## Role of the FTL Files
|
## Role of the FTL Files
|
||||||
|
|
||||||
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.).
|
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, appointment etc.).
|
||||||
- These templates use the **FreeMarker** syntax to:
|
- These templates use the **FreeMarker** syntax to:
|
||||||
- Extract the required fields from the WMS source flow.
|
- Extract the required fields from the WMS source flow.
|
||||||
- Apply transformation rules (mapping, conversions, enrichments).
|
- Apply transformation rules (mapping, conversions, enrichments).
|
||||||
@@ -17,4 +18,3 @@ This connector does not contain any standalone executable code: it is intended t
|
|||||||
|
|
||||||
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
||||||
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
- [HARDIS SC NETWORK](https://auth.reflex-platform.com/)
|
||||||
|
|
||||||
|
|||||||
11
RFXtoRP_ExecutionflowDeleted.ftl
Normal file
11
RFXtoRP_ExecutionflowDeleted.ftl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "${id.refid?json_string}"
|
||||||
|
},
|
||||||
|
"Payload": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
@@ -16,7 +22,7 @@
|
|||||||
<#if stock.batch_1 == "">
|
<#if stock.batch_1 == "">
|
||||||
"Value": { "String" : "no batch"}
|
"Value": { "String" : "no batch"}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": { "String" : "${stock.batch_1}"}
|
"Value": { "String" : "${stock.batch_1?json_string}"}
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message RFX -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
@@ -18,53 +17,52 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
||||||
[
|
<#if preparationOrder.preparation_line_lst??>
|
||||||
{
|
[
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
<#assign hd_numberHmap ={}>
|
|
||||||
<#assign hd_numberHmapHUadded ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
|
||||||
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
|
||||||
,
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
<#assign refIDHmap ={}>
|
||||||
|
<#assign hd_numberHmap ={}>
|
||||||
|
<#assign hd_numberHmapHUadded ={}>
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
|
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? && !hd_numberHmap[despatched_ipg.carton_number]??)&& (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
|
}
|
||||||
|
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
@@ -75,18 +73,22 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
<#assign refIDHmap ={}>
|
||||||
<#assign refIDHmap ={}>
|
]
|
||||||
]
|
<#else>
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
<#-- No line-->
|
||||||
<#stop >
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- Preparation Type not supported-->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||||
<#stop >
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,81 +15,125 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type == "030">
|
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type -->
|
||||||
<#stop "ignored message because receipt type = transfert">
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.line_list ??>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = UPDATE ******************** -->
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
<#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
{
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
}
|
||||||
}
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#if receipt.receipt_type == "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
||||||
<#stop>
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#stop> <#-- Receipt reference for transfer is empty-->
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if receipt.line_list ??>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#-- Receipt reference is empty-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -97,25 +141,19 @@
|
|||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#if receipt.line_list ??>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
{
|
||||||
<#if receipt.line_list ??>
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
<#-- Receipt reference is empty-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
<#stop> <#-- No line-->
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
193
RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl
Normal file
193
RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||||
|
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||||
|
<#assign refIDHmap_local ={}>
|
||||||
|
[
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||||
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
|
{
|
||||||
|
"Goods":
|
||||||
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
<#list receipt.line_list as receipt_line >
|
||||||
|
<#if receipt_line.origin_order_line_reference!="">
|
||||||
|
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
||||||
|
<#if refIDHmap_local?size != 0 >
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
|
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||||
|
"RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"CreationDateTime": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}",
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
|
{
|
||||||
|
"Goods":
|
||||||
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
"Header": {"ProjectID": "${projectRP}"},
|
||||||
|
"ID": {
|
||||||
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"CreationDateTime": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}",
|
||||||
|
<#if receipt.line_list??>
|
||||||
|
"Lines" : [
|
||||||
|
<#list receipt.line_list as line>
|
||||||
|
{
|
||||||
|
"LineID": "${line.receipt_line_number}",
|
||||||
|
<#-- Line Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
"RequestedContent":
|
||||||
|
{
|
||||||
|
"Goods":
|
||||||
|
{
|
||||||
|
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||||
|
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||||
|
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_without_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
|
||||||
|
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${line_detail_priority_date}",
|
||||||
|
<#else>
|
||||||
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#-- Segmentation Keys inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
},
|
||||||
|
"Quantity" :
|
||||||
|
{
|
||||||
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
|
"Value": "${line.order_quantity_in_lv!0}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
@@ -16,28 +16,23 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl">
|
<#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- No line -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- preparation order type not supported -->
|
<#-- Preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#-- PRO reference is empty -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -46,7 +41,7 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@@ -59,13 +54,11 @@
|
|||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- PRO reference is empty -->
|
<#-- Preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -9,14 +9,18 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
<#list preparation_order.line_list as preparation_order_line >
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message RFX -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +20,7 @@
|
|||||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,11 +8,7 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${carrier.carrier_designation?json_string}",
|
"Name": "${carrier.carrier_designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": true,
|
"IsCarrier": true,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
@@ -37,7 +30,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier.address??>
|
<#if carrier.address??>
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -15,14 +18,15 @@
|
|||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,18 +8,12 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
|
|
||||||
<#-- if HARDIS WMS is structured -->
|
<#-- if HARDIS WMS is structured -->
|
||||||
<#if actor.consignee_structured_address??>
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaCons to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaCons to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
32
RFXtoRP_HsaDesPatch.ftl
Normal file
32
RFXtoRP_HsaDesPatch.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message HARDIS WMS -->
|
||||||
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for desPatch">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign desPatch = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for desPatch">
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
32
RFXtoRP_HsaDespNt.ftl
Normal file
32
RFXtoRP_HsaDespNt.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message HARDIS WMS -->
|
||||||
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign despNt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for despNt">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign despNt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for despNt">
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
@@ -16,15 +16,14 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
<#assign dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if dispute.dispute_closed == true >
|
<#if dispute.dispute_closed == true >
|
||||||
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||||
}
|
}
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||||
@@ -32,13 +31,9 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#-- "Reference is empty"-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if dispute.dispute_preparation??>
|
<#if dispute.dispute_preparation??>
|
||||||
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
<#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0>
|
||||||
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
"RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "preparation order list is empty" >
|
<#stop "preparation order list is empty" >
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
||||||
"Title":"${dispute.dispute_reference?trim?json_string}",
|
"Title":"${dispute.dispute_reference?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"Title":"",
|
"Title":"",
|
||||||
</#if>
|
</#if>
|
||||||
@@ -43,22 +43,44 @@
|
|||||||
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||||
<#-- To configure -->
|
<#-- To configure -->
|
||||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||||
<#if dispute.dispute_type_code=="050" >
|
<#if dispute.dispute_type_code=="050" > <#-- Preparation -->
|
||||||
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
<#if dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="">
|
||||||
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
"EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||||
<#else>
|
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
|
||||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
|
||||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "WMS type code not supported">
|
"EntityID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
||||||
|
"DisplayID":"O${dispute.dispute_preparation.preparation_order_list[0].preparation_order_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_year_number?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_number?trim?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070" >
|
||||||
|
<#if dispute.dispute_reception.reception_type_code=="030"> <#-- Receipt transfer type -->
|
||||||
|
<#if dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?? && dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot!="" >
|
||||||
|
"EntityID":"${dispute.dispute_reception.reception_supplier.supplier_transfer_physical_depot?json_string}${dispute.dispute_reception.reception_supplier.supplier_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_reference?json_string}",
|
||||||
|
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!="">
|
||||||
|
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||||
|
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||||
|
"DisplayID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception.reception_type_code=="010" || dispute.dispute_reception.reception_type_code=="020" >
|
||||||
|
"EntityID":"R${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_reception.reception_year_number?json_string}${dispute.dispute_reception.reception_number?json_string}",
|
||||||
|
"DisplayID":"${dispute.dispute_reception.reception_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#stop "WMS type code not supported">
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "Reason code not supported">
|
<#stop "Claim reason code not supported" >
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,3 +88,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
|
|
||||||
<#-- Specify table for reason code -->
|
<#-- Specify table for reason code -->
|
||||||
<#assign TableReasonCode = {}/>
|
<#-- Table example for reason code to claim type ID -->
|
||||||
|
<#-- <#assign TableReasonCode = { -->
|
||||||
|
<#-- "001":"ID_CLAIMTYPE_1",-->
|
||||||
|
<#-- "M1":"ID_CLAIMTYPE_2",-->
|
||||||
|
|
||||||
|
<#-- }/>-->
|
||||||
|
|
||||||
|
<#assign TableReasonCode = {
|
||||||
|
|
||||||
|
"M1" :"CAS"
|
||||||
|
|
||||||
|
}
|
||||||
|
/>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"Goods": {
|
"Goods": {
|
||||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
@@ -31,24 +31,24 @@
|
|||||||
},
|
},
|
||||||
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||||
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||||
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="" && !reflexMvtStockInterface.receipt_reference?starts_with(reflexMvtStockInterface.original_receipt_physical_depot_code + reflexMvtStockInterface.activity_code + reflexMvtStockInterface.receipt_year_number)>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||||
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"ExecutionflowID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||||
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
"OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -24,9 +24,14 @@
|
|||||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">
|
||||||
|
|
||||||
<#-- Item Photo URI could be added here -->
|
<#-- Item Photo URI could be added here -->
|
||||||
<#if item.url?? && item.url!="">
|
<#if item.saved_picture_path?? && item.saved_picture_path!="" && item.saved_picture_path?starts_with("http") == true>
|
||||||
,
|
,
|
||||||
"PhotoURI": "${item.url?json_string}"
|
"PhotoURI": "${item.saved_picture_path?json_string}"
|
||||||
|
<#else>
|
||||||
|
<#if item.url?? && item.url!="" && item.url?starts_with("http") == true>
|
||||||
|
,
|
||||||
|
"PhotoURI": "${item.url?json_string}"
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Loop for the Logistical Variants - LV -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaItm to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,40 +1,89 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
|
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
<#case "U">
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = Update ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
<#break>
|
|
||||||
|
|
||||||
<#case "D">
|
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
<#if !carrier_apt_status.status?? || carrier_apt_status.appointment_year_number==0>
|
||||||
{
|
<#stop >
|
||||||
|
</#if>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#switch carrier_apt_status.status.carrier_status_code>
|
||||||
|
<#case "010"> <#--Carrier Expected -->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "020"> <#--Carrier Arrived-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "040"> <#--Unloading Started -->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "050"> <#--Unloading Completed-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "060"> <#--Loading Started-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "070"> <#--Loading Completed-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl">
|
||||||
|
<#break>
|
||||||
|
<#case "090"> <#--Carrier Departed-->
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl">
|
||||||
|
<#break>
|
||||||
|
|
||||||
}
|
<#default>
|
||||||
]
|
<#stop 'this updated appointment Status not implemented'>
|
||||||
<#break>
|
</#switch>
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#stop 'Delete Appointment Status not implemented' >
|
||||||
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
30
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierArrived.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_CarrierExpected.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_LoadingStarted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
30
RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt_status.constant_appointment?? && carrier_apt_status.constant_appointment== "true">
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}-${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !="">
|
||||||
|
"RefID": "${carrier_apt_status.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt_status.appointment_year_number?json_string}-${carrier_apt_status.appointment_number?json_string}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -16,58 +16,57 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
|
<#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030">
|
||||||
<#--**Pick batch runned (200) **-->
|
<#--**Pick batch runned (200) **-->
|
||||||
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" >
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
|
||||||
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationExpected.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation dispatched (600)** -->
|
<#-- ** Collection started (300) and Preparation in progress (400)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && (preparationStatusInterface.preparation_status_code == "300" || preparationStatusInterface.preparation_status_code == "400") >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationStarted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationStarted.ftl">
|
||||||
},
|
}
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
|
||||||
}
|
|
||||||
<#else>
|
<#else>
|
||||||
<#-- ****Preparation cancelled (650)**** -->
|
<#-- ****Preparation dispatched (600)** -->
|
||||||
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "600" >
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsaProStatus_PreparationCompleted.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowTransportStarted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaProStatus_TransportStarted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#-- ****Preparation cancelled (650)**** -->
|
||||||
|
<#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "650" >
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop >
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#--PRO reference is empty-->
|
|
||||||
<#stop >
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -7,10 +7,14 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefDate": {
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"DateTime": "${preparation_status_datetime}",
|
<#else>
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${preparation_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,14 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
"RefDate": {
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
"DateTime": "${preparation_status_datetime}",
|
<#else>
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${preparation_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,14 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
<#if preparationStatusInterface.preparation_order_originator_reference?? && preparationStatusInterface.preparation_order_originator_reference!="">
|
||||||
|
"RefID": "${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparationStatusInterface.physical_depot_code?trim?json_string}${preparationStatusInterface.activity_code?trim?json_string}${preparationStatusInterface.preparation_order_originator_code?trim?json_string}${preparationStatusInterface.preparation_order_year}${preparationStatusInterface.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
@@ -17,7 +20,7 @@
|
|||||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -11,10 +8,7 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${actor.designation?json_string}",
|
"Name": "${actor.designation?json_string}",
|
||||||
"ManagedStock": false,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
@@ -22,7 +16,6 @@
|
|||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if HARDIS WMS address is structured -->
|
||||||
<#if actor.supplier_structured_address?? >
|
<#if actor.supplier_structured_address?? >
|
||||||
|
|
||||||
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||||
@@ -36,7 +29,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
@@ -47,7 +39,6 @@
|
|||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsaSup to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsaSup to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
|
|||||||
50
RFXtoRP_HsrAntRec.ftl
Normal file
50
RFXtoRP_HsrAntRec.ftl
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message HARDIS WMS -->
|
||||||
|
<#-- project : projectId in HARDIS SC NETWORK -->
|
||||||
|
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#-- *********************************************** Action = CREATE ******************** -->
|
||||||
|
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#stop >
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
@@ -1,40 +1,156 @@
|
|||||||
<#-- **** input parameters ***** -->
|
<#-- **** input parameters ***** -->
|
||||||
<#-- input : message HARDIS WMS -->
|
<#-- input : message HARDIS-WMS -->
|
||||||
<#-- project : projectId in HARDIS SC NETWORK -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in HARDIS SC NETWORK -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
|
||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
<#assign partnerApplicationRP = partnerApplication>
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
<#stop>
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#switch cloudEventMsg.action>
|
<#switch cloudEventMsg.action>
|
||||||
<#case "C">
|
<#case "C">
|
||||||
<#case "U">
|
|
||||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceBookAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = Update ********************-->
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl">
|
||||||
|
},
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl">
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdated.ftl">
|
||||||
|
<#if carrier_apt.status?? && (carrier_apt.status.status_code=="999" || carrier_apt.status.status_code=="040" || carrier_apt.status.status_code=="030")>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived-->
|
||||||
|
[
|
||||||
{
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started -->
|
||||||
<#case "D">
|
[
|
||||||
<#-- *********************************************** Action = DELETE *************************** -->
|
{
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted>
|
||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed-->
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started-->
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierExpected.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed-->
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed-->
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingWMSUpdateAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = Delete ******************** -->
|
||||||
[
|
[
|
||||||
{
|
|
||||||
|
|
||||||
}
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.BookingForceCancelAppointment>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl">
|
||||||
|
}
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<#-- A décommenter si besoin de les utiliser-->
|
||||||
|
<#-- Uncomment if you need to use them-->
|
||||||
|
<#--{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierInformationUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierInformationUpdatedToConfigure.ftl">
|
||||||
|
},
|
||||||
|
-->
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<#--
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#--To configure-->
|
||||||
|
<#-- "CarrierInformation": [
|
||||||
|
{
|
||||||
|
"Key": "string",
|
||||||
|
"Value": {
|
||||||
|
"Bool": "true / false",
|
||||||
|
"Float": 3.1415,
|
||||||
|
"Int": 42,
|
||||||
|
"String": "Hello World !",
|
||||||
|
"Timestamp": {
|
||||||
|
"AuthorTimeZone": "Europe/Paris",
|
||||||
|
"DateTime": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
-->
|
||||||
60
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
60
RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
9
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
9
RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdated.ftl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<#-- A décommenter si besoin de les utiliser-->
|
||||||
|
<#-- Uncomment if you need to use them-->
|
||||||
|
<#--{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentMetaDataUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_AppointmentMetadataUpdatedToConfigure.ftl">
|
||||||
|
},
|
||||||
|
-->
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<#--
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#--To configure-->
|
||||||
|
<#-- "MetaData": [
|
||||||
|
{
|
||||||
|
"Key": "string",
|
||||||
|
"Value": {
|
||||||
|
"Bool": "true / false",
|
||||||
|
"Float": 3.1415,
|
||||||
|
"Int": 42,
|
||||||
|
"String": "Hello World !",
|
||||||
|
"Timestamp": {
|
||||||
|
"AuthorTimeZone": "Europe/Paris",
|
||||||
|
"DateTime": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
-->
|
||||||
192
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
192
RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
[
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"TimeZone":"${time_zone_rfx}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration < 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration < 0)>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration < 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
<#else>
|
||||||
|
<#if (duration == 0)>
|
||||||
|
<#assign duration = 1 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"AppointmentType": "${appointmentType}",
|
||||||
|
"Emails": ["${carrier_apt.creation_user_email?json_string}"],
|
||||||
|
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">,
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">,
|
||||||
|
<#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">,
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [{
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
|
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
"Unloading" :
|
||||||
|
<#else>
|
||||||
|
"Loading" :
|
||||||
|
</#if>
|
||||||
|
{
|
||||||
|
"Projects" : [{
|
||||||
|
"Commissions": [{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slot": {
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
58
RFXtoRP_HsrCarrierApt_BookingForceCancelAppointment.ftl
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"ID":{
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${update_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
196
RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl
Normal file
196
RFXtoRP_HsrCarrierApt_BookingWMSUpdateAppointment.ftl
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign update_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}:${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${update_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"TimeZone":"${time_zone_rfx}",
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
|
{
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
|
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"Reason": "",
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
"Loading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
|
{
|
||||||
|
"Commissions": [
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
<#else>
|
||||||
|
<#if appointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
"Unloading" :
|
||||||
|
{
|
||||||
|
"Projects" : [
|
||||||
|
{
|
||||||
|
"Commissions": [
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"ProjectID": "${projectRP}",
|
||||||
|
"PartnerAppID": "${partnerApplicationRP}",
|
||||||
|
"OrganisationID": "${organisationRP}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ProjectID" : "${projectRP}"
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slot": {
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_CarrierArrived.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
31
RFXtoRP_HsrCarrierApt_CarrierExpected.ftl
Normal file
31
RFXtoRP_HsrCarrierApt_CarrierExpected.ftl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
<#assign ref_datetime2 = AddSecondsToDatetime(ref_datetime?datetime.iso, 60)?iso_utc />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime2}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
3
RFXtoRP_HsrCarrierApt_CarrierInformation.ftl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"CarrierInformation": [
|
||||||
|
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_LoadingStarted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
5
RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
"MetaData": [
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
6
RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
"SegmentationSelections": [
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
22
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
22
RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
30
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
30
RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[
|
||||||
|
<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}", <#-- pour les RDV récurrents, aligner les statuts quand la balise sera dispo -->
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"RefID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${ref_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
149
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
149
RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
|
"Header":{
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
<#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true">
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}-${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"AppointmentID": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"AppointmentID": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" >
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-") || carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") >
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING>
|
||||||
|
<#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) />
|
||||||
|
<#if (duration <= 0)>
|
||||||
|
<#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN>
|
||||||
|
<#assign duration = 0 />
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
"TimeZone":"${time_zone_rfx}",
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot",
|
||||||
|
"Value": "${carrier_apt.physical_depot?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "year",
|
||||||
|
"Value": "${carrier_apt.year_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "number",
|
||||||
|
"Value": "${carrier_apt.appointment_number?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${carrier_apt.appointment_reference?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "carrier",
|
||||||
|
"Value": "${carrier_apt.planned_carrier?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "loading",
|
||||||
|
"Value": "${carrier_apt.load_appointment?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "unloading",
|
||||||
|
"Value": "${carrier_apt.unloading_appointment?json_string}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0) && ((carrier_apt.unloading_appointment =="true" && carrier_apt.load_appointment =="false") || (carrier_apt.unloading_appointment =="false" && carrier_apt.load_appointment =="true"))>
|
||||||
|
"Commissions": [
|
||||||
|
<#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt>
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}",
|
||||||
|
<#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!="">
|
||||||
|
"OrderID": "${physical_receipt.physical_receipt_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
|
"ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}",
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
}<#sep>,</#sep>
|
||||||
|
</#list>
|
||||||
|
],
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
"Reason": "UNLOADING AND LOADING / ${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_designation?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!="">
|
||||||
|
"Reason": "${carrier_apt.appointment_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "${carrier_apt.year_number}-${carrier_apt.appointment_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Slots": [{
|
||||||
|
<#-- calcul de de la durée en fonction des start et end time-->
|
||||||
|
"DurationInSeconds": "${duration}",
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" >
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_load_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_load_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true">
|
||||||
|
<#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")>
|
||||||
|
<#stop "planned_unloading_start_datetime field of appointmend is not initialized" >
|
||||||
|
</#if>
|
||||||
|
"StartDateTime": "${carrier_apt.planned_unloading_start_datetime}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Appointment type not supported" >
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
}]
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreatedv2>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||||
|
|||||||
@@ -11,20 +11,12 @@
|
|||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"Name": "${depot.physical_depot_designation?json_string}",
|
"Name": "${depot.physical_depot_designation?json_string}",
|
||||||
"ManagedStock": true,
|
|
||||||
"IsCarrier": false,
|
"IsCarrier": false,
|
||||||
<#-- ***Partner ID could be added here *** -->
|
|
||||||
<#-- "PartnerID": "${}", -->
|
|
||||||
|
|
||||||
|
|
||||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if HARDIS WMS address is structured -->
|
<#-- if HARDIS WMS address is structured -->
|
||||||
<#if depot.physical_depot_structured_address?? >
|
<#if depot.physical_depot_structured_address?? >
|
||||||
|
|
||||||
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||||
@@ -38,7 +30,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||||
|
|
||||||
<#-- if HARDIS WMS address is not structured -->
|
<#-- if HARDIS WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if depot.physical_depot_address??>
|
<#if depot.physical_depot_address??>
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -17,69 +17,63 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
<#if preparationOrder.total_lv_validated !=0>
|
<#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0>
|
||||||
<#if preparationOrder.preparation_line_lst??>
|
<#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030">
|
||||||
[
|
<#if preparationOrder.preparation_line_lst??>
|
||||||
{
|
[
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
|
||||||
}
|
|
||||||
|
|
||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
|
||||||
,
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||||
},
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.OrderCarrierUpdated>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
|
||||||
<#assign hd_numberHmap ={}>
|
|
||||||
<#assign hd_numberHmapHUadded ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
|
||||||
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
|
||||||
,
|
|
||||||
{
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
|
||||||
"datas" :
|
|
||||||
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
|
||||||
},
|
},
|
||||||
|
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl">
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_CarrierUpdated.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign refIDHmap ={}>
|
||||||
|
<#assign hd_numberHmap ={}>
|
||||||
|
<#assign hd_numberHmapHUadded ={}>
|
||||||
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line>
|
||||||
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
|
<#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
|
<#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||||
|
}
|
||||||
|
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
@@ -90,18 +84,22 @@
|
|||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
<#assign refIDHmap ={}>
|
||||||
<#assign refIDHmap ={}>
|
]
|
||||||
]
|
<#else>
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
<#-- No line-->
|
||||||
<#stop >
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- Preparation Type not supported-->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- no confirmed quantity for the preparation - preparation closed-->
|
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||||
<#stop >
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,35 @@
|
|||||||
<#include "ActorPrefix.ftl">
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
<#list preparationOrder.preparation_line_lst as preparation_line>
|
||||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
||||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
<#assign OrderOriginReference = "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}">
|
||||||
<#if refIDHmap_local?size != 0 >
|
<#else>
|
||||||
,
|
<#assign OrderOriginReference = "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}">
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||||
|
<#if refIDHmap_local?size != 0 >
|
||||||
|
,
|
||||||
|
</#if>
|
||||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"RefID": "${OrderOriginReference}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||||
}
|
|
||||||
<#-- Add transport grade code
|
|
||||||
<#if preparationOrder.transport_grade_code!="">
|
|
||||||
,
|
|
||||||
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
|
||||||
</#if> -->
|
|
||||||
}
|
}
|
||||||
}
|
<#-- Add transport grade code
|
||||||
|
<#if preparationOrder.transport_grade_code!="">
|
||||||
|
,
|
||||||
|
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||||
|
</#if> -->
|
||||||
|
}
|
||||||
|
}
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
|
|||||||
27
RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl
Normal file
27
RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<#--
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID":{
|
||||||
|
"RefID": "${Your_Object_ID}"
|
||||||
|
},
|
||||||
|
"Payload":{
|
||||||
|
"MetaData": [
|
||||||
|
{
|
||||||
|
"Key": "string",
|
||||||
|
"Value": {
|
||||||
|
"Bool": "true / false",
|
||||||
|
"Float": 3.1415,
|
||||||
|
"Int": 42,
|
||||||
|
"String": "Hello World !",
|
||||||
|
"Timestamp": {
|
||||||
|
"AuthorTimeZone": "Europe/Paris",
|
||||||
|
"DateTime": "2023-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-->
|
||||||
10
RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl
Normal file
10
RFXtoRP_HsrPrepa_ExecutionflowMetadataUpdated.ftl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<#-- A décommenter si besoin de les utiliser-->
|
||||||
|
<#-- Uncomment if you need to use them-->
|
||||||
|
<#--
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowMetaDataUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_ExecutionflowMetaDataUpdatedToConfigure.ftl">
|
||||||
|
},
|
||||||
|
-->
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#-- Best practices:
|
||||||
"MetaData" :[
|
If the SK is of type:
|
||||||
]
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
-->
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
"Key": "Grade",
|
"Key": "Grade",
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#-- Best practices:
|
||||||
"MetaData" :[
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
-->
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
<#assign refIDHmap_local ={}>
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line>
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||||
<#if refIDHmap_local?size != 0 >
|
<#if refIDHmap_local?size != 0 >
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ActorPrefix.ftl">
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 ) as preparation_line>
|
||||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
{
|
{
|
||||||
@@ -77,19 +77,19 @@
|
|||||||
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
||||||
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
||||||
|
|
||||||
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
|
||||||
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
|
||||||
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
"PriorityDate": "${priority_date}",
|
||||||
|
<#else>
|
||||||
|
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
||||||
|
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
|
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
||||||
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc />
|
|
||||||
"PriorityDate": "${priority_date}",
|
|
||||||
<#else>
|
|
||||||
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)>
|
|
||||||
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${priority_date}",
|
"PriorityDate": "${priority_date}",
|
||||||
<#else>
|
<#else>
|
||||||
@@ -111,9 +111,15 @@
|
|||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
|
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
||||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
"ExecutionflowID": "${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
||||||
|
"ExecutionflowID": "O${preparation_line.pro_physical_depot_code?trim?json_string}${preparationOrder.activity_code?trim?json_string}${preparation_line.pro_originator_code?trim?json_string}${preparation_line.pro_year}${preparation_line.pro_number}",
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||||
<#else>
|
<#else>
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.ftl">
|
|
||||||
<#include "ActorPrefix.ftl">
|
|
||||||
[
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
|
||||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
|
||||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
|
||||||
<#if refIDHmap_local?size != 0 >
|
|
||||||
,
|
|
||||||
</#if>
|
|
||||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
|
||||||
{
|
|
||||||
"Header": {
|
|
||||||
"ProjectID": "${projectRP}"
|
|
||||||
},
|
|
||||||
"ID":{
|
|
||||||
"RefID": "${OrderOriginReference}"
|
|
||||||
},
|
|
||||||
"Payload":{
|
|
||||||
"Carrier": {
|
|
||||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
|
||||||
@@ -34,15 +34,15 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
"RefID":"${despatched_ipg.carton_number}",
|
"RefID":"${despatched_ipg.carton_number}",
|
||||||
<#else>
|
<#else>
|
||||||
"RefID":"${despatched_ipg.hd_number}",
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
|
|||||||
@@ -16,28 +16,29 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
|
||||||
<#-- check preparation type code (internal order and reservation are ignored) -->
|
<#-- check preparation type code (internal order and reservation are ignored) -->
|
||||||
<#if preparation_order.preparation_type_code?? && (preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030")>
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl">
|
||||||
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line -->
|
<#-- No line -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- preparation order type not supported -->
|
<#-- Preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#-- PRO reference is empty -->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" >
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@@ -59,13 +60,11 @@
|
|||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- PRO reference is empty -->
|
<#-- Preparation order type not supported -->
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop >
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${preparation_status_datetime}",
|
"DateTime": "${preparation_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
44
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
44
RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"Payload" :{},
|
||||||
|
"ID":{
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot_code",
|
||||||
|
"Value": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${preparation_order.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${preparation_order.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${preparation_order.originator_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${preparation_order.preparation_order_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${preparation_order.preparation_order_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}"
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}"
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -9,7 +9,37 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${preparation_order.originator_reference?trim?json_string}",
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot_code",
|
||||||
|
"Value": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${preparation_order.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${preparation_order.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${preparation_order.originator_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${preparation_order.preparation_order_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${preparation_order.preparation_order_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
"RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${pro_creation_datetime}",
|
"DateTime": "${pro_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -31,54 +61,52 @@
|
|||||||
},
|
},
|
||||||
"ShipFromAcked": true,
|
"ShipFromAcked": true,
|
||||||
"ShipTo": {
|
"ShipTo": {
|
||||||
<#if
|
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true">
|
||||||
<#-- preparation_order.address.type_code == "" &&
|
"ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}"
|
||||||
preparation_order.address.title_code == "" &&
|
|
||||||
preparation_order.address.first_name == "" &&
|
|
||||||
preparation_order.address.last_name == "" &&
|
|
||||||
preparation_order.address.mail_address == "" &&
|
|
||||||
preparation_order.address.contact_type_code == "" &&
|
|
||||||
preparation_order.address.mobile_phone_number == "" &&
|
|
||||||
preparation_order.address.land_line_phone_number == "" &&
|
|
||||||
preparation_order.address.fax_number == "" && -->
|
|
||||||
preparation_order.address.address_type_code == "" &&
|
|
||||||
preparation_order.address.name_or_company_name == "" &&
|
|
||||||
preparation_order.address.additional_address_data_1 == "" &&
|
|
||||||
preparation_order.address.additional_address_data_2 == "" &&
|
|
||||||
preparation_order.address.post_code_area_name == "" &&
|
|
||||||
preparation_order.address.territorial_division_code == "" &&
|
|
||||||
preparation_order.address.postal_code == "" &&
|
|
||||||
preparation_order.address.iso_country_code == "">
|
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
|
||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
<#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.transfer_intermediate_consignee=="false" && preparation_order.transfer_physical_depot_code?? && preparation_order.transfer_physical_depot_code!="">
|
||||||
{
|
"ActorID": "${RFXtoRPprefixDepot(preparation_order.transfer_physical_depot_code?json_string)}"
|
||||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
<#else>
|
||||||
"Address" :
|
<#if preparation_order.address.address_type_code == "" &&
|
||||||
|
preparation_order.address.name_or_company_name == "" &&
|
||||||
|
preparation_order.address.additional_address_data_1 == "" &&
|
||||||
|
preparation_order.address.additional_address_data_2 == "" &&
|
||||||
|
preparation_order.address.post_code_area_name == "" &&
|
||||||
|
preparation_order.address.territorial_division_code == "" &&
|
||||||
|
preparation_order.address.postal_code == "" &&
|
||||||
|
preparation_order.address.iso_country_code == "">
|
||||||
|
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||||
|
<#else>
|
||||||
|
"Actor":
|
||||||
{
|
{
|
||||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl">,
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||||
<#if isCountryCode>
|
"Address" :
|
||||||
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
{
|
||||||
<#else>
|
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||||
"CountryCode" : "",
|
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||||
</#if>
|
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||||
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
}
|
||||||
}
|
},
|
||||||
},
|
"Contact" :
|
||||||
"Contact" :
|
{
|
||||||
{
|
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
||||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
||||||
"Emails" : ${splitEmailsIntoArray((preparation_order.address.mail_address!"")?json_string)},
|
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
||||||
"Phones" : ["${(preparation_order.address.mobile_phone_number!"")?json_string}","${(preparation_order.address.land_line_phone_number!"")?json_string}", "${(preparation_order.address.fax_number!"")?json_string}" ]
|
}
|
||||||
}
|
</#if>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||||
|
"OrderID": "${preparation_order.originator_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}",
|
||||||
|
</#if>
|
||||||
<#if preparation_order.line_list??>
|
<#if preparation_order.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list preparation_order.line_list as preparation_order_line >
|
<#list preparation_order.line_list as preparation_order_line >
|
||||||
@@ -117,8 +145,14 @@
|
|||||||
{
|
{
|
||||||
"RequestedDeliveryDateTime" :
|
"RequestedDeliveryDateTime" :
|
||||||
{
|
{
|
||||||
|
<#if preparation_order.intermediate_consignee_code?? && preparation_order.intermediate_consignee_code!="" && preparation_order.intermediate_delivery_start_datetime?? && preparation_order.intermediate_delivery_start_datetime!="0000-00-00T00:00:00">
|
||||||
|
<#assign intermediate_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.intermediate_delivery_start_datetime,time_zone_rfx) />
|
||||||
|
"DateTime": "${intermediate_delivery_start_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
<#else>
|
||||||
"DateTime": "${planned_final_delivery_start_datetime}",
|
"DateTime": "${planned_final_delivery_start_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
"MetaData": [
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
{
|
- boolean: possible values: true and false
|
||||||
"Key": "OrderType",
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
"Value": { "String" : "${preparation_order.optional_attributes.reason_code}"}
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
}
|
|
||||||
],
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
<#--
|
<#--
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
|
|
||||||
"SegmentationKeys": [
|
"SegmentationKeys": [
|
||||||
{
|
{
|
||||||
|
|||||||
10
RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl
Normal file
10
RFXtoRP_HsrPro_ExecutionflowDetected_ShipToMetadata.ftl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<#-- use protobuf of class HsrPro to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
|
"MetaData": [ ]
|
||||||
@@ -15,28 +15,52 @@
|
|||||||
|
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
<#if receipt.receipt_type == "030">
|
<#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list?? && receipt.line_list[0]?? > <#-- if reception is a transfer type -->
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
|
||||||
<#if receipt.line_list ??>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl">
|
||||||
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@@ -46,41 +70,123 @@
|
|||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
<#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.receipt_confirmed == "true" >
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||||
{
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="" && receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
<#assign ID = "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"/>
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
<#assign ID = "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}"/>
|
||||||
|
<#else>
|
||||||
|
<#assign ID = "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}' />
|
||||||
|
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds>
|
||||||
|
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||||
|
<#assign orderRP = JsonUtil.jsonToMap(response)>
|
||||||
|
<#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? >
|
||||||
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#if receipt.receipt_type == "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
<#else>
|
||||||
<#if receipt.line_list ??>
|
{
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
},
|
||||||
},
|
{
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl">
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
}
|
||||||
}
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
||||||
|
<#assign ID = "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"/>
|
||||||
|
<#assign payload = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${ID}"}]}'/>
|
||||||
|
<#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.OrderGetByIds>
|
||||||
|
<#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payload) />
|
||||||
|
<#assign orderRP = JsonUtil.jsonToMap(response)>
|
||||||
|
<#if orderRP?? && orderRP.Objects?? && orderRP.Objects[0]?? && orderRP.Objects[0].ID.RefID?? >
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#-- No line-->
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list?? && receipt.line_list[0]??>
|
||||||
<#stop>
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#else>
|
||||||
|
<#stop> <#-- Receipt reference for transfer is empty-->
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if receipt.line_list ?? && receipt.line_list[0]??>
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
@@ -92,20 +198,19 @@
|
|||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
<#assign receipt = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#if receipt.line_list ??>
|
||||||
[
|
[
|
||||||
<#if receipt.line_list ??>
|
{
|
||||||
{
|
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#-- No line-->
|
|
||||||
<#stop>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
<#stop> <#-- No line-->
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
40
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
40
RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"Payload" :{},
|
||||||
|
"ID":{
|
||||||
|
"CustomFields": [
|
||||||
|
{
|
||||||
|
"Key": "depot_code",
|
||||||
|
"Value": "${receipt.physical_depot_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${receipt.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${receipt.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${receipt.receipt_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${receipt.receipt_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${receipt.receipt_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,48 +1,20 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
[
|
[
|
||||||
<#if receipt.line_list??>
|
{
|
||||||
<#list receipt.line_list as receipt_line >
|
"Header": {
|
||||||
<#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!="">
|
"ProjectID": "${projectRP}"
|
||||||
<#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? >
|
},
|
||||||
<#if refIDHmap_local?size != 0 >
|
"ID": {
|
||||||
,
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
</#if>
|
"RefDate": {
|
||||||
<#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}>
|
"DateTime": "${receipt_status_datetime}",
|
||||||
{
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
}
|
||||||
"ID": {
|
},
|
||||||
"RefID": "${receipt_line.origin_order_line_reference?trim?json_string}",
|
"Payload": {
|
||||||
"RefDate": {
|
}
|
||||||
"DateTime": "${receipt_status_datetime}",
|
}
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
<#else>
|
|
||||||
{
|
|
||||||
"Header": {"ProjectID": "${projectRP}"},
|
|
||||||
"ID": {
|
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
"RefDate": {
|
|
||||||
"DateTime": "${receipt_status_datetime}",
|
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Payload": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<#break>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,11 +9,33 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
"CustomFields": [
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
{
|
||||||
<#else>
|
"Key": "depot_code",
|
||||||
"RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
"Value": "${receipt.physical_depot_code?trim?json_string}"
|
||||||
</#if>
|
},
|
||||||
|
{
|
||||||
|
"Key": "activity_code",
|
||||||
|
"Value": "${receipt.activity_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "originator_code",
|
||||||
|
"Value": "${receipt.originator_code?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "reference",
|
||||||
|
"Value": "${receipt.receipt_reference?trim?json_string}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_year",
|
||||||
|
"Value": "${receipt.receipt_year}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Key": "order_number",
|
||||||
|
"Value": "${receipt.receipt_number}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${receipt_creation_datetime}",
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
@@ -33,7 +55,7 @@
|
|||||||
<#if receipt.receipt_type == '020'>
|
<#if receipt.receipt_type == '020'>
|
||||||
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
||||||
<#else>
|
<#else>
|
||||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
@@ -41,18 +63,18 @@
|
|||||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
"ShipToAcked": true,
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
||||||
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"OrderID":"R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
||||||
|
</#if>
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
"Carrier":
|
"Carrier":
|
||||||
{
|
{
|
||||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
</#if>
|
</#if>
|
||||||
<#if receipt.receipt_reference?? && receipt.receipt_reference!="">
|
|
||||||
"OrderID": "${receipt.receipt_reference?trim?json_string}",
|
|
||||||
<#else>
|
|
||||||
"OrderID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}",
|
|
||||||
</#if>
|
|
||||||
<#if receipt.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
<#list receipt.line_list as line>
|
<#list receipt.line_list as line>
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)
|
||||||
"MetaData": [
|
"MetaData": [
|
||||||
{
|
{
|
||||||
"Key": "OrderType",
|
"Key": "OrderType",
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names -->
|
||||||
|
|
||||||
|
<#-- Best practices:
|
||||||
|
If the SK is of type:
|
||||||
|
- string: add ?json_string (e.g. "${stock.batch_1?json_string}")
|
||||||
|
- boolean: possible values: true and false
|
||||||
|
- datetime: expected format: 2025-10-30T10:12:10.000Z
|
||||||
|
- decimal number: the separator is a point (e.g. 10.5)-->
|
||||||
|
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user