You've already forked reflex-wms-connector
Compare commits
298 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4624bab7ad | |||
| c754edaafb | |||
| adff1396c1 | |||
| 0b70c90257 | |||
| 2828c01cc4 | |||
| 4553507e3b | |||
| 830db1493b | |||
| 79ad7f53e8 | |||
| c280b2c83a | |||
| 3a0bbdc479 | |||
| 1e9ce7cdc4 | |||
| eefc7070ac | |||
| f9c62d5ee4 | |||
| bcf77601b9 | |||
| 1670a22218 | |||
| cdc78d71b1 | |||
| 6b840c0ce7 | |||
| 8ee7527ba4 | |||
| 1be67f65b2 | |||
| dec9a4b17f | |||
| eb6182c337 | |||
| 9f63f0ee62 | |||
| 5b3de10184 | |||
| 8cfd636c72 | |||
| 18808b6033 | |||
| a849b1c92e | |||
| 810e0eaa89 | |||
| 1dc77965ce | |||
| 9aee7a9448 | |||
| d4765890e5 | |||
| 9997441edb | |||
| d2a00ffe2e | |||
| 45a31fb33f | |||
| 58bcf838bd | |||
| 24f17f434e | |||
| c16c48b270 | |||
| 57d4cb6be2 | |||
| 29e16f12cc | |||
| c74470b780 | |||
| fab2238278 | |||
| 432cca8ec9 | |||
| 172d6ead58 | |||
| 57533e8735 | |||
| 4d59a53517 | |||
| 71a73bded4 | |||
| 0e0397708f | |||
| 6319051741 | |||
| d955ccdbc4 | |||
| 817209a095 | |||
| af0d846271 | |||
| fda736c295 | |||
| 2318bee797 | |||
| df2332b17e | |||
| 1de373be9c | |||
| e806da1129 | |||
| b40475626e | |||
| 559fff82e5 | |||
| 37f73115ff | |||
| a7bf18f25d | |||
| 498ef5a5bf | |||
| b6415fa316 | |||
| 08e4b04f7f | |||
| bf0ae15a50 | |||
| 3f7cd7a245 | |||
| 173deec755 | |||
| d3c7d5a96c | |||
| 329747d225 | |||
| f5e6c2b22e | |||
| 85bfe55af7 | |||
| 730750b898 | |||
| d85abf8235 | |||
| e41309e744 | |||
| 46a9a82e12 | |||
| ae0b82b6e4 | |||
| 5fc26e6015 | |||
| 20d77f21ed | |||
| 3c11695650 | |||
| 5c6e200d3e | |||
| d896aa95f4 | |||
| 236c2d754c | |||
| 5499e3059f | |||
| cae9bf80bb | |||
| ea58acc353 | |||
| 4d24367b58 | |||
| 5901619f6a | |||
| ed0141584b | |||
| 19c87e38df | |||
| 821b58b3bf | |||
| 31f38e9626 | |||
| e6a27c2ba2 | |||
| 0a26159dc9 | |||
| a4f3bf8151 | |||
| 867fdc5743 | |||
| 5d799566fe | |||
| 867a894e2e | |||
| a11124d144 | |||
| b69bfa50ba | |||
| 834abe1b78 | |||
| dbfcccfdd9 | |||
| 0c4e85067b | |||
| b1e5d51ba0 | |||
| e190a16ddc | |||
| e63b14d0ff | |||
| 1e42f6d81c | |||
| 04bc005cda | |||
| 6e46d30221 | |||
| 1f2d3ab212 | |||
| 8aab4296a2 | |||
| 8160342c63 | |||
| 72abd3b22a | |||
| bcddf351a0 | |||
| 9c229997b3 | |||
| cdbb00ea4c | |||
| ffbeb4cadc | |||
| f736d62ee4 | |||
| 6f636b4ee7 | |||
| 0406a2ff3a | |||
| 833ed4ebd6 | |||
| 90bfd41f41 | |||
| 771915ad19 | |||
| 4a1fe56381 | |||
| a9a357d4ed | |||
| 557828b459 | |||
| 1cc34e6657 | |||
| 42571ef2a1 | |||
| 63db993164 | |||
| 86335ba52d | |||
| 37773416ff | |||
| e9e09a5eb1 | |||
| 234918a77e | |||
| 8d4067a58e | |||
| aa62c276d1 | |||
| de5a9b431e | |||
| deba22e9d4 | |||
| 81720b2547 | |||
| ed8aff1e3c | |||
| 153df99ed1 | |||
| 65601133f1 | |||
| 0e3e60b45a | |||
| f0e27a6f88 | |||
| f72bcc2537 | |||
| 9700548214 | |||
| 96aec6555c | |||
| 54511c55f1 | |||
| de828ed606 | |||
| 25011e68e6 | |||
| 3a9f26cef2 | |||
| 7c1b05d76e | |||
| 134e44185a | |||
| 49b2f6e17a | |||
| 6400c985a2 | |||
| e97066c118 | |||
| 9f02fce236 | |||
| 10bb90bf92 | |||
| e53e4ec9a0 | |||
| 9524923f0c | |||
| 138bcdadf8 | |||
| e2c0735dc7 | |||
| aba22026bb | |||
| eaa7ef1b9b | |||
| 360c0743bc | |||
| 307ae9ebe2 | |||
| 80a34b354d | |||
| 09ec0e4509 | |||
| c05a4653ba | |||
| 956105fc38 | |||
| d91d15c1c9 | |||
| 550c0047da | |||
| a8b044fdba | |||
| 89fae85a2f | |||
| bfc96d37ab | |||
| c742c3639f | |||
| d60a75cbbc | |||
| cde81b3e8b | |||
| 75a9a1727c | |||
| 6d45f474d4 | |||
| 7857dfd696 | |||
| 4c84e4195b | |||
| 113c94f100 | |||
| 01d58746d8 | |||
| 7963b351aa | |||
| ab7c45bcd7 | |||
| f4f0a50493 | |||
| 65fed72146 | |||
| 0a0121c020 | |||
| 50fb9b467f | |||
| 843bf837b2 | |||
| 8425747b42 | |||
| 03e20e7aed | |||
| 04b7974c77 | |||
| ca33a85694 | |||
| 087346139d | |||
| c183ade001 | |||
| d4b927b7f7 | |||
| 0a4263d551 | |||
| b00302c8e3 | |||
| 55b7b54b44 | |||
| 26003c24f2 | |||
| 08cf8ec1a6 | |||
| 66d002052c | |||
| 949d4c6a8d | |||
| 0468700574 | |||
| fe35481144 | |||
| d21204a949 | |||
| 2b828c2f4b | |||
| a9fec0b5f9 | |||
| b7f383d531 | |||
| d21a863060 | |||
| 9ee9743b81 | |||
| b5ef671512 | |||
| 46421972a8 | |||
| ccca6d1592 | |||
| 3eb072f36d | |||
| 68622896f0 | |||
| fea5691ddd | |||
| 2fb5dcd103 | |||
| 04253d939f | |||
| f98e963b76 | |||
| 5c0b112c39 | |||
| c3d1ceb0c5 | |||
| b80623e631 | |||
| 45e8c4fee2 | |||
| 23a87c1995 | |||
| a3a2fa3b23 | |||
| 22b26ac7d3 | |||
| af29a11b22 | |||
| 74b976b367 | |||
| 0b3f07add9 | |||
| 28659b1157 | |||
| 3de6a2f6a9 | |||
| 4afc7fa50c | |||
| 6910fb80a8 | |||
| 1052849c12 | |||
| 044fda9d16 | |||
| e8510d079c | |||
| 24a94caf29 | |||
| aa19de32a5 | |||
| 513a5c2c3e | |||
| 2524859cd4 | |||
| 011540fc51 | |||
| 06147dd8d4 | |||
| 5e9804db40 | |||
| e344cca043 | |||
| b0b4714df9 | |||
| 9cbacc0ebc | |||
| c31d6de4a2 | |||
| 15bd095feb | |||
| c0dd029d1f | |||
| 2e0d61310b | |||
| f62ccadba5 | |||
| 2c29166ccb | |||
| 4534155f2e | |||
| b3da874dd3 | |||
| 5948467818 | |||
| c63e4ff5c8 | |||
| 457cfc85c2 | |||
| 6809b32410 | |||
| 82dfc05cdb | |||
| eda5fe4e07 | |||
| 26654a9820 | |||
| 37a5e64e83 | |||
| 2f31833bc3 | |||
| cff0f18d8a | |||
| 6b6cef5332 | |||
| 22b78b4ffe | |||
| 25bf3110e9 | |||
| 0a32ead29a | |||
| d7c9c72762 | |||
| 46a9dc8996 | |||
| 1eb262c91c | |||
| 2588fda3a8 | |||
| 87efb21e64 | |||
| d060d3eb10 | |||
| 28e99e9a2b | |||
| 78b0b467a3 | |||
| eca09f2e9e | |||
| cfb8e2ab5a | |||
| d1512d4269 | |||
| 264f9131d0 | |||
| fd9f248619 | |||
| 0fff71b759 | |||
| 196ab387ac | |||
| 5cafa068a7 | |||
| 6f287e878a | |||
| c3a23254b1 | |||
| c47672b8cc | |||
| 12483253f1 | |||
| f0f6e39407 | |||
| fb0bab260a | |||
| 040ba2a392 | |||
| 753de14f97 | |||
| 9cdcd2784d | |||
| cfe6bddf8d | |||
| 0cb3cc7dd0 | |||
| 59a7783203 | |||
| 03362d6a8b | |||
| f7125548db | |||
| 92e37e8baa |
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>
|
||||
@@ -1,11 +1,11 @@
|
||||
# Reflex Platform Core FTLs
|
||||
|
||||
|
||||
|
||||
|
||||
These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API.
|
||||
|
||||
|
||||
|
||||
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/
|
||||
|
||||
|
||||
You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/partnerapp/reflex-wms-connector/
|
||||
|
||||
|
||||
|
||||
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">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${stock.physical_depot_code}"
|
||||
},
|
||||
"Payload": {
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
|
||||
},
|
||||
"Payload": {
|
||||
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
||||
"Snapshot": {
|
||||
"EndDateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"MessageNb": ${sum_elt}
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"MessageNb": ${sum_elt}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
<#break>
|
||||
</#list>
|
||||
</#list>
|
||||
]
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
|
||||
{
|
||||
@@ -6,19 +8,19 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"Payload": {
|
||||
"ActorID": "${stock.physical_depot_code}",
|
||||
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
|
||||
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
|
||||
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
|
||||
"Snapshot": {
|
||||
"DateTime": {
|
||||
"DateTime": "${generation_date}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"Quantity":
|
||||
{
|
||||
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||
}
|
||||
"ID": "${stock.physical_depot_code}-${idSnapshot}",
|
||||
"Quantity":
|
||||
{
|
||||
"Value" : "${stock.quantity_in_base_lvs!"0"}",
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}"
|
||||
}
|
||||
},
|
||||
|
||||
"Goods": {
|
||||
@@ -27,7 +29,9 @@
|
||||
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
|
||||
"PriorityDate" : "${priority_date}",
|
||||
</#if>
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation keys inclusion -->
|
||||
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${stock.batch_1}"}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "HeldForSpecificCode",
|
||||
"Value": { "Bool" : "${stock.held_for_specific_code}"}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
<#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",
|
||||
"Value": "Timestamp": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${manufacturing_datetime}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
<#stop "no generic FTL file available yet for Grades">
|
||||
<#stop "no generic FTL file available yet for Grades">
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<#case "C">
|
||||
<#case "U">
|
||||
<#case "D">
|
||||
<#stop "no generic FTL file available yet for Owners">
|
||||
<#stop "no generic FTL file available yet for Owners">
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
||||
*** -->
|
||||
|
||||
<#-- *********************************************** Parameter global ******************** -->
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -16,18 +16,18 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign file = JsonUtil.jsonToMap(dataRfx)>
|
||||
|
||||
|
||||
<#include "RFXtoRP_RfxConfigurationRp.ftl">
|
||||
|
||||
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "deletion of config not supported">
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,33 +14,33 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************************* -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign carrier = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${carrier.carrier_designation?json_string}",
|
||||
"ManagedStock": false,
|
||||
@@ -14,10 +16,8 @@
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
|
||||
|
||||
"Address":
|
||||
{
|
||||
@@ -29,7 +29,12 @@
|
||||
"StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}",
|
||||
"City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
|
||||
|
||||
@@ -39,7 +44,8 @@
|
||||
"Name": "${carrier.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${carrier.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${carrier.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}"
|
||||
"StreetAddressThree" : "${carrier.address.address_3?json_string}",
|
||||
"CountryCode" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${carrier.carrier_code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,33 +14,33 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaCons_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation?json_string}",
|
||||
"ManagedStock": false,
|
||||
@@ -14,9 +16,9 @@
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
|
||||
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
@@ -29,7 +31,12 @@
|
||||
"StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.consignee_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${actor.consignee_structured_address.country_code?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.consignee_structured_address.country_designation?json_string}"
|
||||
|
||||
@@ -40,7 +47,8 @@
|
||||
"Name": "${actor.address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.address.address_1?json_string}",
|
||||
"StreetAddressTwo" : "${actor.address.address_2?json_string}",
|
||||
"StreetAddressThree" : "${actor.address.address_3?json_string}"
|
||||
"StreetAddressThree" : "${actor.address.address_3?json_string}",
|
||||
"CountryCode" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {}
|
||||
}
|
||||
]
|
||||
|
||||
54
RFXtoRP_HsaDispute.ftl
Normal file
54
RFXtoRP_HsaDispute.ftl
Normal file
@@ -0,0 +1,54 @@
|
||||
<#-- **** 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 >
|
||||
<#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")>
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated>
|
||||
"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>
|
||||
<#else>
|
||||
<#stop "Reference is empty">
|
||||
</#if>
|
||||
</#if>
|
||||
]
|
||||
<#break>
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop>
|
||||
</#switch>
|
||||
|
||||
66
RFXtoRP_HsaDispute_Created.ftl
Normal file
66
RFXtoRP_HsaDispute_Created.ftl
Normal file
@@ -0,0 +1,66 @@
|
||||
<#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?trim?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}"
|
||||
},
|
||||
<#-- To configure -->
|
||||
<#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl">
|
||||
<#if dispute.dispute_type_code=="050" >
|
||||
"EntityID":"${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>
|
||||
<#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" >
|
||||
"EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
"DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}",
|
||||
<#else>
|
||||
<#stop "WMS type code not supported">
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if TableReasonCode[dispute.dispute_reason_code]??>
|
||||
"ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}"
|
||||
<#else>
|
||||
<#stop "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 = {}/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
<#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) -->
|
||||
|
||||
<#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0>
|
||||
|
||||
<#-- IPG moves translated into Stock moves -->
|
||||
<#-- IPG moves translated into Stock moves -->
|
||||
<#if reflexMvtStockInterface.ipg_move_type == "130" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "200" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "210" ||
|
||||
@@ -25,13 +24,19 @@
|
||||
reflexMvtStockInterface.ipg_move_type == "260" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "290" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "300" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "350" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "370" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "400" ||
|
||||
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")
|
||||
>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.MovementCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved.ftl">
|
||||
@@ -41,22 +46,22 @@
|
||||
<#-- IPG moves translated into goods received (all type of receipt) -->
|
||||
<#if (reflexMvtStockInterface.ipg_move_type == "100" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "110" ||
|
||||
reflexMvtStockInterface.ipg_move_type == "120") && reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
}
|
||||
]
|
||||
reflexMvtStockInterface.ipg_move_type == "120") >
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop " Reference receipt is empty">
|
||||
</#if>
|
||||
<#else>
|
||||
<#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!="">
|
||||
<#-- Case of IPG move type volontarilly ignored-->
|
||||
<#stop " Reference receipt is empty">
|
||||
<#else>
|
||||
<#stop>
|
||||
</#if>
|
||||
<#stop>
|
||||
</#if>
|
||||
</#if>
|
||||
<#else>
|
||||
@@ -67,11 +72,11 @@
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported - Case D ">
|
||||
<#stop >
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop>
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<#include "HfRpConfig.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 />
|
||||
{
|
||||
"Header": {
|
||||
@@ -20,18 +21,24 @@
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
|
||||
"PriorityDate": "${priority_date}",
|
||||
|
||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
<#-- Goods received Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
|
||||
},
|
||||
|
||||
<#if reflexMvtStockInterface.receipt_reference!="">
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
"OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
|
||||
<#else>
|
||||
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
"OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
|
||||
</#if>
|
||||
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
@@ -41,4 +48,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
]
|
||||
@@ -18,21 +18,21 @@
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "HeldForSpecificCode",
|
||||
"Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
<#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"Key": "ManufacturingDate",
|
||||
"Value": "Timestamp": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${manufacturing_date}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
-->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
|
||||
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
|
||||
"200":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
@@ -10,12 +11,18 @@
|
||||
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
||||
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
|
||||
"400":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"410":"STOCK_MOVEMENT_TYPE_FIX",
|
||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}>
|
||||
<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
|
||||
"420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
|
||||
"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 />
|
||||
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
@@ -24,7 +31,11 @@
|
||||
"Payload": {
|
||||
"Goods": {
|
||||
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
|
||||
"PriorityDate": "${ipg_priority_datetime}",
|
||||
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
|
||||
"PriorityDate": "${ipg_priority_datetime}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation keys inclusions -->
|
||||
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,
|
||||
@@ -32,7 +43,7 @@
|
||||
|
||||
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
|
||||
},
|
||||
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
|
||||
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
|
||||
"Movement": {
|
||||
|
||||
"DateTime": {
|
||||
@@ -42,7 +53,11 @@
|
||||
"Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}",
|
||||
"ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}",
|
||||
"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}",
|
||||
<#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0>
|
||||
"OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}",
|
||||
@@ -51,7 +66,7 @@
|
||||
"Quantity":
|
||||
{
|
||||
"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}
|
||||
<#else>
|
||||
"Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -15,37 +15,37 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if item.logistical_variant_list?? >
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated.ftl">
|
||||
<#else>
|
||||
<#stop "no LV for the item">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign item = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItm_ItemDeleted.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -15,31 +15,31 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign lv = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl">
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
]
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
"Codes": [
|
||||
<#list lv.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
],
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
|
||||
|
||||
<#-- 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 -->
|
||||
<#if item.logistical_variant_list??>
|
||||
@@ -39,8 +41,8 @@
|
||||
"Codes": [
|
||||
<#list logistical_variant.id_list as id>
|
||||
{
|
||||
"Key": "${id.logistical_variant_ID_type_code?json_string!""}",
|
||||
"Value": "${id.logistical_variant_ID_code?json_string!""}"
|
||||
"Key": "${(id.logistical_variant_ID_type_code!"")?json_string}",
|
||||
"Value": "${(id.logistical_variant_ID_code!"")?json_string}"
|
||||
}<#sep>,</#sep>
|
||||
</#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>
|
||||
@@ -72,10 +72,10 @@
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (case D)">
|
||||
<#stop >
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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) />
|
||||
|
||||
[
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,33 +14,33 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign actor = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsaSup_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${actor.designation?json_string}",
|
||||
"ManagedStock": false,
|
||||
@@ -14,9 +16,7 @@
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
"Address":
|
||||
{
|
||||
@@ -28,7 +28,12 @@
|
||||
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
||||
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
||||
|
||||
@@ -38,7 +43,8 @@
|
||||
"Name": "${actor.optional_attributes.company_name?json_string}",
|
||||
"StreetAddressOne" : "${actor.optional_attributes.address_1?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" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${actor.code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"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>
|
||||
@@ -3,7 +3,7 @@
|
||||
<#-- project : projectId in ReflexPlatform -->
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign cloudEventMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -14,33 +14,33 @@
|
||||
<#case "U">
|
||||
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE *************************** -->
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
<#assign depot = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrDepot_ActorDeleted.ftl">
|
||||
}
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
"Name": "${depot.physical_depot_designation?json_string}",
|
||||
"ManagedStock": true,
|
||||
@@ -14,9 +16,9 @@
|
||||
<#-- ***Partner ID could be added here *** -->
|
||||
<#-- "PartnerID": "${}", -->
|
||||
|
||||
<#--
|
||||
|
||||
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
||||
-->
|
||||
|
||||
|
||||
"Address":
|
||||
{
|
||||
@@ -28,23 +30,32 @@
|
||||
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
||||
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
||||
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
||||
"CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
|
||||
<#if isCountryCode >
|
||||
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
||||
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
||||
|
||||
<#-- if Reflex WMS address is not structured -->
|
||||
<#else>
|
||||
<#if depot.physical_depot_address??>
|
||||
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
||||
"StreetAddressOne" : "${depot.physical_depot_address.address_1?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" : ""
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
},
|
||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
"Typology": "TYPOLOGY_UNKNOWN"
|
||||
<#if depot.physical_depot_address??>
|
||||
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
||||
"${depot.physical_depot_address.other_number?json_string}"
|
||||
],
|
||||
</#if>
|
||||
"Typology": "TYPOLOGY_WAREHOUSE"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
||||
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
|
||||
"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>
|
||||
@@ -2,10 +2,11 @@
|
||||
<#-- 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>
|
||||
|
||||
@@ -25,6 +26,7 @@
|
||||
<#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl">
|
||||
},
|
||||
{
|
||||
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
@@ -47,9 +49,14 @@
|
||||
}
|
||||
</#if>
|
||||
|
||||
<#assign refIDHmap ={}>
|
||||
<#assign hd_numberHmap ={}>
|
||||
<#assign hd_numberHmapHUadded ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#if despatched_ipg.consignment_unit_id!="">
|
||||
<#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 apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
@@ -72,10 +79,21 @@
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl">
|
||||
}
|
||||
<#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )>
|
||||
<#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
,
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
</#if>
|
||||
</#list>
|
||||
<#-- <#sep>,</#sep> -->
|
||||
</#list>
|
||||
<#assign refIDHmap ={}>
|
||||
]
|
||||
<#else>
|
||||
<#stop "no confirmed quantity for the preparation - preparation closed">
|
||||
@@ -85,9 +103,9 @@
|
||||
<#break>
|
||||
<#case "D">
|
||||
<#-- *********************************************** Action = DELETE ******************** -->
|
||||
<#stop "event not supported (Case D)">
|
||||
<#stop>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop>
|
||||
</#switch>
|
||||
@@ -1,26 +1,34 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
,
|
||||
</#if>
|
||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
<#-- Add transport grade code
|
||||
<#if preparationOrder.transport_grade_code!="">
|
||||
,
|
||||
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||
</#if> -->
|
||||
}
|
||||
<#-- Add transport grade code
|
||||
<#if preparationOrder.transport_grade_code!="">
|
||||
,
|
||||
"CarrierService":"${preparationOrder.transport_grade_code?trim?json_string}"
|
||||
</#if> -->
|
||||
}
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
]
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
<#--
|
||||
"MetaData" :[
|
||||
|
||||
]
|
||||
|
||||
]
|
||||
-->
|
||||
"MetaData": [ ]
|
||||
@@ -15,7 +15,7 @@
|
||||
"Value": { "String" : "no batch"}
|
||||
<#else>
|
||||
"Value": { "String" : "${despatched_ipg.batch_number}"}
|
||||
</#if>
|
||||
</#if>
|
||||
},
|
||||
{
|
||||
"Key": "HeldForSpecificCode",
|
||||
@@ -24,15 +24,14 @@
|
||||
<#else>
|
||||
"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",
|
||||
"Value": "Timestamp": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${manufacturing_date}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg.carton_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}<#sep>,</#sep>
|
||||
<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
|
||||
<#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>
|
||||
<#if !refIDHmap[despatched_ipg3.carton_number]?? >
|
||||
<#if refIDHmap?size != 0 >
|
||||
,
|
||||
</#if>
|
||||
<#assign refIDHmap += {despatched_ipg3.carton_number,despatched_ipg3.carton_number}>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg3.carton_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched3_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
]
|
||||
|
||||
9
RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl
Normal file
9
RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl
Normal file
@@ -0,0 +1,9 @@
|
||||
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
|
||||
|
||||
<#--
|
||||
"MetaData" :[
|
||||
|
||||
]
|
||||
|
||||
-->
|
||||
"MetaData": [ ]
|
||||
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,23 +1,28 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg.hd_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
<#if !refIDHmap_local[despatched_ipg.hd_number]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
,
|
||||
</#if>
|
||||
<#assign refIDHmap_local +={despatched_ipg.hd_number,despatched_ipg.hd_number}>
|
||||
{
|
||||
"Header": {"ProjectID": "${projectRP}"},
|
||||
"ID": {
|
||||
"RefID": "${despatched_ipg.hd_number}",
|
||||
"RefDate": {
|
||||
"DateTime": "${dispatched_datetime}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": { }
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
]
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<#include "ReflexUtils.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 && l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#list preparation_line.despatched_ipg_list as despatched_ipg>
|
||||
<#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefDate": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${packing_datetime}"
|
||||
},
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"RefID": "${despatched_ipg.carton_number}"
|
||||
<#else>
|
||||
@@ -18,9 +24,9 @@
|
||||
"Payload": {
|
||||
"Information" :{
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
"ContainerType": "${despatched_ipg.carton_type_code}"
|
||||
"ContainerType": "${despatched_ipg.carton_type_code?json_string}"
|
||||
<#if preparation_line.despatched_cartons_list?? >
|
||||
<#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
||||
<#list preparation_line.despatched_cartons_list?filter(l -> l?? && l.carton_number==despatched_ipg.carton_number) as dimensionCarton>
|
||||
,
|
||||
"Length": {
|
||||
"Unit": "${length_unit_rfx}",
|
||||
@@ -43,7 +49,7 @@
|
||||
<#else>
|
||||
"ContainerType": "${despatched_ipg.hd_type_code?json_string}"
|
||||
<#if preparation_line.despatched_hds_list??>
|
||||
<#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
||||
<#list preparation_line.despatched_hds_list?filter(j -> j?? && j.handling_device_number==despatched_ipg.hd_number) as dimensionHU>
|
||||
,
|
||||
"Length": {
|
||||
"Unit": "${length_unit_rfx}",
|
||||
@@ -70,57 +76,58 @@
|
||||
"Goods": {
|
||||
"ItemID": "${preparation_line.item_code?trim?json_string}",
|
||||
"LVBranchID": "${preparation_line.item_lv_code?json_string}",
|
||||
<#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 />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
|
||||
<#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 />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#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 />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#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 />
|
||||
"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}",
|
||||
<#else>
|
||||
<#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 />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
||||
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
<#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}",
|
||||
<#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 />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
|
||||
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
|
||||
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${priority_date}",
|
||||
<#else>
|
||||
"PriorityDate": "1970-01-01T00:00:00Z",
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
|
||||
},
|
||||
"OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
"ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}",
|
||||
<#if (preparation_line.pro_originator_reference_line_number!0) != 0>
|
||||
"LineID": "${preparation_line.pro_originator_reference_line_number}",
|
||||
<#else>
|
||||
"LineID": "${preparation_line.pro_line_number!0}",
|
||||
</#if>
|
||||
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${despatched_ipg.quantity_lvs}
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
|
||||
"Quantity": {
|
||||
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
||||
"Value": ${despatched_ipg.quantity_lvs}
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
<#sep>,</#sep>
|
||||
|
||||
43
RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl
Normal file
43
RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl
Normal file
@@ -0,0 +1,43 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
[
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefDate": {
|
||||
"AuthorTimeZone": "${time_zone_rfx}",
|
||||
"DateTime": "${HUadded_packing_datetime}"
|
||||
},
|
||||
"RefID": "${despatched_ipg.hd_number}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
|
||||
"IncludedHandlingunitIDs": [ "${despatched_ipg.carton_number}" ]
|
||||
<#if preparation_line.despatched_hds_list?? && preparation_line.despatched_hds_list[0]??>
|
||||
,
|
||||
"Information": {
|
||||
"ContainerType": "${preparation_line.despatched_hds_list[0].hd_type_code}",
|
||||
"Length": {
|
||||
"Unit": "${length_unit_rfx}",
|
||||
"Value": ${preparation_line.despatched_hds_list[0].hd_type_depth}
|
||||
},
|
||||
"Weight": {
|
||||
"Unit": "${weight_unit_rfx}",
|
||||
"Value": ${preparation_line.despatched_hds_list[0].hd_gross_weight}
|
||||
},
|
||||
"Width": {
|
||||
"Unit": "${length_unit_rfx}",
|
||||
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
|
||||
}
|
||||
}
|
||||
</#if>,
|
||||
<#-- HU Metadata inclusin inclusion -->
|
||||
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,21 +1,29 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
<#assign refIDHmap_local ={}>
|
||||
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
|
||||
<#assign OrderOriginReference = preparation_line.preparation_order_originator_reference?trim?json_string>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
|
||||
<#if !refIDHmap_local[OrderOriginReference]?? >
|
||||
<#if refIDHmap_local?size != 0 >
|
||||
,
|
||||
</#if>
|
||||
<#assign refIDHmap_local +={OrderOriginReference,OrderOriginReference}>
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID":{
|
||||
"RefID": "${OrderOriginReference}"
|
||||
},
|
||||
"Payload":{
|
||||
"Carrier": {
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
}
|
||||
</#if>
|
||||
</#list>
|
||||
<#assign refIDHmap_local ={}>
|
||||
]
|
||||
@@ -1,13 +1,54 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "RFX_PartnerAPP_Settings.ftl">
|
||||
[
|
||||
|
||||
<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) />
|
||||
{
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"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": {
|
||||
"DateTime": "${dispatched_datetime4}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
}
|
||||
},
|
||||
"Payload": {
|
||||
<#if despatched_ipg.carton_number != "000000000000000000">
|
||||
@@ -18,9 +59,8 @@
|
||||
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
|
||||
,
|
||||
"HUCarrier":{
|
||||
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
|
||||
}
|
||||
|
||||
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
|
||||
}
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,28 +16,30 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#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) -->
|
||||
<#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030">
|
||||
<#-- Only if preparation order not confirmed -->
|
||||
<#if preparation_order.preparation_order_confirmed == "false" >
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
|
||||
<#else>
|
||||
<#stop "preparation order already confirmed">
|
||||
}
|
||||
<#else>
|
||||
<#-- preparation order already confirmed -->
|
||||
<#stop>
|
||||
</#if>
|
||||
|
||||
<#else>
|
||||
<#stop "preparation order type not supported">
|
||||
<#-- preparation order type not supported -->
|
||||
<#stop>
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
}
|
||||
|
||||
]
|
||||
<#break>
|
||||
|
||||
@@ -46,23 +48,21 @@
|
||||
<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) />
|
||||
<#assign preparation_order = JsonUtil.jsonToMap(dataRfx)>
|
||||
[
|
||||
{
|
||||
<#if preparation_order.originator_reference?? && preparation_order.originator_reference!="">
|
||||
{
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl">
|
||||
}
|
||||
}
|
||||
<#else>
|
||||
<#stop "PRO reference is empty">
|
||||
</#if>
|
||||
}
|
||||
]
|
||||
<#break>
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<#include "HfRpConfig.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 pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_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 = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
@@ -26,7 +27,7 @@
|
||||
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
|
||||
</#if> -->
|
||||
"ShipFrom": {
|
||||
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
|
||||
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipFromAcked": true,
|
||||
"ShipTo": {
|
||||
@@ -48,27 +49,32 @@
|
||||
preparation_order.address.territorial_division_code == "" &&
|
||||
preparation_order.address.postal_code == "" &&
|
||||
preparation_order.address.iso_country_code == "">
|
||||
"ActorID": "${preparation_order.end_consignee_code}"
|
||||
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
|
||||
<#else>
|
||||
"Actor":
|
||||
{
|
||||
"Name" : "${preparation_order.address.name_or_company_name?json_string!""}",
|
||||
"Name" : "${(preparation_order.address.name_or_company_name!"")?json_string}",
|
||||
"Address" :
|
||||
{
|
||||
"City" : "${preparation_order.address.post_code_area_name?json_string!""}",
|
||||
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
|
||||
"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!""}",
|
||||
"StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}"
|
||||
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
|
||||
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
|
||||
<#if isCountryCode>
|
||||
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
|
||||
<#else>
|
||||
"CountryCode" : "",
|
||||
</#if>
|
||||
"PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}",
|
||||
"StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}",
|
||||
"StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",
|
||||
"StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}"
|
||||
}
|
||||
},
|
||||
"Contact" :
|
||||
{
|
||||
"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!""}" ]
|
||||
"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>
|
||||
},
|
||||
@@ -84,7 +90,6 @@
|
||||
</#if>
|
||||
<#-- Line Metadata inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
|
||||
|
||||
"RequestedContent":
|
||||
{
|
||||
"Goods":
|
||||
@@ -95,10 +100,8 @@
|
||||
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
|
||||
"PriorityDate": "${forced_priority_date}",
|
||||
</#if>
|
||||
|
||||
<#-- Segmentation Keys inclusion -->
|
||||
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
|
||||
|
||||
},
|
||||
"Quantity" :
|
||||
{
|
||||
@@ -110,7 +113,6 @@
|
||||
</#list>
|
||||
],
|
||||
</#if>
|
||||
|
||||
"RequestedMilestones" :
|
||||
{
|
||||
"RequestedDeliveryDateTime" :
|
||||
|
||||
@@ -98,6 +98,6 @@
|
||||
|
||||
|
||||
<#default>
|
||||
<#stop "event not supported">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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) />
|
||||
|
||||
[
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
[
|
||||
{
|
||||
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) />
|
||||
<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) />
|
||||
<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) />
|
||||
"Header": {
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
@@ -25,19 +26,21 @@
|
||||
|
||||
"ShipFrom":
|
||||
{
|
||||
"ActorID": "${receipt.original_code?trim?json_string}"
|
||||
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
|
||||
},
|
||||
"ShipTo" :
|
||||
{
|
||||
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
|
||||
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
|
||||
},
|
||||
"ShipToAcked": true,
|
||||
|
||||
<#if receipt.carrier_informations.carrier_code != "">
|
||||
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
|
||||
"Carrier":
|
||||
{
|
||||
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
|
||||
},
|
||||
</#if>
|
||||
|
||||
|
||||
<#if receipt.line_list??>
|
||||
"Lines" : [
|
||||
<#list receipt.line_list as line>
|
||||
@@ -51,13 +54,16 @@
|
||||
{
|
||||
"ItemID": "${line.item_code?trim?json_string!"0"}",
|
||||
"LVBranchID": "${line.item_lv_code?json_string!"0"}",
|
||||
<#if line.line_without_detail??>
|
||||
<#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
|
||||
<#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}",
|
||||
</#if>
|
||||
<#else>
|
||||
<#stop >
|
||||
<#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">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#include "HfRpConfig.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) />
|
||||
|
||||
[
|
||||
{
|
||||
|
||||
@@ -22,22 +22,21 @@
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
},
|
||||
"TechMessage": {
|
||||
"Code": "${restResponsetMsg.status}",
|
||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||
"Label": ${strJsonBody}
|
||||
},
|
||||
"UserMessage": {
|
||||
"Code": "${restResponsetMsg.status}",
|
||||
"Code": "${restResponsetMsg.status!"no Code"}",
|
||||
"Label": ${strJsonBody},
|
||||
"Params": []
|
||||
},
|
||||
"DetailElements": [],
|
||||
"CorrelationID": "${id.correlationid}",
|
||||
"ContextPayload": "rfxresponse",
|
||||
"CorrelationID": "${id.correlationid!"no Correlationid"}",
|
||||
"ContextPayload": ${strJsonBody},
|
||||
"Type": "RP_EXECUTIONFLOW_EVENT",
|
||||
"Task": "${id.apiRestReflexID}",
|
||||
"OriginalID": "${id.refid?trim?json_string}",
|
||||
"Task": "${id.apiRestReflexID!"no Task"}",
|
||||
"OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
|
||||
"StackTrace": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
]
|
||||
@@ -4,7 +4,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${id.refid}"
|
||||
"RefID": "${id.refid?json_string}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${id.refid}"
|
||||
"RefID": "${id.refid?json_string}"
|
||||
},
|
||||
|
||||
"Payload": {
|
||||
|
||||
@@ -4,16 +4,57 @@
|
||||
<#-- organisation : organisationtId in ReflexPlatform -->
|
||||
|
||||
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
|
||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)>
|
||||
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
|
||||
<#assign aDateTime = .now>
|
||||
<#assign no_apiRestReflexID = "no apiRestReflexID">
|
||||
<#assign no_status = -99999>
|
||||
|
||||
<#switch id.apiRestReflexID>
|
||||
|
||||
<#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>
|
||||
|
||||
<#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 201>
|
||||
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
|
||||
@@ -28,22 +69,33 @@
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
|
||||
[
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
|
||||
}
|
||||
]
|
||||
<#else>
|
||||
[
|
||||
{
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_PlatformLogCreate.ftl">
|
||||
},
|
||||
{
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
"datas" :
|
||||
<#include "RFXtoRP_RestResponseAllocationError.ftl">
|
||||
}
|
||||
]
|
||||
</#if>
|
||||
</#if>
|
||||
<#break>
|
||||
<#default>
|
||||
@@ -52,7 +104,7 @@
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@@ -70,7 +122,29 @@
|
||||
<#break>
|
||||
|
||||
<#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 201>
|
||||
<#-- *********************************************** ApiRestID = receipts_post ******************** -->
|
||||
@@ -110,7 +184,7 @@
|
||||
<#if restResponsetMsg.body?? >
|
||||
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
|
||||
<#else>
|
||||
<#assign restResponseBody = "{}" />
|
||||
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
|
||||
</#if>
|
||||
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
|
||||
"apiReflexPlatformID" : "${apiReflexPlatformID}",
|
||||
@@ -126,7 +200,6 @@
|
||||
]
|
||||
</#switch>
|
||||
<#break>
|
||||
|
||||
<#default>
|
||||
<#stop>
|
||||
</#switch>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"ProjectID": "${projectRP}"
|
||||
},
|
||||
"ID": {
|
||||
"RefID": "${id.refid?trim?json_string}",
|
||||
"RefID": "${id.refid!"no RefID"?trim?json_string}",
|
||||
"RefDate": {
|
||||
"DateTime": "${aDateTime?iso_utc}",
|
||||
"AuthorTimeZone": "${time_zone_rfx}"
|
||||
|
||||
@@ -2,35 +2,42 @@
|
||||
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
|
||||
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#noparse>
|
||||
|
||||
<#noparse>
|
||||
<#noparse>
|
||||
<#-- 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 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 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 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 quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
|
||||
<#assign rfx_date_format_default = "yyyy-MM-dd" >
|
||||
|
||||
</#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 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 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 number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
|
||||
|
||||
<#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 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"}>
|
||||
|
||||
|
||||
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
|
||||
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
|
||||
|
||||
|
||||
<#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>
|
||||
|
||||
<#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 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 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 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!"Europe/Paris"}<#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>
|
||||
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
|
||||
</#list>
|
||||
|
||||
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
|
||||
<#if reflex_platform_project_uniqueness.site_code_unicity??>
|
||||
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
|
||||
<#else>
|
||||
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
|
||||
</#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>
|
||||
@@ -5,7 +5,7 @@
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#include "ReflexUtils.ftl">
|
||||
|
||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||
<#assign eventRP = JsonUtil.jsonToMap(input)>
|
||||
<#assign projectRP = project>
|
||||
<#assign organisationRP = organisation>
|
||||
|
||||
@@ -24,28 +24,28 @@
|
||||
<#if executionflow.MetaData??>
|
||||
<#assign Header_MetaData_Map = JsonUtil.sequenceToMap(executionflow.MetaData, "Key", "Value") />
|
||||
</#if>
|
||||
|
||||
[
|
||||
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
|
||||
|
||||
[
|
||||
<#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
|
||||
<#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_PrepOrder.ftl">
|
||||
"datas" :
|
||||
<#include "RPtoRFX_PrepOrder.ftl">
|
||||
}
|
||||
</#if>
|
||||
<#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected>
|
||||
<#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected>
|
||||
{
|
||||
<#assign apiRestReflexID = ApiRestReflexID.receipts_post>
|
||||
<#assign apiRestReflexID = ApiRestReflexID.receipts_post>
|
||||
"apiRestReflexID" : "${apiRestReflexID}",
|
||||
"datas" :
|
||||
<#include "RPtoRFX_Receipt.ftl">
|
||||
"datas" :
|
||||
<#include "RPtoRFX_Receipt.ftl">
|
||||
}
|
||||
</#if>
|
||||
|
||||
]
|
||||
]
|
||||
<#break>
|
||||
<#default>
|
||||
<#stop "Event not processed">
|
||||
<#stop >
|
||||
</#switch>
|
||||
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
<#-- Valeurs par défaut Adresse -->
|
||||
<#-- Default values -->
|
||||
<#assign typecode ="010">
|
||||
<#assign titlecode ="1">
|
||||
<#assign contacttypecode ="010">
|
||||
<#assign adresstypecode ="010">
|
||||
<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans Reflex WMS pour utiliser cette fonctionnalité -->
|
||||
<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
|
||||
<#assign defaultactor ="VIZ">
|
||||
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
|
||||
<#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
|
||||
<#else>
|
||||
<#assign actorID = defaultactor >
|
||||
</#if>
|
||||
|
||||
{
|
||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/preparation_orders",
|
||||
"method" : "POST",
|
||||
"uri_substitutions": {
|
||||
"activity_code": "${activity_code}",
|
||||
"physical_depot_code": "${executionflow.ShipFrom.ActorID}",
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}",
|
||||
"originator_code": "${originator_code}"
|
||||
},
|
||||
"payload" :
|
||||
"payload" :
|
||||
{
|
||||
"originator_reference": "${executionflow.OrderID}",
|
||||
"originator_reference": "${executionflow.OrderID?json_string}",
|
||||
"preparation_type_code": "${preparation_type_code}",
|
||||
"end_consignee_code": "${executionflow.ShipTo.ActorID!""}",
|
||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||
"end_consignee_code": "${actorID}",
|
||||
<#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??>
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",
|
||||
<#else>
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
"requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
</#if>
|
||||
"requested_delivery_date_type": "${requested_delivery_date_type}",
|
||||
"consolidated_delivery": "${consolidated_delivery_flag}",
|
||||
@@ -30,53 +46,70 @@
|
||||
"apt_with_end_consignee": "${apt_with_end_consignee_flag}",
|
||||
"apt_with_intermediate": "false",
|
||||
"load_grouping": "${load_grouping}"
|
||||
},
|
||||
<#if executionflow.ShipTo.ActorID == "">
|
||||
"address": {
|
||||
"first_name": "${executionflow.ShipTo.Contact.FirstName!""?json_string}",
|
||||
"last_name" :"${executionflow.ShipTo.Contact.Lastname!""?json_string}",
|
||||
"mail_address": "${executionflow.ShipTo.Actor.Emails[0]!""}",
|
||||
"mobile_phone_number": "${executionflow.ShipTo.Actor.Phones[0]!""}",
|
||||
"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_2": "${executionflow.ShipTo.Actor.Address.StreetAddressThree!""?json_string}",
|
||||
"postal_code": "${executionflow.ShipTo.Actor.Address.PostalCode!""}",
|
||||
"iso_country_code": "${executionflow.ShipTo.Actor.Address.CountryCode!""}"
|
||||
},
|
||||
}
|
||||
<#if actorID == defaultactor >
|
||||
,
|
||||
"address": {
|
||||
"type_code": "${typecode}",
|
||||
"title_code" : "${titlecode}",
|
||||
"contact_type_code" : "${contacttypecode}",
|
||||
"address_type_code" : "${adresstypecode}",
|
||||
"first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}",
|
||||
"last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
||||
<#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!="">
|
||||
"name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}",
|
||||
<#else>
|
||||
"name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}",
|
||||
</#if>
|
||||
<#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!="">
|
||||
"mail_address": "${executionflow.ShipTo.Contact.Emails[0]?json_string}",
|
||||
</#if>
|
||||
<#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!="">
|
||||
"mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]?json_string}",
|
||||
</#if>
|
||||
"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_2": "${(executionflow.ShipTo.Actor.Address.StreetAddressThree!"")?json_string}",
|
||||
"postal_code": "${(executionflow.ShipTo.Actor.Address.PostalCode!"")?json_string}",
|
||||
"post_code_area_name" : "${(executionflow.ShipTo.Actor.Address.City!"")?json_string}",
|
||||
"iso_country_code": "${(executionflow.ShipTo.Actor.Address.CountryCode!"")?json_string}"
|
||||
}
|
||||
</#if>
|
||||
<#if executionflow.Lines??>
|
||||
"line_list": [
|
||||
<#list executionflow.Lines as line>
|
||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||
<#if line.MetaData??>
|
||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||
</#if>
|
||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||
</#if>
|
||||
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
||||
{
|
||||
"originator_reference_line_number": ${line.LineID?number},
|
||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
||||
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
||||
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
||||
"input_order_data": "false",
|
||||
"batch_1": "${batch_1}",
|
||||
"base_lv_quantity": "true",
|
||||
"any_lv": "false"
|
||||
<#--
|
||||
"stock_reservation": "false",
|
||||
"forced_priority_date_min_lead_time": "false",
|
||||
"temp_substitution_possible": "false",
|
||||
"substitution_possible": "false"
|
||||
-->
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
</#if>
|
||||
]
|
||||
<#if executionflow.Lines??>
|
||||
,
|
||||
"line_list": [
|
||||
<#list executionflow.Lines as line>
|
||||
<#-- ******* line MetaData and Segmentationkeys to maps ******** -->
|
||||
<#if line.MetaData??>
|
||||
<#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") />
|
||||
</#if>
|
||||
<#if line.RequestedContent.Goods.SegmentationKeys??>
|
||||
<#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") />
|
||||
</#if>
|
||||
<#include "RPtoRFX_PrepOrder_DefaultLineData.ftl">
|
||||
{
|
||||
"originator_reference_line_number": ${line.LineID?number},
|
||||
"item_code": "${line.RequestedContent.Goods.ItemID!""}",
|
||||
"item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}",
|
||||
"base_lv_quantity_to_prepare": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||
"owner_code_to_prepare" :"${owner_code_to_prepare}",
|
||||
"grade_code_to_prepare" :"${grade_code_to_prepare}",
|
||||
"input_order_data": "false",
|
||||
"batch_1": "${batch_1?json_string}",
|
||||
"base_lv_quantity": "true",
|
||||
"any_lv": "false"
|
||||
<#--
|
||||
"stock_reservation": "false",
|
||||
"forced_priority_date_min_lead_time": "false",
|
||||
"temp_substitution_possible": "false",
|
||||
"substitution_possible": "false"
|
||||
-->
|
||||
|
||||
}
|
||||
<#sep>,</#sep>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<#-- Note : you can use Order Header Metadata, using the define map : Header_MetaData_Map -->
|
||||
|
||||
<#-- How to use MD Header map
|
||||
Example :
|
||||
Example :
|
||||
<#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/>
|
||||
|
||||
If your MD is :
|
||||
@@ -23,8 +23,22 @@
|
||||
<#assign protected_flag ="false"/>
|
||||
<#assign automatic_generation_flag ="false"/>
|
||||
<#assign apt_with_end_consignee_flag="false"/>
|
||||
<#assign load_grouping = "DEFAUT"/>
|
||||
|
||||
|
||||
<#-- A supprimer si utilisation de la table de correspondance-->
|
||||
<#--To be deleted if using the correspondence table-->
|
||||
<#assign load_grouping = "default">
|
||||
|
||||
|
||||
<#-- Table de correspondance Transporteur/Code regroupement chargement,
|
||||
affectation à un chargement si paramétrage regroupement chargement+plan de base distribution-->
|
||||
<#--Carrier / Load Grouping Code Correspondence Table,
|
||||
Assigning to a load if you set up Load Grouping+Distribution Master Plan-->
|
||||
<#-- Example -->
|
||||
<#--<#if executionflow.Carrier.ActorID == "TEST" >
|
||||
<#assign load_grouping = "TEST">
|
||||
<#else>
|
||||
<#assign load_grouping = "default">
|
||||
</#if>-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
|
||||
<#include "ActorPrefix.ftl">
|
||||
<#include "HfRpConfig.ftl">
|
||||
|
||||
{
|
||||
"id" : {"refid" : "${executionflow.OrderID}"},
|
||||
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
|
||||
"route" : "rest/public/v1/activities/{activity_code}/physical_depots/{physical_depot_code}/originators/{originator_code}/receipts",
|
||||
"method" : "POST",
|
||||
"uri_substitutions": {
|
||||
"activity_code": "${activity_code}",
|
||||
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}",
|
||||
"physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}",
|
||||
"originator_code": "${originator_code}"
|
||||
},
|
||||
"payload" :
|
||||
"payload" :
|
||||
{
|
||||
"receipt_reference": "${executionflow.OrderID}",
|
||||
"receipt_reference": "${executionflow.OrderID?json_string}",
|
||||
"receipt_type": "${receipt_type}",
|
||||
"receipt_reason_code": "${receipt_reason_code}",
|
||||
"receipt_reason_code": "${receipt_reason_code}",
|
||||
"work_mode_code" : "${work_mode_code}",
|
||||
"original_code" : "${executionflow.ShipFrom.ActorID}",
|
||||
"carrier_code" : "${executionflow.Carrier.ActorID!""}",
|
||||
"original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.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)}",
|
||||
<#else>
|
||||
"receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}",
|
||||
</#if>
|
||||
"carrier_appointment_made": "false",
|
||||
"receipt_in_cross_docking": "false",
|
||||
"dock_occupation_duration": 1,
|
||||
|
||||
<#if executionflow.Lines??>
|
||||
"dock_occupation_duration": 1
|
||||
|
||||
<#if executionflow.Lines??>
|
||||
,
|
||||
"line_list": [
|
||||
<#list executionflow.Lines as line>
|
||||
|
||||
@@ -46,10 +49,9 @@
|
||||
"level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0},
|
||||
"owner_code": "${owner_code}",
|
||||
"grade_code": "${grade_code}",
|
||||
"batch_1": "${batch_1!""}",
|
||||
"batch_1": "${batch_1?json_string!""}",
|
||||
"optional_attributes": {
|
||||
<#--"held_for_check": "false",
|
||||
"held _for_repacking": "false",
|
||||
"hold_code": "false", -->
|
||||
"hold_for_specific_code": "false"
|
||||
}
|
||||
@@ -59,9 +61,8 @@
|
||||
} -->
|
||||
|
||||
}<#sep>,</#sep>
|
||||
</#list>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map -->
|
||||
|
||||
<#-- How to use MD or SK map
|
||||
Example :
|
||||
Example :
|
||||
<#assign owner_code = SegmentationKeys_Map["Owner"].String!""/>
|
||||
|
||||
If your SK is :
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
<#function splitEmailsIntoArray emails >
|
||||
<#local str = "[">
|
||||
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
|
||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||
<#if str != "[">
|
||||
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
||||
<#if str != "[">
|
||||
<#local str += ",">
|
||||
</#if>
|
||||
<#local str += "\"">
|
||||
<#local str += email>
|
||||
<#local str += "\"">
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
<#local str += "]">
|
||||
<#return (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