From 7c15a16e57ffa128d9fd0fc324764f31030c27a9 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Fri, 29 Aug 2025 11:48:14 +0200 Subject: [PATCH 001/183] SCPN1-9254 --- RFXtoRP_HsaDesPatch.ftl | 32 ++++++++++++++++++++++++++++++++ RFXtoRP_HsaDespNt.ftl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 RFXtoRP_HsaDesPatch.ftl create mode 100644 RFXtoRP_HsaDespNt.ftl diff --git a/RFXtoRP_HsaDesPatch.ftl b/RFXtoRP_HsaDesPatch.ftl new file mode 100644 index 0000000..202981f --- /dev/null +++ b/RFXtoRP_HsaDesPatch.ftl @@ -0,0 +1,32 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign desPatch = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for desPatch"> + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign desPatch = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for desPatch"> + <#break> + <#default> + <#stop > + + diff --git a/RFXtoRP_HsaDespNt.ftl b/RFXtoRP_HsaDespNt.ftl new file mode 100644 index 0000000..da1d0c2 --- /dev/null +++ b/RFXtoRP_HsaDespNt.ftl @@ -0,0 +1,32 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign despNt = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for despNt"> + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign despNt = JsonUtil.jsonToMap(dataRfx)> + + <#stop "no generic FTL file available yet for despNt"> + <#break> + <#default> + <#stop > + + From 6b0d53926f50d20d832a574f9065fab25430f022 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Sep 2025 10:01:04 +0200 Subject: [PATCH 002/183] Corrections 250908 --- RFXtoRP_HsaItm_ItemCreated.ftl | 2 +- RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl | 2 +- ...RP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl | 2 +- RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index c2d33a9..1f22d6b 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -37,7 +37,7 @@ "LVID": "${logistical_variant.logistical_variant_code?json_string}", "Name" : "${logistical_variant.lv_type_code?json_string}", - <#if logistical_variant.id_list??> + <#if logistical_variant.id_list?? && (logistical_variant.id_list?size == logistical_variant.id_list?filter(l ->l??)?size)> "Codes": [ <#list logistical_variant.id_list as id> { diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl index 7f4269d..1ea0c2b 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl @@ -23,7 +23,7 @@ <#else> <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl index 6f0e002..e8b647d 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl @@ -23,7 +23,7 @@ <#else> <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , diff --git a/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl index f8df01b..3ffb8c4 100644 --- a/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl @@ -23,7 +23,7 @@ <#else> <#if receipt.line_list??> <#list receipt.line_list as receipt_line > - <#if receipt_line.origin_order_line_reference!=""> + <#if receipt_line.origin_order_line_reference?? && receipt_line.origin_order_line_reference!=""> <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > <#if refIDHmap_local?size != 0 > , From 8d4721576fda47a1023ba24a67a56c212a1c082d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Sep 2025 16:43:25 +0200 Subject: [PATCH 003/183] Renotified --- RPtoRFX_ExecutionflowEvent.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index 89519e8..e0f4aab 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -17,6 +17,7 @@ <#switch eventRP.event> <#case "Created"> + <#case "Renotified"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign executionflow = eventRP.data /> From 9b07206cf465356b47fa437c997672ce4f8f8789 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Sep 2025 08:13:56 +0200 Subject: [PATCH 004/183] Correction list --- RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl index c61e73b..b1dbb63 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl @@ -12,7 +12,7 @@ { "LVID": "${lv.logistical_variant_code?json_string}", "Name" : "${lv.lv_type_code?json_string}", - <#if lv.id_list??> + <#if lv.id_list?? && (lv.id_list?size == lv.id_list?filter(l ->l??)?size)> "Codes": [ <#list lv.id_list as id> { From 4fd4007794f1ef0e98bad7d3a8d38dd33cdbd238 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 23 Sep 2025 10:17:39 +0200 Subject: [PATCH 005/183] Correction transfert --- RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl index 53593cd..55ae697 100644 --- a/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertExecutionflowDetected.ftl @@ -29,7 +29,6 @@ <#else> "OrderID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", - "OrderID":"${receipt.receipt_reference?trim?json_string}", <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, "ShipFrom": From a6628be34ea6a0a3bd9e0063fe13df8c29c99f58 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Thu, 25 Sep 2025 16:23:34 +0200 Subject: [PATCH 006/183] SCPN1-9348 --- RFXtoRP_HsrPrepa.ftl | 3 +-- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index f592fc9..0f56cef 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -51,8 +51,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> - <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + <#if (!hd_numberHmap[despatched_ipg.hd_number]?? || !hd_numberHmap[despatched_ipg.carton_number]??) && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> , { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 9f96b31..4f4f46c 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -53,8 +53,10 @@ "Payload": { <#if despatched_ipg.carton_number != "000000000000000000"> "HandlingunitID": "${despatched_ipg.carton_number}" + <#assign hd_numberHmap += {despatched_ipg.carton_number,despatched_ipg.carton_number}> <#else> "HandlingunitID": "${despatched_ipg.hd_number}" + <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , From 4129dfdd5817f3513c68427a679a0a2968604b86 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Mon, 29 Sep 2025 14:55:51 +0200 Subject: [PATCH 007/183] SCPN1-9094 --- RFXtoRP_HliPrepaL.ftl | 80 +++++++- RFXtoRP_HliReceiptLr.ftl | 145 ++++++++++++- ...P_HliReceiptLr_ExecutionflowLinesAdded.ftl | 60 ++++++ ...iptLr_TransfertExecutionflowLinesAdded.ftl | 193 ++++++++++++++++++ RFXtoRP_HlrProL.ftl | 53 ++++- RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl | 59 ++++++ 6 files changed, 562 insertions(+), 28 deletions(-) create mode 100644 RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl create mode 100644 RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl create mode 100644 RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index e643caa..970544d 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -13,17 +13,77 @@ <#switch cloudEventMsg.action> <#case "C"> <#--<#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> +<#-- *********************************************** Action = CREATE or UPDATE ******************** --> +<#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> +<#assign preparationOrder = JsonUtil.jsonToMap(dataRfx)> + + <#if preparationOrder.total_lv_validated?? && preparationOrder.total_lv_validated !=0> + <#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030"> + <#if preparationOrder.preparation_line_lst??> + [ + <#assign refIDHmap ={}> + <#assign hd_numberHmap ={}> + <#assign hd_numberHmapHUadded ={}> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? ) as preparation_line> + <#list preparation_line.despatched_ipg_list as despatched_ipg> + <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> + <#if (!hd_numberHmap[despatched_ipg.hd_number]?? && !hd_numberHmap[despatched_ipg.carton_number]??)&& (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> + } + + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> + } + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )> + <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> + } + + + + + + <#assign refIDHmap ={}> + ] + <#else> + <#-- No line--> + <#stop> + + <#else> + <#-- Preparation Type not supported--> + <#stop> + + <#else> + <#-- no confirmed quantity for the preparation - preparation closed--> + <#stop> + + + +<#break> <#case "D"> - <#-- *********************************************** Action = DELETE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> +<#-- *********************************************** Action = DELETE ******************** --> +<#stop> <#break> <#default> diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 61cdef6..70ab38e 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -11,22 +11,151 @@ <#switch cloudEventMsg.action> <#case "C"> - <#case "U"> <#-- *********************************************** Action = CREATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign receiptLines = JsonUtil.jsonToMap(dataRfx)> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + <#if receipt.receipt_type?? && receipt.receipt_type = "030" && receipt.line_list??> <#-- if reception is a transfer type --> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> - <#stop "no generic FTL file available yet for receiptLines"> - <#break> + } + ] + <#else> + <#if receipt.line_list ??> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl"> + + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + + } + ] + <#else> + <#stop> + + + <#break> + <#case "U"> + <#-- *********************************************** Action = UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + [ + <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowCancelled.ftl"> + } + <#else> + <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "true"> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertExecutionflowReceiptCompleted.ftl"> + } + <#else> + <#if receipt.receipt_confirmed?? && receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> + } + <#else> + <#if receipt.receipt_confirmed ?? && receipt.receipt_confirmed == "true" > + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HliReceiptLr_ExecutionflowReceiptCompleted.ftl"> + } + <#else> + <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??> + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowAddedLines.ftl"> + + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> + + } + ] + <#else> + <#stop> <#-- Receipt reference for transfer is empty--> + + <#else> + <#if receipt.line_list ??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> + } + <#else> + <#stop> + + + + + + + ] + <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign receiptLines = JsonUtil.jsonToMap(dataRfx)> + <#assign receipt = JsonUtil.jsonToMap(dataRfx)> + <#if receipt.line_list ??> + [ + { + + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl"> + } + ] + <#else> + <#stop> <#-- No line--> + + <#break> - <#stop "no generic FTL file available yet for receiptLines"> - <#break> <#default> <#stop > diff --git a/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl new file mode 100644 index 0000000..d75f65a --- /dev/null +++ b/RFXtoRP_HliReceiptLr_ExecutionflowLinesAdded.ftl @@ -0,0 +1,60 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + <#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) /> + <#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if receipt.line_list??> + "Lines" : [ + <#list receipt.line_list as line> + { + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${line.item_code?trim?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", + <#else> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${line.order_quantity_in_lv!0}" + } + } + + } + <#sep>, + + ] + + } + } +] diff --git a/RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl b/RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl new file mode 100644 index 0000000..889fdf7 --- /dev/null +++ b/RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl @@ -0,0 +1,193 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +<#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) /> +<#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> +<#assign refIDHmap_local ={}> +[ + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + { + "Header": {"ProjectID": "${projectRP}"}, + "ID": { + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + "RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + + "RefDate": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if receipt.line_list??> + "Lines" : [ + <#list receipt.line_list as line> + { + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${line.item_code?trim?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", + <#else> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${line.order_quantity_in_lv!0}" + } + } + } + <#sep>, + + ] + + } + } + <#else> + <#if receipt.line_list??> + <#list receipt.line_list as receipt_line > + <#if receipt_line.origin_order_line_reference!=""> + <#if !refIDHmap_local[receipt_line.origin_order_line_reference]?? > + <#if refIDHmap_local?size != 0 > + , + + <#assign refIDHmap_local +={receipt_line.origin_order_line_reference,receipt_line.origin_order_line_reference}> + { + "Header": {"ProjectID": "${projectRP}"}, + "ID": { + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + "RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt_line.origin_order_line_reference?trim?json_string}", + + "RefDate": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + "CreationDateTime": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "OrderID":"${receipt_line.origin_order_line_reference?trim?json_string}", + <#if receipt.line_list??> + "Lines" : [ + <#list receipt.line_list as line> + { + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${line.item_code?trim?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", + <#else> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${line.order_quantity_in_lv!0}" + } + } + } + <#sep>, + + ] + + } + } + + <#else> + { + "Header": {"ProjectID": "${projectRP}"}, + "ID": { + "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}", + "RefDate": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + "CreationDateTime": { + "DateTime": "${receipt_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "OrderID":"${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year?trim?json_string}${receipt.receipt_number?trim?json_string}", + <#if receipt.line_list??> + "Lines" : [ + <#list receipt.line_list as line> + { + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${line.item_code?trim?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", + <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", + <#else> + <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> + <#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_detail_priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${line.order_quantity_in_lv!0}" + } + } + } + <#sep>, + + ] + + } + } + <#break> + + + + + ] diff --git a/RFXtoRP_HlrProL.ftl b/RFXtoRP_HlrProL.ftl index 7b4504b..5aedce4 100644 --- a/RFXtoRP_HlrProL.ftl +++ b/RFXtoRP_HlrProL.ftl @@ -12,20 +12,53 @@ <#switch cloudEventMsg.action> <#case "C"> <#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> + <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> + [ + <#-- check preparation type code (internal order and reservation are ignored) --> + <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> + <#if preparation_order.line_list??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl"> + } + <#else> + <#-- No line --> + <#stop> + + <#else> + <#-- Preparation order type not supported --> + <#stop> + + ] + <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign preparationOrderLines = JsonUtil.jsonToMap(dataRfx)> - - <#stop "no generic FTL file available yet for preparationOrderLines"> - <#break> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign preparation_order = JsonUtil.jsonToMap(dataRfx)> + [ + <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030" > + <#if preparation_order.line_list??> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPro_ExecutionflowCancelled.ftl"> + } + <#else> + <#-- No line --> + <#stop> + + <#else> + <#-- Preparation order type not supported --> + <#stop> + + ] + <#break> <#default> <#stop > diff --git a/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl b/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl new file mode 100644 index 0000000..fa3181d --- /dev/null +++ b/RFXtoRP_HlrProL_ExecutionflowLinesAdded.ftl @@ -0,0 +1,59 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + <#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}" + }, + "ID": { + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> + "RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}", + <#else> + "RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}", + + "RefDate": { + "DateTime": "${pro_creation_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if preparation_order.line_list??> + "Lines" : [ + <#list preparation_order.line_list as preparation_order_line > + { + <#if (preparation_order_line.originator_reference_line_number!0) != 0> + "LineID": "${preparation_order_line.originator_reference_line_number}", + <#else> + "LineID": "${preparation_order_line.preparation_order_line_number!0}", + + <#-- Line Metadata inclusion --> + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, + "RequestedContent": + { + "Goods": + { + "ItemID": "${preparation_order_line.item_code?trim?json_string!"0"}", + "LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}", + <#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)> + <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${forced_priority_date}", + + <#-- Segmentation Keys inclusion --> + <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> + }, + "Quantity" : + { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}" + } + } + }<#sep>, + + ] + + } + } +] From 8ca640ca383f3e43385e70ed28ee7d6bd004d347 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Mon, 29 Sep 2025 17:44:43 +0200 Subject: [PATCH 008/183] SCPN1-9094 --- RFXtoRP_HliPrepaL.ftl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 970544d..c3cd6aa 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -21,6 +21,7 @@ <#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030"> <#if preparationOrder.preparation_line_lst??> [ + <#assign first = true> <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> <#assign hd_numberHmapHUadded ={}> @@ -28,7 +29,10 @@ <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? && !hd_numberHmap[despatched_ipg.carton_number]??)&& (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> + <#if !first> + <#assign first = false> , + { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -37,7 +41,10 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + <#if !first> + <#assign first = false> , + { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", From 6080d1a959cd7668bb21eb77f2ea442f36e05c83 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 3 Oct 2025 10:04:03 +0200 Subject: [PATCH 009/183] SCPN1-8956 --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 2cb6932..3877c45 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -17,7 +17,21 @@ "RefDate": { "DateTime": "${pro_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + }, + "CustomFields": [ + { + "Key": "depot", + "Value": "${preparation_order.physical_depot_code?trim?json_string}" + }, + { + "Key": "activite", + "Value": "${preparation_order.activity_code?trim?json_string}" + }, + { + "Key": "do", + "Value": "${preparation_order.originator_code?trim?json_string}" + } + ] }, "Payload": { "CreationDateTime": { From a262140b4b7e9104e18ceb56b44b7a1db42521fb Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Wed, 8 Oct 2025 15:58:21 +0200 Subject: [PATCH 010/183] SCPN1-9400 --- RPtoRFX_AppointmentEvent.ftl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 RPtoRFX_AppointmentEvent.ftl diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl new file mode 100644 index 0000000..9891ef8 --- /dev/null +++ b/RPtoRFX_AppointmentEvent.ftl @@ -0,0 +1,28 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> + +<#assign eventRP = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#-- initialisation map for SegmentationKey and MetaData --> +<#assign Header_MetaData_Map = {} /> +<#assign SegmentationKeys_Map = {} /> +<#assign Line_MetaData_Map = {} /> + + +<#switch eventRP.event> + <#case "Created"> + <#assign appointment = eventRP.data /> + + <#stop Appointment creation event> + + <#break> + <#default> + <#stop > + + From eafbf7a6e32423b13609e55e72592fbaabf092f3 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 13 Oct 2025 12:03:45 +0200 Subject: [PATCH 011/183] nouvelle marque --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0f1ecdd..c39fac5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Reflex Platform Core FTLs +# Hardis SC NETWORK Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. +The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Hardis SC NETWORK**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,9 +12,9 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for Reflex Platform. + - Generate a **final structured JSON** for Hardis SC NETWORK. ## Useful Resources - [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html) -- [Reflex Platform](https://auth.reflex-platform.com/) +- [Hardis SC NETWORK](https://auth.reflex-platform.com/) From b4677ea095919942b4b275d4c825ba13805de228 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 13 Oct 2025 13:31:57 +0200 Subject: [PATCH 012/183] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c39fac5..1b40bad 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This connector does not contain any standalone executable code: it is intended t ## Role of the FTL Files -- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, etc.). +- Each `.ftl` file corresponds to a **flow type** (order, stock, receipt, shipment, appointment etc.). - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). From ae27efacf30349388d5d913cd11bceeed2b951e1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 13 Oct 2025 14:25:08 +0200 Subject: [PATCH 013/183] SCPN1-9437 --- RFXtoRP_HsaItm.ftl | 5 ----- RFXtoRP_HsaItm_ItemCreated.ftl | 6 ++++-- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index 231b196..63ca3a2 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -18,15 +18,10 @@ <#assign item = JsonUtil.jsonToMap(dataRfx)> [ { - <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaItm_ItemCreated.ftl"> - <#else> - <#-- "no LV for the item"--> - <#stop> - } ] <#break> diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 1f22d6b..5186091 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -21,15 +21,17 @@ }, <#-- Item metadata inclusion --> - <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, + <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> <#if item.url?? && item.url!=""> + , "PhotoURI": "${item.url?json_string}", <#-- Loop for the Logistical Variants - LV --> - <#if item.logistical_variant_list??> + <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> + , "LogisticVariants": [ <#list item.logistical_variant_list as logistical_variant> diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 3877c45..d7adc1d 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -53,7 +53,7 @@ "ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}" <#else> <#if preparation_order.preparation_type_code == "030"> - "ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_code?json_string)}" + "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}" <#else> <#if preparation_order.address.address_type_code == "" && preparation_order.address.name_or_company_name == "" && From 93a0fbd79c9f5a0db9b5f2513819d209fee99f3a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 13 Oct 2025 15:31:14 +0200 Subject: [PATCH 014/183] SCPN1-9437 --- RFXtoRP_HsaItm_ItemCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 5186091..4433f6e 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -26,7 +26,7 @@ <#-- Item Photo URI could be added here --> <#if item.url?? && item.url!=""> , - "PhotoURI": "${item.url?json_string}", + "PhotoURI": "${item.url?json_string}" <#-- Loop for the Logistical Variants - LV --> From 15430bea946bf4743d091f663e6596d6935b92a2 Mon Sep 17 00:00:00 2001 From: "GROUP\\frea" Date: Wed, 8 Oct 2025 15:58:21 +0200 Subject: [PATCH 015/183] SCPN1-9400 --- RPtoRFX_AppointmentEvent.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 9891ef8..b5b8da6 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -19,7 +19,7 @@ <#case "Created"> <#assign appointment = eventRP.data /> - <#stop Appointment creation event> + <#stop "Appointment creation event"> <#break> <#default> From 5bdd9fbfe16fdbf65dd018a643e69adece90546a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Oct 2025 12:05:44 +0200 Subject: [PATCH 016/183] SCPN1-9437 --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index d7adc1d..3877c45 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -53,7 +53,7 @@ "ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}" <#else> <#if preparation_order.preparation_type_code == "030"> - "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_code?json_string)}" <#else> <#if preparation_order.address.address_type_code == "" && preparation_order.address.name_or_company_name == "" && From 791a958b4d2a0d1a0fc5ebeb9535207d1d2177af Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 14 Oct 2025 17:09:53 +0200 Subject: [PATCH 017/183] SCPN1-9437 --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 3877c45..1c079db 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -52,8 +52,8 @@ <#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?? && preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot!="" && preparation_order.optional_attributes.transfer_intermediate_consignee=="true"> "ActorID": "${RFXtoRPprefixDepot(preparation_order.optional_attributes.intermediate_consignee_transfer_physical_depot?json_string)}" <#else> - <#if preparation_order.preparation_type_code == "030"> - "ActorID": "${RFXtoRPprefixDepot(preparation_order.end_consignee_code?json_string)}" + <#if preparation_order.preparation_type_code == "030" && preparation_order.optional_attributes.transfer_intermediate_consignee=="false" && preparation_order.transfer_physical_depot_code?? && preparation_order.transfer_physical_depot_code!=""> + "ActorID": "${RFXtoRPprefixDepot(preparation_order.transfer_physical_depot_code?json_string)}" <#else> <#if preparation_order.address.address_type_code == "" && preparation_order.address.name_or_company_name == "" && From 039e984ec05f6b57a4d3b4fd51180b1a3fd5c0b3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 16 Oct 2025 10:07:03 +0200 Subject: [PATCH 018/183] readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b40bad..ede35aa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Hardis SC NETWORK Core FTLs +# Reflex Platform Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Hardis SC NETWORK**. +The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,9 +12,9 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for Hardis SC NETWORK. + - Generate a **final structured JSON** for Reflex Platform. ## Useful Resources - [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html) -- [Hardis SC NETWORK](https://auth.reflex-platform.com/) +- [Reflex Platform](https://auth.reflex-platform.com/) From b783e7dcc1f2e8b0afa7c9922d09a7e493fa6334 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 17 Oct 2025 14:25:35 +0200 Subject: [PATCH 019/183] customFields delete payload --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 1c079db..f2b4ca9 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -17,21 +17,7 @@ "RefDate": { "DateTime": "${pro_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, - "CustomFields": [ - { - "Key": "depot", - "Value": "${preparation_order.physical_depot_code?trim?json_string}" - }, - { - "Key": "activite", - "Value": "${preparation_order.activity_code?trim?json_string}" - }, - { - "Key": "do", - "Value": "${preparation_order.originator_code?trim?json_string}" - } - ] + } }, "Payload": { "CreationDateTime": { From 4f8317f007e3538622b4a2f78c59cd26fb0e0b28 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 20 Oct 2025 15:49:28 +0200 Subject: [PATCH 020/183] Coorection HliPrepaL --- RFXtoRP_HliPrepaL.ftl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index c3cd6aa..21e332b 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -21,6 +21,18 @@ <#if preparationOrder.preparation_type_code=="010" || preparationOrder.preparation_type_code=="030"> <#if preparationOrder.preparation_line_lst??> [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsPrepared> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> + } <#assign first = true> <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> @@ -29,6 +41,7 @@ <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? && !hd_numberHmap[despatched_ipg.carton_number]??)&& (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> + , <#if !first> <#assign first = false> , @@ -41,6 +54,7 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + , <#if !first> <#assign first = false> , From f8c4e5d79dd5276f04ee743298c14e5b9c23654c Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 21 Oct 2025 11:39:54 +0200 Subject: [PATCH 021/183] SCPN1-9399 --- RFXtoRP_HliPrepaL.ftl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 21e332b..2ab39f8 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -33,7 +33,6 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl"> } - <#assign first = true> <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> <#assign hd_numberHmapHUadded ={}> @@ -42,10 +41,6 @@ <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if (!hd_numberHmap[despatched_ipg.hd_number]?? && !hd_numberHmap[despatched_ipg.carton_number]??)&& (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> , - <#if !first> - <#assign first = false> - , - { <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -54,9 +49,6 @@ } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > - , - <#if !first> - <#assign first = false> , { From b3366a3597623c9b8f078eaff30bda86d4b5b461 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 21 Oct 2025 15:36:15 +0200 Subject: [PATCH 022/183] Brand --- README.md | 8 +- RFXtoRP_HfDtlStockLs.ftl | 120 ++--- ...ckLs_StockSnapshotted_SegmentationKeys.ftl | 2 +- RFXtoRP_HfRpConfig.ftl | 2 +- RFXtoRP_HliPrepaL.ftl | 6 +- RFXtoRP_HliReceiptLr.ftl | 6 +- RFXtoRP_HlrProL.ftl | 6 +- RFXtoRP_HsaCarrier.ftl | 6 +- RFXtoRP_HsaCarrier_ActorCreated.ftl | 4 +- RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsaCons.ftl | 6 +- RFXtoRP_HsaCons_ActorCreated.ftl | 4 +- RFXtoRP_HsaCons_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsaDesPatch.ftl | 6 +- RFXtoRP_HsaDespNt.ftl | 6 +- RFXtoRP_HsaDispute.ftl | 6 +- ...HsaIpgMove_StockMoved_SegmentationKeys.ftl | 2 +- RFXtoRP_HsaItm.ftl | 6 +- ...aItmLv_LogisticVariantUpdated_Metadata.ftl | 2 +- RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl | 2 +- RFXtoRP_HsaLstCarSta.ftl | 78 ++-- RFXtoRP_HsaProStatus.ftl | 6 +- RFXtoRP_HsaSup_ActorCreated.ftl | 4 +- RFXtoRP_HsaSup_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsrCarrierApt.ftl | 78 ++-- RFXtoRP_HsrDepot.ftl | 6 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 4 +- RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl | 2 +- RFXtoRP_HsrLoadInfo.ftl | 78 ++-- RFXtoRP_HsrPackBranch.ftl | 6 +- RFXtoRP_HsrPackOrder.ftl | 6 +- RFXtoRP_HsrPrepa.ftl | 6 +- ...epa_GoodsPrepared_HandlingUnitMetadata.ftl | 2 +- ...srPrepa_GoodsPrepared_SegmentationKeys.ftl | 2 +- RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 2 +- RFXtoRP_HsrPro.ftl | 6 +- ...o_ExecutionflowDetected_HeaderMetadata.ftl | 2 +- ...Pro_ExecutionflowDetected_LineMetadata.ftl | 2 +- ...ExecutionflowDetected_SegmentationKeys.ftl | 2 +- RFXtoRP_HsrReceiptList.ftl | 6 +- ...t_ExecutionflowDetected_HeaderMetadata.ftl | 2 +- ...ist_ExecutionflowDetected_LineMetadata.ftl | 2 +- ...ExecutionflowDetected_SegmentationKeys.ftl | 2 +- RFXtoRP_RestResponse.ftl | 412 +++++++++--------- RP_connector.ftl | 4 +- RPtoRFX_AppointmentEvent.ftl | 6 +- RPtoRFX_ExecutionflowEvent.ftl | 6 +- RPtoRFX_PrepOrder.ftl | 4 +- 48 files changed, 471 insertions(+), 471 deletions(-) diff --git a/README.md b/README.md index ede35aa..be119ee 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Reflex Platform Core FTLs +# HARDIS SC NETWORK Core FTLs ## Overview -The **Reflex WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from Reflex WMS** into **flows compatible with Reflex Platform**. +The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**. This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. @@ -12,9 +12,9 @@ This connector does not contain any standalone executable code: it is intended t - These templates use the **FreeMarker** syntax to: - Extract the required fields from the WMS source flow. - Apply transformation rules (mapping, conversions, enrichments). - - Generate a **final structured JSON** for Reflex Platform. + - Generate a **final structured JSON** for HARDIS SC NETWORK. ## Useful Resources - [FreeMarker Documentation](https://freemarker.apache.org/docs/index.html) -- [Reflex Platform](https://auth.reflex-platform.com/) +- [HARDIS SC NETWORK](https://auth.reflex-platform.com/) diff --git a/RFXtoRP_HfDtlStockLs.ftl b/RFXtoRP_HfDtlStockLs.ftl index 28d6d61..4bac6a2 100644 --- a/RFXtoRP_HfDtlStockLs.ftl +++ b/RFXtoRP_HfDtlStockLs.ftl @@ -1,60 +1,60 @@ -<#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> -<#-- sum_elt : nb element in snapshot (optional parameter) --> - -<#include "HfRpConfig.ftl"> - -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> - -<#switch cloudEventMsg.action> - <#case "C"> - <#case "U"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)> - - <#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image --> - <#if cloudEventMsg.messageSet??> - <#assign idSnapshot = cloudEventMsg.messageSet /> - <#else> - <#assign idSnapshot = cloudEventMsg.id /> - - - <#list reflexStockPicturesInterface.detailled_stock_list as stock> - <#if stock.stock_type_code != "200"> - <#stop> - <#break> - - - [ - { - <#if sum_elt??> - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl"> - <#else> - <#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl"> - - } - ] - - <#break> - - <#case "D"> - <#-- *********************************************** Action = DELETE ******************** --> - <#stop > - <#break> - - - <#default> - <#stop > - - +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> +<#-- sum_elt : nb element in snapshot (optional parameter) --> + +<#include "HfRpConfig.ftl"> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign reflexStockPicturesInterface = JsonUtil.jsonToMap(dataRfx)> + + <#-- idSnapshot MUST BE UNIQUE regardless of the number of messages in the stock image --> + <#if cloudEventMsg.messageSet??> + <#assign idSnapshot = cloudEventMsg.messageSet /> + <#else> + <#assign idSnapshot = cloudEventMsg.id /> + + + <#list reflexStockPicturesInterface.detailled_stock_list as stock> + <#if stock.stock_type_code != "200"> + <#stop> + <#break> + + + [ + { + <#if sum_elt??> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorSnapshotCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl"> + <#else> + <#assign apiReflexPlatformID = ApiReflexPlatformID.StockSnapshotted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl"> + + } + ] + + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#stop > + <#break> + + + <#default> + <#stop > + + diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index 9a24817..8fefdd0 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HfDtlStockLs to find Reflex WMS fields names --> +<#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HfRpConfig.ftl b/RFXtoRP_HfRpConfig.ftl index 0d0751e..51dc7ae 100644 --- a/RFXtoRP_HfRpConfig.ftl +++ b/RFXtoRP_HfRpConfig.ftl @@ -1,5 +1,5 @@ <#-- **** -Reflex WMS provides some of their environment parameters through the class HfRpConfig +HARDIS WMS provides some of their environment parameters through the class HfRpConfig those parameters are stored in FTL file HfRpConfig.ftl for later use in some of the data ftl files *** --> diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 2ab39f8..3e6474b 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 70ab38e..00e7f57 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HlrProL.ftl b/RFXtoRP_HlrProL.ftl index 5aedce4..61313e3 100644 --- a/RFXtoRP_HlrProL.ftl +++ b/RFXtoRP_HlrProL.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index 870e4f5..288be38 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> <#include "ActorPrefix.ftl"> diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 3b89345..d5bcb4c 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -14,7 +14,7 @@ "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if carrier.carrier_structured_address?? > "Name": "${carrier.carrier_structured_address.name_or_company?json_string}", @@ -30,7 +30,7 @@ "ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}", "State": "${carrier.carrier_structured_address.country_designation?json_string}" - <#-- if Reflex WMS address is not structured --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if carrier.address??> "Name": "${carrier.address.company_name?json_string}", diff --git a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl index f013ed3..ceb5dfe 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaCarrier to find Reflex WMS fields names --> +<#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaCons.ftl b/RFXtoRP_HsaCons.ftl index 86217fc..fb5bb1b 100644 --- a/RFXtoRP_HsaCons.ftl +++ b/RFXtoRP_HsaCons.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> <#include "ActorPrefix.ftl"> diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 832adc5..b44e15e 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -14,7 +14,7 @@ "Address": { - <#-- if Reflex WMS is structured --> + <#-- if HARDIS WMS is structured --> <#if actor.consignee_structured_address??> "Name": "${actor.consignee_structured_address.name_or_company?json_string}", @@ -31,7 +31,7 @@ "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", "State": "${actor.consignee_structured_address.country_designation?json_string}" - <#-- if Reflex WMS is not structured --> + <#-- if HARDIS WMS is not structured --> <#else> <#if actor.address?? > diff --git a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl index 19decec..8555307 100644 --- a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaCons to find Reflex WMS fields names --> +<#-- use protobuf of class HsaCons to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaDesPatch.ftl b/RFXtoRP_HsaDesPatch.ftl index 202981f..1e362dc 100644 --- a/RFXtoRP_HsaDesPatch.ftl +++ b/RFXtoRP_HsaDesPatch.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaDespNt.ftl b/RFXtoRP_HsaDespNt.ftl index da1d0c2..97c2538 100644 --- a/RFXtoRP_HsaDespNt.ftl +++ b/RFXtoRP_HsaDespNt.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index d551da9..7421d0c 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index efb4f7b..33fc628 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> +<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ { diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index 63ca3a2..0fe883c 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl index 72f7aa3..cbbb6f7 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItmLv to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl index 881c81c..11676ae 100644 --- a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItm to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 635e62b..a74a148 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -1,40 +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 > +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#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 > \ No newline at end of file diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index d638425..b64f03b 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 4d04e95..f2134b2 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -14,7 +14,7 @@ "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if actor.supplier_structured_address?? > "Name": "${actor.supplier_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}", @@ -29,7 +29,7 @@ "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", "State": "${actor.supplier_structured_address.country_designation?json_string}" - <#-- if Reflex WMS address is not structured --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if actor.optional_attributes?? > "Name": "${actor.optional_attributes.company_name?json_string}", diff --git a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl index 770bf64..80b9a11 100644 --- a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaSup to find Reflex WMS fields names --> +<#-- use protobuf of class HsaSup to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 635e62b..a74a148 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -1,40 +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 > +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#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 > \ No newline at end of file diff --git a/RFXtoRP_HsrDepot.ftl b/RFXtoRP_HsrDepot.ftl index 7e3a522..96f75c3 100644 --- a/RFXtoRP_HsrDepot.ftl +++ b/RFXtoRP_HsrDepot.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 2c2478c..171f8ad 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -15,7 +15,7 @@ <#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">, "Address": { - <#-- if Reflex WMS address is structured --> + <#-- if HARDIS WMS address is structured --> <#if depot.physical_depot_structured_address?? > "Name": "${depot.physical_depot_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}", @@ -30,7 +30,7 @@ "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 --> + <#-- if HARDIS WMS address is not structured --> <#else> <#if depot.physical_depot_address??> "Name": "${depot.physical_depot_address.company_name?json_string}", diff --git a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl index 68c665e..dc02b6c 100644 --- a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrDepot to find Reflex WMS fields names --> +<#-- use protobuf of class HsrDepot to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrLoadInfo.ftl b/RFXtoRP_HsrLoadInfo.ftl index 635e62b..a74a148 100644 --- a/RFXtoRP_HsrLoadInfo.ftl +++ b/RFXtoRP_HsrLoadInfo.ftl @@ -1,40 +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 > +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#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 > \ No newline at end of file diff --git a/RFXtoRP_HsrPackBranch.ftl b/RFXtoRP_HsrPackBranch.ftl index f1b7b7d..f0f360e 100644 --- a/RFXtoRP_HsrPackBranch.ftl +++ b/RFXtoRP_HsrPackBranch.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPackOrder.ftl b/RFXtoRP_HsrPackOrder.ftl index 1b78ac1..63a612d 100644 --- a/RFXtoRP_HsrPackOrder.ftl +++ b/RFXtoRP_HsrPackOrder.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 0f56cef..6aa54a2 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl index 9f6c877..dde74cb 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> <#-- "MetaData" :[ diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index 0d28cf4..60d6334 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class Hsrprepa to find Reflex WMS fields names --> +<#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ { diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl index 5b233b9..e6d07b1 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> <#-- "MetaData" :[ diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 828b047..23ab2fb 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl index 64a37f6..3606ba8 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPro to find Reflex Wms fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl index 8dc79af..f0de72a 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPro to find Reflex Wms fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl index 8cb3286..4cd89b9 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrPro to find Reflex WMS fields names --> +<#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index fa5c49a..43f8c1d 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl index 301e1e2..6b4d530 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl index de873ff..d77c54e 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex Wms fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl index 8950e72..e8a84f5 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsrReceiptList to find Reflex WMS fields names --> +<#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- "SegmentationKeys": [ diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 489cedb..151a9b2 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -1,206 +1,206 @@ -<#-- **** input parameters ***** --> -<#-- input : Response message from Reflex --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> - -<#assign restResponsetMsg = JsonUtil.jsonToMap(input)> -<#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!no_apiRestReflexID> - <#case no_apiRestReflexID> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - } - ] - <#break> - - <#case "preparation_orders_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.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"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - - <#case "receipts_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Receipt_ShipToAcked.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"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - <#default> - <#stop> - - +<#-- **** input parameters ***** --> +<#-- input : Response message from HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign restResponsetMsg = JsonUtil.jsonToMap(input)> +<#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!no_apiRestReflexID> + <#case no_apiRestReflexID> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + } + ] + <#break> + + <#case "preparation_orders_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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 ******************** --> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.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"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + + <#case "receipts_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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 ******************** --> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Receipt_ShipToAcked.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"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> + <#stop> + + diff --git a/RP_connector.ftl b/RP_connector.ftl index cb996bd..e056ed5 100644 --- a/RP_connector.ftl +++ b/RP_connector.ftl @@ -14,9 +14,9 @@ those parameters are stored in FTL file Conf-connector.ftl for later use in some <#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --> <#noparse><#-- 0 : Always empty --> -<#noparse><#-- 1 : Always use Reflex WMS tracking --> +<#noparse><#-- 1 : Always use HARDIS WMS tracking --> <#noparse><#-- 2 : Always use the HU number --> -<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --> +<#noparse><#-- 3 : Use HARDIS WMS tracking if it exists, the HU number otherwise --> <#list file.parameters as parameter> <#switch parameter.type> diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index b5b8da6..3ba3fb1 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index e0f4aab..b959c1e 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -1,7 +1,7 @@ <#-- **** input parameters ***** --> -<#-- input : message RFX --> -<#-- project : projectId in ReflexPlatform --> -<#-- organisation : organisationtId in ReflexPlatform --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 21a21fc..0df6f4f 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -7,8 +7,8 @@ <#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 --> +<#-- Si vous utilisez des acteurs non référencés, il faudra créer un destinataire "VIZ" dans HARDIS WMS pour utiliser cette fonctionnalité --> +<#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in HARDIS WMS to use this feature --> <#assign defaultactor ="VIZ"> <#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" > From d116ab3856fd765f1f1f5588a6b2b2ecf5cde0a1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 22 Oct 2025 14:29:37 +0200 Subject: [PATCH 023/183] json_string order --- RPtoRFX_PrepOrder.ftl | 2 +- RPtoRFX_Receipt.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 0df6f4f..aa1e6ec 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -96,7 +96,7 @@ { <#include "RPtoRFX_PrepOrder_LineMetadata.ftl"> "originator_reference_line_number": ${line.LineID?number}, - "item_code": "${line.RequestedContent.Goods.ItemID!""}", + "item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}", "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}", diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 90ef77a..bd37d24 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -50,7 +50,7 @@ { <#include "RPtoRFX_Receipt_LineMetadata.ftl"> "receipt_reference_line_no": ${line.LineID?number}, - "item_code": "${line.RequestedContent.Goods.ItemID!""}", + "item_code": "${line.RequestedContent.Goods.ItemID?json_string!""}", "item_lv_code": "${line.RequestedContent.Goods.LVBranchID!""}", "level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, "owner_code": "${owner_code}", From a46b06fa3d67594a9661a373bf2817ef1ef58a63 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 22 Oct 2025 14:59:19 +0200 Subject: [PATCH 024/183] SCPN1-9399 --- RFXtoRP_HliPrepaL.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HliPrepaL.ftl b/RFXtoRP_HliPrepaL.ftl index 3e6474b..9125d0c 100644 --- a/RFXtoRP_HliPrepaL.ftl +++ b/RFXtoRP_HliPrepaL.ftl @@ -50,7 +50,6 @@ <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , - { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", From e9c759455574adaf314ddced23429c293ac2b0bc Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 22 Oct 2025 16:19:05 +0200 Subject: [PATCH 025/183] SCPN1-9399SCPN1-9399 --- RFXtoRP_HliReceiptLr.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HliReceiptLr.ftl b/RFXtoRP_HliReceiptLr.ftl index 00e7f57..b84b80f 100644 --- a/RFXtoRP_HliReceiptLr.ftl +++ b/RFXtoRP_HliReceiptLr.ftl @@ -88,7 +88,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowReceiptCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HliReceiptLr_ExecutionflowReceiptCompleted.ftl"> + <#include "RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl"> } <#else> <#if receipt.receipt_type?? && receipt.receipt_type == "030" && receipt.receipt_confirmed == "false" && receipt.line_list??> @@ -98,7 +98,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowLinesAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowAddedLines.ftl"> + <#include "RFXtoRP_HliReceiptLr_TransfertExecutionflowLinesAdded.ftl"> }, { From 0adef4a1f30748d0a8039803a0c1d2e39f5f0fc0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 30 Oct 2025 11:50:35 +0100 Subject: [PATCH 026/183] Brand --- RFXtoRP_HsaDispute_ClaimMetadata.ftl | 2 +- RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl | 2 +- RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl | 10 +++++----- RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl | 2 +- ...oRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl | 2 +- ...P_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl | 2 +- ...eceiptList_ExecutionflowDetected_HeaderMetadata.ftl | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/RFXtoRP_HsaDispute_ClaimMetadata.ftl b/RFXtoRP_HsaDispute_ClaimMetadata.ftl index e5b9b99..d0a8314 100644 --- a/RFXtoRP_HsaDispute_ClaimMetadata.ftl +++ b/RFXtoRP_HsaDispute_ClaimMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaDispute to find Reflex Wms fields names --> +<#-- use protobuf of class HsaDispute to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index 4fa3d1d..f47abd4 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaIpgMove to find Reflex WMS fields names --> +<#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index 33fc628..29d1851 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -15,22 +15,22 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${reflexMvtStockInterface.batch_1}"} - + }, { "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}" } - } - ] + } + ] --> "SegmentationKeys": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl index 49607a6..2b30c89 100644 --- a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl @@ -1,4 +1,4 @@ -<#-- use protobuf of class HsaItm to find Reflex Wms fields names --> +<#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl index 3606ba8..8506511 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,6 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> -<#-- +<#-- "MetaData": [ { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl index 4cd89b9..9cd8bc9 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl @@ -16,7 +16,7 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${preparation_order_line.batch_1}"} - + } ] --> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl index 6b4d530..079640d 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,6 +1,6 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> -<#-- +<#-- "MetaData": [ { From bfbf654ee21b11207fc750e17f9be8a4ed093e3b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 30 Oct 2025 14:47:34 +0100 Subject: [PATCH 027/183] SCPN1-9577 --- ...StockLs_StockSnapshotted_SegmentationKeys.ftl | 8 +++++++- RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaCons_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaDispute_ClaimMetadata.ftl | 6 ++++++ ...HsaIpgMove_GoodsReceived_SegmentationKeys.ftl | 7 ++++++- ...RP_HsaIpgMove_StockMoved_SegmentationKeys.ftl | 6 ++++++ ..._HsaItmLv_LogisticVariantUpdated_Metadata.ftl | 6 ++++++ RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl | 6 ++++++ ...saItm_ItemCreated_LogisticVariantMetadata.ftl | 6 ++++++ RFXtoRP_HsaSup_ActorCreated_Metadata.ftl | 6 ++++++ RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl | 6 ++++++ ...rPrepa_GoodsPrepared_HandlingUnitMetadata.ftl | 11 +++++++---- ...P_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl | 6 ++++++ RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl | 11 ++++++----- ...rPro_ExecutionflowDetected_HeaderMetadata.ftl | 16 ++++++---------- ...HsrPro_ExecutionflowDetected_LineMetadata.ftl | 6 ++++++ ...ro_ExecutionflowDetected_SegmentationKeys.ftl | 6 ++++++ ...List_ExecutionflowDetected_HeaderMetadata.ftl | 7 ++++++- ...ptList_ExecutionflowDetected_LineMetadata.ftl | 6 ++++++ ...st_ExecutionflowDetected_SegmentationKeys.ftl | 14 ++++++++++---- 20 files changed, 126 insertions(+), 26 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index 8fefdd0..ed820f5 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -1,6 +1,12 @@ <#-- use protobuf of class HfDtlStockLs to find HARDIS WMS fields names --> <#-- +Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { @@ -16,7 +22,7 @@ <#if stock.batch_1 == ""> "Value": { "String" : "no batch"} <#else> - "Value": { "String" : "${stock.batch_1}"} + "Value": { "String" : "${stock.batch_1?json_string}"} }, { diff --git a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl index ceb5dfe..572e497 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaCarrier to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl index 8555307..772efa2 100644 --- a/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaCons_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaCons to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_ClaimMetadata.ftl b/RFXtoRP_HsaDispute_ClaimMetadata.ftl index d0a8314..e2afd54 100644 --- a/RFXtoRP_HsaDispute_ClaimMetadata.ftl +++ b/RFXtoRP_HsaDispute_ClaimMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaDispute to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index f47abd4..be83a84 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -1,7 +1,12 @@ <#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- - +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { diff --git a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl index 29d1851..4a5b726 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl @@ -1,5 +1,11 @@ <#-- use protobuf of class HsaIpgMove to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { "Key": "Grade", diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl index cbbb6f7..744d05d 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItmLv to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl index 11676ae..a4620da 100644 --- a/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl index 2b30c89..895a30f 100644 --- a/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl +++ b/RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaItm to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl index 80b9a11..ca3c87a 100644 --- a/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsaSup_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsaSup to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl index dc02b6c..61ffd4c 100644 --- a/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrDepot to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl index dde74cb..220b470 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl @@ -1,7 +1,10 @@ <#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> -<#-- -"MetaData" :[ -] ---> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> + "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index 60d6334..0d23b62 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -1,5 +1,11 @@ <#-- use protobuf of class Hsrprepa to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { "Key": "Grade", diff --git a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl index e6d07b1..220b470 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl @@ -1,9 +1,10 @@ <#-- use protobuf of class HsrPrepa to find HARDIS WMS fields names --> -<#-- -"MetaData" :[ +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> - ] - ---> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl index 8506511..dcc2bc7 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,14 +1,10 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> -<#-- - -"MetaData": [ - { - "Key": "OrderType", - "Value": { "String" : "${preparation_order.optional_attributes.reason_code}"} - } - ], ---> - +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl index f0de72a..dcc2bc7 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl index 9cd8bc9..3518792 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,5 +1,11 @@ <#-- use protobuf of class HsrPro to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl index 079640d..da20da3 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl @@ -1,7 +1,12 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- - +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "MetaData": [ { "Key": "OrderType", diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl index d77c54e..06f715b 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl @@ -1,4 +1,10 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5)--> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl index e8a84f5..de24f8b 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl @@ -1,6 +1,12 @@ <#-- use protobuf of class HsrReceiptList to find HARDIS WMS fields names --> <#-- +<#-- Best practices: + If the SK is of type: + - string: add ?json_string (e.g. "${stock.batch_1?json_string}") + - boolean: possible values: true and false + - datetime: expected format: 2025-10-30T10:12:10.000Z + - decimal number: the separator is a point (e.g. 10.5) "SegmentationKeys": [ { "Key": "Grade", @@ -16,7 +22,7 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${line_without_detail.batch_1}"} - + }, { "Key": "HeldForSpecificCode", @@ -25,15 +31,15 @@ <#else> "Value": { "Bool" : "False"} }, - + { - <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign manufacturing_date = line_without_detail.ipg_date_of_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_date}" } - } + } ] From 9214df8b96ef9f8864bae3d7ab49ca4fdc6f6c43 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 4 Nov 2025 10:02:37 +0100 Subject: [PATCH 028/183] SCPN1-9601 --- README.md | 2 +- RFXtoRP_Receipt_ExecutionflowDeleted.ftl | 11 +++++++++++ RFXtoRP_Receipt_ShipToAcked.ftl | 15 --------------- RFXtoRP_RestResponse.ftl | 14 +++++++------- ReflexUtils.ftl | 20 ++++++++++---------- 5 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 RFXtoRP_Receipt_ExecutionflowDeleted.ftl delete mode 100644 RFXtoRP_Receipt_ShipToAcked.ftl diff --git a/README.md b/README.md index be119ee..f9e1ca8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The **HARDIS WMS Connector** is a set of **FreeMarker templates (FTL)** designed to transform **outgoing JSON flows from HARDIS WMS** into **flows compatible with HARDIS SC NETWORK**. -This connector does not contain any standalone executable code: it is intended to be used by **Reflex integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. +This connector does not contain any standalone executable code: it is intended to be used by **HARDIS WMS integration engines** or **data exchange pipelines**, where it applies the mapping rules defined in the `.ftl` files. ## Role of the FTL Files diff --git a/RFXtoRP_Receipt_ExecutionflowDeleted.ftl b/RFXtoRP_Receipt_ExecutionflowDeleted.ftl new file mode 100644 index 0000000..5be2d8c --- /dev/null +++ b/RFXtoRP_Receipt_ExecutionflowDeleted.ftl @@ -0,0 +1,11 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${id.refid?json_string}" + }, + "Payload": {} + } +] diff --git a/RFXtoRP_Receipt_ShipToAcked.ftl b/RFXtoRP_Receipt_ShipToAcked.ftl deleted file mode 100644 index a094aeb..0000000 --- a/RFXtoRP_Receipt_ShipToAcked.ftl +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${id.refid?json_string}" - }, - - "Payload": { - "ShipToAcked": true - } - - } -] diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 151a9b2..5276881 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -10,8 +10,8 @@ <#assign aDateTime = .now> -<#assign no_apiRestReflexID = "no apiRestReflexID"> -<#assign no_status = -99999> +<#assign no_apiRestReflexID = "no apiRestReflexID"> +<#assign no_status = -99999> <#switch id.apiRestReflexID!no_apiRestReflexID> @@ -30,7 +30,7 @@ } ] <#break> - + <#case "preparation_orders_post"> <#switch restResponsetMsg.status!no_status> <#case no_status> @@ -54,7 +54,7 @@ } ] <#break> - + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> @@ -144,7 +144,7 @@ } ] <#break> - + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = receipts_post ******************** --> @@ -153,10 +153,10 @@ <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipToAcked> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_Receipt_ShipToAcked.ftl"> + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> } ] <#else> diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index afa299e..fbe48c5 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -1,5 +1,5 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format --> +<#-- Concat HARDIS WMS timestamp with HARDIS WMS time zone and format this date in ISO UTC format --> <#-- --------------------------------------------------------------------------------------- --> <#function RfxDateTimetoUTC rfxdatetime offset > <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> @@ -10,21 +10,21 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Split email reflex into json array string --> +<#-- Split email HARDIS WMS into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> <#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" --> <#-- --------------------------------------------------------------------------------------- --> <#function splitEmailsIntoArray emails > <#local str = "["> <#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email> -<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> -<#if str != "["> -<#local str += ","> - -<#local str += "\""> -<#local str += email> -<#local str += "\""> - + <#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> + <#if str != "["> + <#local str += ","> + + <#local str += "\""> + <#local str += email> + <#local str += "\""> + <#local str += "]"> <#return (str)> From d895bac1372655aa83bfa32cc08642f9ff60f60d Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 7 Nov 2025 10:07:21 +0100 Subject: [PATCH 029/183] version 1 des FTL des RDZ --- ...oRP_HsaCarrierAptStatus_CarrierArrived.ftl | 18 +++ ...RP_HsaCarrierAptStatus_CarrierDeparted.ftl | 18 +++ ...RP_HsaCarrierAptStatus_CarrierExpected.ftl | 18 +++ ...P_HsaCarrierAptStatus_ReceptionStarted.ftl | 18 +++ ..._HsaCarrierAptStatus_ReceptionUnloaded.ftl | 18 +++ ...saDispute_TableReasonCodeToClaimTypeID.ftl | 12 +- RFXtoRP_HsaLstCarSta.ftl | 108 +++++++++++------- RFXtoRP_HsrCarrierApt.ftl | 106 ++++++++++------- ...rCarrierApt_AppointmentCarrierExpected.ftl | 18 +++ ...P_HsrCarrierApt_ForceUpdateAppointment.ftl | 77 +++++++++++++ ...RP_HsrCarrierApt_SiteCancelAppointment.ftl | 13 +++ ...HsrCarrierApt_SiteForceBookAppointment.ftl | 62 ++++++++++ ...rCarrierApt_SiteForceUpdateAppointment.ftl | 75 ++++++++++++ RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 23 +++- 14 files changed, 497 insertions(+), 87 deletions(-) create mode 100644 RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl create mode 100644 RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl create mode 100644 RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl create mode 100644 RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl create mode 100644 RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl create mode 100644 RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl new file mode 100644 index 0000000..60ed608 --- /dev/null +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl new file mode 100644 index 0000000..60ed608 --- /dev/null +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl new file mode 100644 index 0000000..60ed608 --- /dev/null +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl new file mode 100644 index 0000000..60ed608 --- /dev/null +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl new file mode 100644 index 0000000..60ed608 --- /dev/null +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl index 9b2f13a..e2f37da 100644 --- a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl +++ b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl @@ -1,7 +1,15 @@ + <#-- Specify table for reason code --> -<#assign TableReasonCode = {}/> - +<#-- Table example for reason code to claim type ID --> +<#-- <#assign TableReasonCode = { --> +<#-- "001":"ID_CLAIMTYPE_1",--> +<#-- "M1":"ID_CLAIMTYPE_2",--> +<#-- }/>--> + <#assign TableReasonCode = { +"M1" :"CAS" +} +/> \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index a74a148..e561d3d 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -1,40 +1,68 @@ -<#-- **** input parameters ***** --> -<#-- input : message HARDIS WMS --> -<#-- project : projectId in HARDIS SC NETWORK --> -<#-- organisation : organisationtId in HARDIS SC NETWORK --> - -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> - -<#assign aDateTime = .now> - -<#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 > - \ No newline at end of file +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#-- site : siteID in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> + +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = Update ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> + [ + { + + + <#switch carrier_apt_status.status.carrier_status_code> + <#case "010"> <#-- Transporteur attendu --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl"> + <#break> + <#case "020"> <#-- Transporteur arrivé sur site--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl"> + <#break> + <#case "040"> <#-- Déchargement commencé --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> + <#break> + <#case "050"> <#-- Déchargement terminé--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> + <#break> + + <#default> + <#stop 'this updated appointment Status not implemented'> + + + + } + ] + <#break> + +<#case "D"> + <#-- *********************************************** Action = Delete ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> + <#stop 'Delete Appointment Status not implemented' > + <#break> + <#default> + <#stop > + + diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index a74a148..b8a39b8 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -1,40 +1,66 @@ -<#-- **** input parameters ***** --> -<#-- input : message HARDIS WMS --> -<#-- project : projectId in HARDIS SC NETWORK --> -<#-- organisation : organisationtId in HARDIS SC NETWORK --> - -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> -<#assign projectRP = project> -<#assign organisationRP = organisation> - -<#assign aDateTime = .now> - -<#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 > - \ No newline at end of file +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> +<#-- site : siteID in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> + } + ] + <#break> + + <#case "U"> + <#-- *********************************************** Action = Update ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> + } + ] + <#break> + +<#case "D"> + <#-- *********************************************** Action = Delete ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + [ + <#-- Ajout des lignes--> + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + } + + ] + <#break> + <#default> + <#stop > + + diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl new file mode 100644 index 0000000..a3c6dae --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl @@ -0,0 +1,18 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${carrier_apt.appointment_reference?trim?json_string}", + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{} + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl new file mode 100644 index 0000000..d951834 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl @@ -0,0 +1,77 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> + + +<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> + + +[ + { + <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> + <#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}" + }, + "ActorID": "${carrier_apt.physical_depot}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> + <#assign duration = 0 /> <#-- à confirmer --> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "ProjectID": "${projectRP}", + "TimeZone": "${time_zone_rfx}", + "AppointmentID": "${carrier_apt.appointment_reference}", + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == lv.physical_receipt_list?filter(l ->l??)?size)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${carrier_apt.physical_depot}", + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ], + + + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if duration >= 0> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + + + + + }] + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl new file mode 100644 index 0000000..cb8256b --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -0,0 +1,13 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> + +<#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> + +[ + { + "AppointmentID": "${carrier_apt.appointment_reference?trim?json_string}", + "Header": { + "ProjectID": "${projectRP}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl new file mode 100644 index 0000000..1a08474 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -0,0 +1,62 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> + + +<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> + + +[ + { + <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> + <#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}" + }, + "ActorID": "${carrier_apt.physical_depot}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> + <#assign duration = 0 /> <#-- à confirmer --> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "ProjectID": "${projectRP}", + "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> + "Reason": "no commission", <#-- à confirmer --> + "CarrierName": "${carrier_apt.planned_carrier}", + "AppointmentType": "${appointmentType}", + "AppointmentID": "${carrier_apt.appointment_reference}", + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if duration >= 0> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + + + + + }] + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl new file mode 100644 index 0000000..571bfc4 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -0,0 +1,75 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> + + + +[ + { + <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> + <#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}" + }, + "ActorID": "${carrier_apt.physical_depot}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> + <#assign duration = 0 /> <#-- à confirmer --> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "ProjectID": "${projectRP}", + "TimeZone": "${time_zone_rfx}", + "AppointmentID": "${carrier_apt.appointment_reference}", + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${carrier_apt.physical_depot}", + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ], + + + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if duration >= 0> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + + + + + }] + } +] \ No newline at end of file diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index 6d51468..c196fce 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -2,6 +2,7 @@ <#-- How to use MD Header map Example : +<<<<<<< HEAD <#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/> If your MD is : @@ -14,19 +15,28 @@ -<#assign activity_code = ""/> -<#assign originator_code = ""/> -<#assign preparation_type_code = ""/> -<#assign requested_delivery_date_type = ""/> +<#assign activity_code = "ALI"/> +<#assign originator_code = "001"/> +======= + <#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/> +--> + + +<#assign activity_code = "ALI"/> +<#assign originator_code = "DEPT ALIM"/> +>>>>>>> main +<#assign preparation_type_code = "010"/> +<#assign requested_delivery_date_type = "010"/> <#assign consolidated_delivery_flag ="false"/> <#assign pick_sequence_code = ""/> <#assign protected_flag ="false"/> <#assign automatic_generation_flag ="false"/> <#assign apt_with_end_consignee_flag="false"/> +<<<<<<< HEAD <#-- A supprimer si utilisation de la table de correspondance--> <#--To be deleted if using the correspondence table--> -<#assign load_grouping = "default"> +<#assign load_grouping = "TEST"> <#-- Table de correspondance Transporteur/Code regroupement chargement, @@ -45,3 +55,6 @@ Assigning to a load if you set up Load Grouping+Distribution Master Plan--> +======= +<#assign load_grouping = "STD"/> +>>>>>>> main From 894031cc496634f5f5d2a63d043f4cc7a72b0613 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Nov 2025 14:22:40 +0100 Subject: [PATCH 030/183] SCPN1-9640 --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 1a08474..237465c 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -15,9 +15,11 @@ "ProjectID": "${projectRP}" }, "ActorID": "${carrier_apt.physical_depot}", + "AppointmentID": "${carrier_apt.appointment_reference}", + "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> @@ -27,17 +29,37 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> <#assign duration = 0 /> <#-- à confirmer --> <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> - "ProjectID": "${projectRP}", - "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> - "Reason": "no commission", <#-- à confirmer --> - "CarrierName": "${carrier_apt.planned_carrier}", "AppointmentType": "${appointmentType}", - "AppointmentID": "${carrier_apt.appointment_reference}", + "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> + + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${carrier_apt.physical_depot}", + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ] + <#else> + "ProjectID": "${projectRP}", + "Reason": "no commission", <#-- à confirmer --> + + <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> + "CarrierName": "${carrier_apt.planned_carrier}", + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", @@ -48,7 +70,7 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> From bf365ba1705e5a0650747cce5a651a0eec653677 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Nov 2025 14:23:57 +0100 Subject: [PATCH 031/183] SCPN1-9640 --- RFXtoRP_HsaProStatus.ftl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index b64f03b..35dd5da 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -16,6 +16,7 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign preparationStatusInterface = JsonUtil.jsonToMap(dataRfx) /> [ + <#if preparationStatusInterface.preparation_type_code=="010" || preparationStatusInterface.preparation_type_code=="030"> <#--**Pick batch runned (200) **--> <#if preparationStatusInterface.preparation_status_type == "100" && preparationStatusInterface.preparation_status_code == "200" > { @@ -63,6 +64,9 @@ + <#else> + <#stop> + ] <#break> From a151a0b6554588338a88f56be22ee88a3252d784 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Nov 2025 14:45:26 +0100 Subject: [PATCH 032/183] Revert "SCPN1-9640" This reverts commit 894031cc496634f5f5d2a63d043f4cc7a72b0613. --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 42 +++++-------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 237465c..1a08474 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -15,11 +15,9 @@ "ProjectID": "${projectRP}" }, "ActorID": "${carrier_apt.physical_depot}", - "AppointmentID": "${carrier_apt.appointment_reference}", - "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> @@ -29,37 +27,17 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> <#assign duration = 0 /> <#-- à confirmer --> <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + "ProjectID": "${projectRP}", + "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> + "Reason": "no commission", <#-- à confirmer --> + "CarrierName": "${carrier_apt.planned_carrier}", "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> - - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> - { - "ActorID": "${carrier_apt.physical_depot}", - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] - }<#sep>, - - ] - <#else> - "ProjectID": "${projectRP}", - "Reason": "no commission", <#-- à confirmer --> - - <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> - "CarrierName": "${carrier_apt.planned_carrier}", - + "AppointmentID": "${carrier_apt.appointment_reference}", "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", @@ -70,7 +48,7 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> From 5477fbd66a3c75592b8de8fffbc19e3107c701af Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 12 Nov 2025 16:30:59 +0100 Subject: [PATCH 033/183] SCPN1-8643 --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 47 +++++++++++++------ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 1a08474..7e270ab 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -1,10 +1,7 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> - - <#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> - [ { <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> @@ -14,10 +11,12 @@ "Header":{ "ProjectID": "${projectRP}" }, - "ActorID": "${carrier_apt.physical_depot}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> @@ -27,17 +26,37 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> <#assign duration = 0 /> <#-- à confirmer --> <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> - "ProjectID": "${projectRP}", - "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> - "Reason": "no commission", <#-- à confirmer --> - "CarrierName": "${carrier_apt.planned_carrier}", "AppointmentType": "${appointmentType}", - "AppointmentID": "${carrier_apt.appointment_reference}", + "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> + + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ] + <#else> + "ProjectID": "${projectRP}", + "Reason": "no commission", <#-- à confirmer --> + + <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> + "CarrierName": "${carrier_apt.planned_carrier}", + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", @@ -48,7 +67,7 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> From e09c0fecda968548917b883564db2a0488d42b8c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 12 Nov 2025 16:33:27 +0100 Subject: [PATCH 034/183] SCPN1-9640 --- RFXtoRP_HsaProStatus.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 35dd5da..6020d1d 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -65,8 +65,12 @@ <#else> - <#stop> + <#--PRO reference is empty--> + <#stop > + <#else> + <#stop > + ] <#break> From 9c38272c6c3986174671578f71707b81ae80241b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 12 Nov 2025 16:37:15 +0100 Subject: [PATCH 035/183] SCPN1-9640 --- RFXtoRP_HsaProStatus.ftl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 6020d1d..2bc089f 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -65,12 +65,8 @@ <#else> - <#--PRO reference is empty--> <#stop > - <#else> - <#stop > - ] <#break> From bd7b24fed755b8dc582e0981d38a4adc106faeb5 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 12 Nov 2025 17:10:56 +0100 Subject: [PATCH 036/183] modif sur les rdz --- ...P_HsrCarrierApt_ForceUpdateAppointment.ftl | 6 +- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 6 +- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 6 +- RPtoRFX_AppointmentEvent.ftl | 21 +++-- RPtoRFX_CarrierAppointment.ftl | 76 +++++++++++++++++++ ReflexUtils.ftl | 20 ++++- 6 files changed, 119 insertions(+), 16 deletions(-) create mode 100644 RPtoRFX_CarrierAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl index d951834..3ef8dad 100644 --- a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl @@ -17,11 +17,11 @@ "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign duration = (carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> @@ -62,7 +62,7 @@ <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 1a08474..01b5643 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -17,11 +17,11 @@ "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> @@ -47,7 +47,7 @@ <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso,time_zone_rfx) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 571bfc4..39f7bbe 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -15,11 +15,11 @@ "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_load_start_datetime,carrier_apt.planned_load_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> @@ -60,7 +60,7 @@ <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#assign duration = RfxDurationBetweenTwoDateTimetoInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso,time_zone_rfx) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 3ba3fb1..2647599 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -9,12 +9,23 @@ <#assign projectRP = project> <#assign organisationRP = organisation> -<#-- initialisation map for SegmentationKey and MetaData --> -<#assign Header_MetaData_Map = {} /> -<#assign SegmentationKeys_Map = {} /> -<#assign Line_MetaData_Map = {} /> - +<#switch eventRP.event> + <#case "Created"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointment.ftl"> + } + ] + <#break> + <#default> + <#stop > + <#switch eventRP.event> <#case "Created"> <#assign appointment = eventRP.data /> diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl new file mode 100644 index 0000000..27a7663 --- /dev/null +++ b/RPtoRFX_CarrierAppointment.ftl @@ -0,0 +1,76 @@ +<#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> + +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "DPF" <#-- "${RPtoRFXprefixDepot(appointment.ActorID)}" --> + }, + "payload" : + { + "appointment_reference": "${appointment.a_defnir?json_string}", + + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_EXPEDITION"> + + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + + <#break> + + <#case "APPOINTMENT_TYPE_RECEPTION"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented> + + + "planned_carrier" : "${appointment.CarrierName?json_string}", + + <#if appointment.Commissions??> + "physical_receipt_list": [ + <#list appointment.Commissions as commission> + { + "receipt_activity": "str", + "originator_code": "string", + "physical_receipt_reference": "string", + "receipt_year": 0, + "receipt_number": 0, + "comment_list": [ + { + "line_number": 999, + "group_code": "str", + "text": "string" + } + ] + + { + "ProjectID": "recette-rfxdev", + "OrderID": "SPA-121125-02", + "Quantities": [ + { + "UnitID": "PAL", + "Value": 1.0 + } + ], + "OrganisationID": "recette", + "PartnerAppID": "recette-rfxdev-rfxdev", + "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" + } + } + <#sep>, + + ], + + "constant_appointment": "false" + + + } + } diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index fbe48c5..9103c0a 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -1,6 +1,6 @@ -<#-- --------------------------------------------------------------------------------------- --> +<#-- -------------------------------------------------------------------------------------------- --> <#-- Concat HARDIS WMS timestamp with HARDIS WMS time zone and format this date in ISO UTC format --> -<#-- --------------------------------------------------------------------------------------- --> +<#-- -------------------------------------------------------------------------------------------- --> <#function RfxDateTimetoUTC rfxdatetime offset > <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> @@ -9,6 +9,22 @@ <#return dateutc?datetime.iso?iso_nz(locale)> +<#-- -------------------------------------------------------------------------------------------- --> +<#-- Add second to dateTime ex: AddSecondsToDatetime("2025-11-17T09:15:00Z"?datetime.iso, 61) --> +<#-- -------------------------------------------------------------------------------------------- --> +<#function AddSecondsToDatetime date seconds> + <#assign timeInMilliseconds = (1000 * seconds) > + <#assign aDate = date?long + timeInMilliseconds?long> + <#return aDate?number_to_datetime> + + +<#-- -------------------------------------------------------------------------------------------- --> +<#-- duration between two datetime in second --> +<#-- -------------------------------------------------------------------------------------------- --> +<#function DurationBetweenTwoDatetimeInsecond startDate endDate> + <#return (endDate?long - startDate?long) / 1000 > + + <#-- --------------------------------------------------------------------------------------- --> <#-- Split email HARDIS WMS into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> From b4f11ef83d37cc47fe4ce44d66f97b65c26b086e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 13 Nov 2025 10:02:56 +0100 Subject: [PATCH 037/183] SCPN1-8643 --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 7e270ab..d0bb4b2 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> <#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> [ From 8f8f26d2a23e35511864fdbd6d10da19b4653b5b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 13 Nov 2025 10:09:11 +0100 Subject: [PATCH 038/183] mails --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index d0bb4b2..680573d 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -33,7 +33,7 @@ "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com"], <#-- à confirmer --> + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à confirmer --> <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ From 4648c02a2cb9da6bec0709b6e7a2fcdb73438b60 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 14 Nov 2025 14:27:33 +0100 Subject: [PATCH 039/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt.ftl | 4 +- ...rCarrierApt_AppointmentCarrierExpected.ftl | 2 - ...P_HsrCarrierApt_ForceUpdateAppointment.ftl | 15 +--- ...RP_HsrCarrierApt_SiteCancelAppointment.ftl | 4 - ...HsrCarrierApt_SiteForceBookAppointment.ftl | 6 +- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 5 -- RFXtoRP_RestResponse.ftl | 82 +++++++++++++++++++ RPtoRFX_CarrierAppointment.ftl | 14 ++-- ReflexUtils.ftl | 4 +- 9 files changed, 96 insertions(+), 40 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index b8a39b8..ff2a9e1 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -2,7 +2,9 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#-- site : siteID in ReflexPlatform --> +<#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl index a3c6dae..c2ee7d6 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> { diff --git a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl index 3ef8dad..a6d9622 100644 --- a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl @@ -1,23 +1,12 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - - -<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> - - [ { - <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> - <#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) /> - <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - - "Header":{ + "Header":{ "ProjectID": "${projectRP}" }, "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = (carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index cb8256b..f29573d 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -1,8 +1,4 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> - [ { "AppointmentID": "${carrier_apt.appointment_reference?trim?json_string}", diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index c240f5c..a107ef8 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -1,13 +1,9 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -<#-- à quoi correspond ID du transporteur dans l'API a voir avec Vincent--> - [ { "Header":{ "ProjectID": "${projectRP}" }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ActorID": "${RPtoRFXprefixDepot("DPF")}", "AppointmentID": "${carrier_apt.appointment_reference?json_string}", "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 39f7bbe..f10c7e5 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -1,8 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> - - - [ { <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 5276881..6faa7a8 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -200,6 +200,88 @@ ] <#break> + <#case "appointment_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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 ******************** --> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <# stop "Création rdz OK" > + + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.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"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> <#stop> diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 27a7663..ecd0794 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -1,12 +1,9 @@ -<#include "ActorPrefix.ftl"> -<#include "HfRpConfig.ftl"> - { "id" : {"refid" : "${eventRP.refid?json_string}"}, "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", "uri_substitutions": { - "physical_depot_code": "DPF" <#-- "${RPtoRFXprefixDepot(appointment.ActorID)}" --> + "physical_depot_code": "${RPtoRFXprefixDepot("DPF")}" <#-- "${RPtoRFXprefixDepot(appointment.ActorID)}" --> }, "payload" : { @@ -25,11 +22,11 @@ <#case "APPOINTMENT_TYPE_RECEPTION"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" <#break> <#default> - <#stop "appointment.AppointmentType not implemented> + <#stop "appointment.AppointmentType not implemented" > "planned_carrier" : "${appointment.CarrierName?json_string}", @@ -37,8 +34,8 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> - { - "receipt_activity": "str", + <#-- { + "receipt_activity": "str", "originator_code": "string", "physical_receipt_reference": "string", "receipt_year": 0, @@ -65,6 +62,7 @@ "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" } } + --> <#sep>, ], diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index 9103c0a..4199deb 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -19,9 +19,9 @@ <#-- -------------------------------------------------------------------------------------------- --> -<#-- duration between two datetime in second --> +<#-- Duration between two datetimes in second --> <#-- -------------------------------------------------------------------------------------------- --> -<#function DurationBetweenTwoDatetimeInsecond startDate endDate> +<#function DurationBetweenTwoDatetimeInSeconds startDate endDate> <#return (endDate?long - startDate?long) / 1000 > From e83186cc3f2191432b81fee685b593fff5a9dd07 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 17 Nov 2025 09:45:06 +0100 Subject: [PATCH 040/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl index a6d9622..0bf5775 100644 --- a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl @@ -6,11 +6,11 @@ "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index f10c7e5..1c76b5d 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -10,11 +10,11 @@ "ActorID": "${carrier_apt.physical_depot}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> @@ -55,7 +55,7 @@ <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if duration >= 0> "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" From 1dcf91bf712805b29a59973fa858b79eb1b4ef9c Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 17 Nov 2025 10:02:33 +0100 Subject: [PATCH 041/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 8 ++++---- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index bcf2cd3..f2b17d4 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -8,11 +8,11 @@ "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> @@ -58,9 +58,9 @@ <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso,time_zone_rfx) /> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if duration >= 0> + <#if (duration >= 0) > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 1c76b5d..86a3422 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -57,7 +57,7 @@ <#else> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if duration >= 0> + <#if (duration >= 0) > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> "StartDateTime": "${carrier_apt.planned_load_start_datetime}" From 7ff859420a890cb70b0a143f145c38c166fdfaef Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 17 Nov 2025 17:31:23 +0100 Subject: [PATCH 042/183] modif sur les rdz --- ...P_HsrCarrierApt_ForceUpdateAppointment.ftl | 66 ------------------- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 8 ++- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 12 +++- 3 files changed, 16 insertions(+), 70 deletions(-) delete mode 100644 RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl deleted file mode 100644 index 0bf5775..0000000 --- a/RFXtoRP_HsrCarrierApt_ForceUpdateAppointment.ftl +++ /dev/null @@ -1,66 +0,0 @@ -[ - { - "Header":{ - "ProjectID": "${projectRP}" - }, - "ActorID": "${carrier_apt.physical_depot}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_unloading_end_datetime) /> - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> - <#assign duration = 0 /> <#-- à confirmer --> - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> - - - - "ProjectID": "${projectRP}", - "TimeZone": "${time_zone_rfx}", - "AppointmentID": "${carrier_apt.appointment_reference}", - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == lv.physical_receipt_list?filter(l ->l??)?size)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> - { - "ActorID": "${carrier_apt.physical_depot}", - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] - }<#sep>, - - ], - - - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime,carrier_apt.planned_load_start_datetime,time_zone_rfx) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if duration >= 0> - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - - - - - }] - } -] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index f2b17d4..f9ad303 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -6,11 +6,17 @@ "ActorID": "${RPtoRFXprefixDepot("DPF")}", "AppointmentID": "${carrier_apt.appointment_reference?json_string}", "TimeZone":"${time_zone_rfx}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#else> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 86a3422..ff542e2 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -8,11 +8,17 @@ "ProjectID": "${projectRP}" }, "ActorID": "${carrier_apt.physical_depot}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#else> @@ -20,8 +26,8 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> <#assign duration = 0 /> <#-- à confirmer --> <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> From 065d4c026ba5132144d785d077f3acfd86404a8b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 17 Nov 2025 17:39:15 +0100 Subject: [PATCH 043/183] modif sur les rdz --- RPtoRFX_AppointmentEvent.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 2647599..ae27a77 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -4,6 +4,7 @@ <#-- organisation : organisationtId in HARDIS SC NETWORK --> <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> <#assign eventRP = JsonUtil.jsonToMap(input)> <#assign projectRP = project> From 4bfd6e7a4f3aa751c2128d88a328f180328f5fb5 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 17 Nov 2025 17:58:20 +0100 Subject: [PATCH 044/183] modif sur les rdz --- RPtoRFX_CarrierAppointment.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index ecd0794..2207f22 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -3,11 +3,11 @@ "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments", "method" : "POST", "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot("DPF")}" <#-- "${RPtoRFXprefixDepot(appointment.ActorID)}" --> + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}" }, "payload" : { - "appointment_reference": "${appointment.a_defnir?json_string}", + "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_EXPEDITION"> From 138dd801d2b7085353637ecd8d350a6c2ccee93d Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 18 Nov 2025 10:41:35 +0100 Subject: [PATCH 045/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 10 ++++++++-- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index f9ad303..462663c 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -30,8 +30,14 @@ "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à confirmer --> + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> + "SegmentationSelections" : [ + { + "SegmentationID" : "secteur",<#-- à changer --> + "SegmentationValueID" : "n1-mh0plpq3-6n1x56plog4"<#-- à changer --> + } + ], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> @@ -50,7 +56,7 @@ ] <#else> "ProjectID": "${projectRP}", - "Reason": "no commission", <#-- à confirmer --> + "Reason": "no commission", <#-- à changer --> <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> "CarrierName": "${carrier_apt.planned_carrier}", diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index ff542e2..7c88078 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -34,6 +34,12 @@ "ProjectID": "${projectRP}", "TimeZone": "${time_zone_rfx}", "AppointmentID": "${carrier_apt.appointment_reference}", + "SegmentationSelections" : [ + { + "SegmentationID" : "secteur",<#-- à changer --> + "SegmentationValueID" : "n1-mh0plpq3-6n1x56plog4"<#-- à changer --> + } + ], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> From ae47fda38fd939bc78bc1a636d57c389886c5a93 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 18 Nov 2025 10:48:46 +0100 Subject: [PATCH 046/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 7c88078..ff542e2 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -34,12 +34,6 @@ "ProjectID": "${projectRP}", "TimeZone": "${time_zone_rfx}", "AppointmentID": "${carrier_apt.appointment_reference}", - "SegmentationSelections" : [ - { - "SegmentationID" : "secteur",<#-- à changer --> - "SegmentationValueID" : "n1-mh0plpq3-6n1x56plog4"<#-- à changer --> - } - ], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> From d03f3bb7a06e9b71ddd964d0a321798c1af0ec72 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 18 Nov 2025 11:06:35 +0100 Subject: [PATCH 047/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 18 +++++++-------- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 22 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index ff2a9e1..2ff64dd 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -14,6 +14,7 @@ <#switch cloudEventMsg.action> <#case "C"> + <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> @@ -24,17 +25,16 @@ "datas" : <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> - } + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> + } ] <#break> - <#case "U"> - <#-- *********************************************** Action = Update ******************** --> + <#-- *********************************************** Action = Update ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ @@ -44,7 +44,7 @@ "datas" : <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> } - ] + ] <#break> <#case "D"> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 462663c..7d19212 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -3,15 +3,15 @@ "Header":{ "ProjectID": "${projectRP}" }, - "ActorID": "${RPtoRFXprefixDepot("DPF")}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "AppointmentID": "${carrier_apt.appointment_reference?json_string}", "TimeZone":"${time_zone_rfx}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> @@ -32,12 +32,12 @@ "AppointmentType": "${appointmentType}", "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> - "SegmentationSelections" : [ - { - "SegmentationID" : "secteur",<#-- à changer --> - "SegmentationValueID" : "n1-mh0plpq3-6n1x56plog4"<#-- à changer --> - } - ], + "SegmentationSelections":[ + { "SegmentationID":"Securise", + "SegmentationValueID":"yes"}, + { "SegmentationID":"Secteur", + "SegmentationValueID":"frais"} + ], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> @@ -71,7 +71,7 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if (duration >= 0) > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> From 256e747c48e5e871a9bb2810bb31a2ea5e409468 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 18 Nov 2025 11:57:00 +0100 Subject: [PATCH 048/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 7d19212..29d17cf 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -4,7 +4,15 @@ "ProjectID": "${projectRP}" }, "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> From 3f1711728a5f40958dca9f996c58fdb77c1634fc Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 18 Nov 2025 15:12:41 +0100 Subject: [PATCH 049/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 29d17cf..fc151c7 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -51,7 +51,11 @@ <#list carrier_apt.physical_receipt_list as physical_receipt> { "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + "ProjectID": "${projectRP}", "Quantities": [ { From 1168bfc50f275f56c80d7a80d7e4223ba5ca7ba5 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 18 Nov 2025 15:18:52 +0100 Subject: [PATCH 050/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl | 4 +++- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl index c2ee7d6..e4b43c6 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl @@ -11,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index ff542e2..45b837b 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -7,7 +7,7 @@ "Header":{ "ProjectID": "${projectRP}" }, - "ActorID": "${carrier_apt.physical_depot}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > From 28c5cabbc38e69c5b27d0c3a9fa5e327c075e78d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 18 Nov 2025 15:25:06 +0100 Subject: [PATCH 051/183] RDV --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 108 +++++++++++++++++- 2 files changed, 103 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index fc151c7..5d1dbb0 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -65,7 +65,7 @@ ] }<#sep>, - ] + ], <#else> "ProjectID": "${projectRP}", "Reason": "no commission", <#-- à changer --> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index ff542e2..488ab91 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -8,12 +8,12 @@ "ProjectID": "${projectRP}" }, "ActorID": "${carrier_apt.physical_depot}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> @@ -43,15 +43,89 @@ "ProjectID": "${projectRP}", "Quantities": [ { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> } ] }<#sep>, ], +[ + { + "Header":{ + "ProjectID": "${projectRP}" + }, + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "TimeZone":"${time_zone_rfx}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> + <#assign duration = 0 /> <#-- à confirmer --> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "AppointmentType": "${appointmentType}", + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> + "SegmentationSelections":[ + { "SegmentationID":"Securise", + "SegmentationValueID":"yes"}, + { "SegmentationID":"Secteur", + "SegmentationValueID":"frais"} + ], + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ], + <#else> + "ProjectID": "${projectRP}", + "Reason": "no commission", <#-- à changer --> + + <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> + "CarrierName": "${carrier_apt.planned_carrier}", + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", @@ -62,7 +136,29 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#if (duration >= 0) > + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + + + + + }] + } +] + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if (duration >= 0) > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> From 2432b37d6466e3730ab32a48b427c02b6363af42 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 18 Nov 2025 15:36:02 +0100 Subject: [PATCH 052/183] RDV --- RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl | 12 ++++++++++-- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl index e4b43c6..13bc369 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl @@ -5,11 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier_apt.appointment_reference?trim?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index f29573d..d719484 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -1,7 +1,15 @@ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> [ { - "AppointmentID": "${carrier_apt.appointment_reference?trim?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + "Header": { "ProjectID": "${projectRP}" } From 35440a5eb3a1b7485611d99dc662c9db12233950 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 10:10:45 +0100 Subject: [PATCH 053/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 2ff64dd..77d5ab6 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -14,7 +14,6 @@ <#switch cloudEventMsg.action> <#case "C"> - <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> @@ -34,6 +33,7 @@ ] <#break> <#case "U"> + <#stop "Not yet implemented"> <#-- *********************************************** Action = Update ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> From 08e9b9b9eb0983aac91a6d38ff67cc7741cb4016 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 10:48:56 +0100 Subject: [PATCH 054/183] rdv --- RFXtoRP_HsrCarrierApt.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 77d5ab6..b0adffc 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -34,18 +34,18 @@ <#break> <#case "U"> <#stop "Not yet implemented"> - <#-- *********************************************** Action = Update ******************** --> + <#-- *********************************************** Action = Update ******************** <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> } ] - <#break> + <#break>--> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From 1bff43fe8d7735ff52daf7ac4d20fd08281712a4 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 10:53:16 +0100 Subject: [PATCH 055/183] modif sur les rdz --- RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl | 6 +++--- RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl | 6 +++--- RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl | 6 +++--- RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl | 6 +++--- RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl | 6 +++--- RFXtoRP_HsaLstCarSta.ftl | 4 +++- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl index 60ed608..0d5080f 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> { @@ -13,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl index 60ed608..0d5080f 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> { @@ -13,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl index 60ed608..0d5080f 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> { @@ -13,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl index 60ed608..0d5080f 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> { @@ -13,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl index 60ed608..0d5080f 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl @@ -1,5 +1,3 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> [ <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> { @@ -13,6 +11,8 @@ "AuthorTimeZone": "${time_zone_rfx}" } }, - "Payload":{} + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index e561d3d..7346eba 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -2,7 +2,9 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#-- site : siteID in ReflexPlatform --> +<#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> From 2a129f1b9c753f9e05afdc2c88590485ca6a7143 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 10:53:55 +0100 Subject: [PATCH 056/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index b0adffc..a868ebe 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -44,8 +44,8 @@ "datas" : <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> } - ] - <#break>--> + ]--> + <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From db60006e94d1e92f89c4346e3839e5b2151edc46 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 10:58:52 +0100 Subject: [PATCH 057/183] modif sur les rdz --- RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl | 2 +- RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl | 2 +- RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl | 2 +- RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl | 2 +- RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl index 0d5080f..b80bc11 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl @@ -12,7 +12,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl index 0d5080f..b80bc11 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl @@ -12,7 +12,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl index 0d5080f..b80bc11 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl @@ -12,7 +12,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl index 0d5080f..b80bc11 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl @@ -12,7 +12,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl index 0d5080f..b80bc11 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl @@ -12,7 +12,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" } } ] \ No newline at end of file From 65ba8e94c9b1448f9a9eaeba510e5c646a68dde6 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 11:45:12 +0100 Subject: [PATCH 058/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 6 ++++++ RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 5d1dbb0..c77f7f5 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -20,6 +20,9 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> @@ -27,6 +30,9 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 48e51c4..79910bf 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -73,6 +73,9 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> @@ -80,6 +83,9 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> From a5891999f2a915158867f00c7e0466d1cec4dda8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 11:55:43 +0100 Subject: [PATCH 059/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index a868ebe..02bdfa8 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -33,7 +33,7 @@ ] <#break> <#case "U"> - <#stop "Not yet implemented"> + <#stop> <#-- *********************************************** Action = Update ******************** <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> @@ -45,7 +45,7 @@ <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> } ]--> - <#break> + <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From f0d37c04ed90457a61c33dca71c4cbe73e113a64 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 13:20:18 +0100 Subject: [PATCH 060/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index c77f7f5..ec93dff 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -15,7 +15,7 @@ "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> @@ -25,7 +25,7 @@ <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 79910bf..540e2eb 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -68,7 +68,7 @@ "TimeZone":"${time_zone_rfx}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> @@ -78,7 +78,7 @@ <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> From 7233859ed853f3ef3704afef2d168b0e8e415e72 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 17:16:16 +0100 Subject: [PATCH 061/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 27 ++++---- ...rrierApt_AppointmentCommissionsUpdated.ftl | 64 ++++++++----------- 2 files changed, 42 insertions(+), 49 deletions(-) rename RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl => RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl (75%) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 02bdfa8..8961200 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -33,18 +33,21 @@ ] <#break> <#case "U"> - <#stop> - <#-- *********************************************** Action = Update ******************** - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> - } - ]--> + <#-- *********************************************** Action = Update ********************--> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCommissionsUpdated> <#-- à revoir--> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl"> + } + ] + <#else> + <#stop> <#--no comission--> + <#break> <#case "D"> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl similarity index 75% rename from RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl rename to RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index 540e2eb..e615f82 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -7,49 +7,39 @@ "Header":{ "ProjectID": "${projectRP}" }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?starts_with("00")> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?starts_with("00")> - <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + "ID": { + "RefDate": { + "AuthorTimeZone": "time_zone_rfx", + "DateTime": "${creation_datetime}" + }, + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> - <#assign duration = 0 /> <#-- à confirmer --> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - - "ProjectID": "${projectRP}", - "TimeZone": "${time_zone_rfx}", - "AppointmentID": "${carrier_apt.appointment_reference}", + }, + "Payload": { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> - { - "ActorID": "${carrier_apt.physical_depot}", - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] - }<#sep>, - - ], + <#list carrier_apt.physical_receipt_list as physical_receipt> + { + "ActorID": "${carrier_apt.physical_depot}", + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + }<#sep>, + + ], [ { From 4d9f26f2605d7e7630bb927d5fccc14a2a2314b1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 17:18:37 +0100 Subject: [PATCH 062/183] RDV --- ...rrierApt_AppointmentCommissionsUpdated.ftl | 128 +----------------- 1 file changed, 2 insertions(+), 126 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index e615f82..bc4d8cc 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -1,7 +1,5 @@ [ { - <#assign appointment_reception_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_unloading_start_datetime,time_zone_rfx) /> - <#assign appointment_expedition_start_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.planned_load_start_datetime,time_zone_rfx) /> <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> "Header":{ @@ -41,128 +39,6 @@ ], -[ - { - "Header":{ - "ProjectID": "${projectRP}" - }, - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}", - <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - <#else> - "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - - - "TimeZone":"${time_zone_rfx}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> - <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > - - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> - <#assign duration = 0 /> <#-- à confirmer --> - <#else> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> - <#assign duration = 0 /> <#-- à confirmer --> - - - - "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> - - "SegmentationSelections":[ - { "SegmentationID":"Securise", - "SegmentationValueID":"yes"}, - { "SegmentationID":"Secteur", - "SegmentationValueID":"frais"} - ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - <#else> - "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", - - "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] - }<#sep>, - - ], - <#else> - "ProjectID": "${projectRP}", - "Reason": "no commission", <#-- à changer --> - - <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> - "CarrierName": "${carrier_apt.planned_carrier}", - - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if (duration >= 0) > - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - - - - - }] - } -] - "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if (duration >= 0) > - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - - - - - }] - } + } + } ] \ No newline at end of file From 39e2272e67105a8c16f738b62343476cd8df5428 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 19 Nov 2025 17:50:50 +0100 Subject: [PATCH 063/183] modif sur les rdz --- RPtoRFX_CarrierAppointment.ftl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 2207f22..1ed35dd 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -14,7 +14,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", + "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" <#break> @@ -22,7 +22,7 @@ <#case "APPOINTMENT_TYPE_RECEPTION"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime : "${appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", + "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" <#break> <#default> @@ -62,9 +62,10 @@ "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" } } - --> + <#sep>, - + --> + ], "constant_appointment": "false" From 8be4f0e9491568d6d2b27a4d75a1d831ca441b0e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 17:52:50 +0100 Subject: [PATCH 064/183] RDV --- RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index bc4d8cc..5a91f9a 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -7,7 +7,7 @@ }, "ID": { "RefDate": { - "AuthorTimeZone": "time_zone_rfx", + "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${creation_datetime}" }, <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> From e3bbaa021187d7c458269a3e843cd1e60983d712 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Nov 2025 17:57:11 +0100 Subject: [PATCH 065/183] RDV --- RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index 5a91f9a..bedbcc1 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -37,7 +37,7 @@ ] }<#sep>, - ], + ] } } From 429d9588b2de531b24239e9c1767d61276a9af1e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 09:09:27 +0100 Subject: [PATCH 066/183] RDV --- ...rrierApt_AppointmentCommissionsUpdated.ftl | 6 ++-- RPtoRFX_CarrierAppointment.ftl | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index bedbcc1..923692c 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -7,11 +7,11 @@ }, "ID": { "RefDate": { - "AuthorTimeZone": "${time_zone_rfx}", - "DateTime": "${creation_datetime}" + "AuthorTimeZone": "${time_zone_rfx}", + "DateTime": "${creation_datetime}" }, <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 1ed35dd..1ec5c55 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -8,29 +8,29 @@ "payload" : { "appointment_reference": "${eventRP.refid?json_string}", - + <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_EXPEDITION"> - "unloading_appointment" : "false", - "load_appointment" : "true", - "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" <#break> - + <#case "APPOINTMENT_TYPE_RECEPTION"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > - - + + "planned_carrier" : "${appointment.CarrierName?json_string}", - + <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> @@ -69,7 +69,7 @@ ], "constant_appointment": "false" - + } } From 64f3a77fb5ed7e90e6d533f88c53d03e440def8e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 09:33:41 +0100 Subject: [PATCH 067/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 26 +++++++++---------- ...rrierApt_AppointmentCommissionsUpdated.ftl | 6 ++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 8961200..9c958ed 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -18,18 +18,18 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> - } + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceBookAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> + } ] <#break> <#case "U"> @@ -44,7 +44,7 @@ "datas" : <#include "RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl"> } - ] + ] <#else> <#stop> <#--no comission--> diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl index 923692c..d77f769 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl @@ -11,12 +11,12 @@ "DateTime": "${creation_datetime}" }, <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}", + "RefID": "${carrier_apt.appointment_reference?json_string}" <#else> <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}" <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}" }, From c273754d49198ff0b73f9132a3d1388a92e9ce81 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 10:11:22 +0100 Subject: [PATCH 068/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 4 +-- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 25 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) rename RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl => RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl (51%) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 9c958ed..5ce6c6f 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -39,10 +39,10 @@ <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCommissionsUpdated> <#-- à revoir--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir--> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl"> + <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> } ] <#else> diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl similarity index 51% rename from RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl rename to RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index d77f769..677fd91 100644 --- a/RFXtoRP_HsrCarrierApt_AppointmentCommissionsUpdated.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -5,23 +5,16 @@ "Header":{ "ProjectID": "${projectRP}" }, - "ID": { - "RefDate": { - "AuthorTimeZone": "${time_zone_rfx}", - "DateTime": "${creation_datetime}" - }, - <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> - "RefID": "${carrier_apt.appointment_reference?json_string}" + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", <#else> - <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> - "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}" - <#else> - "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}" - + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", - }, - "Payload": { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> @@ -39,6 +32,6 @@ ] - } + } ] \ No newline at end of file From 359b416b9787221dd23bcc20984cfc1eb11fd719 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 11:15:02 +0100 Subject: [PATCH 069/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index ec93dff..43c6637 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -44,7 +44,7 @@ "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com","sa.recette-rfxdev-rfxdev@recette.dev.reflex-platform.com"], <#-- à changer --> "SegmentationSelections":[ { "SegmentationID":"Securise", From b691a8bf21b0d93daeb6d34346b074f44c887e53 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 20 Nov 2025 13:12:29 +0100 Subject: [PATCH 070/183] modif sur les rdz --- RPtoRFX_CarrierAppointment.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 1ec5c55..2f48369 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -15,7 +15,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" <#break> @@ -23,7 +23,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds)?iso_nz(time_zone_rfx)}" + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 9129186a5adee95c9e2d9d99119928f960b4bb6b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 20 Nov 2025 13:29:39 +0100 Subject: [PATCH 071/183] no message --- RPtoRFX_CarrierAppointment.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 2f48369..4147b66 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -15,7 +15,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> @@ -23,7 +23,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From d4b7b7de82ded7c40864677a5637c4a4ef81ad73 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 16:09:29 +0100 Subject: [PATCH 072/183] RDV --- RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl | 3 ++- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl index d719484..0d7a7e1 100644 --- a/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl @@ -12,6 +12,7 @@ "Header": { "ProjectID": "${projectRP}" - } + }, + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 43c6637..0238464 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -46,7 +46,7 @@ "AppointmentType": "${appointmentType}", "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com","sa.recette-rfxdev-rfxdev@recette.dev.reflex-platform.com"], <#-- à changer --> - "SegmentationSelections":[ + "SegmentationSelections":[ <#-- intégrer les SK par la suite --> { "SegmentationID":"Securise", "SegmentationValueID":"yes"}, { "SegmentationID":"Secteur", From a678df969ce7003414bace6290bc8ed63ba64fad Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Nov 2025 17:02:30 +0100 Subject: [PATCH 073/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 0238464..87acb2b 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -44,7 +44,7 @@ "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com","sa.recette-rfxdev-rfxdev@recette.dev.reflex-platform.com"], <#-- à changer --> + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> "SegmentationSelections":[ <#-- intégrer les SK par la suite --> { "SegmentationID":"Securise", From 243482af3bdeecbea63402aa84d93816099097ea Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 20 Nov 2025 17:34:07 +0100 Subject: [PATCH 074/183] modif sur les rdz --- RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl | 3 +++ RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl | 5 ++++- RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl | 3 +++ RPtoRFX_CarrierAppointment.ftl | 4 ++-- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl index b80bc11..07b6b85 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl @@ -5,7 +5,10 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl index b80bc11..6426fbe 100644 --- a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl +++ b/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl @@ -5,6 +5,9 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> + <#stop "appointment_reference is not valid or empty" > + "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", "RefDate": { "DateTime": "${ref_datetime}", diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointment.ftl index 4147b66..eb0c5e2 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointment.ftl @@ -15,7 +15,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> @@ -23,7 +23,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 806af7a011f0340d7c481438daee6dfbf02861e9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 21 Nov 2025 11:46:23 +0100 Subject: [PATCH 075/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 87acb2b..13bdafb 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -82,7 +82,8 @@ "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> @@ -98,6 +99,9 @@ + <#else> + <#stop "date à 0"> + }] } ] \ No newline at end of file From 2f4280a4dae54051f9143d3053fbe8c0b96fa4cf Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 21 Nov 2025 11:47:10 +0100 Subject: [PATCH 076/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 13bdafb..d786034 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -83,6 +83,8 @@ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "date à 0"> + <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> @@ -99,8 +101,6 @@ - <#else> - <#stop "date à 0"> }] } From df49304c05344cf79ed278400c00b228e97346a8 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 21 Nov 2025 14:45:29 +0100 Subject: [PATCH 077/183] modif sur les rdz --- RFXtoRP_RestResponse.ftl | 78 ++++++++++++++++++- RPtoRFX_AppointmentEvent.ftl | 20 +++-- ...l => RPtoRFX_CarrierAppointmentCreated.ftl | 10 +-- RPtoRFX_CarrierAppointmentUpdated.ftl | 71 +++++++++++++++++ ReflexUtils.ftl | 2 +- 5 files changed, 163 insertions(+), 18 deletions(-) rename RPtoRFX_CarrierAppointment.ftl => RPtoRFX_CarrierAppointmentCreated.ftl (81%) create mode 100644 RPtoRFX_CarrierAppointmentUpdated.ftl diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 6faa7a8..fb2f318 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -232,7 +232,7 @@ <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > [ { - <# stop "Création rdz OK" > + <#stop "Création rdz OK" > <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -281,6 +281,82 @@ ] <#break> + <#case "appointment_put"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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 ******************** --> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <#stop "Mise à jour rdz OK" > + ] + <#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"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#default> <#stop> diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index ae27a77..23a2c15 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -20,21 +20,19 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_post> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointment.ftl"> - } + <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> + }, + { + + <#assign apiRestReflexID = ApiRestReflexID.appointment_put> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentUpdated.ftl"> + } ] <#break> <#default> <#stop > -<#switch eventRP.event> - <#case "Created"> - <#assign appointment = eventRP.data /> - <#stop "Appointment creation event"> - - <#break> - <#default> - <#stop > - diff --git a/RPtoRFX_CarrierAppointment.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl similarity index 81% rename from RPtoRFX_CarrierAppointment.ftl rename to RPtoRFX_CarrierAppointmentCreated.ftl index eb0c5e2..6c2f2db 100644 --- a/RPtoRFX_CarrierAppointment.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -14,22 +14,22 @@ "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", <#break> <#case "APPOINTMENT_TYPE_RECEPTION"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?long)?iso_nz(time_zone_rfx)}" + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", <#break> <#default> <#stop "appointment.AppointmentType not implemented" > - "planned_carrier" : "${appointment.CarrierName?json_string}", + "planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", --> <#if appointment.Commissions??> "physical_receipt_list": [ diff --git a/RPtoRFX_CarrierAppointmentUpdated.ftl b/RPtoRFX_CarrierAppointmentUpdated.ftl new file mode 100644 index 0000000..4d092ad --- /dev/null +++ b/RPtoRFX_CarrierAppointmentUpdated.ftl @@ -0,0 +1,71 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_EXPEDITION"> + + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + + <#break> + + <#case "APPOINTMENT_TYPE_RECEPTION"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + + "planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", --> + + <#if appointment.Commissions??> + "physical_receipt_list": [ + <#list appointment.Commissions as commission> + <#-- { + "receipt_activity": "str", + "originator_code": "string", + "physical_receipt_reference": "string", + "receipt_year": 0, + "receipt_number": 0, + "comment_list": [ + { + "line_number": 999, + "group_code": "str", + "text": "string" + } + ] + + { + "ProjectID": "recette-rfxdev", + "OrderID": "SPA-121125-02", + "Quantities": [ + { + "UnitID": "PAL", + "Value": 1.0 + } + ], + "OrganisationID": "recette", + "PartnerAppID": "recette-rfxdev-rfxdev", + "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" + } + } + + <#sep>, + --> + + ] + + } + } diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index 4199deb..6b4231a 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -14,7 +14,7 @@ <#-- -------------------------------------------------------------------------------------------- --> <#function AddSecondsToDatetime date seconds> <#assign timeInMilliseconds = (1000 * seconds) > - <#assign aDate = date?long + timeInMilliseconds?long> + <#assign aDate = date?long + timeInMilliseconds> <#return aDate?number_to_datetime> From e0c159215b3615898bc68b61e4d90e6ef26cdd2e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 21 Nov 2025 16:05:12 +0100 Subject: [PATCH 078/183] modif sur les rdz --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentUpdated.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 6c2f2db..4930854 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -22,7 +22,7 @@ <#case "APPOINTMENT_TYPE_RECEPTION"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", <#break> <#default> diff --git a/RPtoRFX_CarrierAppointmentUpdated.ftl b/RPtoRFX_CarrierAppointmentUpdated.ftl index 4d092ad..83bda83 100644 --- a/RPtoRFX_CarrierAppointmentUpdated.ftl +++ b/RPtoRFX_CarrierAppointmentUpdated.ftl @@ -21,7 +21,7 @@ <#case "APPOINTMENT_TYPE_RECEPTION"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime?iso_nz(time_zone_rfx))}", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", <#break> <#default> From efd6a52332989325ab1e87baad9afd597fa5b988 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 24 Nov 2025 13:40:17 +0100 Subject: [PATCH 079/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index d786034..d7a62d3 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -82,7 +82,7 @@ "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#if (carrier_apt.unloading_appointment=="true" && (carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-"))) || (carrier_apt.load_appointment=="true" && (carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")))> <#stop "date à 0"> <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > From e81c0620927c259365e27e5ed5a91c07b12e1608 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 24 Nov 2025 14:24:07 +0100 Subject: [PATCH 080/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 3 --- 1 file changed, 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index d7a62d3..4ef1a9c 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -76,9 +76,6 @@ "ProjectID": "${projectRP}", "Reason": "no commission", <#-- à changer --> - <#if carrier_apt.planned_carrier?? && carrier_apt.planned_carrier!=""> - "CarrierName": "${carrier_apt.planned_carrier}", - "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", From 9150d2fe1bb85b26b03128912a11774830e0a623 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 24 Nov 2025 15:03:30 +0100 Subject: [PATCH 081/183] modif sur les rdz --- ...RP_HsrCarrierApt_SiteForceBookAppointment.ftl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 4ef1a9c..430a2cc 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -79,15 +79,22 @@ "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", - <#if (carrier_apt.unloading_appointment=="true" && (carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-"))) || (carrier_apt.load_appointment=="true" && (carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")))> - <#stop "date à 0"> - <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_unloading_start_datetime field of appointmend is not initialized" > + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if (duration >= 0) > @@ -98,7 +105,6 @@ - }] } ] \ No newline at end of file From 178e73d81b75e24955e4c0cd647d510a31250a57 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 24 Nov 2025 15:46:31 +0100 Subject: [PATCH 082/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 430a2cc..20a9493 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -35,8 +35,7 @@ <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_BOTH> - <#assign duration = 0 /> <#-- à confirmer --> + <#stop "Not managed"> <#else> <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> <#assign duration = 0 /> <#-- à confirmer --> @@ -94,7 +93,7 @@ <#else> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> <#stop "planned_load_start_datetime or planned_unloading_start_datetime field of appointmend is not initialized" > - + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#if (duration >= 0) > From d6724025eeea70126743846d87ce6102a78c8d28 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 25 Nov 2025 10:46:12 +0100 Subject: [PATCH 083/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 20a9493..619a8e7 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -91,16 +91,8 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> - <#stop "planned_load_start_datetime or planned_unloading_start_datetime field of appointmend is not initialized" > - - <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_start_datetime?datetime.iso) /> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#if (duration >= 0) > - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" - <#else> - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - + <#stop "Not managed"> From 97ed60c7fa3ff031b2235f4d9286869423cd3fa0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 25 Nov 2025 11:30:50 +0100 Subject: [PATCH 084/183] RDV --- RFXtoRP_HsaLstCarSta.ftl | 24 +++++++++---------- ...=> RFXtoRP_HsaLstCarSta_CarrierArrived.ftl | 0 ...> RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl | 0 ...> RFXtoRP_HsaLstCarSta_CarrierExpected.ftl | 0 ... RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl | 0 ...RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl | 0 6 files changed, 12 insertions(+), 12 deletions(-) rename RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl => RFXtoRP_HsaLstCarSta_CarrierArrived.ftl (100%) rename RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl => RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl (100%) rename RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl => RFXtoRP_HsaLstCarSta_CarrierExpected.ftl (100%) rename RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl => RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl (100%) rename RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl => RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl (100%) diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 7346eba..167ba10 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -22,40 +22,40 @@ [ { - + <#switch carrier_apt_status.status.carrier_status_code> <#case "010"> <#-- Transporteur attendu --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl"> + <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> <#break> <#case "020"> <#-- Transporteur arrivé sur site--> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl"> - <#break> + <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> + <#break> <#case "040"> <#-- Déchargement commencé --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> - <#break> + <#include "RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl"> + <#break> <#case "050"> <#-- Déchargement terminé--> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl"> - <#break> - + <#include "RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl"> + <#break> + <#default> <#stop 'this updated appointment Status not implemented'> - - + + } - ] + ] <#break> <#case "D"> diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl similarity index 100% rename from RFXtoRP_HsaCarrierAptStatus_CarrierArrived.ftl rename to RFXtoRP_HsaLstCarSta_CarrierArrived.ftl diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl similarity index 100% rename from RFXtoRP_HsaCarrierAptStatus_CarrierDeparted.ftl rename to RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl diff --git a/RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl similarity index 100% rename from RFXtoRP_HsaCarrierAptStatus_CarrierExpected.ftl rename to RFXtoRP_HsaLstCarSta_CarrierExpected.ftl diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl b/RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl similarity index 100% rename from RFXtoRP_HsaCarrierAptStatus_ReceptionStarted.ftl rename to RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl diff --git a/RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl b/RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl similarity index 100% rename from RFXtoRP_HsaCarrierAptStatus_ReceptionUnloaded.ftl rename to RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl From 39f654c95adcb7f2fd6731cf2d6a23777918b750 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 25 Nov 2025 13:30:00 +0100 Subject: [PATCH 085/183] modif sur les rdz --- RFXtoRP_HsaLstCarSta.ftl | 10 ++++------ ....ftl => RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl | 0 ...ed.ftl => RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl | 0 RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- RPtoRFX_CarrierAppointmentCreated.ftl | 4 ++-- RPtoRFX_CarrierAppointmentUpdated.ftl | 4 ++-- 6 files changed, 10 insertions(+), 12 deletions(-) rename RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl => RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl (100%) rename RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl => RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl (100%) diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 167ba10..87c97eb 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -21,8 +21,6 @@ <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> [ { - - <#switch carrier_apt_status.status.carrier_status_code> <#case "010"> <#-- Transporteur attendu --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> @@ -37,16 +35,16 @@ <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> <#break> <#case "040"> <#-- Déchargement commencé --> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl"> + <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> <#break> <#case "050"> <#-- Déchargement terminé--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentReceptionStarted> <#-- à revoir --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl"> + <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> <#break> <#default> diff --git a/RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl similarity index 100% rename from RFXtoRP_HsaLstCarSta_ReceptionUnloaded.ftl rename to RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl diff --git a/RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl similarity index 100% rename from RFXtoRP_HsaLstCarSta_ReceptionStarted.ftl rename to RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 619a8e7..6d3807f 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -18,7 +18,7 @@ <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_RECEPTION> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> <#if (duration <= 0)> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > @@ -28,7 +28,7 @@ <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > - <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_EXPEDITION> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> <#if (duration <= 0)> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 4930854..6c9d802 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -10,7 +10,7 @@ "appointment_reference": "${eventRP.refid?json_string}", <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_EXPEDITION"> + <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", @@ -19,7 +19,7 @@ <#break> - <#case "APPOINTMENT_TYPE_RECEPTION"> + <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", diff --git a/RPtoRFX_CarrierAppointmentUpdated.ftl b/RPtoRFX_CarrierAppointmentUpdated.ftl index 83bda83..51d3803 100644 --- a/RPtoRFX_CarrierAppointmentUpdated.ftl +++ b/RPtoRFX_CarrierAppointmentUpdated.ftl @@ -9,7 +9,7 @@ "payload" : { <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_EXPEDITION"> + <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", @@ -18,7 +18,7 @@ <#break> - <#case "APPOINTMENT_TYPE_RECEPTION"> + <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", From 22d11ff07ee9db4bd2b55a9798bac75f67626cdf Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 25 Nov 2025 14:18:29 +0100 Subject: [PATCH 086/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 6d3807f..20aa171 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -72,7 +72,6 @@ ], <#else> - "ProjectID": "${projectRP}", "Reason": "no commission", <#-- à changer --> "Slots": [{ From 65b4ed7482a22f83fe4374f4c953fd4958af0cc1 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 25 Nov 2025 14:36:44 +0100 Subject: [PATCH 087/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 20aa171..fb187ed 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -72,6 +72,18 @@ ], <#else> + "Commissions": [ + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "ProjectID": "${projectRP}", + "Quantities": [ + { + "UnitID": "PAL", <#-- à changer --> + "Value": 1 <#-- à changer --> + } + ] + } + ], "Reason": "no commission", <#-- à changer --> "Slots": [{ From d355aa5676ec5bd1faab0c573ac9ce2590f57c20 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Nov 2025 11:58:44 +0100 Subject: [PATCH 088/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 677fd91..d9b8359 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -15,6 +15,7 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> "Commissions": [ <#list carrier_apt.physical_receipt_list as physical_receipt> @@ -31,6 +32,8 @@ }<#sep>, ] + <#else> + "Reason": "no commission", <#-- à changer --> } From d7c78145ea2ec04a2ae4810354933e5be4b560be Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Nov 2025 14:43:05 +0100 Subject: [PATCH 089/183] RDV --- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index d9b8359..4e75dba 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -35,6 +35,28 @@ <#else> "Reason": "no commission", <#-- à changer --> + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + + + + }] } ] \ No newline at end of file From b2ca7897ebec7a1b8833e960b6aeb2251bcf05c8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Nov 2025 15:33:10 +0100 Subject: [PATCH 090/183] RDV --- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 4e75dba..b527d1d 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -14,6 +14,34 @@ "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> From 135862972ddfac17925048c26ebd17dabc7f782c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Nov 2025 15:39:33 +0100 Subject: [PATCH 091/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index b527d1d..bde8c56 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -59,7 +59,7 @@ ] }<#sep>, - ] + ], <#else> "Reason": "no commission", <#-- à changer --> From df3df0e93373de90f7b036c3f8aad6023704683c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Nov 2025 17:35:20 +0100 Subject: [PATCH 092/183] RDV --- RFXtoRP_HsaLstCarSta.ftl | 30 ++++++++++++++++----- RFXtoRP_HsaLstCarSta_CarrierArrived.ftl | 13 ++++----- RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl | 11 ++++---- RFXtoRP_HsaLstCarSta_CarrierExpected.ftl | 11 ++++---- RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl | 22 +++++++++++++++ RFXtoRP_HsaLstCarSta_LoadingStarted.ftl | 22 +++++++++++++++ RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl | 11 ++++---- RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl | 11 ++++---- 8 files changed, 99 insertions(+), 32 deletions(-) create mode 100644 RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl create mode 100644 RFXtoRP_HsaLstCarSta_LoadingStarted.ftl diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 87c97eb..c1bbfbc 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -22,29 +22,47 @@ [ { <#switch carrier_apt_status.status.carrier_status_code> - <#case "010"> <#-- Transporteur attendu --> + <#case "010"> <#-- Carrier Expected --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> <#break> - <#case "020"> <#-- Transporteur arrivé sur site--> + <#case "020"> <#-- Carrier Arrived--> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> <#break> - <#case "040"> <#-- Déchargement commencé --> + <#case "040"> <#-- Unloading Started --> <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> <#break> - <#case "050"> <#-- Déchargement terminé--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir --> + <#case "050"> <#-- Unloading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> <#-- à revoir --> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> + <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> + <#break> + <#case "060"> <#-- Loading Started--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> + <#break> + <#case "070"> <#-- Loading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> + <#break> + <#case "090"> <#-- Carrier Departed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> <#-- à revoir --> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> <#break> <#default> diff --git a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl index 6426fbe..256ab68 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierArrived.ftl @@ -5,14 +5,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> - <#stop "appointment_reference is not valid or empty" > - - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", - "RefDate": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" diff --git a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl index 6426fbe..c39c0c3 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl @@ -5,14 +5,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> - <#stop "appointment_reference is not valid or empty" > - - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" diff --git a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl index 6426fbe..c39c0c3 100644 --- a/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl +++ b/RFXtoRP_HsaLstCarSta_CarrierExpected.ftl @@ -5,14 +5,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> - <#stop "appointment_reference is not valid or empty" > - - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" diff --git a/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsaLstCarSta_LoadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl index 6426fbe..c39c0c3 100644 --- a/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl +++ b/RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl @@ -5,14 +5,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> - <#stop "appointment_reference is not valid or empty" > - - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" diff --git a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl index 07b6b85..c39c0c3 100644 --- a/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl +++ b/RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl @@ -5,14 +5,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if (!carrier_apt_status.appointment_reference?? || carrier_apt_status.appointment_reference == "")> - <#stop "appointment_reference is not valid or empty" > - - "RefID": "${carrier_apt_status.appointment_reference?trim?json_string}", + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - } + } }, "Payload":{ "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" From 07482da77dc4fc2996952cada227283b8416d5c4 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 27 Nov 2025 14:47:27 +0100 Subject: [PATCH 093/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt.ftl | 2 +- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 4 ++-- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 5ce6c6f..374e96e 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -36,7 +36,7 @@ <#-- *********************************************** Action = Update ********************--> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir--> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index fb187ed..9ddc7ae 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -51,9 +51,9 @@ { "SegmentationID":"Secteur", "SegmentationValueID":"frais"} ], - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 677fd91..1b31f60 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -15,9 +15,9 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?size == carrier_apt.physical_receipt_list?filter(l ->l??)?size)> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ - <#list carrier_apt.physical_receipt_list as physical_receipt> + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { "ActorID": "${carrier_apt.physical_depot}", "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", From 52b8e3d68da2d8171d2696d86f2086b2fd92caa5 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 28 Nov 2025 16:05:14 +0100 Subject: [PATCH 094/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 -- 1 file changed, 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 9ddc7ae..e9ca229 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -102,9 +102,7 @@ "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> <#stop "Not managed"> - }] From ff28804bd56a399056f9352bf2cab26bf9a45e00 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 28 Nov 2025 17:49:45 +0100 Subject: [PATCH 095/183] DEV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index e9ca229..c8835de 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -43,8 +43,13 @@ "AppointmentType": "${appointmentType}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> - + "Emails": [], <#-- à changer --> + "CustomFields": [ + { + "Key": "activite", + "Value": "${carrier_apt.appointment_reference?json_string}" + } + ], "SegmentationSelections":[ <#-- intégrer les SK par la suite --> { "SegmentationID":"Securise", "SegmentationValueID":"yes"}, From ad15120def47df9aa49a98f30344061138a8c5ad Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Mon, 1 Dec 2025 10:09:35 +0100 Subject: [PATCH 096/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 6b349ae..2dc282c 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -48,7 +48,7 @@ "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> { - "ActorID": "${carrier_apt.physical_depot}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", "ProjectID": "${projectRP}", "Quantities": [ From b259f1762fc9f1f08cf3541e22ac020e03b438ae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 1 Dec 2025 13:34:15 +0100 Subject: [PATCH 097/183] RDV --- ...HsrCarrierApt_SiteForceBookAppointment.ftl | 20 +++++++++++++++++-- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index c8835de..6efece0 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -43,11 +43,27 @@ "AppointmentType": "${appointmentType}", - "Emails": [], <#-- à changer --> + "Emails": [${carrier_apt.creation_user_email?json_string}], "CustomFields": [ { - "Key": "activite", + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" } ], "SegmentationSelections":[ <#-- intégrer les SK par la suite --> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 6b349ae..91ba6fa 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -43,7 +43,7 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "Emails": ["francis.reat@hardis-group.com","laurie.montant@hardis-group.com"], <#-- à changer --> + "Emails": [${carrier_apt.creation_user_email?json_string}], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> From fe0f78a42e697802aba4101e4721d3799043af58 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 1 Dec 2025 13:43:15 +0100 Subject: [PATCH 098/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 2 +- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 6efece0..4f6a6bf 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -43,7 +43,7 @@ "AppointmentType": "${appointmentType}", - "Emails": [${carrier_apt.creation_user_email?json_string}], + "Emails": ["${carrier_apt.creation_user_email?json_string}"], "CustomFields": [ { "Key": "depot", diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index cb664ef..4e60fb4 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -43,7 +43,7 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "Emails": [${carrier_apt.creation_user_email?json_string}], + "Emails": ["${carrier_apt.creation_user_email?json_string}"], <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> From 5c52f62b1eb4d3da308aa01d75d3e139404070cd Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 3 Dec 2025 15:35:54 +0100 Subject: [PATCH 099/183] EF customfields --- RFXtoRP_HsrPro.ftl | 6 +++ ...srPro_ExecutionflowCustomFieldsUpdated.ftl | 43 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 23ab2fb..1eee43f 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -24,6 +24,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> } <#else> <#-- No line --> diff --git a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl new file mode 100644 index 0000000..54750e3 --- /dev/null +++ b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl @@ -0,0 +1,43 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + "Value": "${preparation_order.physical_depot_code?trim?json_string}" + }, + { + "Key": "activity_code", + "Value": "${preparation_order.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${preparation_order.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${preparation_order.originator_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${preparation_order.preparation_order_year}" + }, + { + "Key": "order_number", + "Value": "${preparation_order.preparation_order_number}" + } + ], + <#if preparation_order.originator_reference?? && preparation_order.originator_reference!=""> + "RefID": "${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.originator_reference?trim?json_string}" + <#else> + "RefID": "O${preparation_order.physical_depot_code?trim?json_string}${preparation_order.activity_code?trim?json_string}${preparation_order.originator_code?trim?json_string}${preparation_order.preparation_order_year}${preparation_order.preparation_order_number}" + + } + } +] \ No newline at end of file From 14ce3c586fa11d5abe1a0ff6bb6323fb80a83611 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 3 Dec 2025 16:20:02 +0100 Subject: [PATCH 100/183] Customfields receipt --- RFXtoRP_HsrReceiptList.ftl | 14 +++++- ...oRP_HsrReceiptList_CustomFieldsUpdated.ftl | 39 +++++++++++++++ ...ceiptList_TransfertCustomFieldsUpdated.ftl | 47 +++++++++++++++++++ 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl create mode 100644 RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 43f8c1d..3d67332 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -29,7 +29,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_TransfertReceiptExpected.ftl"> - + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl"> } ] <#else> @@ -47,7 +52,12 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrReceiptList_ReceiptExpected.ftl"> - + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl"> } ] <#else> diff --git a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl new file mode 100644 index 0000000..0a13935 --- /dev/null +++ b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl @@ -0,0 +1,39 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + "Value": "${receipt.physical_depot_code?trim?json_string}" + }, + { + "Key": "activity_code", + "Value": "${receipt.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${receipt.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${receipt.receipt_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${receipt.receipt_year}" + }, + { + "Key": "order_number", + "Value": "${receipt.receipt_number}" + } + ], + "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl new file mode 100644 index 0000000..b98af8d --- /dev/null +++ b/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl @@ -0,0 +1,47 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID":{ + "CustomFields": [ + { + "Key": "depot_code", + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + "Value": "${receipt.origin_order_line_depot?trim?json_string}" + <#else> + "Value": "${receipt.physical_depot_code?trim?json_string}" + + }, + { + "Key": "activity_code", + "Value": "${receipt.activity_code?trim?json_string}" + }, + { + "Key": "originator_code", + "Value": "${receipt.originator_code?trim?json_string}" + }, + { + "Key": "reference", + "Value": "${receipt.receipt_reference?trim?json_string}" + }, + { + "Key": "order_year", + "Value": "${receipt.receipt_year}" + }, + { + "Key": "order_number", + "Value": "${receipt.receipt_number}" + } + ], + <#if receipt.origin_order_line_depot?? && receipt.origin_order_line_depot!=""> + "RefID": "${receipt.origin_order_line_depot?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_reference?trim?json_string}" + <#else> + "RefID": "R${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}" + + } + } +] \ No newline at end of file From 133050bf8ca2a7798f1cf64cabde3acd6ec881ea Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 3 Dec 2025 18:12:27 +0100 Subject: [PATCH 101/183] update custom-field --- RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl | 1 + RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl | 1 + RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl | 1 + 3 files changed, 3 insertions(+) diff --git a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl index 54750e3..aa18239 100644 --- a/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl @@ -6,6 +6,7 @@ "Header": { "ProjectID": "${projectRP}" }, + "Payload" :{}, "ID":{ "CustomFields": [ { diff --git a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl index 0a13935..af70611 100644 --- a/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrReceiptList_CustomFieldsUpdated.ftl @@ -6,6 +6,7 @@ "Header": { "ProjectID": "${projectRP}" }, + "Payload" :{}, "ID":{ "CustomFields": [ { diff --git a/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl b/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl index b98af8d..0d940e0 100644 --- a/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl +++ b/RFXtoRP_HsrReceiptList_TransfertCustomFieldsUpdated.ftl @@ -6,6 +6,7 @@ "Header": { "ProjectID": "${projectRP}" }, + "Payload" :{}, "ID":{ "CustomFields": [ { From 7be9de856acb055033e287478e5cc3c4ca155440 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 10:21:13 +0100 Subject: [PATCH 102/183] RestResponse --- RFXtoRP_HsrPro.ftl | 2 +- RFXtoRP_RestResponse.ftl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 1eee43f..babc54a 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -26,7 +26,7 @@ <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomfieldsupdated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index fb2f318..506c846 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -104,7 +104,7 @@ <#if restResponsetMsg.body?? > <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" /> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -150,7 +150,7 @@ <#-- *********************************************** ApiRestID = receipts_post ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> @@ -229,10 +229,9 @@ <#-- *********************************************** ApiRestID = receipts_post ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#stop "Création rdz OK" > <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -310,10 +309,11 @@ <#-- *********************************************** ApiRestID = receipts_post ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { <#stop "Mise à jour rdz OK" > + } ] <#else> [ From de580e5b2c297f885214350459f82d89a822db49 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 10:22:19 +0100 Subject: [PATCH 103/183] HsrPro --- RFXtoRP_HsrPro.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index babc54a..3dbd2d6 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -26,7 +26,7 @@ <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomfieldsupdated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomfieldsUpdated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> From f3c607ce947ef0108fe358a17f898f70d86b7cde Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 11:45:54 +0100 Subject: [PATCH 104/183] Custom --- RFXtoRP_HsrPro.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 3dbd2d6..1eee43f 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -26,7 +26,7 @@ <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> }, { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomfieldsUpdated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCustomFieldsUpdated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowCustomFieldsUpdated.ftl"> From c382107adccc39a660d323c24b69b2151d95610e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 14:13:24 +0100 Subject: [PATCH 105/183] RDV --- RFXtoRP_Appointment_CarrierExpected.ftl.ftl | 15 +++++++++++++++ RFXtoRP_RestResponse.ftl | 19 ++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 RFXtoRP_Appointment_CarrierExpected.ftl.ftl diff --git a/RFXtoRP_Appointment_CarrierExpected.ftl.ftl b/RFXtoRP_Appointment_CarrierExpected.ftl.ftl new file mode 100644 index 0000000..7310ed7 --- /dev/null +++ b/RFXtoRP_Appointment_CarrierExpected.ftl.ftl @@ -0,0 +1,15 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${id.refid?json_string}" + }, + + "Payload": { + + } + + } +] diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 506c846..84ec65e 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -30,7 +30,7 @@ } ] <#break> - +<#-- *********************************************** Order ******************** --> <#case "preparation_orders_post"> <#switch restResponsetMsg.status!no_status> <#case no_status> @@ -120,7 +120,7 @@ ] <#break> - +<#-- *********************************************** Receipt ******************** --> <#case "receipts_post"> <#switch restResponsetMsg.status!no_status> <#case no_status> @@ -200,6 +200,7 @@ ] <#break> + <#-- *********************************************** Appointment ******************** --> <#case "appointment_post"> <#switch restResponsetMsg.status!no_status> <#case no_status> @@ -226,20 +227,18 @@ <#case 200> <#case 201> - <#-- *********************************************** ApiRestID = receipts_post ******************** --> + <#-- *********************************************** ApiRestID = "appointment_post"******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_Receipt_ExecutionflowDeleted.ftl"> + <#include "RFXtoRP_Appointment_CarrierExpected.ftl"> } ] - <#else> [ { <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> @@ -255,8 +254,6 @@ <#include "RFXtoRP_RestResponseAllocationError.ftl"> } ] - - <#break> <#default> [ @@ -306,7 +303,7 @@ <#case 200> <#case 201> - <#-- *********************************************** ApiRestID = receipts_post ******************** --> + <#-- *********************************************** ApiRestID = appointment_put ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > From 562d8fbba8fcb46a13964db3a5138bb1037c1e7d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 14:36:34 +0100 Subject: [PATCH 106/183] RDV --- RFXtoRP_RestResponse.ftl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 84ec65e..6592a6b 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -239,6 +239,7 @@ <#include "RFXtoRP_Appointment_CarrierExpected.ftl"> } ] + <#else> [ { <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> @@ -254,6 +255,7 @@ <#include "RFXtoRP_RestResponseAllocationError.ftl"> } ] + <#break> <#default> [ @@ -306,10 +308,13 @@ <#-- *********************************************** ApiRestID = appointment_put ******************** --> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#stop "Mise à jour rdz OK" > + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Appointment_CarrierExpected.ftl"> } ] <#else> From 0180dfb3421ca133ded98aa157b816a5914f3de1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 15:09:30 +0100 Subject: [PATCH 107/183] RDV --- RFXtoRP_Appointment_CarrierExpected.ftl.ftl | 15 --------------- RFXtoRP_RestResponse.ftl | 10 ++-------- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 RFXtoRP_Appointment_CarrierExpected.ftl.ftl diff --git a/RFXtoRP_Appointment_CarrierExpected.ftl.ftl b/RFXtoRP_Appointment_CarrierExpected.ftl.ftl deleted file mode 100644 index 7310ed7..0000000 --- a/RFXtoRP_Appointment_CarrierExpected.ftl.ftl +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - "RefID": "${id.refid?json_string}" - }, - - "Payload": { - - } - - } -] diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 6592a6b..420e031 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -233,10 +233,7 @@ <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Appointment_CarrierExpected.ftl"> + <#stop "Appointment created"> } ] <#else> @@ -311,10 +308,7 @@ <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Appointment_CarrierExpected.ftl"> + <#stop "Appointment created"> } ] <#else> From efc642999dff5bb648753793591184c3ae5534d4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 4 Dec 2025 15:17:54 +0100 Subject: [PATCH 108/183] RDV --- RFXtoRP_RestResponse.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 420e031..6bb26fe 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -233,7 +233,7 @@ <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#stop "Appointment created"> + <#stop > } ] <#else> @@ -308,7 +308,7 @@ <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > [ { - <#stop "Appointment created"> + <#stop > } ] <#else> From 30cd227b41d4ae7385d573887450ab4b27bd57e6 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 5 Dec 2025 09:50:29 +0100 Subject: [PATCH 109/183] modif sur les rdz --- RFXtoRP_HsaLstCarSta.ftl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index c1bbfbc..1e41f4f 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -19,6 +19,9 @@ <#-- *********************************************** Action = Update ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt_status = JsonUtil.jsonToMap(dataRfx)> + <#if !carrier_apt_status.status??> + <#stop 'the updated appointment Status not initialized'> + [ { <#switch carrier_apt_status.status.carrier_status_code> From f5b20c2ac3a31b8cccb0923847513dd7b236860e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Dec 2025 14:59:56 +0100 Subject: [PATCH 110/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 34 ++++++--------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 6c9d802..cd043a7 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -34,37 +34,17 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> - <#-- { - "receipt_activity": "str", - "originator_code": "string", - "physical_receipt_reference": "string", - "receipt_year": 0, - "receipt_number": 0, - "comment_list": [ - { - "line_number": 999, - "group_code": "str", - "text": "string" - } - ] + { + "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", + "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", + "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", + "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", + "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" - { - "ProjectID": "recette-rfxdev", - "OrderID": "SPA-121125-02", - "Quantities": [ - { - "UnitID": "PAL", - "Value": 1.0 - } - ], - "OrganisationID": "recette", - "PartnerAppID": "recette-rfxdev-rfxdev", - "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" - } } <#sep>, - --> + ], From 63a668340d408c5ff7f857c85608c08ea507f65a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Dec 2025 15:01:33 +0100 Subject: [PATCH 111/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 15 +++++------- RPtoRFX_CarrierAppointmentUpdated.ftl | 35 +++++---------------------- 2 files changed, 12 insertions(+), 38 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index cd043a7..1d06058 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -34,17 +34,14 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> - { - "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", - "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", - "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", - "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", - "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" - + { + "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", + "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", + "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", + "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", + "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" } - <#sep>, - ], diff --git a/RPtoRFX_CarrierAppointmentUpdated.ftl b/RPtoRFX_CarrierAppointmentUpdated.ftl index 51d3803..907ef18 100644 --- a/RPtoRFX_CarrierAppointmentUpdated.ftl +++ b/RPtoRFX_CarrierAppointmentUpdated.ftl @@ -33,37 +33,14 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> - <#-- { - "receipt_activity": "str", - "originator_code": "string", - "physical_receipt_reference": "string", - "receipt_year": 0, - "receipt_number": 0, - "comment_list": [ - { - "line_number": 999, - "group_code": "str", - "text": "string" - } - ] - - { - "ProjectID": "recette-rfxdev", - "OrderID": "SPA-121125-02", - "Quantities": [ - { - "UnitID": "PAL", - "Value": 1.0 - } - ], - "OrganisationID": "recette", - "PartnerAppID": "recette-rfxdev-rfxdev", - "ExecutionflowID": "DPFALIDEPT ALIMSPA-121125-02" - } + { + "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", + "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", + "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", + "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", + "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" } - <#sep>, - --> ] From c635353b6967cd609c2aee2958b52fc821db4e8f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Dec 2025 08:47:01 +0100 Subject: [PATCH 112/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 65 +++++++++++++------ ...rAppointmentAssociationPhysicalReceipt.ftl | 26 ++++++++ RPtoRFX_CarrierAppointmentSlotUpdated.ftl | 27 ++++++++ 3 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl create mode 100644 RPtoRFX_CarrierAppointmentSlotUpdated.ftl diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 23a2c15..2527390 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -11,28 +11,51 @@ <#assign organisationRP = organisation> <#switch eventRP.event> - <#case "Created"> - <#-- *********************************************** Action = CREATE or UPDATE ******************** --> - <#assign appointment = eventRP.data /> - [ - { +<#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#case "Created"> + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> + } + <#--{ - <#assign apiRestReflexID = ApiRestReflexID.appointment_post> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> - }, - { - - <#assign apiRestReflexID = ApiRestReflexID.appointment_put> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentUpdated.ftl"> - } - ] - <#break> - <#default> - <#stop > + <#assign apiRestReflexID = ApiRestReflexID.appointment_put> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentUpdated.ftl"> + }--> + ] + <#break> +<#-- *********************************************** Action = CommissionsUpdated ******************** --> + <#case "CommissionsUpdated"> + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.physical_receipt_associations_post> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl"> + } + ] + <#break> +<#-- *********************************************** Action = SlotUpdated ******************** --> + <#case "SlotUpdated"> + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl"> + } + ] + <#break> +<#default> + <#stop > diff --git a/RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl b/RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl new file mode 100644 index 0000000..9927961 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl @@ -0,0 +1,26 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/physical_receipt_associations", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + <#if appointment.Commissions??> + "physical_receipt_list": [ + <#list appointment.Commissions as commission> + { + "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", + "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", + "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", + "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", + "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" + } + <#sep>, + + ], + + } + } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl new file mode 100644 index 0000000..6f90104 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl @@ -0,0 +1,27 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + + <#if appointment.Commissions??> + "physical_receipt_list": [ + <#list appointment.Commissions as commission> + { + "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", + "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", + "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", + "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", + "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" + } + <#sep>, + + ] + + } + } From 92eecba16030627ebbb1c6bcf04ac4bc25885053 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Dec 2025 10:33:39 +0100 Subject: [PATCH 113/183] RDV --- RFXtoRP_RestResponse.ftl | 724 ++++++++++-------- RPtoRFX_AppointmentEvent.ftl | 15 +- ...rAppointmentPhysicalReceiptAssociation.ftl | 0 RPtoRFX_CarrierAppointmentSlotUpdated.ftl | 32 +- RPtoRFX_CarrierAppointmentUpdated.ftl | 48 -- 5 files changed, 416 insertions(+), 403 deletions(-) rename RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl => RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl (100%) delete mode 100644 RPtoRFX_CarrierAppointmentUpdated.ftl diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 6bb26fe..a056050 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -15,346 +15,410 @@ <#switch id.apiRestReflexID!no_apiRestReflexID> - <#case no_apiRestReflexID> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - } - ] - <#break> -<#-- *********************************************** Order ******************** --> - <#case "preparation_orders_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl"> - } - ] + <#case no_apiRestReflexID> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + } + ] + <#break> +<#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> + <#case "preparation_orders_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#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"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> -<#-- *********************************************** Receipt ******************** --> - <#case "receipts_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_Receipt_ExecutionflowDeleted.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"> - } - ] - - - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - <#-- *********************************************** Appointment ******************** --> - <#case "appointment_post"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 = "appointment_post"******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] - <#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"> - } - ] + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - <#break> - <#default> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] - - <#break> - <#case "appointment_put"> - <#switch restResponsetMsg.status!no_status> - <#case no_status> - [ - { - <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#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 = appointment_put ******************** --> - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> - <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > - [ - { - <#stop > - } - ] + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "SUCCESS" > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PrepOrder_ShipFromAcked.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" : + [ + { + <#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"> - } - ] - - - <#break> + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** ApiRestID = receipts_post ******************** --> + <#case "receipts_post"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDeleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_Receipt_ExecutionflowDeleted.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"> + } + ] + + <#break> <#default> - [ - { + [ + { <#if restResponsetMsg.body?? > - <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> - <#else> - <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> - - <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_PlatformLogCreate.ftl"> - }, - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_RestResponseAllocationError.ftl"> - } - ] + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] <#break> - - - <#default> - <#stop> + <#-- *********************************************** Appointment_post_create ******************** --> + <#case "appointment_post_create"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#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"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_put_update ******************** --> + <#case "appointment_put_update"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#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"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_association ******************** --> + <#case "appointment_post_physical_receipt_association"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#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"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> +<#-- *********************************************** default ******************** --> + <#default> + <#stop> diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 2527390..a8f4055 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -16,18 +16,11 @@ <#assign appointment = eventRP.data /> [ { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_create> "apiRestReflexID" : "${apiRestReflexID}", "datas" : <#include "RPtoRFX_CarrierAppointmentCreated.ftl"> } - <#--{ - - <#assign apiRestReflexID = ApiRestReflexID.appointment_put> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentUpdated.ftl"> - }--> ] <#break> <#-- *********************************************** Action = CommissionsUpdated ******************** --> @@ -35,10 +28,10 @@ <#assign appointment = eventRP.data /> [ { - <#assign apiRestReflexID = ApiRestReflexID.physical_receipt_associations_post> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_association> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl"> } ] <#break> @@ -47,7 +40,7 @@ <#assign appointment = eventRP.data /> [ { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put> + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update> "apiRestReflexID" : "${apiRestReflexID}", "datas" : <#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl"> diff --git a/RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentAssociationPhysicalReceipt.ftl rename to RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl diff --git a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl index 6f90104..8392929 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl @@ -8,20 +8,24 @@ }, "payload" : { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> - <#if appointment.Commissions??> - "physical_receipt_list": [ - <#list appointment.Commissions as commission> - { - "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", - "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", - "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", - "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", - "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" - } - <#sep>, - - ] - + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + + <#break> + + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + } } diff --git a/RPtoRFX_CarrierAppointmentUpdated.ftl b/RPtoRFX_CarrierAppointmentUpdated.ftl deleted file mode 100644 index 907ef18..0000000 --- a/RPtoRFX_CarrierAppointmentUpdated.ftl +++ /dev/null @@ -1,48 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", - "method" : "PUT", - "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_reference":"${eventRP.refid?json_string}" - }, - "payload" : - { - <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - - "unloading_appointment" : "false", - "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", - - <#break> - - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - - "planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", --> - - <#if appointment.Commissions??> - "physical_receipt_list": [ - <#list appointment.Commissions as commission> - { - "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", - "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", - "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", - "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", - "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" - } - <#sep>, - - ] - - } - } From 832efcc8f6a1f2da016a9c75e9992293bdd156d5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Dec 2025 10:43:48 +0100 Subject: [PATCH 114/183] RDV --- RPtoRFX_CarrierAppointmentSlotUpdated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl index 8392929..f4a82a1 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdated.ftl @@ -14,7 +14,7 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" <#break> @@ -22,7 +22,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 396ad187da588ebd1c67c8dbc884a4f44ca89a49 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 9 Dec 2025 17:01:00 +0100 Subject: [PATCH 115/183] RDV --- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 9927961..3868fed 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -20,7 +20,7 @@ } <#sep>, - ], + ] } } From 23de1ee9b1e2a30105fff50631bb65ae1c4d246e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 10:43:31 +0100 Subject: [PATCH 116/183] RDV --- ...CarrierAppointmentPhysicalReceiptAssociation.ftl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 3868fed..7117380 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -12,11 +12,14 @@ "physical_receipt_list": [ <#list appointment.Commissions as commission> { - "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", - "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", - "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", - "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", - "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" + <#list eventRP.executionflowCustomFields.entrySet() as custom> + ${custom} + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } <#sep>, From bb20aae908d4cba9704ecebe1c8539e939d1488d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 10:48:08 +0100 Subject: [PATCH 117/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 1d06058..613ed38 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -35,11 +35,14 @@ "physical_receipt_list": [ <#list appointment.Commissions as commission> { - "receipt_activity": "${eventRP.executionflowCustomFields.activity_code?json_string}", - "originator_code": "${eventRP.executionflowCustomFields.originator_code?json_string}", - "physical_receipt_reference": "${eventRP.executionflowCustomFields.reference?json_string}", - "receipt_year": "${eventRP.executionflowCustomFields.order_year?json_string}", - "receipt_number": "${eventRP.executionflowCustomFields.order_number?json_string}" + <#list eventRP.executionflowCustomFields.entrySet() as custom> + ${custom} + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } <#sep>, From 268642a1fa365106abc5c9c711fec3d7cd1dcab3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 10:51:42 +0100 Subject: [PATCH 118/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 613ed38..7955a53 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${custom} + ${"custom"} "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 7117380..b921d60 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -13,7 +13,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${custom} + ${"custom"} "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", From c78be4ac9b35f519910c243de5d138082695b714 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 10:55:35 +0100 Subject: [PATCH 119/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 7955a53..c6ef93e 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${"custom"} + "${custom}" "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index b921d60..6c0463f 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -13,7 +13,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${"custom"} + "${custom}" "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", From 719f0ed47547efcb63a250a7e025bdad533d9ae3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 11:00:25 +0100 Subject: [PATCH 120/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index c6ef93e..5ce3d64 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - "${custom}" + $"{custom}" "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 6c0463f..699506b 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -13,7 +13,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - "${custom}" + $"{custom}" "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", From cb5f3aaa4e83a4b09c957daafd73534da386e12d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 11:02:43 +0100 Subject: [PATCH 121/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 5ce3d64..613ed38 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - $"{custom}" + ${custom} "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 699506b..7117380 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -13,7 +13,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - $"{custom}" + ${custom} "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", From 65b34e6fe4ec6a2e298b9d737cf906150354ec3f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 11:08:40 +0100 Subject: [PATCH 122/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 613ed38..c0c4f2f 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,7 +36,7 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${custom} + "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 7117380..a215324 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -13,7 +13,6 @@ <#list appointment.Commissions as commission> { <#list eventRP.executionflowCustomFields.entrySet() as custom> - ${custom} "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", From 26e143efb09ac5871a2dcc90a5b28208ed448e94 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 11:10:47 +0100 Subject: [PATCH 123/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 5 ++--- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index c0c4f2f..c7da2d5 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -34,16 +34,15 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> + <#list eventRP.executionflowCustomFields.entrySet() as custom> { - <#list eventRP.executionflowCustomFields.entrySet() as custom> - "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", "receipt_year": "${custom.value.order_year?json_string}", "receipt_number": "${custom.value.order_number?json_string}" - } + <#sep>, ], diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index a215324..d5a458c 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -11,15 +11,15 @@ <#if appointment.Commissions??> "physical_receipt_list": [ <#list appointment.Commissions as commission> + <#list eventRP.executionflowCustomFields.entrySet() as custom> { - <#list eventRP.executionflowCustomFields.entrySet() as custom> "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", "physical_receipt_reference": "${custom.value.reference?json_string}", "receipt_year": "${custom.value.order_year?json_string}", "receipt_number": "${custom.value.order_number?json_string}" - } + <#sep>, ] From b24fe76a81c38f157d3d06857e4d962e543b054e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 14:16:46 +0100 Subject: [PATCH 124/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 -- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl | 2 -- 2 files changed, 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index c7da2d5..56a27d4 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -33,7 +33,6 @@ <#if appointment.Commissions??> "physical_receipt_list": [ - <#list appointment.Commissions as commission> <#list eventRP.executionflowCustomFields.entrySet() as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", @@ -42,7 +41,6 @@ "receipt_year": "${custom.value.order_year?json_string}", "receipt_number": "${custom.value.order_number?json_string}" } - <#sep>, ], diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index d5a458c..3aab366 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -10,7 +10,6 @@ { <#if appointment.Commissions??> "physical_receipt_list": [ - <#list appointment.Commissions as commission> <#list eventRP.executionflowCustomFields.entrySet() as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", @@ -19,7 +18,6 @@ "receipt_year": "${custom.value.order_year?json_string}", "receipt_number": "${custom.value.order_number?json_string}" } - <#sep>, ] From e8551aa6989a31e15b5a69b3c5750bc89abc0544 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:00:14 +0100 Subject: [PATCH 125/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 30 +++++++++++-------- ...rAppointmentPhysicalReceiptAssociation.ftl | 30 +++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 56a27d4..f545e7e 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -32,18 +32,24 @@ "planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", --> <#if appointment.Commissions??> - "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> - { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" - } - <#sep>, - - ], + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet() as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ], + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"LOADING", + + "constant_appointment": "false" diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl index 3aab366..16aa97a 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl @@ -9,18 +9,24 @@ "payload" : { <#if appointment.Commissions??> - "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> - { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" - } - <#sep>, - - ] + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet() as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ] + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"LOADING" + + } } From b0e231a38db7b2332509080f6e4427744e67916c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:23:52 +0100 Subject: [PATCH 126/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 12 ++++++++++++ RPtoRFX_CarrierAppointmentCanceled.ftl | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 RPtoRFX_CarrierAppointmentCanceled.ftl diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index a8f4055..3cf19d9 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -47,6 +47,18 @@ } ] <#break> +<#-- *********************************************** Action = SlotUpdated ******************** --> + <#case "Canceled"> + <#assign appointment = eventRP.data /> + [ + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCanceled.ftl"> + } + ] + <#break> <#default> <#stop > diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl new file mode 100644 index 0000000..3553375 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCanceled.ftl @@ -0,0 +1,16 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + "status": { + "status_code": "999", + "cancellation_reason_code": "RFT", + } + } + } \ No newline at end of file From b1d66f66aa02c5d205d6ad992f1e38b100559d52 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:35:04 +0100 Subject: [PATCH 127/183] RDV --- RFXtoRP_RestResponse.ftl | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index a056050..da42774 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -271,6 +271,79 @@ <#break> <#-- *********************************************** ApiRestID = appointment_put_update ******************** --> <#case "appointment_put_update"> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#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> + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#assign preparationOrderPostResponse = JsonUtil.jsonToMap(restResponseBody)> + <#if preparationOrderPostResponse.status?? && (preparationOrderPostResponse.status == "SUCCESS" || preparationOrderPostResponse.status == "WARN") > + [ + { + <#stop > + } + ] + <#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"> + } + ] + + <#break> + <#default> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + + <#break> + <#case "Canceled"> <#switch restResponsetMsg.status!no_status> <#case no_status> [ From 87a120bb55a5569445c702103d6899339acb409e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:36:58 +0100 Subject: [PATCH 128/183] RDV --- RPtoRFX_CarrierAppointmentCanceled.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl index 3553375..4f6c15d 100644 --- a/RPtoRFX_CarrierAppointmentCanceled.ftl +++ b/RPtoRFX_CarrierAppointmentCanceled.ftl @@ -10,7 +10,7 @@ { "status": { "status_code": "999", - "cancellation_reason_code": "RFT", + "cancellation_reason_code": "RFT" } } } \ No newline at end of file From 18c8a344bf3863f1f232638cba82308db8720bae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:40:28 +0100 Subject: [PATCH 129/183] RDV --- RPtoRFX_CarrierAppointmentCanceled.ftl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl index 4f6c15d..995082a 100644 --- a/RPtoRFX_CarrierAppointmentCanceled.ftl +++ b/RPtoRFX_CarrierAppointmentCanceled.ftl @@ -8,6 +8,22 @@ }, "payload" : { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + <#break> + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + "status": { "status_code": "999", "cancellation_reason_code": "RFT" From 08e1ac8c11e2bd41de2a8a9fe4b44603759e5b26 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:46:27 +0100 Subject: [PATCH 130/183] RDV --- RPtoRFX_CarrierAppointmentCanceled.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl index 995082a..b3169c6 100644 --- a/RPtoRFX_CarrierAppointmentCanceled.ftl +++ b/RPtoRFX_CarrierAppointmentCanceled.ftl @@ -26,7 +26,7 @@ "status": { "status_code": "999", - "cancellation_reason_code": "RFT" + "cancellation_reason_code": "ASC" } } } \ No newline at end of file From 0113829f9beee12b6f296ff0f3e626b14675293e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 10 Dec 2025 18:57:29 +0100 Subject: [PATCH 131/183] RDV --- RPtoRFX_CarrierAppointmentCanceled.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl index b3169c6..db7711b 100644 --- a/RPtoRFX_CarrierAppointmentCanceled.ftl +++ b/RPtoRFX_CarrierAppointmentCanceled.ftl @@ -26,7 +26,7 @@ "status": { "status_code": "999", - "cancellation_reason_code": "ASC" + "cancellation_reason_code": "ACS" } } } \ No newline at end of file From 9c5741cc7fe3ba3a2b466d6273174238ff52279d Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 11 Dec 2025 14:03:56 +0100 Subject: [PATCH 132/183] modif sur les rdz --- RFXtoRP_HsrCarrierApt_CarrierInformation.ftl | 3 +++ RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl | 5 +++++ RFXtoRP_HsrCarrierApt_Quantities.ftl | 5 +++++ ...P_HsrCarrierApt_SegmentationSelections.ftl | 6 +++++ ...HsrCarrierApt_SiteForceBookAppointment.ftl | 22 +++++-------------- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 7 +----- 6 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_CarrierInformation.ftl create mode 100644 RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl create mode 100644 RFXtoRP_HsrCarrierApt_Quantities.ftl create mode 100644 RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl diff --git a/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl b/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl new file mode 100644 index 0000000..df7f552 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierInformation.ftl @@ -0,0 +1,3 @@ +"CarrierInformation": [ + + ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl b/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl new file mode 100644 index 0000000..cdc9ee0 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl @@ -0,0 +1,5 @@ + +"MetaData": [ +] + + diff --git a/RFXtoRP_HsrCarrierApt_Quantities.ftl b/RFXtoRP_HsrCarrierApt_Quantities.ftl new file mode 100644 index 0000000..22b0ec5 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_Quantities.ftl @@ -0,0 +1,5 @@ +"Quantities": [ + + ] + + diff --git a/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl new file mode 100644 index 0000000..79553d0 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl @@ -0,0 +1,6 @@ + + +"SegmentationSelections": [ + ] + + diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index 4f6a6bf..c655234 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -66,12 +66,9 @@ "Value": "${carrier_apt.planned_carrier?json_string}" } ], - "SegmentationSelections":[ <#-- intégrer les SK par la suite --> - { "SegmentationID":"Securise", - "SegmentationValueID":"yes"}, - { "SegmentationID":"Secteur", - "SegmentationValueID":"frais"} - ], + <#include "RFXtoRP_HsrCarrierApt_SegmentationSelections.ftl">, + <#include "RFXtoRP_HsrCarrierApt_CarrierInformation.ftl">, + <#include "RFXtoRP_HsrCarrierApt_MetadataAppointment.ftl">, <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> @@ -83,11 +80,7 @@ "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> ] }<#sep>, @@ -97,12 +90,7 @@ { "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> } ], "Reason": "no commission", <#-- à changer --> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 4e60fb4..28953bd 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -51,12 +51,7 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", "ProjectID": "${projectRP}", - "Quantities": [ - { - "UnitID": "PAL", <#-- à changer --> - "Value": 1 <#-- à changer --> - } - ] + <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> }<#sep>, ], From 261549ed60361351407e9c3ae56f1b898caeb57b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 11 Dec 2025 14:28:51 +0100 Subject: [PATCH 133/183] modif sur les rdz --- RFXtoRP_RestResponse.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index da42774..eca2fd8 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -269,8 +269,8 @@ ] <#break> - <#-- *********************************************** ApiRestID = appointment_put_update ******************** --> - <#case "appointment_put_update"> + <#-- *********************************************** ApiRestID = appointment_put_update_ref ******************** --> + <#case "appointment_put_update_ref"> <#switch restResponsetMsg.status!no_status> <#case no_status> [ @@ -416,8 +416,8 @@ ] <#break> - <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_association ******************** --> - <#case "appointment_post_physical_receipt_association"> + <#-- *********************************************** ApiRestID = appointment_post_physical_receipt_associations ******************** --> + <#case "appointment_post_physical_receipt_associations"> <#switch restResponsetMsg.status!no_status> <#case no_status> [ From be4dcf11f61de0dcdac11abe97a0974e340d9405 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 11 Dec 2025 15:49:22 +0100 Subject: [PATCH 134/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 8 ++- ...rierApt_AppointmentCustomFieldsUpdated.ftl | 48 +++++++++++++ RPtoRFX_AppointmentEvent.ftl | 71 +++++++++++++------ RPtoRFX_CarrierAppointmentCanceled.ftl | 32 --------- RPtoRFX_CarrierAppointmentCanceledByNumberftl | 17 +++++ RPtoRFX_CarrierAppointmentCanceledByRef.ftl | 16 +++++ ...mentPhysicalReceiptAssociationByNumber.ftl | 33 +++++++++ ...intmentPhysicalReceiptAssociationByRef.ftl | 0 ..._CarrierAppointmentSlotUpdatedByNumber.ftl | 32 +++++++++ ...RFX_CarrierAppointmentSlotUpdatedByRef.ftl | 0 10 files changed, 202 insertions(+), 55 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl delete mode 100644 RPtoRFX_CarrierAppointmentCanceled.ftl create mode 100644 RPtoRFX_CarrierAppointmentCanceledByNumberftl create mode 100644 RPtoRFX_CarrierAppointmentCanceledByRef.ftl create mode 100644 RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl rename RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl => RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl (100%) create mode 100644 RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl rename RPtoRFX_CarrierAppointmentSlotUpdated.ftl => RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl (100%) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 374e96e..00fefdc 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -29,7 +29,13 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_AppointmentCarrierExpected.ftl"> - } + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> + }, ] <#break> <#case "U"> diff --git a/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl new file mode 100644 index 0000000..4cd5972 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl @@ -0,0 +1,48 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "RefID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ] + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 3cf19d9..d46ee24 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,38 +27,65 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_association> + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRefID.ftl"> + } + ] <#break> <#-- *********************************************** Action = SlotUpdated ******************** --> <#case "SlotUpdated"> - <#assign appointment = eventRP.data /> - [ - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentSlotUpdated.ftl"> - } - ] - <#break> + <#assign appointment = eventRP.data /> + [ + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl"> + } + + ] + <#break> <#-- *********************************************** Action = SlotUpdated ******************** --> <#case "Canceled"> - <#assign appointment = eventRP.data /> - [ - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentCanceled.ftl"> - } - ] - <#break> + <#assign appointment = eventRP.data /> + [ + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCanceledByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentCanceledByRef.ftl"> + } + + ] + <#break> <#default> <#stop > diff --git a/RPtoRFX_CarrierAppointmentCanceled.ftl b/RPtoRFX_CarrierAppointmentCanceled.ftl deleted file mode 100644 index db7711b..0000000 --- a/RPtoRFX_CarrierAppointmentCanceled.ftl +++ /dev/null @@ -1,32 +0,0 @@ -{ - "id" : {"refid" : "${eventRP.refid?json_string}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}", - "method" : "PUT", - "uri_substitutions": { - "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_reference":"${eventRP.refid?json_string}" - }, - "payload" : - { - <#switch appointment.AppointmentType> - <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", - "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", - <#break> - <#default> - <#stop "appointment.AppointmentType not implemented" > - - "status": { - "status_code": "999", - "cancellation_reason_code": "ACS" - } - } - } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumberftl b/RPtoRFX_CarrierAppointmentCanceledByNumberftl new file mode 100644 index 0000000..d663b92 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCanceledByNumberftl @@ -0,0 +1,17 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/status", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", + "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + "status": { + "status_code": "999", + "cancellation_reason_code": "ACS" + } + } + } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl new file mode 100644 index 0000000..34f783e --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl @@ -0,0 +1,16 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/carrier_appointments/{appointment_reference}/status", + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_reference":"${eventRP.refid?json_string}" + }, + "payload" : + { + "status": { + "status_code": "999", + "cancellation_reason_code": "ACS" + } + } + } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl new file mode 100644 index 0000000..8c129e5 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -0,0 +1,33 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}/physical_receipt_associations", + "method" : "POST", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", + "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + <#if appointment.Commissions??> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet() as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + } + <#sep>, + + ] + <#else> + <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> + "appointment_designation":"LOADING" + + + + } + } diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentPhysicalReceiptAssociation.ftl rename to RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl new file mode 100644 index 0000000..dfcac35 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -0,0 +1,32 @@ +{ + "id" : {"refid" : "${eventRP.refid?json_string}"}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}, + "method" : "PUT", + "uri_substitutions": { + "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", + "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", + "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + }, + "payload" : + { + <#switch appointment.AppointmentType> + <#case "APPOINTMENT_TYPE_LOADING"> + + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" + + <#break> + + <#case "APPOINTMENT_TYPE_UNLOADING"> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", + "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" + <#break> + <#default> + <#stop "appointment.AppointmentType not implemented" > + + } + } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdated.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentSlotUpdated.ftl rename to RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl From a75167d7f0720ce7bc17f4acdecd9b0e8509c731 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 11 Dec 2025 16:16:13 +0100 Subject: [PATCH 135/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 00fefdc..8c0acfc 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -35,7 +35,7 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> - }, + } ] <#break> <#case "U"> From 863253b7e0785b130f82250cbb379c5f2256fda9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 11:20:31 +0100 Subject: [PATCH 136/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 28953bd..907f888 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -44,6 +44,7 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "Emails": ["${carrier_apt.creation_user_email?json_string}"], + "Reason":"", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> From ca1989b91a880c676ed79ad244951c1e17984444 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:08:55 +0100 Subject: [PATCH 137/183] RDV --- ...rCarrierApt_SiteForceUpdateAppointment.ftl | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl index 907f888..ac135e6 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl @@ -44,6 +44,28 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", "Emails": ["${carrier_apt.creation_user_email?json_string}"], + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ], "Reason":"", <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> "Commissions": [ From de2a95e83cac745fc8fe7818bb7a6a23abdb65c8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:32:13 +0100 Subject: [PATCH 138/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index d46ee24..f63865e 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -39,7 +39,7 @@ <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRefID.ftl"> + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> } ] From fbd3e74906f9a24c4804fb00a5e0e89cd1db8001 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:39:20 +0100 Subject: [PATCH 139/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index f63865e..0101bc2 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -69,7 +69,7 @@ <#case "Canceled"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?has_content> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number> "apiRestReflexID" : "${apiRestReflexID}", From c47da0ae8664f36f2e6b95f1545b04428be84148 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:49:32 +0100 Subject: [PATCH 140/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 0101bc2..09fd93d 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -69,7 +69,7 @@ <#case "Canceled"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields!=""> + <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number> "apiRestReflexID" : "${apiRestReflexID}", From 57db370c4c79fca2b8f8b623e221f984daad39d5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:54:21 +0100 Subject: [PATCH 141/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 09fd93d..dae78de 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -69,7 +69,7 @@ <#case "Canceled"> <#assign appointment = eventRP.data /> [ - <#if appointment.appointmentCustomFields?? && appointment.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number> "apiRestReflexID" : "${apiRestReflexID}", From 503481e41048f99ba54cf36824782b7b88e3c22d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 14:57:08 +0100 Subject: [PATCH 142/183] RDV --- RPtoRFX_CarrierAppointmentCanceledByNumberftl | 4 ++-- ...X_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl | 4 ++-- RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumberftl b/RPtoRFX_CarrierAppointmentCanceledByNumberftl index d663b92..47d1fa0 100644 --- a/RPtoRFX_CarrierAppointmentCanceledByNumberftl +++ b/RPtoRFX_CarrierAppointmentCanceledByNumberftl @@ -4,8 +4,8 @@ "method" : "PUT", "uri_substitutions": { "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", - "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" }, "payload" : { diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 8c129e5..5692e04 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -4,8 +4,8 @@ "method" : "POST", "uri_substitutions": { "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", - "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" }, "payload" : { diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index dfcac35..adf66ad 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -4,8 +4,8 @@ "method" : "PUT", "uri_substitutions": { "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", - "appointment_year":"${appointment.appointmentCustomFields.year?json_string}", - "appointment_number":"${appointment.appointmentCustomFields.number?json_string}" + "appointment_year":"${eventRP.appointmentCustomFields.year?json_string}", + "appointment_number":"${eventRP.appointmentCustomFields.number?json_string}" }, "payload" : { From 51198beafd35bfd0821b31ec4bc6f5ba77a45aac Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 15:02:57 +0100 Subject: [PATCH 143/183] RDV --- RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index adf66ad..518dcc7 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -1,6 +1,6 @@ { "id" : {"refid" : "${eventRP.refid?json_string}"}, - "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}, + "route" : "rest/public/v1/physical_depots/{physical_depot_code}/appointment_years/{appointment_year}/appointment_numbers/{appointment_number}", "method" : "PUT", "uri_substitutions": { "physical_depot_code": "${RPtoRFXprefixDepot(eventRP.actor)}", From 85e1dfd7d38898f926d8611b0eda8c2d9158c2ab Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 15:15:21 +0100 Subject: [PATCH 144/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index dae78de..d44c62f 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -71,14 +71,14 @@ [ <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_number> + <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", "datas" : <#include "RPtoRFX_CarrierAppointmentCanceledByNumber.ftl"> } <#else> { - <#assign apiRestReflexID = ApiRestReflexID.appointment_put_status_by_ref> + <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_ref> "apiRestReflexID" : "${apiRestReflexID}", "datas" : <#include "RPtoRFX_CarrierAppointmentCanceledByRef.ftl"> From f0f0078e08fae9ea1e1bfcb0a0f3ef4c8df86787 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 15:18:00 +0100 Subject: [PATCH 145/183] RDV --- ...dByNumberftl => RPtoRFX_CarrierAppointmentCanceledByNumber.ftl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename RPtoRFX_CarrierAppointmentCanceledByNumberftl => RPtoRFX_CarrierAppointmentCanceledByNumber.ftl (100%) diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumberftl b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl similarity index 100% rename from RPtoRFX_CarrierAppointmentCanceledByNumberftl rename to RPtoRFX_CarrierAppointmentCanceledByNumber.ftl From 8f662265197c0fb1b262653e951c6065f21f1ea0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 15:30:21 +0100 Subject: [PATCH 146/183] RDV --- RPtoRFX_CarrierAppointmentCanceledByNumber.ftl | 6 ++---- RPtoRFX_CarrierAppointmentCanceledByRef.ftl | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl index 47d1fa0..a4cf835 100644 --- a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl @@ -9,9 +9,7 @@ }, "payload" : { - "status": { - "status_code": "999", - "cancellation_reason_code": "ACS" - } + "status_code": "999", + "cancellation_reason_code": "ACS" } } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl index 34f783e..9931820 100644 --- a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl +++ b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl @@ -8,9 +8,7 @@ }, "payload" : { - "status": { - "status_code": "999", - "cancellation_reason_code": "ACS" - } + "status_code": "999", + "cancellation_reason_code": "ACS" } } \ No newline at end of file From a4b2fb2eef583c5df06dafc4c9def25f90c5792c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 16:48:11 +0100 Subject: [PATCH 147/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index d44c62f..9be7b06 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields??has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields??has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -69,7 +69,7 @@ <#case "Canceled"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?size!=0> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", From 21516ad8159b0fd256c30f5fcb3d0d764e2f2c3b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 16:57:47 +0100 Subject: [PATCH 148/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 9be7b06..cdcbf34 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields??has_content> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields??has_content> + <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", From 540a6c9da62e2073e98fca75d3a408536adac5c2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 12 Dec 2025 17:05:09 +0100 Subject: [PATCH 149/183] RDV --- RPtoRFX_AppointmentEvent.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index cdcbf34..21be0c7 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -27,7 +27,7 @@ <#case "CommissionsUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> + <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -48,7 +48,7 @@ <#case "SlotUpdated"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> + <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", @@ -69,7 +69,7 @@ <#case "Canceled"> <#assign appointment = eventRP.data /> [ - <#if eventRP.appointmentCustomFields?? && eventRP.appointmentCustomFields?has_content> + <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.status_appointment_put_update_by_number> "apiRestReflexID" : "${apiRestReflexID}", From ecb0ede86e58a058afc37ce1f6b6de8a08528055 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 12 Dec 2025 18:15:09 +0100 Subject: [PATCH 150/183] modif sur les rdz --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- ...RFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl | 2 +- RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index f545e7e..22ca324 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -34,7 +34,7 @@ <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 5692e04..3a6ba80 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -12,7 +12,7 @@ <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 16aa97a..e5b91cf 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -11,7 +11,7 @@ <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", From c15b087c684241bcba791cd9ebed0af61cce907a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 15:15:04 +0100 Subject: [PATCH 151/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 22ca324..183135b 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -36,11 +36,15 @@ "physical_receipt_list": [ <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" + <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + <#else> + "appointment_designation":"${appointment.Reason?json_string}+" "+${appointment.Commissions.Quantities.Value}${appointment.Commissions.Quantities.UnitID}" + } <#sep>, @@ -50,6 +54,7 @@ "appointment_designation":"LOADING", + "constant_appointment": "false" From 8caed06a9e5670c7c599bab7e745b34cbbf6c659 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 15:31:42 +0100 Subject: [PATCH 152/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 33 ++++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 183135b..737d609 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -33,22 +33,23 @@ <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> - { - <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" - <#else> - "appointment_designation":"${appointment.Reason?json_string}+" "+${appointment.Commissions.Quantities.Value}${appointment.Commissions.Quantities.UnitID}" - - } - <#sep>, - - ], + <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> + "physical_receipt_list": [ + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + { + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" + + } + <#sep>, + + ], + <#else> + "appointment_designation":"${appointment.Reason?json_string}+" "+${appointment.Commissions.Quantities.Value}${appointment.Commissions.Quantities.UnitID}" + <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> "appointment_designation":"LOADING", From c654ef5cf96f2f9ccab78aac4e1d1fbf2d8d8b76 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 15:38:17 +0100 Subject: [PATCH 153/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 737d609..91ccef2 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -48,7 +48,7 @@ ], <#else> - "appointment_designation":"${appointment.Reason?json_string}+" "+${appointment.Commissions.Quantities.Value}${appointment.Commissions.Quantities.UnitID}" + "appointment_designation":"${appointment.Reason?json_string}" <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> From 67fb97753d6c723cc44cb8047ed64f3aa3345a9e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 15:40:35 +0100 Subject: [PATCH 154/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 91ccef2..e99a5bd 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -48,7 +48,7 @@ ], <#else> - "appointment_designation":"${appointment.Reason?json_string}" + "appointment_designation":"${appointment.Reason?json_string}", <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> From cd7f2ecb226b15641bb316885b23159d68f9244a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 15:53:57 +0100 Subject: [PATCH 155/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index e99a5bd..72dc2f6 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -52,7 +52,11 @@ <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - "appointment_designation":"LOADING", + <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> + "appointment_designation":"LOADING", + <#else> + "appointment_designation":"${appointment.Reason?json_string}", + From 34133aabec1caf9cac4526664e657e98a98f87b3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 16:16:19 +0100 Subject: [PATCH 156/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 11 +---------- RPtoRFX_CarrierAppointmentDefaultData.ftl | 0 2 files changed, 1 insertion(+), 10 deletions(-) create mode 100644 RPtoRFX_CarrierAppointmentDefaultData.ftl diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 72dc2f6..2d56629 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -8,17 +8,13 @@ "payload" : { "appointment_reference": "${eventRP.refid?json_string}", - <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", - <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", @@ -28,9 +24,7 @@ <#default> <#stop "appointment.AppointmentType not implemented" > - - "planned_carrier" : "ABAN", <#-- "${appointment.CarrierName?json_string}", --> - + <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> @@ -59,10 +53,7 @@ - "constant_appointment": "false" - - } } diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl new file mode 100644 index 0000000..e69de29 From dbb4a21e6613cf687c14e4564ff2e27bfed4c5f5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 15 Dec 2025 17:14:37 +0100 Subject: [PATCH 157/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index c655234..c75f69d 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -93,7 +93,11 @@ <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> } ], - "Reason": "no commission", <#-- à changer --> + <#if carrier_apt.appointment_designation?? && carrier_apt.appointment_designation!=""> + "Reason": "${carrier_apt.appointment_designation?json_string}", + <#else> + "Reason": "No commission", + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> From 29e35d8ed12fb36dc310b4e45b4fd289a8e8abf5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 10:24:29 +0100 Subject: [PATCH 158/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 30 ++++-- ...FXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 16 ---- ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 92 +++++++++++++++++++ 3 files changed, 115 insertions(+), 23 deletions(-) rename RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl => RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl (87%) create mode 100644 RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 8c0acfc..d9ae3c6 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -42,23 +42,40 @@ <#-- *********************************************** Action = Update ********************--> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + <#if carrier_apt.status ?? carrier_apt.status.status_code=="999"> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceUpdateAppointment> <#-- à revoir--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + } + ] + <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> <#-- à revoir--> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl"> + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> } ] - <#else> - <#stop> <#--no comission--> <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> - <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> [ <#-- Ajout des lignes--> @@ -68,7 +85,6 @@ "datas" : <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> } - ] <#break> <#default> diff --git a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl similarity index 87% rename from RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl rename to RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index ac135e6..963902c 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceUpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -43,7 +43,6 @@ "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "Emails": ["${carrier_apt.creation_user_email?json_string}"], "CustomFields": [ { "Key": "depot", @@ -66,21 +65,6 @@ "Value": "${carrier_apt.planned_carrier?json_string}" } ], - "Reason":"", - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - "Commissions": [ - <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> - { - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", - "ProjectID": "${projectRP}", - <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - }<#sep>, - - ], - <#else> - "Reason": "no commission", <#-- à changer --> - "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl new file mode 100644 index 0000000..963902c --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -0,0 +1,92 @@ +[ + { + <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> + + "Header":{ + "ProjectID": "${projectRP}" + }, + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference!=""> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}", + <#else> + <#if carrier_apt.constant_appointment?? && carrier_apt.constant_appointment== "true"> + "AppointmentID": "${carrier_apt.appointment_reference?json_string}${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + <#else> + "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + + + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-") || carrier_apt.planned_load_end_datetime?starts_with("00") || carrier_apt.planned_load_end_datetime?contains("-00-")> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend is not initialized" > + + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> + <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> + <#if (duration <= 0)> + <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + <#else> + <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNKNOWN> + <#assign duration = 0 /> <#-- à confirmer --> + + + + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + "CustomFields": [ + { + "Key": "depot", + "Value": "${carrier_apt.physical_depot?json_string}" + }, + { + "Key": "year", + "Value": "${carrier_apt.year_number?json_string}" + }, + { + "Key": "number", + "Value": "${carrier_apt.appointment_number?json_string}" + }, + { + "Key": "reference", + "Value": "${carrier_apt.appointment_reference?json_string}" + }, + { + "Key": "carrier", + "Value": "${carrier_apt.planned_carrier?json_string}" + } + ], + "Slots": [{ + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + + + + }] + + } +] \ No newline at end of file From 7f3d3abb0891769dc3ee7cd685a08545d2535ead Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 10:33:00 +0100 Subject: [PATCH 159/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index d9ae3c6..0e1d5c8 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -42,7 +42,7 @@ <#-- *********************************************** Action = Update ********************--> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> - <#if carrier_apt.status ?? carrier_apt.status.status_code=="999"> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="999"> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> From 17ae3b23bf56ee78b623945e2f499100f00c42b5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 10:37:07 +0100 Subject: [PATCH 160/183] rdv --- RFXtoRP_HsrCarrierApt.ftl | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 0e1d5c8..bdca7af 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -45,12 +45,12 @@ <#if carrier_apt.status?? && carrier_apt.status.status_code=="999"> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteCancelAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_SiteCancelAppointment.ftl"> } - ] + ] <#else> <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> [ @@ -61,18 +61,18 @@ <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> } ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> <#-- à revoir--> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } - ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> <#-- à revoir--> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } + ] + <#break> - <#case "D"> <#-- *********************************************** Action = Delete ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> From 59d170c599b2532bdc98d912cc60152dbed49600 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 11:17:02 +0100 Subject: [PATCH 161/183] RDV --- RFXtoRP_HsaLstCarSta.ftl | 28 +++--- RFXtoRP_HsrCarrierApt.ftl | 92 ++++++++++++++++--- ...RP_HsrCarrierApt_UpdateSlotAppointment.ftl | 57 ++++-------- 3 files changed, 109 insertions(+), 68 deletions(-) diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 1e41f4f..a8aa244 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -25,44 +25,44 @@ [ { <#switch carrier_apt_status.status.carrier_status_code> - <#case "010"> <#-- Carrier Expected --> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> <#-- à revoir --> + <#case "010"> <#--Carrier Expected --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierExpected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_CarrierExpected.ftl"> <#break> - <#case "020"> <#-- Carrier Arrived--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> <#-- à revoir --> + <#case "020"> <#--Carrier Arrived--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> <#break> - <#case "040"> <#-- Unloading Started --> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> <#-- à revoir --> + <#case "040"> <#--Unloading Started --> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> <#break> - <#case "050"> <#-- Unloading Completed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> <#-- à revoir --> + <#case "050"> <#--Unloading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> <#break> - <#case "060"> <#-- Loading Started--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> <#-- à revoir --> + <#case "060"> <#--Loading Started--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> <#break> - <#case "070"> <#-- Loading Completed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> <#-- à revoir --> + <#case "070"> <#--Loading Completed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> <#break> - <#case "090"> <#-- Carrier Departed--> - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> <#-- à revoir --> + <#case "090"> <#--Carrier Departed--> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index bdca7af..1151a65 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -52,24 +52,90 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived--> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> } ] <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> <#-- à revoir--> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } - ] + <#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started --> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> + } + ] + <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } + ] + + + + + + <#break> diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index 963902c..5885216 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -1,7 +1,6 @@ [ { <#assign creation_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.creation_datetime,time_zone_rfx) /> - "Header":{ "ProjectID": "${projectRP}" }, @@ -42,50 +41,26 @@ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", - "CustomFields": [ - { - "Key": "depot", - "Value": "${carrier_apt.physical_depot?json_string}" - }, - { - "Key": "year", - "Value": "${carrier_apt.year_number?json_string}" - }, - { - "Key": "number", - "Value": "${carrier_apt.appointment_number?json_string}" - }, - { - "Key": "reference", - "Value": "${carrier_apt.appointment_reference?json_string}" - }, - { - "Key": "carrier", - "Value": "${carrier_apt.planned_carrier?json_string}" - } - ], "Slots": [{ - <#-- calcul de de la durée en fonction des start et end time--> - "DurationInSeconds": "${duration}", - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > - <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> - <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > - - - "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#-- calcul de de la durée en fonction des start et end time--> + "DurationInSeconds": "${duration}", + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false" > + <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-")> + <#stop "planned_unloading_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_unloading_start_datetime}" + <#else> + <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> + <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> + <#stop "planned_load_start_datetime field of appointmend is not initialized" > + + "StartDateTime": "${carrier_apt.planned_load_start_datetime}" <#else> - <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true"> - <#if carrier_apt.planned_load_start_datetime?starts_with("00") || carrier_apt.planned_load_start_datetime?contains("-00-")> - <#stop "planned_load_start_datetime field of appointmend is not initialized" > - - "StartDateTime": "${carrier_apt.planned_load_start_datetime}" - <#else> - <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> - <#stop "Not managed"> - + <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> + <#stop "Not managed"> + }] } From f7d10368f2f56cf18e9758f46d8ecac1cafe0cca Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 16 Dec 2025 11:17:22 +0100 Subject: [PATCH 162/183] modif sur les rdz --- RPtoRFX_CarrierAppointmentCreated.ftl | 12 ++++++------ RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 12 ++++++------ RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 2d56629..dca6fc1 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -12,14 +12,14 @@ <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}", + "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#default> <#stop "appointment.AppointmentType not implemented" > @@ -42,14 +42,14 @@ ], <#else> - "appointment_designation":"${appointment.Reason?json_string}", + "appointment_designation":"${(appointment.Reason!"")!?json_string}", <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> "appointment_designation":"LOADING", <#else> - "appointment_designation":"${appointment.Reason?json_string}", + "appointment_designation":"${(appointment.Reason!"")?json_string}", diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index 518dcc7..1903106 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -14,17 +14,17 @@ "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" - + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" - <#break> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl index f4a82a1..ee02014 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -13,17 +13,17 @@ "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_load_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" - + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(appointment.Slot.StartDateTime,time_zone_rfx)}", - "planned_unloading_end_datetime": "${AddSecondsToDatetime(appointment.Slot.StartDateTime?datetime.iso,appointment.Slot.DurationInSeconds?number)?iso_nz(time_zone_rfx)}" - <#break> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From f242bf0d950c2ac3bd0dfea7fcc2fca6fc4f4f15 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 11:30:16 +0100 Subject: [PATCH 163/183] RDV --- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 18 ++++++++++++++++++ ...RP_HsrReceiptList_ExecutionflowDetected.ftl | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 963902c..b55a4b5 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -65,6 +65,24 @@ "Value": "${carrier_apt.planned_carrier?json_string}" } ], + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + }<#sep>, + + ], + <#else> + <#stop> + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index d93f41f..b8b8924 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -29,7 +29,7 @@ <#if receipt.receipt_type == '020'> "ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}" <#else> - "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}" + "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}" }, "ShipTo" : From 574cc16f1054cd3b482f20aaefef638f65cd1414 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 11:36:07 +0100 Subject: [PATCH 164/183] RDV --- RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl index 5885216..ba02b47 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl @@ -13,6 +13,7 @@ "AppointmentID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number}${carrier_apt.appointment_number}", + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "false"> <#if carrier_apt.planned_unloading_start_datetime?starts_with("00") || carrier_apt.planned_unloading_start_datetime?contains("-00-") || carrier_apt.planned_unloading_end_datetime?starts_with("00") || carrier_apt.planned_unloading_end_datetime?contains("-00-")> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend is not initialized" > From 32c47dcf22ec95e8bcb58ef1ae47c8933bf61f84 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 11:46:18 +0100 Subject: [PATCH 165/183] RDV --- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index b55a4b5..fd60887 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -79,7 +79,7 @@ "ProjectID": "${projectRP}", }<#sep>, - ], + ] <#else> <#stop> From d6331bd8caaa4678cabcf92b9f57106f31d9f65d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 11:49:36 +0100 Subject: [PATCH 166/183] RDV --- RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index fd60887..d175b83 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -76,10 +76,10 @@ "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", - "ProjectID": "${projectRP}", + "ProjectID": "${projectRP}" }<#sep>, - ] + ], <#else> <#stop> From 55c3d24f791edbc01e492d08279d655cf6233363 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 16:41:29 +0100 Subject: [PATCH 167/183] RDV --- RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 6 +++--- RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index 1903106..981aa7d 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -15,15 +15,15 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl index ee02014..661faa3 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -14,15 +14,15 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 3504515b0332b238813c51bc170b0df3ce0d10d5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 16:56:47 +0100 Subject: [PATCH 168/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 1151a65..4a85076 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -42,6 +42,14 @@ <#-- *********************************************** Action = Update ********************--> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier_apt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCustomFieldsUpdated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> + } + ], <#if carrier_apt.status?? && carrier_apt.status.status_code=="999"> [ { From e73fb15ffe0dc78932ebfac7500a3341f97d3471 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 17:13:31 +0100 Subject: [PATCH 169/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index dca6fc1..c2f881d 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -29,13 +29,13 @@ <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> + <#list eventRP.executionflowCustomFields.entrySet() as custom> { - "receipt_activity": "${custom.value.activity_code?json_string}", - "originator_code": "${custom.value.originator_code?json_string}", - "physical_receipt_reference": "${custom.value.reference?json_string}", - "receipt_year": "${custom.value.order_year?json_string}", - "receipt_number": "${custom.value.order_number?json_string}" + "receipt_activity": "${custom.value.activity_code?json_string}", + "originator_code": "${custom.value.originator_code?json_string}", + "physical_receipt_reference": "${custom.value.reference?json_string}", + "receipt_year": "${custom.value.order_year?json_string}", + "receipt_number": "${custom.value.order_number?json_string}" } <#sep>, From f46aa46ae48e026653f101664070aea8505de52d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 17:24:58 +0100 Subject: [PATCH 170/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index c2f881d..a1a0012 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -27,9 +27,9 @@ <#include "RPtoRFX_CarrierAppointmentDefaultData.ftl"> <#if appointment.Commissions??> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_UNLOADING"> - <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> + <#if appointment.Commissions[0].OrderID?? && appointment.Commissions[0].OrderID!=""> "physical_receipt_list": [ - <#list eventRP.executionflowCustomFields.entrySet() as custom> + <#list eventRP.executionflowCustomFields.entrySet()?filter(l ->l.value?? && l.value?has_content) as custom> { "receipt_activity": "${custom.value.activity_code?json_string}", "originator_code": "${custom.value.originator_code?json_string}", From 91d134d02dd701865f5961308de1e12ac8aafea8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 16 Dec 2025 17:49:00 +0100 Subject: [PATCH 171/183] RDV --- ..._CarrierAppointmentSlotUpdatedByNumber.ftl | 21 ++++++++----------- ...RFX_CarrierAppointmentSlotUpdatedByRef.ftl | 21 ++++++++----------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index 981aa7d..736d4b9 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -11,20 +11,17 @@ { <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - - "unloading_appointment" : "false", - "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" - + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" - <#break> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl index 661faa3..c65b8d4 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -10,20 +10,17 @@ { <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> - - "unloading_appointment" : "false", - "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" - + "unloading_appointment" : "false", + "load_appointment" : "true", + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" <#break> - <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" - <#break> + "unloading_appointment" : "true", + "load_appointment" : "false", + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 68e695c084b66b044a8a03b803146e76e712f3eb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 08:57:15 +0100 Subject: [PATCH 172/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 4a85076..e0ae6d3 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -48,8 +48,7 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrCarrierApt_AppointmentCustomFieldsUpdated.ftl"> - } - ], + }, <#if carrier_apt.status?? && carrier_apt.status.status_code=="999"> [ { @@ -146,6 +145,7 @@ + ] <#break> <#case "D"> <#-- *********************************************** Action = Delete ******************** --> From 29aa9fa18724ad893b2c40264ebdecc0f5749fdf Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 09:31:24 +0100 Subject: [PATCH 173/183] RDV --- RPtoRFX_CarrierAppointmentCanceledByRef.ftl | 2 +- RPtoRFX_CarrierAppointmentCancellationCode.ftl | 2 ++ RPtoRFX_CarrierAppointmentDefaultData.ftl | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 RPtoRFX_CarrierAppointmentCancellationCode.ftl diff --git a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl index 9931820..74d5a4e 100644 --- a/RPtoRFX_CarrierAppointmentCanceledByRef.ftl +++ b/RPtoRFX_CarrierAppointmentCanceledByRef.ftl @@ -9,6 +9,6 @@ "payload" : { "status_code": "999", - "cancellation_reason_code": "ACS" + <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> } } \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentCancellationCode.ftl b/RPtoRFX_CarrierAppointmentCancellationCode.ftl new file mode 100644 index 0000000..79d6747 --- /dev/null +++ b/RPtoRFX_CarrierAppointmentCancellationCode.ftl @@ -0,0 +1,2 @@ +<#-- To custom with cancellation reason code--> +"cancellation_reason_code": "" \ No newline at end of file diff --git a/RPtoRFX_CarrierAppointmentDefaultData.ftl b/RPtoRFX_CarrierAppointmentDefaultData.ftl index e69de29..b773333 100644 --- a/RPtoRFX_CarrierAppointmentDefaultData.ftl +++ b/RPtoRFX_CarrierAppointmentDefaultData.ftl @@ -0,0 +1,14 @@ +<#-- Note : you can use Order Line Metadata, using the define map : Line_MetaData_Map --> +<#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map --> + +<#-- How to use MD or SK map + Example : + <#assign owner_code = SegmentationKeys_Map["Owner"].String!""/> + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String +--> \ No newline at end of file From 95ba5b5990f35e6efeb86ed1a594e8ff0f57d0f7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 09:31:47 +0100 Subject: [PATCH 174/183] RDV --- RPtoRFX_CarrierAppointmentCanceledByNumber.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl index a4cf835..4431a3b 100644 --- a/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentCanceledByNumber.ftl @@ -10,6 +10,6 @@ "payload" : { "status_code": "999", - "cancellation_reason_code": "ACS" + <#include "RPtoRFX_CarrierAppointmentCancellationCode.ftl"> } } \ No newline at end of file From 9d3c53699320f57e2a658e4d1aa71ffd3599071a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 09:48:14 +0100 Subject: [PATCH 175/183] RDV --- RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index 736d4b9..ad62a1c 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -20,7 +20,7 @@ "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime" "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" <#break> <#default> <#stop "appointment.AppointmentType not implemented" > From 1006b619d88c23b6c438f8697a21ed274bc43701 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 09:59:24 +0100 Subject: [PATCH 176/183] RDV --- RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl | 5 +++-- RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index ad62a1c..efd5dfc 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -14,16 +14,17 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#default> <#stop "appointment.AppointmentType not implemented" > + "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl index c65b8d4..b7f102d 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -13,16 +13,17 @@ "unloading_appointment" : "false", "load_appointment" : "true", "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}" + "planned_unloading_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", <#break> <#default> <#stop "appointment.AppointmentType not implemented" > + "appointment_designation":"${(appointment.Reason!"")!?json_string}" } } From 0ac201dbc582e70f1fc80d967d098cd19ff9aa39 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 13:29:07 +0100 Subject: [PATCH 177/183] RDV --- RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl index c75f69d..bb3c20b 100644 --- a/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_SiteForceBookAppointment.ftl @@ -81,7 +81,6 @@ "ProjectID": "${projectRP}", <#include "RFXtoRP_HsrCarrierApt_Quantities.ftl"> - ] }<#sep>, ], From 793abba25f03fa930685a542b6f9336ed67fabe8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 17:00:04 +0100 Subject: [PATCH 178/183] RDV --- RPtoRFX_CarrierAppointmentCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index a1a0012..017cee7 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -46,7 +46,7 @@ <#else> <#if appointment.AppointmentType == "APPOINTMENT_TYPE_LOADING"> - <#if appointment.Commissions.OrderID ?? && appointment.Commissions.OrderID!=""> + <#if appointment.Commissions[0].OrderID ?? && appointment.Commissions[0].OrderID!=""> "appointment_designation":"LOADING", <#else> "appointment_designation":"${(appointment.Reason!"")?json_string}", From 608bbb4aeea1e885a2b9d274774936646165c22c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 17:16:45 +0100 Subject: [PATCH 179/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 92 +++----------------- RFXtoRP_HsrCarrierApt_CarrierArrived.ftl | 22 +++++ RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl | 22 +++++ RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl | 22 +++++ RFXtoRP_HsrCarrierApt_LoadingStarted.ftl | 22 +++++ RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl | 22 +++++ RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl | 22 +++++ 7 files changed, 145 insertions(+), 79 deletions(-) create mode 100644 RFXtoRP_HsrCarrierApt_CarrierArrived.ftl create mode 100644 RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_LoadingStarted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl create mode 100644 RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index e0ae6d3..6d19796 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -59,90 +59,24 @@ } ] <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived--> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierArrived.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> } ] <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started --> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_UnloadingStarted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_UnloadingCompleted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_LoadingStarted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_LoadingCompleted.ftl"> - } - ] - <#else> - <#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed--> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaLstCarSta_CarrierDeparted.ftl"> - } - ] - <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> - } - ] - <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } - ] - - - - - - + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } + ] ] diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl new file mode 100644 index 0000000..256ab68 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl new file mode 100644 index 0000000..c39c0c3 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -0,0 +1,22 @@ +[ + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> + "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#else> + "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + + "RefDate": { + "DateTime": "${ref_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload":{ + "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + } + } +] \ No newline at end of file From a3283f55314b4f771f981325d456b1f2c557639e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 17 Dec 2025 17:23:59 +0100 Subject: [PATCH 180/183] RDV --- RFXtoRP_HsrCarrierApt.ftl | 92 +++++++++++++++++--- RFXtoRP_HsrCarrierApt_CarrierArrived.ftl | 10 +-- RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl | 12 +-- RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl | 12 +-- RFXtoRP_HsrCarrierApt_LoadingStarted.ftl | 12 +-- RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl | 12 +-- RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl | 12 +-- 7 files changed, 114 insertions(+), 48 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 6d19796..fca7621 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -59,24 +59,90 @@ } ] <#else> - <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="100"> <#--Carrier Arrived--> [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierArrived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_CarrierArrived.ftl"> } ] <#else> - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> - } - ] + <#if carrier_apt.status?? && carrier_apt.status.status_code=="210"> <#--Unloading Started --> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="290"><#--Unloading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentUnloadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="310"><#--Loading Started--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingStarted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_LoadingStarted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="390"><#--Loading Completed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentLoadingCompleted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl"> + } + ] + <#else> + <#if carrier_apt.status?? && carrier_apt.status.status_code=="500"><#--Carrier Departed--> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.AppointmentCarrierDeparted> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl"> + } + ] + <#else> + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteWMSUpdateAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl"> + } + ] + <#else> + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.SiteForceRescheduleAppointment> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrCarrierApt_UpdateSlotAppointment.ftl"> + } + ] + + + + + + ] diff --git a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl index 256ab68..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierArrived.ftl @@ -1,14 +1,14 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", "RefDate": { "DateTime": "${ref_datetime}", @@ -16,7 +16,7 @@ } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl index c39c0c3..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl +++ b/RFXtoRP_HsrCarrierApt_CarrierDeparted.ftl @@ -1,22 +1,22 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - "RefDate": { + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl index c39c0c3..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingCompleted.ftl @@ -1,22 +1,22 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - "RefDate": { + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl index c39c0c3..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_LoadingStarted.ftl @@ -1,22 +1,22 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - "RefDate": { + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl index c39c0c3..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingCompleted.ftl @@ -1,22 +1,22 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - "RefDate": { + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl index c39c0c3..afdefe6 100644 --- a/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl +++ b/RFXtoRP_HsrCarrierApt_UnloadingStarted.ftl @@ -1,22 +1,22 @@ [ - <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt_status.status.creation_datetime,time_zone_rfx) /> + <#assign ref_datetime = RfxDateTimetoUTCWithTimezone(carrier_apt.metadata.last_update_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if carrier_apt_status.appointment_reference?? && carrier_apt_status.appointment_reference !=""> - "RefID": "${carrier_apt_status.appointment_reference?json_string}", + <#if carrier_apt.appointment_reference?? && carrier_apt.appointment_reference !=""> + "RefID": "${carrier_apt.appointment_reference?json_string}", <#else> - "RefID": "${carrier_apt_status.physical_depot?json_string}${carrier_apt_status.appointment_year_number?json_string}${carrier_apt_status.appointment_number?json_string}", + "RefID": "${carrier_apt.physical_depot?json_string}${carrier_apt.year_number?json_string}${carrier_apt.appointment_number?json_string}", - "RefDate": { + "RefDate": { "DateTime": "${ref_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload":{ - "ActorID": "${RFXtoRPprefixDepot(carrier_apt_status.physical_depot?json_string)}" + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}" } } ] \ No newline at end of file From b2afedf9f83a8ed6832c80cb9474aa6eafe15ff0 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 17 Dec 2025 17:24:26 +0100 Subject: [PATCH 181/183] modif sur les rdz --- RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index c196fce..cf1ae16 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -2,7 +2,6 @@ <#-- How to use MD Header map Example : -<<<<<<< HEAD <#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/> If your MD is : @@ -17,14 +16,6 @@ <#assign activity_code = "ALI"/> <#assign originator_code = "001"/> -======= - <#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/> ---> - - -<#assign activity_code = "ALI"/> -<#assign originator_code = "DEPT ALIM"/> ->>>>>>> main <#assign preparation_type_code = "010"/> <#assign requested_delivery_date_type = "010"/> <#assign consolidated_delivery_flag ="false"/> @@ -32,7 +23,6 @@ <#assign protected_flag ="false"/> <#assign automatic_generation_flag ="false"/> <#assign apt_with_end_consignee_flag="false"/> -<<<<<<< HEAD <#-- A supprimer si utilisation de la table de correspondance--> <#--To be deleted if using the correspondence table--> @@ -55,6 +45,3 @@ Assigning to a load if you set up Load Grouping+Distribution Master Plan--> -======= -<#assign load_grouping = "STD"/> ->>>>>>> main From 437a39f11553ab1d01da1d97b07eed124982dd00 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Wed, 17 Dec 2025 17:44:23 +0100 Subject: [PATCH 182/183] modif sur les rdz --- RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index c196fce..cf1ae16 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -2,7 +2,6 @@ <#-- How to use MD Header map Example : -<<<<<<< HEAD <#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/> If your MD is : @@ -17,14 +16,6 @@ <#assign activity_code = "ALI"/> <#assign originator_code = "001"/> -======= - <#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/> ---> - - -<#assign activity_code = "ALI"/> -<#assign originator_code = "DEPT ALIM"/> ->>>>>>> main <#assign preparation_type_code = "010"/> <#assign requested_delivery_date_type = "010"/> <#assign consolidated_delivery_flag ="false"/> @@ -32,7 +23,6 @@ <#assign protected_flag ="false"/> <#assign automatic_generation_flag ="false"/> <#assign apt_with_end_consignee_flag="false"/> -<<<<<<< HEAD <#-- A supprimer si utilisation de la table de correspondance--> <#--To be deleted if using the correspondence table--> @@ -55,6 +45,3 @@ Assigning to a load if you set up Load Grouping+Distribution Master Plan--> -======= -<#assign load_grouping = "STD"/> ->>>>>>> main From d94ba653076d06293e5bcf8fb3ea905c31bf0067 Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Thu, 18 Dec 2025 09:05:13 +0100 Subject: [PATCH 183/183] Release 2.0.14+1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 761f86f..e91986d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.13+1 +2.0.14+1