You've already forked reflex-wms-connector
Compare commits
402 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 9cadf3329e | |||
| 4502df6fb0 | |||
| 3ca4b61e3b | |||
| 4a26fd9249 | |||
| 4624bab7ad | |||
| e2a8404311 | |||
| b72199c8b2 | |||
| 11ab7068cd | |||
| 3aee512fa1 | |||
| c754edaafb | |||
| adff1396c1 | |||
| 0b70c90257 | |||
| 40d767406a | |||
| 2828c01cc4 | |||
| 4553507e3b | |||
| d5efde68a9 | |||
| 830db1493b | |||
| f31be2092e | |||
| 24564d199e | |||
| 79ad7f53e8 | |||
| c280b2c83a | |||
| 5397b211b4 | |||
| c3e584c43b | |||
| 3a0bbdc479 | |||
| 1e9ce7cdc4 | |||
| cdc4ab6c3c | |||
| 9b4506912c | |||
| eefc7070ac | |||
| e7fa9ec7b7 | |||
| 53c400be49 | |||
| bb6e68a697 | |||
| 969560a0d1 | |||
| f9c62d5ee4 | |||
| 3f693dc4cb | |||
| 02e8dc2566 | |||
| 546891463b | |||
| bcf77601b9 | |||
| c5afde166a | |||
| 9e16ebae85 | |||
| 546d46fc42 | |||
| f14616784a | |||
| 2cae8c7a7c | |||
| 1670a22218 | |||
| 4115d9ec5f | |||
| cdc78d71b1 | |||
| 6b840c0ce7 | |||
| 8ee7527ba4 | |||
| 9d99c0c65e | |||
| 1be67f65b2 | |||
| dec9a4b17f | |||
| ff25781b84 | |||
| a045b37b7b | |||
| 337b011d4e | |||
| 7b4dfe0288 | |||
| da75ead70f | |||
| b168b16931 | |||
| 04ce7e61f8 | |||
| eb6182c337 | |||
| 9f63f0ee62 | |||
| 5b3de10184 | |||
| f76d632303 | |||
| 8cfd636c72 | |||
| 18808b6033 | |||
| a849b1c92e | |||
| 5963948635 | |||
| 80965f3927 | |||
| 7ae70dae92 | |||
| 810e0eaa89 | |||
| dbffc01a70 | |||
| 1dc77965ce | |||
| 9aee7a9448 | |||
| 2681a4dc24 | |||
| d4765890e5 | |||
| 9380d39bb6 | |||
| ba13f7cf59 | |||
| 9997441edb | |||
| d2a00ffe2e | |||
| 45a31fb33f | |||
| 707078c27c | |||
| 58bcf838bd | |||
| 24f17f434e | |||
| c16c48b270 | |||
| 57d4cb6be2 | |||
| 8257084a45 | |||
| 29e16f12cc | |||
| c74470b780 | |||
| fab2238278 | |||
| 23149a2bfe | |||
| 432cca8ec9 | |||
| 172d6ead58 | |||
| 57533e8735 | |||
| 4d59a53517 | |||
| 71a73bded4 | |||
| 0e0397708f | |||
| 6319051741 | |||
| d955ccdbc4 | |||
| 817209a095 | |||
| af0d846271 | |||
| fda736c295 | |||
| 2318bee797 | |||
| df2332b17e | |||
| 1de373be9c | |||
| e806da1129 | |||
| b40475626e | |||
| 559fff82e5 | |||
| 37f73115ff | |||
| a7bf18f25d | |||
| 498ef5a5bf | |||
| b6415fa316 | |||
| 6857ee0697 | |||
| 08e4b04f7f | |||
| bf0ae15a50 | |||
| 3f7cd7a245 | |||
| 173deec755 | |||
| d3c7d5a96c | |||
| 329747d225 | |||
| f5e6c2b22e | |||
| a8ede37b09 | |||
| 85bfe55af7 | |||
| 730750b898 | |||
| d85abf8235 | |||
| e41309e744 | |||
| 41195c4b84 | |||
| 46a9a82e12 | |||
| ae0b82b6e4 | |||
| 5fc26e6015 | |||
| 20d77f21ed | |||
| 3c11695650 | |||
| 5c6e200d3e | |||
| d896aa95f4 | |||
| 640c0f119a | |||
| 236c2d754c | |||
| 5499e3059f | |||
| cae9bf80bb | |||
| ea58acc353 | |||
| 4d24367b58 | |||
| 5901619f6a | |||
| b745622d48 | |||
| ed0141584b | |||
| 19c87e38df | |||
| 821b58b3bf | |||
| c017ca670c | |||
| 31f38e9626 | |||
| e6a27c2ba2 | |||
| 0a26159dc9 | |||
| a4f3bf8151 | |||
| 867fdc5743 | |||
| 5d799566fe | |||
| 867a894e2e | |||
| a11124d144 | |||
| 7b22eea31d | |||
| b69bfa50ba | |||
| 834abe1b78 | |||
| dbfcccfdd9 | |||
| 0c4e85067b | |||
| b1e5d51ba0 | |||
| 3d29596c22 | |||
| 1e42f6d81c | |||
| 6c52bee18a | |||
| 8aab4296a2 | |||
| 8160342c63 | |||
| 72abd3b22a | |||
| bcddf351a0 | |||
| 9c229997b3 | |||
| cdbb00ea4c | |||
| ffbeb4cadc | |||
| f736d62ee4 | |||
| 6f636b4ee7 | |||
| 0406a2ff3a | |||
| 833ed4ebd6 | |||
| 90bfd41f41 | |||
| a44ebe1430 | |||
| 557828b459 | |||
| 1cc34e6657 | |||
| 42571ef2a1 | |||
| 63db993164 | |||
| 86335ba52d | |||
| 37773416ff | |||
| e9e09a5eb1 | |||
| 234918a77e | |||
| 8d4067a58e | |||
| aa62c276d1 | |||
| de5a9b431e | |||
| deba22e9d4 | |||
| 81720b2547 | |||
| ed8aff1e3c | |||
| 153df99ed1 | |||
| 65601133f1 | |||
| 2beeac8a8a | |||
| 25011e68e6 | |||
| 3a9f26cef2 | |||
| 7c1b05d76e | |||
| 134e44185a | |||
| 49b2f6e17a | |||
| 6400c985a2 | |||
| e97066c118 | |||
| 9f02fce236 | |||
| 10bb90bf92 | |||
| 5b7f1808af | |||
| e53e4ec9a0 | |||
| 9524923f0c | |||
| 138bcdadf8 | |||
| e2c0735dc7 | |||
| aba22026bb | |||
| 360c0743bc | |||
| 307ae9ebe2 | |||
| 80a34b354d | |||
| 09ec0e4509 | |||
| c05a4653ba | |||
| 16b439d07c | |||
| 956105fc38 | |||
| d91d15c1c9 | |||
| 550c0047da | |||
| a8b044fdba | |||
| 89fae85a2f | |||
| bfc96d37ab | |||
| c742c3639f | |||
| d60a75cbbc | |||
| cde81b3e8b | |||
| 75a9a1727c | |||
| 6d45f474d4 | |||
| 7857dfd696 | |||
| 01d58746d8 | |||
| ab7c45bcd7 | |||
| f4f0a50493 | |||
| 65fed72146 | |||
| 0a0121c020 | |||
| 50fb9b467f | |||
| 843bf837b2 | |||
| 03cbf4c93f | |||
| ca33a85694 | |||
| 156b06dc3b | |||
| c183ade001 | |||
| d4b927b7f7 | |||
| 4a6998f885 | |||
| 08cf8ec1a6 | |||
| 66d002052c | |||
| 949d4c6a8d | |||
| 4cc36121ec | |||
| 2b828c2f4b | |||
| a9fec0b5f9 | |||
| b7f383d531 | |||
| d21a863060 | |||
| 9ee9743b81 | |||
| b5ef671512 | |||
| 8c8d20a6d5 | |||
| 3eb072f36d | |||
| cb262cfe37 | |||
| 1f4903ea3c | |||
| f98e963b76 | |||
| 562928a7cc | |||
| da5513612b | |||
| 24ae26673f | |||
| b290285e74 | |||
| 3f3253c58b | |||
| fdb7cf7d2c | |||
| 5b18bb79d9 | |||
| 2e95864d6f | |||
| 01439a2f5f | |||
| 1145f22401 | |||
| 3cad254046 | |||
| 0b36faa2ae | |||
| 295731a1c1 | |||
| cc5a3521d3 | |||
| 4f102c94be | |||
| 9fc489a1ac | |||
| ac18cc3db9 | |||
| b0b4a1a953 | |||
| 9e398a0ea6 | |||
| d66baafc55 | |||
| 0da464c8b9 | |||
| 8ea7fcca53 |
162
ActorPrefix.ftl
Normal file
162
ActorPrefix.ftl
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
<#-- Actor Prefix 4 cars -->
|
||||||
|
<#-- --------------------------------------------------------------------------------------- -->
|
||||||
|
|
||||||
|
<#-- For Depot -->
|
||||||
|
<#function RFXtoRPprefixDepot depot>
|
||||||
|
<#if uniqueness >
|
||||||
|
<#local actor = depot>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="fr">
|
||||||
|
<#local actor = "DEP_"+depot>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="it">
|
||||||
|
<#local actor = "DEP_"+depot>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="es">
|
||||||
|
<#local actor = "DEP_"+depot>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="pl">
|
||||||
|
<#local actor = "MAG_"+depot>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="nl">
|
||||||
|
<#local actor = "DEP_"+depot>
|
||||||
|
<#else>
|
||||||
|
<#local actor = "DEP_"+depot>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#return (actor)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#function RPtoRFXprefixDepot actor>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local depot = actor>
|
||||||
|
<#else>
|
||||||
|
<#local depot = actor[4..]>
|
||||||
|
</#if>
|
||||||
|
<#return (depot)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<#-- For Supplier -->
|
||||||
|
<#function RFXtoRPprefixSupplier supplier>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local actor = supplier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="fr">
|
||||||
|
<#local actor = "FOU_"+supplier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="it">
|
||||||
|
<#local actor = "FOR_"+supplier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="es">
|
||||||
|
<#local actor = "PRO_"+supplier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="pl">
|
||||||
|
<#local actor = "DOS_"+supplier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="nl">
|
||||||
|
<#local actor = "LEV_"+supplier>
|
||||||
|
<#else>
|
||||||
|
<#local actor = "SUP_"+supplier>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#return (actor)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#function RPtoRFXprefixSupplier actor>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local supplier = actor>
|
||||||
|
<#else>
|
||||||
|
<#local supplier = actor[4..]>
|
||||||
|
</#if>
|
||||||
|
<#return (supplier)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#-- For Carrier -->
|
||||||
|
<#function RFXtoRPprefixCarrier carrier>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local actor = carrier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="fr">
|
||||||
|
<#local actor = "TRA_"+carrier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="it">
|
||||||
|
<#local actor = "VET_"+carrier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="es">
|
||||||
|
<#local actor = "TRA_"+carrier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="pl">
|
||||||
|
<#local actor = "PRZ_"+carrier>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="nl">
|
||||||
|
<#local actor = "VER_"+carrier>
|
||||||
|
<#else>
|
||||||
|
<#local actor = "CAR_"+carrier>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#return (actor)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#function RPtoRFXprefixCarrier actor>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local carrier = actor>
|
||||||
|
<#else>
|
||||||
|
<#local carrier = actor[4..]>
|
||||||
|
</#if>
|
||||||
|
<#return (carrier)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#-- For Consignee -->
|
||||||
|
<#function RFXtoRPprefixConsignee consignee>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local actor = consignee>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="fr">
|
||||||
|
<#local actor = "DES_"+consignee>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="it">
|
||||||
|
<#local actor = "DES_"+consignee>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="es">
|
||||||
|
<#local actor = "DES_"+consignee>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="pl">
|
||||||
|
<#local actor = "ODB_"+consignee>
|
||||||
|
<#else>
|
||||||
|
<#if text_language_rfx ="nl">
|
||||||
|
<#local actor = "ONT_"+consignee>
|
||||||
|
<#else>
|
||||||
|
<#local actor = "CON_"+consignee>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#return (actor)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#function RPtoRFXprefixConsignee actor>
|
||||||
|
<#if uniqueness>
|
||||||
|
<#local consignee = actor>
|
||||||
|
<#else>
|
||||||
|
<#local consignee = actor[4..]>
|
||||||
|
</#if>
|
||||||
|
<#return (consignee)>
|
||||||
|
</#function>
|
||||||
15
README.md
15
README.md
@@ -1,11 +1,20 @@
|
|||||||
# Reflex Platform Core FTLs
|
# Reflex Platform Core FTLs
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**.
|
||||||
|
|
||||||
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
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
|
||||||
|
|
||||||
|
- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.).
|
||||||
|
- These templates use the **FreeMarker** syntax to:
|
||||||
|
- Extract the required fields from the WMS source flow.
|
||||||
|
- Apply transformation rules (mapping, conversions, enrichments).
|
||||||
|
- Generate a **final structured JSON** for Reflex Platform.
|
||||||
|
|
||||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/howto/reflex-wms-connector/
|
## Useful Resources
|
||||||
|
|
||||||
|
|
||||||
|
- [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html)
|
||||||
|
- [Reflex Platform](https://auth.reflex-platform.com/)
|
||||||
|
|||||||
1
RFX_PartnerAPP_Settings.ftl
Normal file
1
RFX_PartnerAPP_Settings.ftl
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<#assign trackingNumberSource = 3>
|
||||||
@@ -50,11 +50,11 @@
|
|||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
@@ -6,17 +8,17 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${stock.physical_depot_code}"
|
"RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
||||||
"Snapshot": {
|
"Snapshot": {
|
||||||
"EndDateTime": {
|
"EndDateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||||
"MessageNb": ${sum_elt}
|
"MessageNb": ${sum_elt}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||||
{
|
{
|
||||||
@@ -6,19 +8,19 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
"ActorID": "${stock.physical_depot_code}",
|
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
|
||||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
||||||
"Snapshot": {
|
"Snapshot": {
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
"DateTime": "${generation_date}",
|
"DateTime": "${generation_date}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||||
"Quantity":
|
"Quantity":
|
||||||
{
|
{
|
||||||
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"Goods": {
|
"Goods": {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_datetime = RfxDateTimetoUTC(stock.Date_of_manufacture,time_zone_offset_rfx) />
|
<#assign manufacturing_datetime = RfxDateTimetoUTCWithTimezone(stock.Date_of_manufacture,time_zone_rfx) />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
"Value": "Timestamp": {
|
"Value": "Timestamp": {
|
||||||
"AuthorTimeZone": "${time_zone_rfx}",
|
"AuthorTimeZone": "${time_zone_rfx}",
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,6 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
31
RFXtoRP_HliPrepaL.ftl
Normal file
31
RFXtoRP_HliPrepaL.ftl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#--<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||||
|
<#break>
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||||
|
<#break>
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop>
|
||||||
|
</#switch>
|
||||||
34
RFXtoRP_HliReceiptLr.ftl
Normal file
34
RFXtoRP_HliReceiptLr.ftl
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE ******************** -->
|
||||||
|
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for receiptLines">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign receiptLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for receiptLines">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
32
RFXtoRP_HlrProL.ftl
Normal file
32
RFXtoRP_HlrProL.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#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 preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for preparationOrderLines">
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- 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 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">
|
||||||
@@ -41,6 +44,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,20 +4,13 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"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">,
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
@@ -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 Reflex WMS address is not structured -->
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if carrier.address??>
|
<#if carrier.address??>
|
||||||
@@ -45,7 +37,7 @@
|
|||||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- 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>
|
||||||
@@ -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">
|
||||||
@@ -41,6 +45,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,23 +4,16 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"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 Reflex WMS is structured -->
|
<#-- if Reflex WMS is structured -->
|
||||||
<#if actor.consignee_structured_address??>
|
<#if actor.consignee_structured_address??>
|
||||||
|
|
||||||
@@ -31,7 +24,7 @@
|
|||||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
||||||
<#if isCountryCode>
|
<#if isCountryCode>
|
||||||
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"CountryCode" : "",
|
"CountryCode" : "",
|
||||||
</#if>
|
</#if>
|
||||||
@@ -46,7 +39,7 @@
|
|||||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
50
RFXtoRP_HsaDispute.ftl
Normal file
50
RFXtoRP_HsaDispute.ftl
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#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 dispute = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
<#if dispute.dispute_closed == true >
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaDispute_Created.ftl">
|
||||||
|
}
|
||||||
|
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#stop>
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop>
|
||||||
|
</#switch>
|
||||||
|
|
||||||
4
RFXtoRP_HsaDispute_ClaimMetadata.ftl
Normal file
4
RFXtoRP_HsaDispute_ClaimMetadata.ftl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<#-- use protobuf of class HsaDispute to find Reflex Wms fields names -->
|
||||||
|
|
||||||
|
|
||||||
|
"MetaData": [ ]
|
||||||
91
RFXtoRP_HsaDispute_Created.ftl
Normal file
91
RFXtoRP_HsaDispute_Created.ftl
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "Table.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
|
||||||
|
"Title":"${dispute.dispute_reference?json_string}",
|
||||||
|
<#else>
|
||||||
|
"Title":"",
|
||||||
|
</#if>
|
||||||
|
"Criticality":"${TableCriticality[dispute.dispute_criticity]}",
|
||||||
|
"Amount": {
|
||||||
|
<#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) />
|
||||||
|
<#if isCurrencyCode>
|
||||||
|
"Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if TableAmount[dispute.dispute_amount_unit?json_string]??>
|
||||||
|
"Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",
|
||||||
|
<#else>
|
||||||
|
"Currency" : "XXX",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
"Value": "${dispute.dispute_amount}"
|
||||||
|
},
|
||||||
|
<#-- Claim metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">,
|
||||||
|
<#-- To configure -->
|
||||||
|
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||||
|
<#if dispute.dispute_type_code=="050" > <#-- Preparation -->
|
||||||
|
<#if dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference!="">
|
||||||
|
"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}",
|
||||||
|
"DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
"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 TableReasonCode[dispute.dispute_reason_code]??>
|
||||||
|
"ClaimTypeID":"CLAIMTYPE_${projectRP}_EXECUTIONFLOW_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||||
|
<#else>
|
||||||
|
<#stop "Claim reason code not supported" >
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
124
RFXtoRP_HsaDispute_MessageSent.ftl
Normal file
124
RFXtoRP_HsaDispute_MessageSent.ftl
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
"Message": "${dispute.dispute_reference?trim?json_string}"
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
<#if dispute.dispute_quantity!=0 && dispute.dispute_item??>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
<#elseif dispute.dispute_item??>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"Message": "${dispute.dispute_item.item_code?trim?json_string}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
<#elseif dispute.dispute_quantity!=0>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
<#if dispute.dispute_preparation??>
|
||||||
|
<#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}"
|
||||||
|
<#else>
|
||||||
|
<#stop "preparation order list is empty" >
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#if dispute.dispute_reception??>
|
||||||
|
"RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}"
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
|
||||||
|
"Message": " ${dispute.dispute_description?trim?json_string}"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
7
RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl
Normal file
7
RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<#-- Specify table for reason code -->
|
||||||
|
<#assign TableReasonCode = {}/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,11 @@
|
|||||||
reflexMvtStockInterface.ipg_move_type == "370" ||
|
reflexMvtStockInterface.ipg_move_type == "370" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "410" ||
|
reflexMvtStockInterface.ipg_move_type == "410" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "420"
|
reflexMvtStockInterface.ipg_move_type == "420" ||
|
||||||
|
reflexMvtStockInterface.ipg_move_type == "455" ||
|
||||||
|
reflexMvtStockInterface.ipg_move_type == "460" ||
|
||||||
|
reflexMvtStockInterface.ipg_move_type == "465" ||
|
||||||
|
(reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69")
|
||||||
>
|
>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -43,7 +47,6 @@
|
|||||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||||
@@ -52,10 +55,6 @@
|
|||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
<#else>
|
|
||||||
<#-- Case of IPG move type volontarilly ignored-->
|
|
||||||
<#stop " Reference receipt is empty">
|
|
||||||
</#if>
|
|
||||||
<#else>
|
<#else>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
@@ -68,11 +67,11 @@
|
|||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop "event not supported - Case D ">
|
<#stop >
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
<#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
|
||||||
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -25,17 +26,37 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Goods received Segmentation Keys inclusion -->
|
<#-- Goods received Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
<#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement -->
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
<#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!="">
|
||||||
|
"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}",
|
||||||
|
<#else>
|
||||||
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||||
|
"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}",
|
||||||
|
<#else>
|
||||||
|
"ExecutionflowID": "R${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>
|
||||||
<#else>
|
<#else>
|
||||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||||
|
"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}",
|
||||||
|
<#else>
|
||||||
|
"ExecutionflowID": "R${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>
|
||||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
<#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0>
|
||||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
"LineID": "${reflexMvtStockInterface.origin_order_line_number_reference}",
|
||||||
|
<#else>
|
||||||
|
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||||
|
</#if>
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
|
||||||
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
||||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
@@ -14,10 +15,14 @@
|
|||||||
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
||||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||||
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
"455":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
|
"460":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
|
"465":"STOCK_MOVEMENT_TYPE_FIX",
|
||||||
|
"520":"STOCK_MOVEMENT_TYPE_OUTBOUND"
|
||||||
|
}>
|
||||||
|
<#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
|
||||||
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
@@ -38,7 +43,7 @@
|
|||||||
|
|
||||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
||||||
},
|
},
|
||||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||||
"Movement": {
|
"Movement": {
|
||||||
|
|
||||||
"DateTime": {
|
"DateTime": {
|
||||||
@@ -48,7 +53,11 @@
|
|||||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
||||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||||
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
"Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}",
|
||||||
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
<#if reflexMvtStockInterface.ipg_move_type == "520" >
|
||||||
|
"Reason": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}",
|
||||||
|
<#else>
|
||||||
|
"Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}",
|
||||||
|
</#if>
|
||||||
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
"ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}",
|
||||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||||
@@ -57,7 +66,7 @@
|
|||||||
"Quantity":
|
"Quantity":
|
||||||
{
|
{
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
<#if reflexMvtStockInterface.move_sign == "+">
|
<#if reflexMvtStockInterface.move_sign == "+" || reflexMvtStockInterface.ipg_move_quantity_in_base_lvs <= 0 >
|
||||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
<#else>
|
<#else>
|
||||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||||
|
|||||||
@@ -18,13 +18,14 @@
|
|||||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#if item.logistical_variant_list?? >
|
<#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "no LV for the item">
|
<#-- "no LV for the item"-->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -46,6 +47,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,6 @@
|
|||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
<#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 -->
|
||||||
<#--"PhotoURI": " ", -->
|
<#if item.url?? && item.url!="">
|
||||||
|
"PhotoURI": "${item.url?json_string}",
|
||||||
|
</#if>
|
||||||
|
|
||||||
<#-- Loop for the Logistical Variants - LV -->
|
<#-- Loop for the Logistical Variants - LV -->
|
||||||
<#if item.logistical_variant_list??>
|
<#if item.logistical_variant_list??>
|
||||||
|
|||||||
40
RFXtoRP_HsaLstCarSta.ftl
Normal file
40
RFXtoRP_HsaLstCarSta.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#stop>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
<#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) />
|
||||||
[
|
[
|
||||||
<#--**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>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowPreparationExpected>
|
||||||
@@ -64,18 +63,15 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop "PRO reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop "event not supported (case D)">
|
<#stop >
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -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}"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"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,13 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"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,13 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"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,13 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"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}"
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
<#-- input : message RFX -->
|
<#-- input : message RFX -->
|
||||||
<#-- project : projectId in ReflexPlatform -->
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- 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">
|
||||||
@@ -41,6 +44,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -4,25 +4,18 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"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">,
|
||||||
-->
|
|
||||||
|
|
||||||
"Address":
|
"Address":
|
||||||
{
|
{
|
||||||
<#-- if Reflex WMS address is structured -->
|
<#-- if Reflex 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}",
|
||||||
@@ -31,12 +24,11 @@
|
|||||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
||||||
<#if isCountryCode>
|
<#if isCountryCode>
|
||||||
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
||||||
<#else>
|
<#else>
|
||||||
"CountryCode" : "",
|
"CountryCode" : "",
|
||||||
</#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 Reflex WMS address is not structured -->
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
<#if actor.optional_attributes?? >
|
<#if actor.optional_attributes?? >
|
||||||
@@ -44,10 +36,9 @@
|
|||||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
|
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}",
|
||||||
"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}",
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${actor.code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
40
RFXtoRP_HsrCarrierApt.ftl
Normal file
40
RFXtoRP_HsrCarrierApt.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#stop>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
@@ -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">
|
||||||
@@ -41,6 +41,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,22 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"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 Reflex WMS address is structured -->
|
<#-- if Reflex 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}",
|
||||||
@@ -36,21 +30,23 @@
|
|||||||
</#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 Reflex WMS address is not structured -->
|
<#-- if Reflex WMS address is not structured -->
|
||||||
<#else>
|
<#else>
|
||||||
|
<#if depot.physical_depot_address??>
|
||||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
||||||
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
||||||
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
|
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
|
||||||
"CountryCode" : ""
|
"CountryCode" : ""
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
},
|
},
|
||||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
<#if depot.physical_depot_address??>
|
||||||
"${depot.physical_depot_address.other_number?json_string}"
|
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||||
],
|
"${depot.physical_depot_address.other_number?json_string}"
|
||||||
"Typology": "TYPOLOGY_UNKNOWN"
|
],
|
||||||
|
</#if>
|
||||||
|
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
|
|
||||||
"Payload": {}
|
"Payload": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
40
RFXtoRP_HsrLoadInfo.ftl
Normal file
40
RFXtoRP_HsrLoadInfo.ftl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#stop>
|
||||||
|
|
||||||
|
<#switch cloudEventMsg.action>
|
||||||
|
<#case "C">
|
||||||
|
<#case "U">
|
||||||
|
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE *************************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
32
RFXtoRP_HsrPackBranch.ftl
Normal file
32
RFXtoRP_HsrPackBranch.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#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 packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for Pack Branch">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign packBranch = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for Pack Branch">
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
32
RFXtoRP_HsrPackOrder.ftl
Normal file
32
RFXtoRP_HsrPackOrder.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#-- **** input parameters ***** -->
|
||||||
|
<#-- input : message RFX -->
|
||||||
|
<#-- project : projectId in ReflexPlatform -->
|
||||||
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
|
<#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 packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for Pack Order">
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "D">
|
||||||
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
|
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||||
|
<#assign packOrder = JsonUtil.jsonToMap(dataRfx)>
|
||||||
|
|
||||||
|
<#stop "no generic FTL file available yet for Pack Order">
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#stop >
|
||||||
|
</#switch>
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
@@ -16,45 +17,41 @@
|
|||||||
<#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_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>
|
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl">
|
<#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
|
||||||
|
|
||||||
<#assign refIDHmap ={}>
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="">
|
||||||
<#assign hd_numberHmap ={}>
|
,
|
||||||
<#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 apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCarrierUpdated>
|
||||||
<#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
<#if despatched_ipg.consignment_unit_id!="">
|
"datas" :
|
||||||
<#if !hd_numberHmap[despatched_ipg.hd_number]?? >
|
<#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]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))>
|
||||||
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
@@ -63,38 +60,57 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
|
||||||
}
|
}
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
|
,
|
||||||
,
|
{
|
||||||
{
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded>
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"datas" :
|
||||||
"datas" :
|
<#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl">
|
||||||
<#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_HUsAdded_HandlingUnitDispatched.ftl">
|
}
|
||||||
}
|
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||||
</#if>
|
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||||
|
,
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
</#list>
|
</#list>
|
||||||
</#list>
|
<#assign refIDHmap ={}>
|
||||||
<#assign refIDHmap ={}>
|
]
|
||||||
]
|
<#else>
|
||||||
|
<#-- No line-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
|
<#else>
|
||||||
|
<#-- Preparation Type not supported-->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
<#-- no confirmed quantity for the preparation - preparation closed-->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
<#break>
|
<#break>
|
||||||
<#case "D">
|
<#case "D">
|
||||||
<#-- *********************************************** Action = DELETE ******************** -->
|
<#-- *********************************************** Action = DELETE ******************** -->
|
||||||
<#stop "event not supported (Case D)">
|
<#stop>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.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!="">
|
||||||
|
<#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}">
|
||||||
|
<#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 !refIDHmap_local[OrderOriginReference]?? >
|
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||||
<#if refIDHmap_local?size != 0 >
|
<#if refIDHmap_local?size != 0 >
|
||||||
,
|
,
|
||||||
@@ -14,11 +19,11 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID":{
|
"ID":{
|
||||||
"RefID": "${OrderOriginReference}"
|
"RefID": "${OrderOriginReference}"
|
||||||
},
|
},
|
||||||
"Payload":{
|
"Payload":{
|
||||||
"Carrier": {
|
"Carrier": {
|
||||||
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||||
}
|
}
|
||||||
<#-- Add transport grade code
|
<#-- Add transport grade code
|
||||||
<#if preparationOrder.transport_grade_code!="">
|
<#if preparationOrder.transport_grade_code!="">
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
<#--
|
<#--
|
||||||
"MetaData" :[
|
"MetaData" :[
|
||||||
|
]
|
||||||
]
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
"MetaData": [ ]
|
"MetaData": [ ]
|
||||||
@@ -24,7 +24,6 @@
|
|||||||
<#else>
|
<#else>
|
||||||
"Value": { "Bool" : "False"}
|
"Value": { "Bool" : "False"}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"Key": "ManufacturingDate",
|
"Key": "ManufacturingDate",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3>
|
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3>
|
||||||
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
<#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3>
|
||||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
||||||
<#if refIDHmap?size != 0 >
|
<#if refIDHmap?size != 0 >
|
||||||
|
|||||||
27
RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl
Normal file
27
RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
[
|
||||||
|
<#assign dispatched_datetime5 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||||
|
{
|
||||||
|
"Header": {
|
||||||
|
"ProjectID": "${projectRP}"
|
||||||
|
},
|
||||||
|
"ID": {
|
||||||
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${dispatched_datetime5}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
"HandlingunitID": "${despatched_ipg.hd_number}"
|
||||||
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||||
|
,
|
||||||
|
"HUCarrier":{
|
||||||
|
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_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.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 >
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
<#include "ReflexUtils.ftl">
|
||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && 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 = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
|
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
@@ -75,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>
|
||||||
@@ -110,22 +112,28 @@
|
|||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||||
},
|
},
|
||||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
<#if preparation_line.preparation_order_originator_reference?? && preparation_line.preparation_order_originator_reference!="">
|
||||||
|
"OrderID": "${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>
|
||||||
"LineID": "${preparation_line.pro_line_number!0}",
|
"LineID": "${preparation_line.pro_line_number!0}",
|
||||||
</#if>
|
</#if>
|
||||||
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
|
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
|
||||||
"Quantity": {
|
"Quantity": {
|
||||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||||
"Value": ${despatched_ipg.quantity_lvs}
|
"Value": ${despatched_ipg.quantity_lvs}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
|
||||||
<#include "ReflexUtils.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":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
<#assign refIDHmap_local ={}>
|
|
||||||
]
|
|
||||||
@@ -1,17 +1,54 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||||
[
|
[
|
||||||
<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
<#switch trackingNumberSource>
|
||||||
|
<#case 1>
|
||||||
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#case 2>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"RefID":"${despatched_ipg.carton_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#case 3>
|
||||||
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"RefID":"${despatched_ipg.carton_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
<#break>
|
||||||
|
<#default>
|
||||||
|
<#if despatched_ipg.consignment_unit_id!="">
|
||||||
|
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
|
||||||
|
<#else>
|
||||||
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
|
"RefID":"${despatched_ipg.carton_number}",
|
||||||
|
<#else>
|
||||||
|
"RefID":"${despatched_ipg.hd_number}",
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
</#switch>
|
||||||
|
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${dispatched_datetime4}",
|
"DateTime": "${dispatched_datetime4}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Payload": {
|
"Payload": {
|
||||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||||
@@ -22,9 +59,8 @@
|
|||||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||||
,
|
,
|
||||||
"HUCarrier":{
|
"HUCarrier":{
|
||||||
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
|
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,9 @@
|
|||||||
<#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 == "010" || preparation_order.preparation_type_code == "030">
|
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||||
<#-- Only if preparation order not confirmed -->
|
<#if preparation_order.line_list??>
|
||||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
|
||||||
{
|
{
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -29,17 +26,13 @@
|
|||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "preparation order already confirmed">
|
<#-- No line -->
|
||||||
</#if>
|
<#stop>
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "preparation order type not supported">
|
<#-- Preparation order type not supported -->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
<#else>
|
|
||||||
<#stop "PRO reference is empty">
|
|
||||||
</#if>
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -48,21 +41,25 @@
|
|||||||
<#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??>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
{
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"datas" :
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
"datas" :
|
||||||
}
|
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#-- No line -->
|
||||||
|
<#stop>
|
||||||
|
</#if>
|
||||||
<#else>
|
<#else>
|
||||||
<#stop "PRO reference is empty">
|
<#-- Preparation order type not supported -->
|
||||||
|
<#stop>
|
||||||
</#if>
|
</#if>
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) />
|
<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.modification_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"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}"
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
|
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) />
|
||||||
<#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) />
|
<#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
||||||
"Header": {
|
"Header": {
|
||||||
"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}"
|
||||||
@@ -26,53 +31,55 @@
|
|||||||
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
||||||
</#if> -->
|
</#if> -->
|
||||||
"ShipFrom": {
|
"ShipFrom": {
|
||||||
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
|
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
|
||||||
},
|
},
|
||||||
"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": "${preparation_order.end_consignee_code?trim?json_string}"
|
|
||||||
<#else>
|
<#else>
|
||||||
"Actor":
|
<#if preparation_order.preparation_type_code == "030">
|
||||||
{
|
"ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_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}",
|
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
"Address" :
|
||||||
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
{
|
||||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
"PostalCode" : "${preparation_order.address.postal_code!""}",
|
||||||
}
|
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||||
},
|
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||||
"Contact" :
|
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||||
{
|
}
|
||||||
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
},
|
||||||
"LastName" : "${(preparation_order.address.last_name!"")?json_string}",
|
"Contact" :
|
||||||
"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}" ]
|
"FirstName" : "${(preparation_order.address.first_name!"")?json_string}",
|
||||||
}
|
"LastName" : "${(preparation_order.address.last_name!"")?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}" ]
|
||||||
|
}
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
},
|
},
|
||||||
|
<#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 >
|
||||||
@@ -84,7 +91,6 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<#-- Line Metadata inclusion -->
|
<#-- Line Metadata inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
||||||
|
|
||||||
"RequestedContent":
|
"RequestedContent":
|
||||||
{
|
{
|
||||||
"Goods":
|
"Goods":
|
||||||
@@ -95,10 +101,8 @@
|
|||||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||||
"PriorityDate": "${forced_priority_date}",
|
"PriorityDate": "${forced_priority_date}",
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#-- Segmentation Keys inclusion -->
|
<#-- Segmentation Keys inclusion -->
|
||||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||||
|
|
||||||
},
|
},
|
||||||
"Quantity" :
|
"Quantity" :
|
||||||
{
|
{
|
||||||
@@ -110,13 +114,18 @@
|
|||||||
</#list>
|
</#list>
|
||||||
],
|
],
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
"RequestedMilestones" :
|
"RequestedMilestones" :
|
||||||
{
|
{
|
||||||
"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>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,65 +15,126 @@
|
|||||||
|
|
||||||
<#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.line_list??> <#-- if reception is a transfer type -->
|
||||||
<#if receipt.receipt_type = "030">
|
|
||||||
<#stop "ignored message because receipt type = transfert">
|
|
||||||
<#else>
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#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">
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
<#if receipt.line_list ??>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#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>
|
||||||
<#else>
|
|
||||||
<#stop "Receipt reference is empty">
|
|
||||||
</#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" >
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true">
|
||||||
{
|
{
|
||||||
<#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.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.ExecutionflowDetected>
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
},
|
}
|
||||||
{
|
<#else>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected>
|
<#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" >
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
{
|
||||||
"datas" :
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted>
|
||||||
<#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl">
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
}
|
"datas" :
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl">
|
||||||
|
}
|
||||||
|
<#else>
|
||||||
|
<#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??>
|
||||||
|
<#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 ??>
|
||||||
|
{
|
||||||
|
<#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>
|
||||||
<#else>
|
|
||||||
<#stop "Receipt reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
@@ -81,8 +142,8 @@
|
|||||||
<#-- *********************************************** 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!="">
|
|
||||||
{
|
{
|
||||||
|
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||||
@@ -90,14 +151,14 @@
|
|||||||
"datas" :
|
"datas" :
|
||||||
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl">
|
||||||
}
|
}
|
||||||
<#else>
|
|
||||||
<#stop "Receipt reference is empty">
|
|
||||||
</#if>
|
|
||||||
]
|
]
|
||||||
|
<#else>
|
||||||
|
<#stop> <#-- No line-->
|
||||||
|
</#if>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "event not supported">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
"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_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||||
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
"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}"
|
||||||
@@ -25,18 +26,28 @@
|
|||||||
|
|
||||||
"ShipFrom":
|
"ShipFrom":
|
||||||
{
|
{
|
||||||
"ActorID": "${receipt.original_code?trim?json_string}"
|
<#if receipt.receipt_type == '020'>
|
||||||
|
"ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}"
|
||||||
|
<#else>
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
</#if>
|
||||||
},
|
},
|
||||||
"ShipTo" :
|
"ShipTo" :
|
||||||
{
|
{
|
||||||
"ActorID": "${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!="">
|
||||||
<#if receipt.carrier_informations.carrier_code != "">
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?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 != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
<#if receipt.line_list??>
|
<#if receipt.line_list??>
|
||||||
"Lines" : [
|
"Lines" : [
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) />
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"Header": {
|
"Header": {
|
||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
"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_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<#include "HfRpConfig.ftl">
|
<#include "HfRpConfig.ftl">
|
||||||
<#include "ReflexUtils.ftl">
|
<#include "ReflexUtils.ftl">
|
||||||
<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${receipt.receipt_reference?trim?json_string}",
|
"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_status_datetime}",
|
"DateTime": "${receipt_status_datetime}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
}
|
}
|
||||||
|
|||||||
67
RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl
Normal file
67
RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_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": "${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}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
278
RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl
Normal file
278
RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
<#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": {
|
||||||
|
"CreationDateTime": {
|
||||||
|
"DateTime": "${receipt_creation_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
},
|
||||||
|
<#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!="">
|
||||||
|
"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>
|
||||||
|
"OrderID":"${receipt.receipt_reference?trim?json_string}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#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>
|
||||||
|
"RequestedMilestones" :
|
||||||
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
|
{
|
||||||
|
"DateTime": "${receipt_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#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}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#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>
|
||||||
|
"RequestedMilestones" :
|
||||||
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
|
{
|
||||||
|
"DateTime": "${receipt_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#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}",
|
||||||
|
<#-- Header Metadata inclusion -->
|
||||||
|
<#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">,
|
||||||
|
"ShipFrom":
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipTo" :
|
||||||
|
{
|
||||||
|
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
"ShipToAcked": true,
|
||||||
|
<#if receipt.carrier_informations.carrier_code != "">
|
||||||
|
"Carrier":
|
||||||
|
{
|
||||||
|
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||||
|
},
|
||||||
|
</#if>
|
||||||
|
<#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>
|
||||||
|
"RequestedMilestones" :
|
||||||
|
{
|
||||||
|
"RequestedDeliveryDateTime" :
|
||||||
|
{
|
||||||
|
"DateTime": "${receipt_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_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": "${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}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
67
RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl
Normal file
67
RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
<#include "ReflexUtils.ftl">
|
||||||
|
<#assign receipt_status_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": "${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}",
|
||||||
|
</#if>
|
||||||
|
"RefDate": {
|
||||||
|
"DateTime": "${receipt_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</#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_status_datetime}",
|
||||||
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Payload": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
|
]
|
||||||
@@ -22,22 +22,21 @@
|
|||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
},
|
},
|
||||||
"TechMessage": {
|
"TechMessage": {
|
||||||
"Code": "${restResponsetMsg.status}",
|
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||||
"Label": ${strJsonBody}
|
"Label": ${strJsonBody}
|
||||||
},
|
},
|
||||||
"UserMessage": {
|
"UserMessage": {
|
||||||
"Code": "${restResponsetMsg.status}",
|
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||||
"Label": ${strJsonBody},
|
"Label": ${strJsonBody},
|
||||||
"Params": []
|
"Params": []
|
||||||
},
|
},
|
||||||
"DetailElements": [],
|
"DetailElements": [],
|
||||||
"CorrelationID": "${id.correlationid}",
|
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
||||||
"ContextPayload": "rfxresponse",
|
"ContextPayload": ${strJsonBody},
|
||||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||||
"Task": "${id.apiRestReflexID}",
|
"Task": "${id.apiRestReflexID!"no Task"}",
|
||||||
"OriginalID": "${id.refid?trim?json_string}",
|
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
||||||
"StackTrace": ""
|
"StackTrace": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,57 @@
|
|||||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||||
|
|
||||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
||||||
<#assign projectRP = project>
|
<#assign projectRP = project>
|
||||||
<#assign organisationRP = organisation>
|
<#assign organisationRP = organisation>
|
||||||
|
|
||||||
|
|
||||||
<#assign aDateTime = .now>
|
<#assign aDateTime = .now>
|
||||||
|
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||||
|
<#assign no_status = -99999>
|
||||||
|
|
||||||
|
|
||||||
|
<#switch id.apiRestReflexID!no_apiRestReflexID>
|
||||||
|
<#case no_apiRestReflexID>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
<#switch id.apiRestReflexID>
|
|
||||||
<#case "preparation_orders_post">
|
<#case "preparation_orders_post">
|
||||||
<#switch restResponsetMsg.status>
|
<#switch restResponsetMsg.status!no_status>
|
||||||
|
<#case no_status>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||||
@@ -63,7 +104,7 @@
|
|||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "{}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -81,7 +122,29 @@
|
|||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#case "receipts_post">
|
<#case "receipts_post">
|
||||||
<#switch restResponsetMsg.status>
|
<#switch restResponsetMsg.status!no_status>
|
||||||
|
<#case no_status>
|
||||||
|
[
|
||||||
|
{
|
||||||
|
<#if restResponsetMsg.body?? >
|
||||||
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
|
<#else>
|
||||||
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
|
</#if>
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||||
|
},
|
||||||
|
{
|
||||||
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||||
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
|
"datas" :
|
||||||
|
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<#break>
|
||||||
|
|
||||||
<#case 200>
|
<#case 200>
|
||||||
<#case 201>
|
<#case 201>
|
||||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||||
@@ -121,7 +184,7 @@
|
|||||||
<#if restResponsetMsg.body?? >
|
<#if restResponsetMsg.body?? >
|
||||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||||
<#else>
|
<#else>
|
||||||
<#assign restResponseBody = "{}" />
|
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||||
</#if>
|
</#if>
|
||||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||||
@@ -137,7 +200,6 @@
|
|||||||
]
|
]
|
||||||
</#switch>
|
</#switch>
|
||||||
<#break>
|
<#break>
|
||||||
|
|
||||||
<#default>
|
<#default>
|
||||||
<#stop>
|
<#stop>
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"ProjectID": "${projectRP}"
|
"ProjectID": "${projectRP}"
|
||||||
},
|
},
|
||||||
"ID": {
|
"ID": {
|
||||||
"RefID": "${id.refid?trim?json_string}",
|
"RefID": "${id.refid!"no RefID"?trim?json_string}",
|
||||||
"RefDate": {
|
"RefDate": {
|
||||||
"DateTime": "${aDateTime?iso_utc}",
|
"DateTime": "${aDateTime?iso_utc}",
|
||||||
"AuthorTimeZone": "${time_zone_rfx}"
|
"AuthorTimeZone": "${time_zone_rfx}"
|
||||||
|
|||||||
@@ -4,37 +4,40 @@
|
|||||||
|
|
||||||
<#noparse>
|
<#noparse>
|
||||||
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
|
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item -->
|
||||||
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
||||||
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
||||||
|
|
||||||
|
|
||||||
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
|
<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}>
|
||||||
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
|
<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}>
|
||||||
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
|
<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}>
|
||||||
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
|
<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}>
|
||||||
|
|
||||||
</#noparse>
|
</#noparse>
|
||||||
|
|
||||||
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
|
||||||
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
|
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
|
||||||
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
|
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
|
||||||
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
||||||
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
|
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"Europe/Paris"}<#noparse>"></#noparse>
|
||||||
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
|
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+01:00"}<#noparse>"></#noparse>
|
||||||
|
|
||||||
|
|
||||||
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
|
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
|
||||||
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
<#if file.reflex_platform_project_list[0].site_code_unicity??>
|
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
|
||||||
<#noparse><#assign uniqueness = </#noparse>${file.reflex_platform_project_list[0].site_code_unicity?c}<#noparse>></#noparse>
|
<#if reflex_platform_project_uniqueness.site_code_unicity??>
|
||||||
|
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
|
||||||
<#else>
|
<#else>
|
||||||
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
|
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
|
||||||
</#if>
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
|||||||
38
RP_connector.ftl
Normal file
38
RP_connector.ftl
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<#-- ****
|
||||||
|
Connector provides some of parameters through the class connectorParameters
|
||||||
|
those parameters are stored in FTL file Conf-connector.ftl for later use in some of the data ftl files
|
||||||
|
*** -->
|
||||||
|
|
||||||
|
<#-- *********************************************** Parameter global ******************** -->
|
||||||
|
<#assign file = JsonUtil.jsonToMap(input)>
|
||||||
|
<#assign projectRP = project>
|
||||||
|
<#assign organisationRP = organisation>
|
||||||
|
<#assign aDateTime = .now>
|
||||||
|
|
||||||
|
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#noparse>
|
||||||
|
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
|
||||||
|
|
||||||
|
<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --></#noparse>
|
||||||
|
<#noparse><#-- 0 : Always empty --></#noparse>
|
||||||
|
<#noparse><#-- 1 : Always use Reflex WMS tracking --></#noparse>
|
||||||
|
<#noparse><#-- 2 : Always use the HU number --></#noparse>
|
||||||
|
<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --></#noparse>
|
||||||
|
|
||||||
|
<#list file.parameters as parameter>
|
||||||
|
<#switch parameter.type>
|
||||||
|
<#case "string">
|
||||||
|
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = "</#noparse>${parameter.value!""}<#noparse>"></#noparse>
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "integer">
|
||||||
|
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${parameter.value!0}<#noparse>></#noparse>
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#case "boolean">
|
||||||
|
<#noparse><#assign </#noparse>${parameter.name}<#noparse> = </#noparse>${(parameter.value!false)?c}<#noparse>></#noparse>
|
||||||
|
<#break>
|
||||||
|
|
||||||
|
<#default>
|
||||||
|
|
||||||
|
</#switch>
|
||||||
|
</#list>
|
||||||
@@ -46,6 +46,6 @@
|
|||||||
]
|
]
|
||||||
<#break>
|
<#break>
|
||||||
<#default>
|
<#default>
|
||||||
<#stop "Event not processed">
|
<#stop >
|
||||||
</#switch>
|
</#switch>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
<#-- Valeurs par défaut Adresse -->
|
<#-- Valeurs par défaut Adresse -->
|
||||||
<#-- Default values -->
|
<#-- Default values -->
|
||||||
<#assign typecode ="010">
|
<#assign typecode ="010">
|
||||||
@@ -9,22 +11,23 @@
|
|||||||
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
|
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
|
||||||
<#assign defaultactor ="VIZ">
|
<#assign defaultactor ="VIZ">
|
||||||
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
|
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
|
||||||
<#assign actorID = executionflow.ShipTo.ActorID >
|
<#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
|
||||||
<#else>
|
<#else>
|
||||||
<#assign actorID = defaultactor >
|
<#assign actorID = defaultactor >
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
"activity_code": "${activity_code}",
|
"activity_code": "${activity_code}",
|
||||||
"physical_depot_code": "${executionflow.ShipFrom.ActorID}",
|
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}",
|
||||||
"originator_code": "${originator_code}"
|
"originator_code": "${originator_code}"
|
||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
|
<#include "RPtoRFX_PrepOrder_HeaderMetadata.ftl">
|
||||||
"originator_reference": "${executionflow.OrderID?json_string}",
|
"originator_reference": "${executionflow.OrderID?json_string}",
|
||||||
"preparation_type_code": "${preparation_type_code}",
|
"preparation_type_code": "${preparation_type_code}",
|
||||||
"end_consignee_code": "${actorID}",
|
"end_consignee_code": "${actorID}",
|
||||||
@@ -41,6 +44,7 @@
|
|||||||
"automatic_generation": "${automatic_generation_flag}",
|
"automatic_generation": "${automatic_generation_flag}",
|
||||||
"deactivate": "false",
|
"deactivate": "false",
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
|
<#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl">
|
||||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||||
"apt_with_intermediate": "false",
|
"apt_with_intermediate": "false",
|
||||||
"load_grouping": "${load_grouping}"
|
"load_grouping": "${load_grouping}"
|
||||||
@@ -60,10 +64,10 @@
|
|||||||
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
||||||
</#if>
|
</#if>
|
||||||
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
|
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
|
||||||
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]}",
|
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]?json_string}",
|
||||||
</#if>
|
</#if>
|
||||||
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
|
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
|
||||||
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}",
|
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]?json_string}",
|
||||||
</#if>
|
</#if>
|
||||||
"street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}",
|
"street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}",
|
||||||
"additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}",
|
"additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}",
|
||||||
@@ -80,12 +84,17 @@
|
|||||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||||
<#if line.MetaData??>
|
<#if line.MetaData??>
|
||||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||||
|
<#else>
|
||||||
|
<#assign Line_MetaData_Map = {} />
|
||||||
</#if>
|
</#if>
|
||||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||||
|
<#else>
|
||||||
|
<#assign SegmentationKeys_Map = {} />
|
||||||
</#if>
|
</#if>
|
||||||
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
||||||
{
|
{
|
||||||
|
<#include "RPtoRFX_PrepOrder_LineMetadata.ftl">
|
||||||
"originator_reference_line_number": ${line.LineID?number},
|
"originator_reference_line_number": ${line.LineID?number},
|
||||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||||
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
||||||
@@ -96,13 +105,6 @@
|
|||||||
"batch_1": "${batch_1?json_string}",
|
"batch_1": "${batch_1?json_string}",
|
||||||
"base_lv_quantity": "true",
|
"base_lv_quantity": "true",
|
||||||
"any_lv": "false"
|
"any_lv": "false"
|
||||||
<#--
|
|
||||||
"stock_reservation": "false",
|
|
||||||
"forced_priority_date_min_lead_time": "false",
|
|
||||||
"temp_substitution_possible": "false",
|
|
||||||
"substitution_possible": "false"
|
|
||||||
-->
|
|
||||||
|
|
||||||
}
|
}
|
||||||
<#sep>,</#sep>
|
<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
|
|||||||
17
RPtoRFX_PrepOrder_HeaderMetadata.ftl
Normal file
17
RPtoRFX_PrepOrder_HeaderMetadata.ftl
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
|
<#-- You can map metadata with additional information,comments... -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
<#assign COLOR = Header_MetaData_Map["Color"].String/>
|
||||||
|
<#if COLOR??>
|
||||||
|
,
|
||||||
|
"additional_data_value_list":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "Color",
|
||||||
|
"value": "${COLOR}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>,
|
||||||
|
-->
|
||||||
17
RPtoRFX_PrepOrder_LineMetadata.ftl
Normal file
17
RPtoRFX_PrepOrder_LineMetadata.ftl
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
|
<#-- You can map metadata with additional information,comments... -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
<#assign COLOR = Header_MetaData_Map["Color"].String/>
|
||||||
|
<#if COLOR??>
|
||||||
|
,
|
||||||
|
"additional_data_value_list":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "Color",
|
||||||
|
"value": "${COLOR}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>,
|
||||||
|
-->
|
||||||
8
RPtoRFX_PrepOrder_OptionalAttributes.ftl
Normal file
8
RPtoRFX_PrepOrder_OptionalAttributes.ftl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<#-- Here are the fields that can be added
|
||||||
|
"end_consignee_apt_start_datetime": "0000-00-00T00:00:00",
|
||||||
|
"end_consignee_apt_end_datetime": "0000-00-00T00:00:00",
|
||||||
|
"reason_code": "str",
|
||||||
|
"planned_preparation_date": "0000-00-00",
|
||||||
|
"despatch_grouping": "string",
|
||||||
|
"reservation_end_datetime": "0000-00-00T00:00:00",
|
||||||
|
-->
|
||||||
@@ -1,22 +1,25 @@
|
|||||||
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
||||||
|
<#include "ActorPrefix.ftl">
|
||||||
|
<#include "HfRpConfig.ftl">
|
||||||
|
|
||||||
{
|
{
|
||||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
"id" : {"refid" : "${eventRP.refid?json_string}"},
|
||||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"uri_substitutions": {
|
"uri_substitutions": {
|
||||||
"activity_code": "${activity_code}",
|
"activity_code": "${activity_code}",
|
||||||
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}",
|
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}",
|
||||||
"originator_code": "${originator_code}"
|
"originator_code": "${originator_code}"
|
||||||
},
|
},
|
||||||
"payload" :
|
"payload" :
|
||||||
{
|
{
|
||||||
|
<#include "RPtoRFX_Receipt_HeaderMetadata.ftl">
|
||||||
"receipt_reference": "${executionflow.OrderID?json_string}",
|
"receipt_reference": "${executionflow.OrderID?json_string}",
|
||||||
"receipt_type": "${receipt_type}",
|
"receipt_type": "${receipt_type}",
|
||||||
"receipt_reason_code": "${receipt_reason_code}",
|
"receipt_reason_code": "${receipt_reason_code}",
|
||||||
"work_mode_code" : "${work_mode_code}",
|
"work_mode_code" : "${work_mode_code}",
|
||||||
"original_code" : "${executionflow.ShipFrom.ActorID}",
|
"original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}",
|
||||||
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
"carrier_code" : "${RPtoRFXprefixCarrier(executionflow.Carrier.ActorID!"")}",
|
||||||
|
|
||||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
"receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||||
@@ -35,12 +38,17 @@
|
|||||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||||
<#if line.MetaData??>
|
<#if line.MetaData??>
|
||||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||||
|
<#else>
|
||||||
|
<#assign Line_MetaData_Map = {} />
|
||||||
</#if>
|
</#if>
|
||||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||||
|
<#else>
|
||||||
|
<#assign SegmentationKeys_Map = {} />
|
||||||
</#if>
|
</#if>
|
||||||
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
<#include "RPtoRFX_Receipt_DefaultLineData.ftl">
|
||||||
{
|
{
|
||||||
|
<#include "RPtoRFX_Receipt_LineMetadata.ftl">
|
||||||
"receipt_reference_line_no": ${line.LineID?number},
|
"receipt_reference_line_no": ${line.LineID?number},
|
||||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||||
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
||||||
@@ -49,16 +57,9 @@
|
|||||||
"grade_code": "${grade_code}",
|
"grade_code": "${grade_code}",
|
||||||
"batch_1": "${batch_1?json_string!""}",
|
"batch_1": "${batch_1?json_string!""}",
|
||||||
"optional_attributes": {
|
"optional_attributes": {
|
||||||
<#--"held_for_check": "false",
|
<#include "RPtoRFX_Receipt_OptionalAttributes.ftl">
|
||||||
"held _for_repacking": "false",
|
|
||||||
"hold_code": "false", -->
|
|
||||||
"hold_for_specific_code": "false"
|
"hold_for_specific_code": "false"
|
||||||
}
|
}
|
||||||
<#--"quality_control_attributes": {
|
|
||||||
"qcf_to_create_for_receipt_line": "false",
|
|
||||||
"exclude_item_from_inspection": "false"
|
|
||||||
} -->
|
|
||||||
|
|
||||||
}<#sep>,</#sep>
|
}<#sep>,</#sep>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
|
|||||||
17
RPtoRFX_Receipt_HeaderMetadata.ftl
Normal file
17
RPtoRFX_Receipt_HeaderMetadata.ftl
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
|
<#-- You can map metadata with additional information,comments... -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
<#assign COLOR = Header_MetaData_Map["Color"].String/>
|
||||||
|
<#if COLOR??>
|
||||||
|
,
|
||||||
|
"additional_data_value_list":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "Color",
|
||||||
|
"value": "${COLOR}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>,
|
||||||
|
-->
|
||||||
17
RPtoRFX_Receipt_LineMetadata.ftl
Normal file
17
RPtoRFX_Receipt_LineMetadata.ftl
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<#-- Vous pouvez mapper les métadonnées avec des informations complémentaires, des commentaires... -->
|
||||||
|
<#-- You can map metadata with additional information,comments... -->
|
||||||
|
|
||||||
|
<#--
|
||||||
|
<#if Header_MetaData_Map["Color"]??>
|
||||||
|
<#assign COLOR = Header_MetaData_Map["Color"].String/>
|
||||||
|
<#if COLOR??>
|
||||||
|
,
|
||||||
|
"additional_data_value_list":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "Color",
|
||||||
|
"value": "${COLOR}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</#if>,
|
||||||
|
-->
|
||||||
16
RPtoRFX_Receipt_OptionalAttributes.ftl
Normal file
16
RPtoRFX_Receipt_OptionalAttributes.ftl
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<#-- Here are the fields that can be added
|
||||||
|
"batch_2": "string",
|
||||||
|
"batch_3": "string",
|
||||||
|
"anticipated_receipt_line_activity_code": "str",
|
||||||
|
"anticipated_receipt_line_physical_depot_code": "str",
|
||||||
|
"anticipated_receipt_line_originator_code": "string",
|
||||||
|
"anticipated_receipt_reference": "string",
|
||||||
|
"anticipated_receipt_planned_date": "0000-00-00",
|
||||||
|
"anticipated_receipt_reference_line_no": 999999,
|
||||||
|
"reservation_consignee_code": "string",
|
||||||
|
"reservation_consignee_group_code": "string",
|
||||||
|
"pro_reservation_reference": "string",
|
||||||
|
"held_for_check": "false",
|
||||||
|
"held_for_repacking": "false",
|
||||||
|
"hold_code": "str"
|
||||||
|
-->
|
||||||
15
Table.ftl
Normal file
15
Table.ftl
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<#-- Table criticality -->
|
||||||
|
<#assign TableCriticality = {
|
||||||
|
"1": "CLAIM_CRITICALITY_LOW",
|
||||||
|
"2":"CLAIM_CRITICALITY_MEDIUM",
|
||||||
|
"3":"CLAIM_CRITICALITY_HIGH",
|
||||||
|
"4":"CLAIM_CRITICALITY_BLOCKING"
|
||||||
|
}>
|
||||||
|
|
||||||
|
<#-- Table Amount -->
|
||||||
|
<#assign TableAmount = {
|
||||||
|
"$": "USD",
|
||||||
|
"£":"GBP",
|
||||||
|
"DH":"MAD"
|
||||||
|
}>
|
||||||
|
|
||||||
Reference in New Issue
Block a user